Numpy is supporting a large number of data types than python does.
Let’s see the data types with examples:
- bool_ – It will store boolean values(True or False).
- int_ – Default integer type.
- int8 – range(-127 to 128)
- float_ – float64
There are many other data types like unit2, complex64, etc. So, with examples will look at some of the data types. Other you can find in documentation in detail.
Checking with the data types
Difference between int and uint
- int -> It can take negative values as well.
- uint -> It cannot take negative values, if you passed any negative value then it will convert it to some other no.
Hope you understood data types in numpy. Stay tuned! keep learning with us.