@@ -938,13 +938,13 @@ def power(self, y, /, **kwargs):
938
938
939
939
def min (self , y , / , ** kwargs ):
940
940
self ._check_args (** kwargs )
941
- xp = array_namespace (self .x )
941
+ xp = array_namespace (self .x , y )
942
942
self .x [self .idx ] = xp .minimum (self .x [self .idx ], y )
943
943
return self .x
944
944
945
945
def max (self , y , / , ** kwargs ):
946
946
self ._check_args (** kwargs )
947
- xp = array_namespace (self .x )
947
+ xp = array_namespace (self .x , y )
948
948
self .x [self .idx ] = xp .maximum (self .x [self .idx ], y )
949
949
return self .x
950
950
@@ -963,14 +963,14 @@ def iwhere(condition, x, y, /):
963
963
"""
964
964
if is_writeable_array (x ):
965
965
if is_array_api_obj (y ) and len (y .shape ) > 0 :
966
- xp = array_namespace (x )
966
+ xp = array_namespace (x , y )
967
967
x , y = xp .broadcast_arrays (x , y )
968
968
x [condition ] = y [condition ]
969
969
else :
970
970
x [condition ] = y
971
971
return x
972
972
else :
973
- xp = array_namespace (x )
973
+ xp = array_namespace (x , y )
974
974
return xp .where (condition , x , y )
975
975
976
976
__all__ = [
0 commit comments