empty
Return a new array of given shape and type, without initializing entries.Shape of the new array, e.g.,
(2, 3) or 2.The desired data-type for the array, e.g.,
numpy.int8. Default is numpy.float64.Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.
The device on which to place the created array. For Array-API interoperability only, must be
"cpu" if passed.ndarray - Array of uninitialized data of the given shape, dtype, and order.
zeros
Return a new array of given shape and type, filled with zeros.Shape of the new array, e.g.,
(2, 3) or 2.The desired data-type for the array, e.g.,
numpy.int8. Default is numpy.float64.Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.
The device on which to place the created array. Must be
"cpu" if passed.ndarray - Array of zeros with the given shape, dtype, and order.
ones
Return a new array of given shape and type, filled with ones.Shape of the new array, e.g.,
(2, 3) or 2.The desired data-type for the array, e.g.,
numpy.int8. Default is numpy.float64.Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.
The device on which to place the created array. Must be
"cpu" if passed.ndarray - Array of ones with the given shape, dtype, and order.
full
Return a new array of given shape and type, filled withfill_value.
Shape of the new array, e.g.,
(2, 3) or 2.Fill value.
The desired data-type for the array. Default is
np.array(fill_value).dtype.Whether to store multidimensional data in C- or Fortran-contiguous (row- or column-wise) order in memory.
The device on which to place the created array. Must be
"cpu" if passed.ndarray - Array of fill_value with the given shape, dtype, and order.
empty_like
Return a new array with the same shape and type as a given array, without initializing entries.The shape and data-type of
a define these same attributes of the returned array.Overrides the data type of the result.
Overrides the memory layout of the result. ‘K’ means match the layout of
a as closely as possible.If True, then the newly created array will use the sub-class type of
a.Overrides the shape of the result.
The device on which to place the created array. Must be
"cpu" if passed.ndarray - Array of uninitialized data with the same shape and type as a.
zeros_like
Return an array of zeros with the same shape and type as a given array.The shape and data-type of
a define these same attributes of the returned array.Overrides the data type of the result.
Overrides the memory layout of the result. ‘K’ means match the layout of
a as closely as possible.If True, then the newly created array will use the sub-class type of
a.Overrides the shape of the result.
The device on which to place the created array. Must be
"cpu" if passed.ndarray - Array of zeros with the same shape and type as a.
ones_like
Return an array of ones with the same shape and type as a given array.The shape and data-type of
a define these same attributes of the returned array.Overrides the data type of the result.
Overrides the memory layout of the result. ‘K’ means match the layout of
a as closely as possible.If True, then the newly created array will use the sub-class type of
a.Overrides the shape of the result.
The device on which to place the created array. Must be
"cpu" if passed.ndarray - Array of ones with the same shape and type as a.
full_like
Return a full array with the same shape and type as a given array.The shape and data-type of
a define these same attributes of the returned array.Fill value.
Overrides the data type of the result.
Overrides the memory layout of the result. ‘K’ means match the layout of
a as closely as possible.If True, then the newly created array will use the sub-class type of
a.Overrides the shape of the result.
The device on which to place the created array. Must be
"cpu" if passed.ndarray - Array of fill_value with the same shape and type as a.
