larray.full_like¶
-
larray.full_like(array, fill_value, title='', dtype=None, order='K')[source]¶ Returns an array with the same axes and type as input array and filled with fill_value.
Parameters: array : LArray
Input array.
fill_value : scalar or LArray
Value to fill the array
title : str, optional
Title.
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.
Returns: LArray
Examples
>>> a = ndrange((2, 3)) >>> full_like(a, 5) {0}*\{1}* 0 1 2 0 5 5 5 1 5 5 5