Skip to content

Inf vs NaN #721

@sfinkens

Description

@sfinkens

Currently pyproj returns inf whenever a projection operation fails, which is coherent with the behaviour of PROJ. However, I could see some benefits from changing this to NaN, see OSGeo/PROJ#2376.

Since the PROJ developers are cautious making such a breaking change, would it be an option to expose NaN instead of inf in pyproj? Downstream applications using np.isfinite to filter invalid values would not be affected, since this also filters NaN. It would be a breaking change for users checking lat > 90 for instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalIdea for a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions