Numpy: The function numpy.iinfo crashes when used with numpy.float64

Created on 30 Aug 2019  路  1Comment  路  Source: numpy/numpy

Hi folks!
First of all, I would like to thank you for the amazing work you've done with this lib.
I'm having issues when trying to get numpy types info using numpy.iinfo function with numpy.float64 in the version 1.17.1

The following code:

import numpy as np
np.iinfo(np.float64)

Outputs the following error:

----> 1 np.iinfo(np.float64)
d:\folder\env\lib\site-packages\numpy\core\getlimits.py in __init__(self, int_type)
    504         self.key = "%s%d" % (self.kind, self.bits)
    505         if self.kind not in 'iu':
--> 506             raise ValueError("Invalid integer data type %r." % (self.kind,))
    507
    508     @property

ValueError: Invalid integer data type 'f'.

Cheers

Most helpful comment

I'm sorry only now I found out about the function numpy.finfo to check floats.

>All comments

I'm sorry only now I found out about the function numpy.finfo to check floats.

Was this page helpful?
0 / 5 - 0 ratings