-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
Adopt the numpy.array_api
module as cupy.array_api
#5698
Commits on Sep 5, 2021
-
Add initial array_api sub-namespace
This is based on the function stubs from the array API test suite, and is currently based on the assumption that NumPy already follows the array API standard. Now it needs to be modified to fix it in the places where NumPy deviates (for example, different function names for inverse trigonometric functions).
Configuration menu - View commit details
-
Copy full SHA for f290297 - Browse repository at this point
Copy the full SHA f290297View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e0b163 - Browse repository at this point
Copy the full SHA 6e0b163View commit details -
Fix array API functions that are named differently or not in the defa…
…ult numpy namespace
Configuration menu - View commit details
-
Copy full SHA for bc6cd91 - Browse repository at this point
Copy the full SHA bc6cd91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d2f35d - Browse repository at this point
Copy the full SHA 0d2f35dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a9765a - Browse repository at this point
Copy the full SHA 2a9765aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 94980e5 - Browse repository at this point
Copy the full SHA 94980e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7940635 - Browse repository at this point
Copy the full SHA 7940635View commit details -
Configuration menu - View commit details
-
Copy full SHA for a45d744 - Browse repository at this point
Copy the full SHA a45d744View commit details -
Make the array_api submodules private, and remove __all__ from indivi…
…dual files The specific submodule organization is an implementation detail and should not be used. Only the top-level numpy._array_api namespace should be used.
Configuration menu - View commit details
-
Copy full SHA for 5d602a5 - Browse repository at this point
Copy the full SHA 5d602a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5dfd723 - Browse repository at this point
Copy the full SHA 5dfd723View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1587e46 - Browse repository at this point
Copy the full SHA 1587e46View commit details -
Use "import numpy as np" in the array_api submodule
This avoids importing everything inside the individual functions, but still is preferred over importing the functions used explicitly, as most of them clash with the wrapper function names.
Configuration menu - View commit details
-
Copy full SHA for dad5148 - Browse repository at this point
Copy the full SHA dad5148View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58140bc - Browse repository at this point
Copy the full SHA 58140bcView commit details -
Add basic docstrings to the array API wrapper functions
The docstrings just point back to the functions they wrap for now. More thought may need to be put into this for the future. Most functions can actually perhaps inherit the docstring of the function they wrap directly, but there are some functions that have differences (e.g., different names, different keyword arguments, fewer keyword arguments, etc.). There's also the question of how to handle cross-references/see alsos that point to functions not in the API spec and behavior shown in docstring examples that isn't required in the spec.
Configuration menu - View commit details
-
Copy full SHA for f2f5039 - Browse repository at this point
Copy the full SHA f2f5039View commit details -
Add an explanatory docstring to _array_api/__init__.py
This is mostly aimed at any potential reviewers of the module for now.
Configuration menu - View commit details
-
Copy full SHA for 0da4b09 - Browse repository at this point
Copy the full SHA 0da4b09View commit details -
Add type annotations to the array api submodule function definitions
Some stubs still need to be modified to properly pass mypy type checking. Also, 'device' is just left as a TypeVar() for now.
Configuration menu - View commit details
-
Copy full SHA for adefed2 - Browse repository at this point
Copy the full SHA adefed2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2c4fcf - Browse repository at this point
Copy the full SHA d2c4fcfView commit details -
Use np.asarray in the array API submodule for any function that can r…
…eturn a scalar This is needed to pass mypy type checks for the given type annotations.
Configuration menu - View commit details
-
Copy full SHA for 70155e6 - Browse repository at this point
Copy the full SHA 70155e6View commit details -
Use _implementation on all functions that have it in the array API su…
…bmodule That way they only work on actual ndarray inputs, not array-like, which is more inline with the spec.
Configuration menu - View commit details
-
Copy full SHA for 76eb888 - Browse repository at this point
Copy the full SHA 76eb888View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9639de2 - Browse repository at this point
Copy the full SHA 9639de2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c2f8b8 - Browse repository at this point
Copy the full SHA 9c2f8b8View commit details -
Start implementing wrapper object for the array API
So far, it just is a wrapper with all the methods defined in the spec, which all pass through. The next step is to make it so that the methods that behave differently actually work as the spec describes. We also still need to modify all the array_api functions to return this wrapper object instead of np.ndarray.
Configuration menu - View commit details
-
Copy full SHA for d185d4b - Browse repository at this point
Copy the full SHA d185d4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e1ff4f9 - Browse repository at this point
Copy the full SHA e1ff4f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d7999a - Browse repository at this point
Copy the full SHA 0d7999aView commit details -
Implement a simple passthrough __str__ and __repr__ on the array_api …
…ndarray class These methods aren't required by the spec, but without them, the array object is harder to use interactively.
Configuration menu - View commit details
-
Copy full SHA for 19ecbe7 - Browse repository at this point
Copy the full SHA 19ecbe7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29f8cc2 - Browse repository at this point
Copy the full SHA 29f8cc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ae8959 - Browse repository at this point
Copy the full SHA 1ae8959View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89016b0 - Browse repository at this point
Copy the full SHA 89016b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 783595e - Browse repository at this point
Copy the full SHA 783595eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e71addb - Browse repository at this point
Copy the full SHA e71addbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e753072 - Browse repository at this point
Copy the full SHA e753072View commit details -
Only allow the spec guaranteed dtypes in the array API elementwise fu…
…nctions The array API namespace is designed to be only those parts of specification that are required. So many things that work in NumPy but are not required by the array API specification will not work in the array_api namespace functions. For example, transcendental functions will only work with floating-point dtypes, because those are the only dtypes required to work by the array API specification.
Configuration menu - View commit details
-
Copy full SHA for 26c6348 - Browse repository at this point
Copy the full SHA 26c6348View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5463790 - Browse repository at this point
Copy the full SHA 5463790View commit details -
Don't check if a dtype is in all_dtypes
The array API namespace is not going to do type checking against arbitrary objects. An object that takes an array as input should assume that it will get an array API namespace array object. Passing a NumPy array or other type of object to any of the functions is undefined behavior, unless the type signature allows for it.
Configuration menu - View commit details
-
Copy full SHA for 2e56f8e - Browse repository at this point
Copy the full SHA 2e56f8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0223975 - Browse repository at this point
Copy the full SHA 0223975View commit details -
Make the array API constants into dimension 0 arrays
The spec does not actually specify whether these should be dimension 0 arrays or Python floats (which they are in NumPy). However, making them dimension 0 arrays is cleaner, and ensures they also have all the methods and attributes that are implemented on the ndarray object.
Configuration menu - View commit details
-
Copy full SHA for e6fa443 - Browse repository at this point
Copy the full SHA e6fa443View commit details -
Configuration menu - View commit details
-
Copy full SHA for c09758c - Browse repository at this point
Copy the full SHA c09758cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c63f78 - Browse repository at this point
Copy the full SHA 2c63f78View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8055d1 - Browse repository at this point
Copy the full SHA e8055d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for cdef60d - Browse repository at this point
Copy the full SHA cdef60dView commit details -
Remove _implementation from the array API functions
As discussed at https://mail.python.org/pipermail/numpy-discussion/2021-February/081541.html, _implementation is not as useful for the array API module as previously thought.
Configuration menu - View commit details
-
Copy full SHA for f523a11 - Browse repository at this point
Copy the full SHA f523a11View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdb60bd - Browse repository at this point
Copy the full SHA bdb60bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for e0adef8 - Browse repository at this point
Copy the full SHA e0adef8View commit details -
Only allow indices that are required by the spec in the array API nam…
…espace The private function _validate_indices describes the cases that are disallowed. This functionality should be tested (it isn't yet), as the array API test suite will only test the cases that are allowed, not that non-required cases are rejected.
Configuration menu - View commit details
-
Copy full SHA for d9df101 - Browse repository at this point
Copy the full SHA d9df101View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2151f10 - Browse repository at this point
Copy the full SHA 2151f10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73fb624 - Browse repository at this point
Copy the full SHA 73fb624View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4154f92 - Browse repository at this point
Copy the full SHA 4154f92View commit details -
Configuration menu - View commit details
-
Copy full SHA for da01464 - Browse repository at this point
Copy the full SHA da01464View commit details -
Configuration menu - View commit details
-
Copy full SHA for b954e7e - Browse repository at this point
Copy the full SHA b954e7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f64447c - Browse repository at this point
Copy the full SHA f64447cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a085278 - Browse repository at this point
Copy the full SHA a085278View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e00aee - Browse repository at this point
Copy the full SHA 6e00aeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e0d72f - Browse repository at this point
Copy the full SHA 1e0d72fView commit details -
bitwise_left_shift and bitwise_right_shift should return the dtype of…
… the first argument
Configuration menu - View commit details
-
Copy full SHA for c48dc90 - Browse repository at this point
Copy the full SHA c48dc90View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdeb4ab - Browse repository at this point
Copy the full SHA bdeb4abView commit details -
Configuration menu - View commit details
-
Copy full SHA for bac32a2 - Browse repository at this point
Copy the full SHA bac32a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0a330c - Browse repository at this point
Copy the full SHA c0a330cView commit details -
Give a better error message in the array API asarray for out of bound…
…s integers Without this the error message would be a confusing message about object arrays not being supported.
Configuration menu - View commit details
-
Copy full SHA for 8a38161 - Browse repository at this point
Copy the full SHA 8a38161View commit details -
Configuration menu - View commit details
-
Copy full SHA for e629546 - Browse repository at this point
Copy the full SHA e629546View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07b92f2 - Browse repository at this point
Copy the full SHA 07b92f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ffbe9c1 - Browse repository at this point
Copy the full SHA ffbe9c1View commit details -
Use dtype objects instead of classes in the array API
The array API does not require any methods or behaviors on dtype objects, other than that they be literals that can be compared for equality and passed to dtype keywords in functions. Since dtype objects are already used by the dtype attribute of ndarray, this makes it consistent, so that func(dtype=<dtype>).dtype will give exactly <dtype> back, which will be the same thing as numpy._array_api.<dtype>. This also fixes an issue in the array API test suite due to the fact that dtype classes and objects are not equal as dictionary keys.
Configuration menu - View commit details
-
Copy full SHA for 936db17 - Browse repository at this point
Copy the full SHA 936db17View commit details -
Fix type promotion consistency for the array API elementwise function…
…s and operators NumPy's type promotion behavior deviates from the spec, which says that type promotion should work independently of shapes or values, in cases where one array is 0-d and the other is not. A helper function is added that works around this issue by adding a dimension to the 0-d array before passing it to the NumPy function. This function is used in elementwise functions and operators. It may still need to be applied to other functions in the namespace. Additionally, this fixes: - The shift operators (<< and >>) should always return the same dtype as the first argument. - NumPy's __pow__ does not type promote the two arguments, so we use the array API pow() in ndarray.__pow__, which does. - The internal _promote_scalar helper function was changed to return an array API ndarray object, as this is simpler with the inclusion of the new _normalize_two_args helper in the operators.
Configuration menu - View commit details
-
Copy full SHA for a26de3b - Browse repository at this point
Copy the full SHA a26de3bView commit details -
Add meshgrid(), broadcast_arrays(), broadcast_to(), and can_cast() to…
… the array API namespace
Configuration menu - View commit details
-
Copy full SHA for e33d630 - Browse repository at this point
Copy the full SHA e33d630View commit details -
Configuration menu - View commit details
-
Copy full SHA for 674dbdd - Browse repository at this point
Copy the full SHA 674dbddView commit details -
Configuration menu - View commit details
-
Copy full SHA for b439d70 - Browse repository at this point
Copy the full SHA b439d70View commit details -
Configuration menu - View commit details
-
Copy full SHA for c71899b - Browse repository at this point
Copy the full SHA c71899bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b543e3d - Browse repository at this point
Copy the full SHA b543e3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e9fda2 - Browse repository at this point
Copy the full SHA 5e9fda2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66d9a39 - Browse repository at this point
Copy the full SHA 66d9a39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a1ddf8 - Browse repository at this point
Copy the full SHA 1a1ddf8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c94883a - Browse repository at this point
Copy the full SHA c94883aView commit details -
Update the linear algebra functions in the array API namespace
For now, only the functions in from the main spec namespace are implemented. The remaining linear algebra functions are part of an extension in the spec, and will be implemented in a future pull request. This is because the linear algebra functions are relatively complicated, so they will be easier to review separately. This also updates those functions that do remain for now to be more compliant with the spec.
Configuration menu - View commit details
-
Copy full SHA for bbd6b04 - Browse repository at this point
Copy the full SHA bbd6b04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2af28f4 - Browse repository at this point
Copy the full SHA 2af28f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3eb5d22 - Browse repository at this point
Copy the full SHA 3eb5d22View commit details -
Capitalize the names of the type hint types in the array API
That way they aren't ambiguous with the attributes with the same names.
Configuration menu - View commit details
-
Copy full SHA for 0c13a3e - Browse repository at this point
Copy the full SHA 0c13a3eView commit details -
Rename the array class in the array API namespace from ndarray to Array
The actual class name doesn't matter because it isn't part of the namespace API (arrays should be constructed with the array creation functions like asarray()). However, it is better to use a name that is different from the existing NumPy array object to avoid ambiguity.
Configuration menu - View commit details
-
Copy full SHA for 9e232ff - Browse repository at this point
Copy the full SHA 9e232ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 797150c - Browse repository at this point
Copy the full SHA 797150cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 285cc0b - Browse repository at this point
Copy the full SHA 285cc0bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a703bed - Browse repository at this point
Copy the full SHA a703bedView commit details -
Use better type signatures in the array API module
This includes returning custom dataclasses for finfo and iinfo that only contain the properties required by the array API specification.
Configuration menu - View commit details
-
Copy full SHA for 994ce07 - Browse repository at this point
Copy the full SHA 994ce07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5026ed9 - Browse repository at this point
Copy the full SHA 5026ed9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c38c6b8 - Browse repository at this point
Copy the full SHA c38c6b8View commit details -
Only allow floating-point dtypes in the array API __pow__ and __trued…
…iv__ See data-apis/array-api#221.
Configuration menu - View commit details
-
Copy full SHA for f5a2310 - Browse repository at this point
Copy the full SHA f5a2310View commit details -
Update the type hints for the array API __pow__ and __truediv__
They should not accept int. PEP 484 actually makes int a subtype of float, so this won't actually affect type checkers the way we would want.
Configuration menu - View commit details
-
Copy full SHA for e89d82a - Browse repository at this point
Copy the full SHA e89d82aView commit details -
Use tuples for internal type lists in the array API
These are easier for type checkers to handle.
Configuration menu - View commit details
-
Copy full SHA for 0dda4e6 - Browse repository at this point
Copy the full SHA 0dda4e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a086d8c - Browse repository at this point
Copy the full SHA a086d8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f46d66 - Browse repository at this point
Copy the full SHA 3f46d66View commit details -
Configuration menu - View commit details
-
Copy full SHA for 207d779 - Browse repository at this point
Copy the full SHA 207d779View commit details -
Make the array API left and right shift do type promotion
The spec previously said it should return the type of the left argument, but this was changed to do type promotion to be consistent with all the other elementwise functions/operators.
Configuration menu - View commit details
-
Copy full SHA for 783d157 - Browse repository at this point
Copy the full SHA 783d157View commit details -
Configuration menu - View commit details
-
Copy full SHA for 379b2ad - Browse repository at this point
Copy the full SHA 379b2adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ddbd5c - Browse repository at this point
Copy the full SHA 1ddbd5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 575e019 - Browse repository at this point
Copy the full SHA 575e019View commit details -
Configuration menu - View commit details
-
Copy full SHA for 084b819 - Browse repository at this point
Copy the full SHA 084b819View commit details -
Remove error ignoring in the array API namespace
The array API requires that elementwise functions always give a value, like nan. However, it doesn't specify that the functions need not give warnings. It is possible here to still break things by manually changing warnings into errors with np.seterr(), but this is considered unsupported behavior.
Configuration menu - View commit details
-
Copy full SHA for 330eac2 - Browse repository at this point
Copy the full SHA 330eac2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 229a9b3 - Browse repository at this point
Copy the full SHA 229a9b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 654ecf4 - Browse repository at this point
Copy the full SHA 654ecf4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9fdfac2 - Browse repository at this point
Copy the full SHA 9fdfac2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d1ee76 - Browse repository at this point
Copy the full SHA 8d1ee76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 12129c8 - Browse repository at this point
Copy the full SHA 12129c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e28c9e - Browse repository at this point
Copy the full SHA 4e28c9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a96a571 - Browse repository at this point
Copy the full SHA a96a571View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf2890f - Browse repository at this point
Copy the full SHA bf2890fView commit details -
Start adding tests for the array API submodule
The tests for the module will mostly focus on those things that aren't already tested by the official array API test suite (https://github.com/data-apis/array-api-tests). Currently, indexing tests are added, which test that the Array object correctly rejects otherwise valid indices that are not required by the array API spec.
Configuration menu - View commit details
-
Copy full SHA for 30778f7 - Browse repository at this point
Copy the full SHA 30778f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e688ea0 - Browse repository at this point
Copy the full SHA e688ea0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccbe442 - Browse repository at this point
Copy the full SHA ccbe442View commit details -
Implement the array API result_type() manually
np.result_type() has too many behaviors that we want to avoid in the array API namespace, like value-based casting and unwanted type promotions. Instead, we implement the exact type promotion table from the spec.
Configuration menu - View commit details
-
Copy full SHA for 29535ad - Browse repository at this point
Copy the full SHA 29535adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f771de - Browse repository at this point
Copy the full SHA 8f771deView commit details -
Restrict the array API namespace array operator type promotions
Only those type promotions that are required by the spec are allowed. In particular, promotions across kinds, like integer + floating-point, are not allowed, except for the case of Python scalars. Tests are added for this. This commit additionally makes the operators return NotImplemented on unexpected input types rather than directly giving a TypeError. This is not strictly required by the array API spec, but it is generally considered a best practice for operator methods in Python. This same thing will be implemented for the various functions in the array API namespace in a later commit.
Configuration menu - View commit details
-
Copy full SHA for b2c4246 - Browse repository at this point
Copy the full SHA b2c4246View commit details -
Use ValueError instead of TypeError for array API @=
This is consistent with @ and with NumPy.
Configuration menu - View commit details
-
Copy full SHA for 898e3d9 - Browse repository at this point
Copy the full SHA 898e3d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b82fcbc - Browse repository at this point
Copy the full SHA b82fcbcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e56849 - Browse repository at this point
Copy the full SHA 3e56849View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8316e68 - Browse repository at this point
Copy the full SHA 8316e68View commit details -
Configuration menu - View commit details
-
Copy full SHA for caf16dc - Browse repository at this point
Copy the full SHA caf16dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d62c00 - Browse repository at this point
Copy the full SHA 5d62c00View commit details -
Fix the array API trunc() to return the same dtype as the input
It is similar to floor() and ceil() but I missed it previously.
Configuration menu - View commit details
-
Copy full SHA for dab0e39 - Browse repository at this point
Copy the full SHA dab0e39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75dba89 - Browse repository at this point
Copy the full SHA 75dba89View commit details -
Configuration menu - View commit details
-
Copy full SHA for eebbc67 - Browse repository at this point
Copy the full SHA eebbc67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 409e79b - Browse repository at this point
Copy the full SHA 409e79bView commit details -
Only allow dtypes to be spelled with their names in the array API
Other spellings like dtype=int or dtype='i' are not part of the spec.
Configuration menu - View commit details
-
Copy full SHA for a0976d0 - Browse repository at this point
Copy the full SHA a0976d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0878800 - Browse repository at this point
Copy the full SHA 0878800View commit details -
Configuration menu - View commit details
-
Copy full SHA for 866b5e5 - Browse repository at this point
Copy the full SHA 866b5e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f9955a - Browse repository at this point
Copy the full SHA 8f9955aView commit details -
Add tests for the array API creation functions
As with the other array API tests, the tests primarily focus on things that should error. Working behavior is tested by the official array API test suite.
Configuration menu - View commit details
-
Copy full SHA for 694651a - Browse repository at this point
Copy the full SHA 694651aView commit details -
Rename numpy._array_api to numpy.array_api
Instead of the leading underscore, the experimentalness of the module will be indicated by omitting a warning on import. That we, we do not have to change the API from underscore to no underscore when the module is no longer experimental.
Configuration menu - View commit details
-
Copy full SHA for 29de791 - Browse repository at this point
Copy the full SHA 29de791View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b1684b - Browse repository at this point
Copy the full SHA 6b1684bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46f568a - Browse repository at this point
Copy the full SHA 46f568aView commit details -
Remove asarray() calls from the array API statistical functions
asarray() is already called in Array._new.
Configuration menu - View commit details
-
Copy full SHA for ac57827 - Browse repository at this point
Copy the full SHA ac57827View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb92224 - Browse repository at this point
Copy the full SHA bb92224View commit details -
Move the array API dtype categories into the top level
They are not an official part of the spec but are useful for various parts of the implementation.
Configuration menu - View commit details
-
Copy full SHA for 61140a7 - Browse repository at this point
Copy the full SHA 61140a7View commit details -
Move some imports out of functions to the top of the file
Some of the imports in the array API module have to be inside functions to avoid circular imports, but these ones did not.
Configuration menu - View commit details
-
Copy full SHA for cd31414 - Browse repository at this point
Copy the full SHA cd31414View commit details -
Configuration menu - View commit details
-
Copy full SHA for 04be0e0 - Browse repository at this point
Copy the full SHA 04be0e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c69663a - Browse repository at this point
Copy the full SHA c69663aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7d5fd0 - Browse repository at this point
Copy the full SHA c7d5fd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62cc871 - Browse repository at this point
Copy the full SHA 62cc871View commit details -
Configuration menu - View commit details
-
Copy full SHA for becc418 - Browse repository at this point
Copy the full SHA becc418View commit details -
Configuration menu - View commit details
-
Copy full SHA for 356891c - Browse repository at this point
Copy the full SHA 356891cView commit details -
Make the axis argument to squeeze() in the array_api module positiona…
…l-only See data-apis/array-api#100.
Configuration menu - View commit details
-
Copy full SHA for dbcb237 - Browse repository at this point
Copy the full SHA dbcb237View commit details -
Configuration menu - View commit details
-
Copy full SHA for e080ea1 - Browse repository at this point
Copy the full SHA e080ea1View commit details -
Configuration menu - View commit details
-
Copy full SHA for e55dc3c - Browse repository at this point
Copy the full SHA e55dc3cView commit details -
Run (selective) black on the array_api submodule
I've omitted a few changes from black that messed up the readability of some complicated if statements that were organized logically line-by-line, and some changes that use unnecessary operator spacing.
Configuration menu - View commit details
-
Copy full SHA for 729b359 - Browse repository at this point
Copy the full SHA 729b359View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a2dbc5 - Browse repository at this point
Copy the full SHA 3a2dbc5View commit details -
Add smallest_normal to the array API finfo
This was blocked on #18536, which has been merged.
Configuration menu - View commit details
-
Copy full SHA for 1114fa1 - Browse repository at this point
Copy the full SHA 1114fa1View commit details -
Remove Python 3.7 checks from the array API code
NumPy has dropped Python 3.7, so these are no longer necessary (and they didn't completely work anyway).
Configuration menu - View commit details
-
Copy full SHA for 8692831 - Browse repository at this point
Copy the full SHA 8692831View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9febe14 - Browse repository at this point
Copy the full SHA 9febe14View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb93033 - Browse repository at this point
Copy the full SHA fb93033View commit details -
Configuration menu - View commit details
-
Copy full SHA for 370c7db - Browse repository at this point
Copy the full SHA 370c7dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3104ec - Browse repository at this point
Copy the full SHA e3104ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for c271454 - Browse repository at this point
Copy the full SHA c271454View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fecd61 - Browse repository at this point
Copy the full SHA 5fecd61View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2a7803 - Browse repository at this point
Copy the full SHA d2a7803View commit details
Commits on Sep 6, 2021
-
move numpy/array_api/tests to tests/cupyx_tests/array_api_tests
- replace numpy/np by cupy/cp - make the tests runnable in CuPy's tester - comment out two failing tests (which I believe is OK)
Configuration menu - View commit details
-
Copy full SHA for 55e6a54 - Browse repository at this point
Copy the full SHA 55e6a54View commit details -
Configuration menu - View commit details
-
Copy full SHA for d65bde2 - Browse repository at this point
Copy the full SHA d65bde2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7972a88 - Browse repository at this point
Copy the full SHA 7972a88View commit details -
Configuration menu - View commit details
-
Copy full SHA for c70c449 - Browse repository at this point
Copy the full SHA c70c449View commit details -
Configuration menu - View commit details
-
Copy full SHA for f154282 - Browse repository at this point
Copy the full SHA f154282View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03280a0 - Browse repository at this point
Copy the full SHA 03280a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for df769af - Browse repository at this point
Copy the full SHA df769afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e9c65d - Browse repository at this point
Copy the full SHA 3e9c65dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce6d809 - Browse repository at this point
Copy the full SHA ce6d809View commit details
Commits on Sep 7, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b81eb39 - Browse repository at this point
Copy the full SHA b81eb39View commit details
Commits on Sep 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for d3a6f0d - Browse repository at this point
Copy the full SHA d3a6f0dView commit details
Commits on Sep 24, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9e6f428 - Browse repository at this point
Copy the full SHA 9e6f428View commit details -
Configuration menu - View commit details
-
Copy full SHA for 05b7dd6 - Browse repository at this point
Copy the full SHA 05b7dd6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e8191c - Browse repository at this point
Copy the full SHA 7e8191cView commit details