arrays

File Purpose: tools for arrays (more generic than xarrays)

Functions

finite_max(arr, *[, if_empty])

returns max of all the finite values of arr.

finite_mean(arr, *[, if_empty])

returns mean of all the finite values of arr.

finite_median(arr, *[, if_empty])

returns median of all the finite values of arr.

finite_min(arr, *[, if_empty])

returns min of all the finite values of arr.

finite_op(arr, op, *[, if_empty])

returns op(arr), hitting only the finite values of arr.

finite_percentile(arr, percentile, *[, if_empty])

returns percentile of all the finite values of arr.

finite_std(arr, *[, if_empty])

returns std of all the finite values of arr.

indices_to_slice(indices, *[, default])

returns a slice object equivalent to the given indices, if possible.

interprets_fractional_indexing(indexer[, L, ...])

interprets any fractional values, i.e. non-integers between -1 and 1.

looks_flat(x)

returns whether x looks flat, i.e. looks like an iterable with no internal layers.

memory_size_check(array, *[, MBmax, ...])

raise MemorySizeError if array is too large.

memory_size_check_loading_arrays_like(array1)

raise MemorySizeError if loading nload arrays like array1 will be too large.

ndenumerate_nonNone(arr[, none])

np.ndenumerate(arr) but skip wherever value is none (compared via 'is', not '==').

ndindex_array(shape)

returns an array of indexes, where each element is its own np.ndindex.

nest_shape(nested_list[, is_element])

returns the implied shape for a numpy object array constructed from nested_list.

np_dtype_object_to_str(array)

convert a numpy array of dtype==object into array of str(x) for all x in array.

unique_close(arr, *[, rtol, atol])

returns unique values of arr, within relative tolerance rtol and absolute tolerance atol.

wraplist(x[, wraprow, wrapcol, fill, dtype])

wrap 1D list into a 2D array.