larray.zeros¶
-
larray.zeros(axes, title='', dtype=<class 'float'>, order='C')[source]¶ Returns an array with the specified axes and filled with zeros.
Parameters: axes : int, tuple of int, Axis or tuple/list/AxisCollection of Axis
Collection of axes or a shape.
title : str, optional
Title.
dtype : data-type, optional
Desired data-type for the array, e.g., numpy.int8. Default is numpy.float64.
order : {‘C’, ‘F’}, optional
Whether to store multidimensional data in C- (default) or Fortran-contiguous (row- or column-wise) order in memory.
Returns: LArray
Examples
>>> zeros('nat=BE,FO;sex=M,F') nat\sex M F BE 0.0 0.0 FO 0.0 0.0 >>> zeros([(['BE', 'FO'], 'nat'), ... (['M', 'F'], 'sex')]) nat\sex M F BE 0.0 0.0 FO 0.0 0.0 >>> nat = Axis('nat=BE,FO') >>> sex = Axis('sex=M,F') >>> zeros([nat, sex]) nat\sex M F BE 0.0 0.0 FO 0.0 0.0