[SciPy-Dev] NearestNDInterpolator refuses to handle (N,1) arrays

David Huard david.huard@gmail....
Fri Sep 2 15:10:33 CDT 2011


Hi,

In version 0.9.0, the NearestNDInterpolator class raises an error if
given arrays of shape (N,1). The error is raised by _check_init_shape

        if points.shape[1] < 2:
            raise ValueError("input data must be at least 2-D")

but the KDTree implementation that is used for interpolation can
handle (N,1) arrays. I'm wondering if there is a reason for not
allowing those cases through or it's just an oversight.

Thanks,

David


More information about the SciPy-Dev mailing list