Skip to content

Feature request: complex values should read/write nan components separately #27007

Open
@bradcray

Description

@bradcray

In #14880 (comment), @damianmoz requested that complex(*) values with nan components read/write them independently, where today if either the real or imaginary component is nan, we simply print nan rather than (say) nan + 1.0i or the like. Looking around at other languages (Matlab, NumPy), it seems that they similarly keep complex values with nan components separated into two distinct values.

One question is how an imaginary nan should be printed. Looking around, it seems that it is common to tack an i or j to the end of the normal symbol for nan, which would result in nani, which is symmetrical to our current use of infi.

Note that in addition to I/O casts to/from strings would also need to be updated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions