summaryrefslogtreecommitdiff
path: root/numpy/array_api/_typing.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: cleanup unused Python3.8-only code and referencesClément Robert2023-03-141-17/+14
|
* ENH: Change `SupportsDLPack` into a protocolBas van Beek2021-10-181-1/+3
|
* ENH: Replace `NestedSequence` with a proper nested sequence protocolBas van Beek2021-10-181-5/+17
|
* MAINT: Import `Array` from the `_array_object` namespaceBas van Beek2021-09-291-1/+1
| | | | Changed as `Array` does not live in the main `np.array_api` namespace
* MAINT: Add a missing subscription slot to `NestedSequence`Bas van Beek2021-09-271-2/+3
|
* MAINT: Fix invalid parameter types used in `Dtype`Bas van Beek2021-09-271-6/+21
|
* ENH: Updates to numpy.array_api (#19937)Aaron Meurer2021-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add __index__ to array_api and update __int__, __bool__, and __float__ The spec specifies that they should only work on arrays with corresponding dtypes. __index__ is new in the spec since the initial PR, and works identically to np.array.__index__. * Add the to_device method to the array_api This method is new since #18585. It does nothing in NumPy since NumPy does not support non-CPU devices. * Update transpose methods in the array_api transpose() was renamed to matrix_transpose() and now operates on stacks of matrices. A function to permute dimensions will be added once it is finalized in the spec. The attribute mT was added and the T attribute was updated to only operate on 2-dimensional arrays as per the spec. * Restrict input dtypes in the array API statistical functions * Add the dtype parameter to the array API sum() and prod() * Add the function permute_dims() to the array_api namespace permute_dims() is the replacement for transpose(), which was split into permute_dims() and matrix_transpose(). * Add tril and triu to the array API namespace * Fix the array_api Array.__repr__ to indent the array properly * Make the Device type in the array_api just accept the string "cpu"
* fix unhashable instance and potential exception identified by LGTMSista Seetaram2021-09-031-1/+1
|
* fixed unhashable instance and potential exception as listed in LGTM#19077Sista Seetaram2021-09-031-1/+1
|
* Run (selective) black on the array_api submoduleAaron Meurer2021-08-061-6/+24
| | | | | | 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.
* Rename numpy._array_api to numpy.array_apiAaron Meurer2021-08-041-0/+26
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.