larray.labels_array

larray.labels_array(axes, title=None, meta=None)[source]

Returns an array with specified axes and the combination of corresponding labels as values.

Parameters:
axes : Axis or collection of Axis
title : str, optional

Deprecated. See ‘meta’ below.

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')
>>> labels_array(sex)
sex  M  F
     M  F
>>> labels_array((nat, sex))
nat  sex\axis  nat  sex
 BE         M   BE    M
 BE         F   BE    F
 FO         M   FO    M
 FO         F   FO    F