array-api icon indicating copy to clipboard operation
array-api copied to clipboard

Complex dtype support in `finfo()`

Open honno opened this issue 3 years ago • 0 comments

Per discussion in #433 and yesterdays meeting, this PR makes finfo() support complex dtypes by returning information of its real-valued component dtype, e.g.

>>> xp.finfo(xp.complex64)
finfo_object(
    bits=32,
    eps=1.1920928955078125e-07,
    max=3.4028234663852886e+38,
    min=-3.4028234663852886e+38,
    smallest_normal=1.1754943508222875e-38
)
>>> xp.finfo(xp.float32)
... # should contain the same information as above

(see #485 RE .dtype)

honno avatar Sep 23 '22 09:09 honno