Skip to content

Docs: mahalanobis() docstring has no Examples section and no NaN note #3579

Description

@brendancol

The public mahalanobis() function in xrspatial/mahalanobis.py documents Parameters and Returns but has no Examples section. Peer utility functions like normalize.rescale and normalize.standardize carry a runnable example. The function also propagates NaN in a specific way the docstring never mentions, even though test_nan_propagation pins that behavior.

Found by the documentation sweep.

Gaps:

  • No Examples section. Other public functions in the package include a .. sourcecode:: python block; this one does not.
  • NaN handling is undocumented. A pixel comes out NaN if any band is non-finite there, and auto-computed statistics only use pixels finite across all bands (needs at least N+1).
  • The name parameter does not show its default. Peers write name : str, default='...'.

Scope is documentation only. No behavior changes. The Returns dtype/shape claim and the four-backend claim already match the ArrayTypeFunctionMapping dispatch, so I left those alone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions