Skip to content

Add experimental global Moran’s I for raster contiguity - #3775

Open
umrndem wants to merge 1 commit into
xarray-contrib:mainfrom
umrndem:feat/1135-global-moran
Open

umrndem wants to merge 1 commit into
xarray-contrib:mainfrom
umrndem:feat/1135-global-moran

Conversation

@umrndem

@umrndem umrndem commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Refs #1135.

Proposed Changes

  • Add xrspatial.experimental.moran for global Moran's I with rook/queen contiguity and binary or row-standardized weights.
  • Support NumPy, CuPy and both Dask backends, returning a scalar DataArray and keeping Dask lazy.
  • Add docs, a benchmark and 138 tests. PySAL reference checks and 240 backend comparisons pass.

This is an initial part of #1135, which is marked for after 1.0. LISA, Geary's C, join counts, distance-band weights and significance tests remain follow-up work.

AI-assisted review notes

Applied the project's numerical-validation and backend-parity workflows. Review led to avoiding a redundant float64 copy and rejecting unsupported extended-precision inputs. All implemented backend checks pass.

@umrndem
umrndem marked this pull request as ready for review December 2, 2026 08:51
@brendancol

Copy link
Copy Markdown
Contributor

@umrndem hey hey nice stuff. I'm going to flag this for merge after the 1.0.0 release but excited to have it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants