File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -831,7 +831,7 @@ def _device_ctx(
831
831
raise AssertionError ("unreachable" ) # pragma: nocover
832
832
833
833
834
- def _validate_device (bare_xp : Namespace , device : Device ) -> None :
834
+ def _check_device (bare_xp : Namespace , device : Device ) -> None :
835
835
with _device_ctx (bare_xp , device ):
836
836
pass
837
837
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def astype(
56
56
specification for more details.
57
57
"""
58
58
# TODO: respect device keyword?
59
- _helpers ._validate_device (da , device )
59
+ _helpers ._check_device (da , device )
60
60
61
61
if not copy and dtype == x .dtype :
62
62
return x
@@ -87,7 +87,7 @@ def arange(
87
87
specification for more details.
88
88
"""
89
89
# TODO: respect device keyword?
90
- _helpers ._validate_device (da , device )
90
+ _helpers ._check_device (da , device )
91
91
92
92
args = [start ]
93
93
if stop is not None :
@@ -157,7 +157,7 @@ def asarray(
157
157
specification for more details.
158
158
"""
159
159
# TODO: respect device keyword?
160
- _helpers ._validate_device (da , device )
160
+ _helpers ._check_device (da , device )
161
161
162
162
if isinstance (obj , da .Array ):
163
163
if dtype is not None and dtype != obj .dtype :
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ def asarray(
95
95
See the corresponding documentation in the array library and/or the array API
96
96
specification for more details.
97
97
"""
98
- _helpers ._validate_device (np , device )
98
+ _helpers ._check_device (np , device )
99
99
100
100
if hasattr (np , '_CopyMode' ):
101
101
if copy is None :
@@ -121,7 +121,7 @@ def astype(
121
121
copy : bool = True ,
122
122
device : Optional [Device ] = None ,
123
123
) -> Array :
124
- _helpers ._validate_device (np , device )
124
+ _helpers ._check_device (np , device )
125
125
return x .astype (dtype = dtype , copy = copy )
126
126
127
127
You can’t perform that action at this time.
0 commit comments