From f74b35996a15637cec567e0dffdacf7f3c24c7f5 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Wed, 21 Jul 2021 15:44:10 -0600 Subject: Add bool and int explicitly to the array API asarray() input type hints --- numpy/_array_api/_creation_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/_array_api/_creation_functions.py') 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 `. -- cgit v1.2.1