spiketools.utils.checks.check_array_lst_orientation

spiketools.utils.checks.check_array_lst_orientation(arr_lst, expected=None)[source]

Check the orientation of arrays in a list.

Parameters:
arr_lstlist of array

List of arrays to check orientation for.

expectedint, optional

The expected number of values per sample (e.g. 2 for (x,y) position values). If provided, is used to infer orientation in ambiguous cases (e.g. # samples < # values).

Returns:
orientation{‘vector’, ‘row’, ‘column’}

The inferred orientation of the data array. For 1d arrays, ‘vector’ is returned. For 2d or 3d arrays, ‘row’ or ‘column’ is returned based on the shape of the array.