1. 学习
  2. /
  3. 课程
  4. /
  5. Introduction to NumPy

Connected

练习

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.

说明 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.