Numpy Data type: iinfo() function
numpy.iinfo() function
Machine limits for integer types.
Version: 1.15.0
Syntax:
class numpy.iinfo(type)
Parameter:
Name | Description | Required / Optional |
---|---|---|
int_type | The kind of integer data type to get information about. | Required |
Return value:
Example: numpy.iinfo() function
>>> import numpy as np
>>> ii16 = np.iinfo(np.int16)
>>> ii16.min
-32768
>>> ii16.max
32767
>>> ii32 = np.iinfo(np.int32)
>>> ii32.min
-2147483648
>>> ii32.max
2147483647
Example: numpy.iinfo() function
>>> import numpy as np
>>> ii32 = np.iinfo(np.int32(15))
>>> ii32.min
-2147483648
>>> ii32.max
2147483647
Python - NumPy Code Editor:
Previous:
format_parser()
Next:
MachAr()
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/numpy/data-type-routines/iinfo.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics