Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some functions that were missing ._array #68

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions array_api_strict/_elementwise_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def conj(x: Array, /) -> Array:
"""
if x.dtype not in _complex_floating_dtypes:
raise TypeError("Only complex floating-point dtypes are allowed in conj")
return Array._new(np.conj(x))
return Array._new(np.conj(x._array))

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


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


def remainder(x1: Array, x2: Array, /) -> Array:
Expand Down
Loading