LayeredArray

LayeredArray([stdzr])

An array with one or more named values at every index.

Methods

LayeredArray.add_layers(**arrays)

Add additional layers at each index.

LayeredArray.as_dict()

Values corresponding to each named level as a dictionary.

LayeredArray.as_list([order])

LayeredArray.drop(name[, missing_ok])

LayeredArray.dstack()

Values at each index as ndarrays stacked in sequence depth wise (along third axis).

LayeredArray.get(name[, default])

Return value given by name if it exists, otherwise return default.

LayeredArray.values()

Values at each index stacked into regular ndarray.

Attributes

class gumbi.arrays.LayeredArray(stdzr=None, **arrays)

Bases: ndarray

An array with one or more named values at every index.

Parameters:
  • name (str) –

  • array (array-like) –

add_layers(**arrays)

Add additional layers at each index.

as_dict()

Values corresponding to each named level as a dictionary.

dstack()

Values at each index as ndarrays stacked in sequence depth wise (along third axis).

get(name, default=None)

Return value given by name if it exists, otherwise return default.

values()

Values at each index stacked into regular ndarray.