In [1]:
import numpy as np
In [2]:
ii64 = np.iinfo(np.int64)
print(type(ii64))
In [3]:
print(ii64)
In [4]:
print(ii64.max)
In [5]:
print(type(ii64.max))
In [6]:
print(ii64.min)
In [7]:
print(ii64.bits)
In [8]:
print(np.iinfo('int16'))
In [9]:
print(np.iinfo('i4'))
In [10]:
print(np.iinfo(int))
In [11]:
print(np.iinfo('uint64'))
In [12]:
i = 100
print(type(i))
In [13]:
print(np.iinfo(i))
In [14]:
ui = np.uint8(100)
print(type(ui))
In [15]:
print(np.iinfo(ui))
In [16]:
a = np.array([1, 2, 3], dtype=np.int8)
print(type(a))
In [17]:
# print(np.iinfo(a))
# ValueError: Invalid integer data type 'O'.
In [18]:
print(np.iinfo(a.dtype))
In [19]:
print(np.iinfo(a[0]))
In [20]:
# print(np.iinfo(np.float64))
# ValueError: Invalid integer data type 'f'.
In [21]:
fi64 = np.finfo(np.float64)
print(type(fi64))
In [22]:
print(fi64)
In [23]:
print(fi64.max)
In [24]:
print(type(fi64.max))
In [25]:
print(fi64.min)
In [26]:
print(fi64.eps)
In [27]:
print(fi64.bits)
In [28]:
print(fi64.iexp)
In [29]:
print(fi64.nmant)