full#

rbc.stdlib.creation_functions.full(shape, fill_value, dtype=None)#

Return a new array of given shape and type, filled with fill_value.

Examples

>>> from rbc.stdlib import array_api
>>> @heavydb('double[](int64, double)')
... def rbc_full(size, fill_value):
...     return array_api.full(size, fill_value)
>>> rbc_full(3, 3.14).execute()
array([3.14, 3.14, 3.14], dtype=float32)
>>> @heavydb('int64[](int64, int64)')
... def rbc_full2(size, fill_value):
...     return array_api.full(size, fill_value, 'int64')
>>> rbc_full2(2, 0).execute()
array([0, 0])

Array-API ‘full’ doc