Skip to content
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

Visibility of user defined attributes in numpy ndarray subclasses #1754

Open
LeMuellerGuy opened this issue Dec 4, 2024 · 1 comment
Open
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@LeMuellerGuy
Copy link

Hello everyone,

I'm not 100% sure if this is the correct address to make this request but the issue/request I have is as follows:
When subclassing numpy arrays to add attributes/properties on top of the numpy array, all of the properties get packed into the __internals__ special variable. While all values are gathered and correctly displayed, it is quite inconvenient to have them be bunched into the __internals__ variable.

I included the two example images to show the problem:

Where the attribute is located:
Image

vs. where you probably want to see the attribute:
Image

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Dec 4, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Dec 4, 2024

That code lives here:

Not sure if we can detect attributes that are internal or not correctly. The info attribute seems like it should be at the top level but that code is just showing all of the data in the __dict__ as part of the __internals__.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants