Skip to content

Commit 472d825

Browse files
committed
Support complex dtypes in finfo()
1 parent 792f11e commit 472d825

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spec/API_specification/array_api/data_type_functions.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,15 @@ def can_cast(from_: Union[dtype, array], to: dtype, /) -> bool:
4646

4747
def finfo(type: Union[dtype, array], /) -> finfo_object:
4848
"""
49-
Machine limits for real-valued floating-point data types.
49+
Machine limits for floating-point data types.
5050
5151
Parameters
5252
----------
5353
type: Union[dtype, array]
54-
the kind of real-valued floating-point data-type about which to get information.
54+
the kind of floating-point data-type about which to get information. If complex, the information is about its component data type.
55+
56+
.. note::
57+
Complex floating-point data types are specified to always use the same precision for both its real and imaginary components, so the information should be true for either component.
5558
5659
Returns
5760
-------

0 commit comments

Comments
 (0)