GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ENH: Add array API standard v2022.12 support to numpy.array_api by charris · Pull Request #23955 · numpy/numpy

ENH: Add array API standard v2022.12 support to numpy.array_api #23955

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.

Sign up for GitHub

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

Merged
charris merged 15 commits into numpy:maintenance/1.25.x from charris:backport-23881
Jun 15, 2023

Uh oh!

There was an error while loading. Please reload this page.

Merged

ENH: Add array API standard v2022.12 support to numpy.array_api #23955

Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
3196b22
Bump array API version in numpy.array_api
asmeurer Jun 5, 2023
7760e8e
Add complex dtypes to numpy.array_api result_type
asmeurer Jun 5, 2023
b2ca2c5
Add complex dtypes to the array_api top-level namespace
asmeurer Jun 5, 2023
b48d390
Update numpy.array_api magic methods for complex numbers
asmeurer Jun 5, 2023
d6bd130
Add conj, imag, and real functions to numpy.array_api
asmeurer Jun 5, 2023
69775d1
Update numpy.array_api sum() and prod() to handle complex dtypes
asmeurer Jun 6, 2023
3dd0aec
Add isdtype() to numpy.array_api
asmeurer Jun 6, 2023
cc94010
Add a release notes entry
asmeurer Jun 6, 2023
1fe2771
Update dtype strictness for complex numbers in array_api elementwise …
asmeurer Jun 6, 2023
235cf14
Update dtype strictness for array_api statistical functions
asmeurer Jun 6, 2023
224f708
Update dtype strictness in array_api searching and sorting functions
asmeurer Jun 6, 2023
b9b62d2
Add the dtype argument to numpy.array_api.linalg.trace
asmeurer Jun 6, 2023
7a58c03
Add dtype to the output of array_api finfo and iinfo
asmeurer Jun 6, 2023
1ee9a58
Add a note that we are skipping numpy.array_api.fft for now
asmeurer Jun 6, 2023
52b8163
Fix __complex__ type annotation
asmeurer Jun 6, 2023
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
Add dtype to the output of array_api finfo and iinfo
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@asmeurer @charris
asmeurer authored and charris committed Jun 15, 2023
commit 7a58c0378de28efca7590ebe170aa754821139c5

There are no files selected for viewing

5 changes: 4 additions & 1 deletion 5 numpy/array_api/_data_type_functions.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ class finfo_object:
max: float
min: float
smallest_normal: float
dtype: Dtype


@dataclass
class iinfo_object:
bits: int
max: int
min: int
dtype: Dtype


def finfo(type: Union[Dtype, Array], /) -> finfo_object:
Expand All @@ -114,6 +116,7 @@ def finfo(type: Union[Dtype, Array], /) -> finfo_object:
float(fi.max),
float(fi.min),
float(fi.smallest_normal),
fi.dtype,
)


Expand All @@ -124,7 +127,7 @@ def iinfo(type: Union[Dtype, Array], /) -> iinfo_object:
See its docstring for more information.
"""
ii = np.iinfo(type)
return iinfo_object(ii.bits, ii.max, ii.min)
return iinfo_object(ii.bits, ii.max, ii.min, ii.dtype)


# Note: isdtype is a new function from the 2022.12 array API specification.
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.