1+ from __future__ import annotations
2+
3+
14__copyright__ = """
25Copyright (C) 2024 University of Illinois Board of Trustees
36"""
@@ -164,7 +167,7 @@ def array_equal(self, a: ArrayOrContainer, b: ArrayOrContainer) -> Array:
164167 [(true_ary if kx_i == ky_i else false_ary )
165168 and self .array_equal (x_i , y_i )
166169 for (kx_i , x_i ), (ky_i , y_i )
167- in zip (serialized_x , serialized_y )],
170+ in zip (serialized_x , serialized_y , strict = True )],
168171 true_ary )
169172
170173 def arange (self , * args , ** kwargs ):
@@ -176,14 +179,14 @@ def linspace(self, *args, **kwargs):
176179 return cp .linspace (* args , ** kwargs )
177180
178181 def zeros_like (self , ary ):
179- if isinstance (ary , ( int , float , complex ) ):
182+ if isinstance (ary , int | float | complex ):
180183 import cupy as cp
181184 # Cupy does not support zeros_like with scalar arguments
182185 ary = cp .array (ary )
183186 return rec_map_array_container (cp .zeros_like , ary )
184187
185188 def ones_like (self , ary ):
186- if isinstance (ary , ( int , float , complex ) ):
189+ if isinstance (ary , int | float | complex ):
187190 import cupy as cp
188191 # Cupy does not support ones_like with scalar arguments
189192 ary = cp .array (ary )
0 commit comments