Aim Storage

aim.storage.arrayview module

class aim.storage.arrayview.ArrayView(*args, **kwds)[source]

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()[source]

First index and value of the array.

first_idx()[source]

First index of the array.

first_value()[source]

First value of the array.

indices()[source]

Return sparse indices iterator.

Yields

Array’s next sparse index.

indices_list()[source]

Get sparse indices as a list.

indices_numpy()[source]

Get sparse indices as numpy array.

items()[source]

Return items iterator.

Yields

Tuple of array’s next sparse index and value.

keys()[source]

Return sparse indices iterator.

Yields

Array’s next sparse index.

last()[source]

Last index and value of the array.

last_idx()[source]

Last index of the array.

last_value()[source]

Last value of the array.

sparse_list()[source]

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

sparse_numpy()[source]

Get sparse indices and values as numpy arrays.

tolist()[source]

Convert to values list

values()[source]

Return values iterator.

Yields

Array’s next value.

values_list()[source]

Get values as a list.

values_numpy()[source]

Get values as numpy array.