numpy.iinfo() function – Python
Last Updated :
18 Jun, 2020
numpy.iinfo()
function shows machine limits for integer types.
Syntax : numpy.iinfo(dtype)
Parameters :
dtype : [integer type, dtype, or instance] The kind of integer data type to get information about.
Return : Machine limits for integer types.
Code #1 :
import numpy as geek
gfg = geek.iinfo(geek.int16)
print (gfg)
|
Output :
Machine parameters for int16
---------------------------------------------------------------
min = -32768
max = 32767
---------------------------------------------------------------
Code #2 :
import numpy as geek
gfg = geek.iinfo(geek.int32)
print (gfg)
|
Output :
Machine parameters for int32
---------------------------------------------------------------
min = -2147483648
max = 2147483647
---------------------------------------------------------------
Share your thoughts in the comments
Please Login to comment...