Aim Storage

aim.storage.arrayview module

class aim.storage.arrayview.ArrayView

Array of homogeneous elements with sparse indices. Interface for working with array as a non-sparse array is available for cases when index values are not important.

first()

First index and value of the array.

first_idx()

First index of the array.

first_value()

First value of the array.

indices()

Return sparse indices iterator.

Yields:

Array’s next sparse index.

indices_list()

Get sparse indices as a list.

indices_numpy()

Get sparse indices as numpy array.

items()

Return items iterator.

Yields:

Tuple of array’s next sparse index and value.

keys()

Return sparse indices iterator.

Yields:

Array’s next sparse index.

last()

Last index and value of the array.

last_idx()

Last index of the array.

last_value()

Last value of the array.

sparse_list()

Get sparse indices and values as :obj:`list`s.

sparse_numpy()

Get sparse indices and values as numpy arrays.

tolist()

Convert to values list

values()

Return values iterator.

Yields:

Array’s next value.

values_list()

Get values as a list.

values_numpy()

Get values as numpy array.