@@ -342,7 +342,7 @@ def conj(x: Array, /) -> Array:
342
342
"""
343
343
if x .dtype not in _complex_floating_dtypes :
344
344
raise TypeError ("Only complex floating-point dtypes are allowed in conj" )
345
- return Array ._new (np .conj (x ), device = x .device )
345
+ return Array ._new (np .conj (x . _array ), device = x .device )
346
346
347
347
@requires_api_version ('2023.12' )
348
348
def copysign (x1 : Array , x2 : Array , / ) -> Array :
@@ -520,7 +520,7 @@ def imag(x: Array, /) -> Array:
520
520
"""
521
521
if x .dtype not in _complex_floating_dtypes :
522
522
raise TypeError ("Only complex floating-point dtypes are allowed in imag" )
523
- return Array ._new (np .imag (x ), device = x .device )
523
+ return Array ._new (np .imag (x . _array ), device = x .device )
524
524
525
525
526
526
def isfinite (x : Array , / ) -> Array :
@@ -817,7 +817,7 @@ def real(x: Array, /) -> Array:
817
817
"""
818
818
if x .dtype not in _complex_floating_dtypes :
819
819
raise TypeError ("Only complex floating-point dtypes are allowed in real" )
820
- return Array ._new (np .real (x ), device = x .device )
820
+ return Array ._new (np .real (x . _array ), device = x .device )
821
821
822
822
823
823
def remainder (x1 : Array , x2 : Array , / ) -> Array :
0 commit comments