Skip to content

Fix mutable default <class 'numpy.ndarray'> for field grid_min is not allowed: use default_factory#78

Open
Petros626 wants to merge 1 commit intozenseact:mainfrom
Petros626:patch-1
Open

Fix mutable default <class 'numpy.ndarray'> for field grid_min is not allowed: use default_factory#78
Petros626 wants to merge 1 commit intozenseact:mainfrom
Petros626:patch-1

Conversation

@Petros626
Copy link

For users of Numpy 2.x the np.cast functions are deprecated, also to use mutable default (e.g. a np.ndarray) directly as default value for a field in a @DataClass can't be done.

#69

…use mutable default (e.g. a np.ndarray) directly as default value for a field in a @DataClass can't be done.
Copy link

@jarix jarix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested these changes and they make it possible to get the devkit_tutorial BEV visualization to work with numpy versions >= 2.0 . Would like to see this merged.

@Petros626
Copy link
Author

Petros626 commented Feb 4, 2026

I've tested these changes and they make it possible to get the devkit_tutorial BEV visualization to work with numpy versions >= 2.0 . Would like to see this merged.

Thank you, hopefully they accept it soon.

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.

2 participants