diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-07-21 15:44:10 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-07-21 15:45:20 -0600 |
commit | f74b35996a15637cec567e0dffdacf7f3c24c7f5 (patch) | |
tree | b25fa262b0c9cec3e3bb6ba84d3461f96f062690 /numpy/_array_api/_creation_functions.py | |
parent | e34c097981ad573c9871f5f52d1e6e5769529dda (diff) | |
download | numpy-f74b35996a15637cec567e0dffdacf7f3c24c7f5.tar.gz |
Add bool and int explicitly to the array API asarray() input type hints
Diffstat (limited to 'numpy/_array_api/_creation_functions.py')
-rw-r--r-- | numpy/_array_api/_creation_functions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/_array_api/_creation_functions.py b/numpy/_array_api/_creation_functions.py index e8c88d9b5..3c591ffe1 100644 --- a/numpy/_array_api/_creation_functions.py +++ b/numpy/_array_api/_creation_functions.py @@ -10,7 +10,7 @@ from ._dtypes import _all_dtypes import numpy as np -def asarray(obj: Union[Array, float, NestedSequence[bool|int|float], SupportsDLPack, SupportsBufferProtocol], /, *, dtype: Optional[Dtype] = None, device: Optional[Device] = None, copy: Optional[bool] = None) -> Array: +def asarray(obj: Union[Array, bool, int, float, NestedSequence[bool|int|float], SupportsDLPack, SupportsBufferProtocol], /, *, dtype: Optional[Dtype] = None, device: Optional[Device] = None, copy: Optional[bool] = None) -> Array: """ Array API compatible wrapper for :py:func:`np.asarray <numpy.asarray>`. |