What is the use of the numpy.iinfo () function
This article is about the usefulness of the numpy.iinfo () function. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The numpy.iinfo () function shows machine limits for integer types.
Usage: numpy.iinfo (dtype)
Parameters:
Dtype: [integer type, dtype or instance] the type of integer data type for which you want to get information.
Return: machine limits for integer types.
Code 1:
# Python program explaining # numpy.iinfo () function # importing numpy as geek import numpy as geek gfg = geek.iinfo (geek.int16) print (gfg)
Output:
Machine parameters for int16---min =-32768max = 32767 Murray- -
Code 2:
# Python program explaining # numpy.iinfo () function # importing numpy as geek import numpy as geek gfg = geek.iinfo (geek.int32) print (gfg)
Output:
Machine parameters for int32---min =-2147483648max = 2147483647Murray- -Thank you for reading! This is the end of the article on "what is the use of the numpy.iinfo () function". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!