Skip to content

Array.values(axes=0) is buggy #1093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gdementen opened this issue Feb 1, 2024 · 0 comments
Closed

Array.values(axes=0) is buggy #1093

gdementen opened this issue Feb 1, 2024 · 0 comments

Comments

@gdementen
Copy link
Contributor

Array.items(axes=0) is broken too but that's just a consequence of this bug

>>> arr = la.ndtest((2, 3))
>>> arr
a\b  b0  b1  b2
 a0   0   1   2
 a1   3   4   5
>>> r = arr.values(axes=0)
>>> assert r[0].equals(arr['a0'])
AssertionError: 

Problem is at line 3437:

        elif not axes:

should be:

        elif len(axes) == 0:

and should happen after axes = (axes,)

Current workaround:

r = arr.values(axes=[0])
@gdementen gdementen added this to the 0.35 milestone Feb 1, 2024
@gdementen gdementen modified the milestones: 0.35, 0.34.3 Jun 19, 2024
@gdementen gdementen self-assigned this Jul 2, 2024
gdementen added a commit to gdementen/larray that referenced this issue Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant