question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mechanism to find complex dtype info

See original GitHub issue

When introducing complex dtypes and updating/introducing related functions (#373), I wonder if we’d want to introduce a cinfo() function ala iinfo()/finfo(). What would its resulting info object look like?

I don’t see any array/tensor library which implements exactly cinfo(), although there might be an equivalent I’m missing. For say NumPy, was there just not demand for such a function, and/or such a need was somewhat served with finfo()?

>>> np.finfo(np.complex64)
finfo(resolution=1e-06, min=-3.4028235e+38, max=3.4028235e+38, dtype=float32)
>>> assert np.finfo(np.complex64) == np.finfo(np.float32)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
honnocommented, Sep 14, 2022

Think we forgot to delegate someone to do this, so just now wrote an issue at https://github.com/numpy/numpy/issues/22260

1reaction
honnocommented, Oct 7, 2022

@honno is there anything left to do here after gh-484?

Nope—forgot to link this issue to that merged PR, so I’ll close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data type objects (dtype) — NumPy v1.24 Manual
A simple data type containing a 32-bit big-endian integer: (see Specifying and constructing data types for details on construction).
Read more >
Special types — h5py 3.7.0 documentation
Each type is represented by a native NumPy dtype, with a small amount of metadata attached. NumPy routines ignore the metadata, but h5py...
Read more >
How should I get the corresponding real numpy dtype for a ...
It's an np. dtype . 'complex' as in imaginary 1j , or as in structured array (compound dtype)? If the default float is...
Read more >
flax/1777-default-dtype.md at main · google/flax - GitHub
JAX uses a NumPy-inspired dtype promotion mechanism as explained here. ... Normalization layers use the complex conjugate to calculate norms instead of ...
Read more >
Types - Julia Documentation
(See Methods for more information on multiple dispatch.) ... The where keyword itself can be nested inside a more complex declaration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found