fast_array_utils.conv
¶
Conversion utilities.
- fast_array_utils.conv.to_dense(x: CpuArray | DiskArray | types.sparray | types.spmatrix | types.CSDataset, /, *, to_cpu_memory: bool = False) NDArray[Any] ¶
- fast_array_utils.conv.to_dense(x: types.DaskArray, /, *, to_cpu_memory: Literal[False] = False) types.DaskArray
- fast_array_utils.conv.to_dense(x: types.DaskArray, /, *, to_cpu_memory: Literal[True]) NDArray[Any]
- fast_array_utils.conv.to_dense(x: GpuArray | types.CupySpMatrix, /, *, to_cpu_memory: Literal[False] = False) types.CupyArray
- fast_array_utils.conv.to_dense(x: GpuArray | types.CupySpMatrix, /, *, to_cpu_memory: Literal[True]) NDArray[Any]
Convert x to a dense array.
If
to_cpu_memory
isFalse
,dask.array.Array
s andcupy.ndarray
s/cupyx.scipy.sparse.spmatrix
instances stay out-of-core and in GPU memory, respecively.- Parameters:
x – Input object to be converted.
to_cpu_memory – Also load data into memory (resulting in a
numpy.ndarray
).
- Returns:
Dense form of
x
fast_array_utils.conv.scipy
¶
Utilities only for sparse matrices.
- fast_array_utils.conv.scipy.to_dense(x: types.spmatrix | types.sparray, order: Literal['C', 'F'] = 'C') NDArray[Any] ¶
Convert a sparse matrix to a dense matrix.
- Parameters:
x – Input matrix.
order – The order of the output matrix.
- Returns:
Dense matrix form of
x