API

Description

Classes

COO(coords[, data, shape, has_duplicates, …]) A sparse multidimensional array.
DOK(shape[, data, dtype, fill_value]) A class for building sparse multidimensional arrays.
SparseArray(shape[, fill_value]) An abstract base class for all the sparse array classes.

Functions

as_coo(x[, shape]) Converts any given format to COO.
concatenate(arrays[, axis]) Concatenate the input arrays along the given dimension.
dot(a, b) Perform the equivalent of numpy.dot on two arrays.
elemwise(func, *args, **kwargs) Apply a function to any number of arguments.
load_npz(filename) Load a sparse matrix in numpy’s .npz format from disk.
nanmax(x[, axis, keepdims, dtype, out]) Maximize along the given axes, skipping NaN values.
nanmin(x[, axis, keepdims, dtype, out]) Minimize along the given axes, skipping NaN values.
nanprod(x[, axis, keepdims, dtype, out]) Performs a product operation along the given axes, skipping NaN values.
nanreduce(x, method[, identity, axis, keepdims]) Performs an NaN skipping reduction on this array.
nansum(x[, axis, keepdims, dtype, out]) Performs a NaN skipping sum operation along the given axes.
random(shape[, density, random_state, …]) Generate a random sparse multidimensional array
roll(a, shift[, axis]) Shifts elements of an array along specified axis.
save_npz(filename, matrix[, compressed]) Save a sparse matrix to disk in numpy’s .npz format.
stack(arrays[, axis]) Stack the input arrays along the given dimension.
tensordot(a, b[, axes]) Perform the equivalent of numpy.tensordot.
tril(x[, k]) Returns an array with all elements above the k-th diagonal set to zero.
triu(x[, k]) Returns an array with all elements below the k-th diagonal set to zero.
where(condition[, x, y]) Select values from either x or y depending on condition.