Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH: add np.array_info utility for quick array summaries #29206

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

proenca555
Copy link

We propose the implementation of a new utility function np.array_info(). This function provides a quick
summary of the structure and content of ndarray objects. np.array_info(array) will return a dictionary of useful information and basic statistics.

We propose the implementation of a new utility function
np.array_info(). This function provides a quick
summary of the structure and content of ndarray objects.
np.array_info(array) will return a dictionary of useful
information and basic statistics.

Signed-off-by: Tiago Proença <[email protected]>
Co-authored-by: Bernardo Simões  <[email protected]>
@WarrenWeckesser
Copy link
Member

FYI: A similar request was made in #23245, although there the requested function would print the information instead of returning a dict. It was pointed out there that the function info already did what was requested.

@ngoldbaum
Copy link
Member

Generally new NumPy API additions require at least a GitHub issue and a ping to the NumPy mailing list. Before spending a bunch of time implementing an idea, it's best to open an issue or check the history or issues to make sure it's a worthwhile endeavor.

Questions that would need to be answered before this gets added:

  • Can you clarify more why someone would want to use this function rather than info as Warren linked?

  • What problems does this solve that are hard to solve right now?

  • Why does this need to live in NumPy rather than a third-party package?

Also you need to document this (it will not automatically be picked up by the API docs), add a release note, and make sure the tests are all passing before this is mergeable.

All that said, I'll go ahead and mark this as draft.

@ngoldbaum ngoldbaum marked this pull request as draft June 20, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs decision
Development

Successfully merging this pull request may close these issues.

3 participants