cupy.zeros#

cupy.zeros(shape, dtype=<class 'float'>, order='C')[源代码][源代码]#

返回一个给定形状和数据类型的新数组,并用零填充。

参数:
  • shape (int or tuple of ints) – 数组的维度。

  • dtype (data-type, optional) – 数据类型说明符。

  • order ({'C', 'F'}) – 行优先(C风格)或列优先(Fortran风格)顺序。

返回:

一个充满零的数组。

返回类型:

cupy.ndarray

参见

numpy.zeros()