Skip to content

Commit c0c7303

Browse files
authored
Merge pull request #68 from asmeurer/array_fixes
Fix some functions that were missing ._array
2 parents 019d935 + ff126d7 commit c0c7303

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

array_api_strict/_elementwise_functions.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def conj(x: Array, /) -> Array:
317317
"""
318318
if x.dtype not in _complex_floating_dtypes:
319319
raise TypeError("Only complex floating-point dtypes are allowed in conj")
320-
return Array._new(np.conj(x))
320+
return Array._new(np.conj(x._array))
321321

322322
@requires_api_version('2023.12')
323323
def copysign(x1: Array, x2: Array, /) -> Array:
@@ -480,7 +480,7 @@ def imag(x: Array, /) -> Array:
480480
"""
481481
if x.dtype not in _complex_floating_dtypes:
482482
raise TypeError("Only complex floating-point dtypes are allowed in imag")
483-
return Array._new(np.imag(x))
483+
return Array._new(np.imag(x._array))
484484

485485

486486
def isfinite(x: Array, /) -> Array:
@@ -755,7 +755,7 @@ def real(x: Array, /) -> Array:
755755
"""
756756
if x.dtype not in _complex_floating_dtypes:
757757
raise TypeError("Only complex floating-point dtypes are allowed in real")
758-
return Array._new(np.real(x))
758+
return Array._new(np.real(x._array))
759759

760760

761761
def remainder(x1: Array, x2: Array, /) -> Array:

0 commit comments

Comments
 (0)