@@ -342,7 +342,7 @@ def conj(x: Array, /) -> Array:
342342 """
343343 if x .dtype not in _complex_floating_dtypes :
344344 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 )
346346
347347@requires_api_version ('2023.12' )
348348def copysign (x1 : Array , x2 : Array , / ) -> Array :
@@ -520,7 +520,7 @@ def imag(x: Array, /) -> Array:
520520 """
521521 if x .dtype not in _complex_floating_dtypes :
522522 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 )
524524
525525
526526def isfinite (x : Array , / ) -> Array :
@@ -817,7 +817,7 @@ def real(x: Array, /) -> Array:
817817 """
818818 if x .dtype not in _complex_floating_dtypes :
819819 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 )
821821
822822
823823def remainder (x1 : Array , x2 : Array , / ) -> Array :
0 commit comments