larray.full_like¶
-
larray.
full_like
(array, fill_value, title=None, dtype=None, order='K', meta=None)[source]¶ Returns an array with the same axes and type as input array and filled with fill_value.
Parameters: - array : Array
Input array.
- fill_value : scalar or Array
Value to fill the array
- title : str, optional
Deprecated. See ‘meta’ below.
- dtype : data-type, optional
Overrides the data type of the result. Defaults to the data type of array.
- 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’ (default) means match the layout of a as closely as possible.
- meta : list of pairs or dict or OrderedDict or Metadata, optional
Metadata (title, description, author, creation_date, …) associated with the array. Keys must be strings. Values must be of type string, int, float, date, time or datetime.
Returns: - Array
Examples
>>> a = ndtest((2, 3)) >>> full_like(a, 5) a\b b0 b1 b2 a0 5 5 5 a1 5 5 5