File tree Expand file tree Collapse file tree 3 files changed +3
-27
lines changed
Expand file tree Collapse file tree 3 files changed +3
-27
lines changed Original file line number Diff line number Diff line change 6666
6767# asarray also adds the copy keyword, which is not present in numpy 1.0.
6868def asarray (
69- obj : Union [
70- Array ,
71- bool ,
72- int ,
73- float ,
74- complex ,
75- NestedSequence [bool | int | float | complex ],
76- SupportsBufferProtocol ,
77- ],
69+ obj : bool | complex | NestedSequence [bool | complex ] | SupportsBufferProtocol ,
7870 / ,
7971 * ,
8072 dtype : Optional [DType ] = None ,
Original file line number Diff line number Diff line change @@ -135,15 +135,7 @@ def arange(
135135
136136# asarray also adds the copy keyword, which is not present in numpy 1.0.
137137def asarray (
138- obj : Union [
139- Array ,
140- bool ,
141- int ,
142- float ,
143- complex ,
144- NestedSequence [bool | int | float | complex ],
145- SupportsBufferProtocol ,
146- ],
138+ obj : bool | complex | NestedSequence [bool | complex ] | SupportsBufferProtocol ,
147139 / ,
148140 * ,
149141 dtype : Optional [DType ] = None ,
Original file line number Diff line number Diff line change @@ -73,15 +73,7 @@ def _supports_buffer_protocol(obj):
7373# complicated enough that it's easier to define it separately for each module
7474# rather than trying to combine everything into one function in common/
7575def asarray (
76- obj : Union [
77- Array ,
78- bool ,
79- int ,
80- float ,
81- complex ,
82- NestedSequence [bool | int | float | complex ],
83- SupportsBufferProtocol ,
84- ],
76+ obj : bool | complex | NestedSequence [bool | complex ] | SupportsBufferProtocol ,
8577 / ,
8678 * ,
8779 dtype : Optional [DType ] = None ,
You can’t perform that action at this time.
0 commit comments