Skip to content

Update to Numpy > 2.0.0 and adding a pyproject.toml file for easier installation - #1212

Open
DARKMOONlite wants to merge 2 commits into
nutonomy:masterfrom
DARKMOONlite:master
Open

DARKMOONlite wants to merge 2 commits into
nutonomy:masterfrom
DARKMOONlite:master

Conversation

@DARKMOONlite

Copy link
Copy Markdown

Found an overflow bug when running this package locally with numpy 2.0.0
Fixed it, just by casting directly to a uint16 as older version of numpy would automatically promote the type from a np.uint8 to a np.uint16

panop_labels[stuff_msk] = np.uint16(lidar_seg.labels[stuff_msk]) * 1000

I have also run ruff, to check for any obvious namespace changes. and tried adding np._set_promotion_state("weak_and_warn") to all existing tests to detect if there were any other random type promotions, but didn't find any

This is not intended as a complete fix, as I have not checked the NuImages code,
Just leaving this here for anyone who really wants to use NuScenes with Numpy 2.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant