Skip to content

Commit d1f2b02

Browse files
committed
ENH: allow xp.real and xp.conj of real fp inputs
1 parent 532db5b commit d1f2b02

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/array_api_stubs/_draft/elementwise_functions.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ def conj(x: array, /) -> array:
869869
Parameters
870870
----------
871871
x: array
872-
input array. Should have a complex floating-point data type.
872+
input array. Should have a floating-point data type.
873873
874874
Returns
875875
-------
@@ -880,6 +880,9 @@ def conj(x: array, /) -> array:
880880
-----
881881
882882
.. versionadded:: 2022.12
883+
884+
If ``x`` array has a real floating-point dtype, the returned array is a copy of ``x``.
885+
883886
"""
884887

885888

@@ -2346,7 +2349,7 @@ def real(x: array, /) -> array:
23462349
Parameters
23472350
----------
23482351
x: array
2349-
input array. Should have a complex floating-point data type.
2352+
input array. Should have a floating-point data type.
23502353
23512354
Returns
23522355
-------
@@ -2357,6 +2360,9 @@ def real(x: array, /) -> array:
23572360
-----
23582361
23592362
.. versionadded:: 2022.12
2363+
2364+
If ``x`` array has a real floating-point dtype, the returned array is a copy of ``x``.
2365+
23602366
"""
23612367

23622368

0 commit comments

Comments
 (0)