dask 2021.10.0

ParametersReturnsBackRef
full(shape, fill_value, *args, **kwargs)

Follows the signature of full_like exactly except that it also features optional keyword arguments chunks: int, tuple, or dict and name: str .

Original signature follows below.

Return a full array with the same shape and type as a given array.

Parameters

a : array_like

The shape and data-type of a define these same attributes of the returned array.

fill_value : scalar

Fill value.

dtype : data-type, optional

Overrides the data type of the result.

order : {'C', 'F', 'A', or 'K'}, optional

Overrides the memory layout of the result. 'C' means C-order, 'F' means F-order, 'A' means 'F' if a is Fortran contiguous, 'C' otherwise. 'K' means match the layout of a as closely as possible.

subok : bool, optional.

If True, then the newly created array will use the sub-class type of a, otherwise it will be a base-class array. Defaults to True.

shape : int or sequence of ints, optional.

Overrides the shape of the result. If order='K' and the number of dimensions is unchanged, will try to keep order, otherwise, order='C' is implied.

versionadded

Returns

out : ndarray

Array of :None:None:`fill_value` with the same shape and type as a.

Blocked variant of full_like

See Also

empty_like

Return an empty array with shape and type of input.

full

Return a new array of given shape filled with value.

ones_like

Return an array of ones with shape and type of input.

zeros_like

Return an array of zeros with shape and type of input.

Examples

This example is valid syntax, but we were not able to check execution
>>> x = np.arange(6, dtype=int)
... np.full_like(x, 1) array([1, 1, 1, 1, 1, 1])
This example is valid syntax, but we were not able to check execution
>>> np.full_like(x, 0.1)
array([0, 0, 0, 0, 0, 0])
This example is valid syntax, but we were not able to check execution
>>> np.full_like(x, 0.1, dtype=np.double)
array([0.1, 0.1, 0.1, 0.1, 0.1, 0.1])
This example is valid syntax, but we were not able to check execution
>>> np.full_like(x, np.nan, dtype=np.double)
array([nan, nan, nan, nan, nan, nan])
This example is valid syntax, but we were not able to check execution
>>> y = np.arange(6, dtype=np.double)
... np.full_like(y, 0.1) array([0.1, 0.1, 0.1, 0.1, 0.1, 0.1])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.array.routines.array dask.array.creation.full_like dask.array.wrap.full dask.utils.empty

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/wrap.py#184
type: <class 'function'>
Commit: