diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-07-09 13:57:44 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-07-09 13:57:44 -0600 |
commit | 74478e2d943f4d61917d4d9122a042214eed94fd (patch) | |
tree | 469046a04700123b9d52e184fdd884dff93a7419 /numpy/_array_api/_creation_functions.py | |
parent | 29b7a69a39ac66ebd8f61c6c9c65e7e60b40b4a0 (diff) | |
download | numpy-74478e2d943f4d61917d4d9122a042214eed94fd.tar.gz |
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.
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 9e9722a55..517c2bfdd 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[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, 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>`. |