full_like#
- rbc.stdlib.creation_functions.full_like(a, fill_value, dtype=None)#
Return a full array with the same shape and type as a given array.
Examples
>>> from rbc.stdlib import array_api >>> @heavydb('double[](double[], double)') ... def full_like(other, fill_value): ... return array_api.full_like(other, fill_value) >>> full_like([1.0, 2.0, 3.0], 3.14).execute() array([3.14, 3.14, 3.14], dtype=float32)
>>> @heavydb('int64[](int64[], int64)') ... def full_like(other, fill_value): ... return array_api.full_like(other, fill_value, 'int64') >>> full_like([1, 2, 3], 3).execute() array([3, 3, 3])