Skip to content

BUG: Replace deprecated np.row_stack with np.vstack for NumPy 1.25+ compatibility #429

@samay2504

Description

@samay2504

Description

The np.row_stack function is an alias for np.vstack that was officially deprecated in NumPy 1.25. esda uses np.row_stack in multiple places:

  • esda/crand.py
  • esda/moran_local_mv.py

When tests are run using NumPy versions >= 1.25, DeprecationWarnings are thrown, contributing to noisy CI output.

To Reproduce

Run tests via pytest with a modern NumPy installation (e.g., 1.26 or 2.0+).
D:\Projects2.0\Gsoc\NumFocus\esda\esda\crand.py:560: DeprecationWarning: \row_stack` alias is deprecated. Use `np.vstack` directly.`

Expected behavior

The codebase should natively use np.vstack to suppress deprecation warnings and maintain future compatiblity when np.row_stack is permanently removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions