pycauset.zeros
Allocate a vector or matrix filled with zeros.
dtype is required.
Parameters
-
shape (int or tuple):
nallocates a length-nvector.(n,)allocates a length-nvector.(n, m)allocates ann×mmatrix.
Notes: * Rectangular allocation is supported for dense numeric matrix types. *
dtype="bool"/dtype="bit"uses bit-packed storage (DenseBitMatrix) and supports rectangular(rows, cols)shapes. * dtype (str or type): Storage dtype token (e.g."float64","int32",float,int). * kwargs: Passed through to the backend allocator.
Returns
- VectorBase or MatrixBase: A newly allocated object.
Examples
import pycauset
v = pycauset.zeros(10, dtype="float64")
m = pycauset.zeros((128, 64), dtype="float32")