Skip to content

Fix Python 3.10+ and NumPy 1.24+ deprecations#106

Open
Mr-Neutr0n wants to merge 1 commit intoStanfordASL:masterfrom
Mr-Neutr0n:fix/python-numpy-deprecations
Open

Fix Python 3.10+ and NumPy 1.24+ deprecations#106
Mr-Neutr0n wants to merge 1 commit intoStanfordASL:masterfrom
Mr-Neutr0n:fix/python-numpy-deprecations

Conversation

@Mr-Neutr0n
Copy link

Summary

  • Fixes compatibility issues with Python 3.10+ and NumPy 1.24+
  • Addresses deprecation warnings and import errors

Changes

  • data_structures.py: Move Sequence import from collections to collections.abc

    • Sequence was moved to collections.abc in Python 3.3 and importing from collections raises a DeprecationWarning in Python 3.10+ (and will be removed in Python 3.12)
  • scene_graph.py: Replace deprecated np.float with np.float64

    • np.float was deprecated in NumPy 1.20 and removed in NumPy 1.24
    • Affects dist_cube and node_attention_mat array creation

Test plan

  • Verify imports work on Python 3.10+
  • Verify NumPy operations work with NumPy 1.24+

Fixes #87

🤖 Generated with Claude Code

- Replace deprecated np.float with np.float64 in scene_graph.py
- Move Sequence import from collections to collections.abc for
  Python 3.10+ compatibility

Fixes StanfordASL#87

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Mr-Neutr0n
Copy link
Author

checking in on this — fixes both Python 3.10+ (collections.Mapping moved) and NumPy 1.24+ (np.bool/np.int removed) deprecations. tests should still pass fine

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import error and np.float deprecated

1 participant