Skip to content

Commit ab74e4a

Browse files
authored
Merge pull request #92 from lucascolley/array-api-strict
MAINT: replace `numpy.array_api` references with `array_api_strict`
2 parents 645f9a8 + 09f8436 commit ab74e4a

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,24 @@ namespace, except that functions that are part of the array API are wrapped so
7171
that they have the correct array API behavior. In each case, the array object
7272
used will be the same array object from the wrapped library.
7373

74-
## Difference between `array_api_compat` and `numpy.array_api`
74+
## Difference between `array_api_compat` and `array_api_strict`
7575

76-
`numpy.array_api` is a strict minimal implementation of the Array API (see
76+
`array_api_strict` is a strict minimal implementation of the array API standard, formerly
77+
known as `numpy.array_api` (see
7778
[NEP 47](https://numpy.org/neps/nep-0047-array-api-standard.html)). For
78-
example, `numpy.array_api` does not include any functions that are not part of
79+
example, `array_api_strict` does not include any functions that are not part of
7980
the array API specification, and will explicitly disallow behaviors that are
8081
not required by the spec (e.g., [cross-kind type
8182
promotions](https://data-apis.org/array-api/latest/API_specification/type_promotion.html)).
82-
(`cupy.array_api` is similar to `numpy.array_api`)
83+
(`cupy.array_api` is similar to `array_api_strict`)
8384

8485
`array_api_compat`, on the other hand, is just an extension of the
8586
corresponding array library namespaces with changes needed to be compliant
8687
with the array API. It includes all additional library functions not mentioned
8788
in the spec, and allows any library behaviors not explicitly disallowed by it,
8889
such as cross-kind casting.
8990

90-
In particular, unlike `numpy.array_api`, this package does not use a separate
91+
In particular, unlike `array_api_strict`, this package does not use a separate
9192
`Array` object, but rather just uses the corresponding array library array
9293
objects (`numpy.ndarray`, `cupy.ndarray`, `torch.Tensor`, etc.) directly. This
9394
is because those are the objects that are going to be passed as inputs to
@@ -96,7 +97,7 @@ functions by end users. This does mean that a few behaviors cannot be wrapped
9697
most things.
9798

9899
Array consuming library authors coding against the array API may wish to test
99-
against `numpy.array_api` to ensure they are not using functionality outside
100+
against `array_api_strict` to ensure they are not using functionality outside
100101
of the standard, but prefer this implementation for the default behavior for
101102
end-users.
102103

array_api_compat/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
Array API standard https://data-apis.org/array-api/latest/. See also NEP 47
66
https://numpy.org/neps/nep-0047-array-api-standard.html.
77
8-
Unlike numpy.array_api, this is not a strict minimal implementation of the
8+
Unlike array_api_strict, this is not a strict minimal implementation of the
99
Array API, but rather just an extension of the main NumPy namespace with
1010
changes needed to be compliant with the Array API. See
1111
https://numpy.org/doc/stable/reference/array_api.html for a full list of
12-
changes. In particular, unlike numpy.array_api, this package does not use a
12+
changes. In particular, unlike array_api_strict, this package does not use a
1313
separate Array object, but rather just uses numpy.ndarray directly.
1414
15-
Library authors using the Array API may wish to test against numpy.array_api
15+
Library authors using the Array API may wish to test against array_api_strict
1616
to ensure they are not using functionality outside of the standard, but prefer
1717
this implementation for the default when working with NumPy arrays.
1818

array_api_compat/common/_aliases.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,5 +543,5 @@ def isdtype(
543543
# This will allow things that aren't required by the spec, like
544544
# isdtype(np.float64, float) or isdtype(np.int64, 'l'). Should we be
545545
# more strict here to match the type annotation? Note that the
546-
# numpy.array_api implementation will be very strict.
546+
# array_api_strict implementation will be very strict.
547547
return dtype == kind

0 commit comments

Comments
 (0)