Exercise

The dtype argument

One way to control the data type of a NumPy array is to declare it when the array is created using the dtype keyword argument. Take a look at the data type NumPy uses by default when creating an array with np.zeros(). Could it be updated?

numpy is loaded as np.

Instructions 1/2

undefined XP
    1
    2
  • Using np.zeros(), create an array of zeros that has three rows and two columns; call it zero_array.
  • Print the data type of zero_array.