larray.full¶
-
larray.
full
(axes, fill_value, title=None, dtype=None, order='C', meta=None)[source]¶ Returns an array with the specified axes and filled with fill_value.
Parameters: - axes : int, tuple of int, Axis or tuple/list/AxisCollection of Axis
Collection of axes or a shape.
- fill_value : scalar or Array
Value to fill the array
- title : str, optional
Deprecated. See ‘meta’ below.
- dtype : data-type, optional
Desired data-type for the array. Default is the data type of fill_value.
- order : {‘C’, ‘F’}, optional
Whether to store multidimensional data in C- (default) or Fortran-contiguous (row- or column-wise) order in memory.
- 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
>>> nat = Axis('nat=BE,FO') >>> sex = Axis('sex=M,F') >>> full([nat, sex], 42.0) nat\sex M F BE 42.0 42.0 FO 42.0 42.0 >>> initial_value = ndtest([sex]) >>> initial_value sex M F 0 1 >>> full([nat, sex], initial_value) nat\sex M F BE 0 1 FO 0 1