zeros_like#
- rbc.stdlib.creation_functions.zeros_like(a, dtype=None)#
Return an array of zeros with the same shape and type as a given array.
Examples
>>> from rbc.stdlib import array_api >>> @heavydb('int64[](int64[])') ... def zeros_like(other): ... return array_api.zeros_like(other) >>> zeros_like([1, 2, 3]).execute() array([0, 0, 0])
>>> @heavydb('float[](int64[])') ... def zeros_like2(other): ... return array_api.zeros_like(other, 'float32') >>> zeros_like2([1, 2, 3]).execute() array([0., 0., 0.], dtype=float32)