full

method of dascore.core.source.ArraySource source

full(
    shape: int | tuple[int, tuple[int, …]] ,
    value: bool | int | float[bool, int, float] ,
    dtype: Any = None,
)-> ‘ArraySource’

Return a source for a constant array, as np.full would build one.

Parameters

Parameter Description
shape The shape of the array.
value The real scalar which fills it; one the dtype would change is
refused.
dtype The dtype of the array; the value’s own when not given.

Examples

from dascore.core.source import ArraySource
assert ArraySource.full((3,), 0).load().dtype.kind == "i"