Data Types

Numpy is supporting a large number of data types than python does.

Let’s see the data types with examples:

  1. bool_ – It will store boolean values(True or False).
  2. int_ – Default integer type.
  3. int8 – range(-127 to 128)
  4. 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

  1. int -> It can take negative values as well.
  2. 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.

Close Menu