Skip to content

Silent bad value in IGroup arithmetics with NumPy >= 2.1 #1173

@gdementen

Description

@gdementen

I am still unsure whether that's a bug in NumPy or not (see numpy/numpy#31036), but I can easily workaround it by not "forwarding" __array_interface__ in Group.__getattr__ to the underlying value.

>>> age = la.Axis('age=0..3')
>>> # ok
... np.int64(1) - age[2]
-1
>>> # bad
... np.int64(1) - age.i[2]
0
>>> # bad
... np.int64(1) - age[np.int64(2)]
0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions