#7583·Open3D

compute_fpfh_feature stub incorrectly requires the optional indices argument

Author: 314systemsCreated Sep 28, 2026Updated Sep 28, 2026
Labelsbug

Checklist

Describe the issue

In Open3D 0.20.0, the bundled type stub for compute_fpfh_feature declares indices as a required argument, although the Python binding defaults it to None.

As a result, pyrefly reports missing-argument for a valid call that omits indices.

The annotation also does not allow None, so both the default value and the nullable type appear to be missing.

Steps to reproduce the bug

Run pyrefly on the following code:

python
import open3d as o3d

def compute_features(point_cloud: o3d.geometry.PointCloud):
    return o3d.pipelines.registration.compute_fpfh_feature(
        point_cloud,
        o3d.geometry.KDTreeSearchParamHybrid(radius=0.25, max_nn=100),
    )

Error message

Pyrefly reports that the indices argument is missing.

Image

The bundled open3d/pybind/pipelines/registration.pyi contains:

python
def compute_fpfh_feature(
    input: open3d.pybind.geometry.PointCloud,
    search_param: open3d.pybind.geometry.KDTreeSearchParam,
    indices: collections.abc.Sequence[typing.SupportsInt],
) -> Feature:
    ...

However, the Python binding declares "indices"_a = py::none():

https://github.com/isl-org/Open3D/blob/main/cpp/pybind/pipelines/registration/feature.cpp#L65-L67

PR #7118 introduced indices as an optional argument. When omitted, features are computed for the entire point cloud.

Expected behavior

The stub should reflect the runtime API, for example:

python
indices: collections.abc.Sequence[typing.SupportsInt] | None = None

Both omitting indices and explicitly passing indices=None should pass type checking.

Open3D, Python and System information

  • Open3D: 0.20.0
  • Python: 3.13
  • Type checker: pyrefly

Additional information

AI generated issue.