hdf5array package

Submodules

hdf5array.Hdf5CompressedSparseMatrixSeed module

class hdf5array.Hdf5CompressedSparseMatrixSeed.Hdf5CompressedSparseMatrix(path, group_name, shape, by_column, **kwargs)[source]

Bases: DelayedArray

Compressed sparse matrix in a HDF5 file as a DelayedArray.

property by_column: bool

Returns: Whether the matrix is compressed sparse column.

property data_name: str

Returns: Name of the HDF5 dataset containing the matrix data values.

property group_name: str | None

Returns: Name of the HDF5 group containing the matrix contents, or None if the matrix is not contained within a single group.

property index_dtype: dtype

Returns: NumPy type of the indices in this matrix.

property indices_name: str

Returns: Name of the HDF5 dataset containing the matrix indices.

property indptr_name: str

Returns: Name of the HDF5 dataset containing the matrix pointers.

property path: str

Returns: Path to the HDF5 file.

class hdf5array.Hdf5CompressedSparseMatrixSeed.Hdf5CompressedSparseMatrixSeed(path, group_name, shape, by_column, dtype=None, index_dtype=None, data_name=None, indices_name=None, indptr_name=None)[source]

Bases: object

Compressed sparse matrix stored in a HDF5 file, represented as a DelayedArray seed.

This assumes that there are three datasets; data containing the data values, indices containing the indices, and indptr containing the pointers to the start of every row/column.

property by_column: bool

Returns: Whether the matrix is compressed sparse column.

property data_name: str

Returns: Name of the HDF5 dataset containing the matrix data values.

property dtype: dtype

Returns: NumPy type of this matrix.

property group_name: str | None

Returns: Name of the HDF5 group containing the matrix contents, or None if the matrix is not contained within a single group.

property index_dtype: <property object at 0x7efe45fcfb30>

Returns: NumPy type of the indices in this matrix.

property indices_name: str

Returns: Name of the HDF5 dataset containing the matrix indices.

property indptr_name: str

Returns: Name of the HDF5 dataset containing the matrix pointers.

property path: str

Returns: Path to the HDF5 file.

property shape: Tuple[int, int]

Returns: Tuple containing the dimensions of this matrix.

hdf5array.Hdf5CompressedSparseMatrixSeed.chunk_grid_Hdf5CompressedSparseMatrixSeed(x)[source]

See chunk_grid().

The cost factor is set to 20 to reflect the computational work involved in extracting data from disk.

hdf5array.Hdf5CompressedSparseMatrixSeed.extract_dense_array_Hdf5CompressedSparseMatrixSeed(x, subset)[source]

See extract_dense_array().

Return type:

ndarray

hdf5array.Hdf5CompressedSparseMatrixSeed.extract_sparse_array_Hdf5CompressedSparseMatrixSeed(x, subset)[source]

See extract_sparse_array().

Return type:

SparseNdarray

hdf5array.Hdf5CompressedSparseMatrixSeed.is_masked_Hdf5CompressedSparseMatrixSeed(x)[source]

See is_masked().

Return type:

bool

hdf5array.Hdf5CompressedSparseMatrixSeed.is_sparse_Hdf5CompressedSparseMatrixSeed(x)[source]

See is_sparse().

hdf5array.Hdf5CompressedSparseMatrixSeed.to_scipy_sparse_matrix_from_Hdf5CompressedSparseMatrix(x, format='csc')[source]

See delayedarray.to_scipy_sparse_matrix.to_scipy_sparse_matrix().

Return type:

spmatrix

hdf5array.Hdf5CompressedSparseMatrixSeed.wrap_Hdf5CompressedSparseMatrixSeed(x)[source]

See wrap().

hdf5array.Hdf5DenseArraySeed module

class hdf5array.Hdf5DenseArraySeed.Hdf5DenseArray(path, name, **kwargs)[source]

Bases: DelayedArray

HDF5-backed dataset as a DelayedArray dense array.

This subclass allows developers to implement custom methods for HDF5-backed arrays.

property name: str

Returns: Name of the dataset inside the file.

property path: str

Returns: Path to the HDF5 file.

class hdf5array.Hdf5DenseArraySeed.Hdf5DenseArraySeed(path, name, dtype=None, native_order=False)[source]

Bases: object

HDF5-backed dataset as a DelayedArray dense array seed.

property dtype: dtype

Returns: NumPy type of this array.

property name: str

Returns: Name of the dataset inside the file.

property path: str

Returns: Path to the HDF5 file.

property shape: Tuple[int, ...]

Returns: Tuple containing the dimensions of this array.

hdf5array.Hdf5DenseArraySeed.chunk_grid_Hdf5DenseArraySeed(x)[source]

See chunk_grid().

The cost factor is set to 20 to reflect the computational work involved in extracting data from disk.

hdf5array.Hdf5DenseArraySeed.extract_dense_array_Hdf5DenseArraySeed(x, subset)[source]

See extract_dense_array().

Return type:

ndarray

hdf5array.Hdf5DenseArraySeed.is_masked_Hdf5DenseArraySeed(x)[source]

See is_masked().

Return type:

bool

hdf5array.Hdf5DenseArraySeed.wrap_Hdf5DenseArraySeed(x)[source]

See wrap().

Module contents