pyxu.info.deps#

CUPY_ENABLED: bool#

Show if CuPy-based backends are available.

class NDArrayInfo(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

Supported dense array backends.

NUMPY = 1#
DASK = 2#
CUPY = 3#
classmethod default()[source]#

Default array backend to use.

Return type:

NDArrayInfo

type()[source]#

Array type associated to a backend.

Return type:

type

classmethod from_obj(obj)[source]#

Find array backend associated to obj.

Return type:

NDArrayInfo

classmethod from_flag(gpu)[source]#

Find array backend suitable for in-memory CPU/GPU computing.

Parameters:

gpu (bool)

Return type:

NDArrayInfo

module(linalg=False)[source]#

Python module associated to an array backend.

Parameters:

linalg (bool) – Return the linear-algebra submodule with identical API to numpy.linalg.

Return type:

ModuleType

class SparseArrayInfo(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

Supported sparse array backends.

SCIPY_SPARSE = 1#
CUPY_SPARSE = 2#
classmethod default()[source]#

Default array backend to use.

Return type:

SparseArrayInfo

type()[source]#

Array type associated to a backend.

Return type:

type

classmethod from_obj(obj)[source]#

Find array backend associated to obj.

Return type:

SparseArrayInfo

module(linalg=False)[source]#

Python module associated to an array backend.

Parameters:

linalg (bool) – Return the linear-algebra submodule with identical API to scipy.sparse.linalg.

Return type:

ModuleType

supported_array_types()[source]#

List of all supported dense array types in current Pyxu install.

Return type:

Collection[type]

supported_array_modules()[source]#

List of all supported dense array modules in current Pyxu install.

Return type:

Collection[ModuleType]

supported_sparse_types()[source]#

List of all supported sparse array types in current Pyxu install.

Return type:

Collection[type]

supported_sparse_modules()[source]#

List of all supported sparse array modules in current Pyxu install.

Return type:

Collection[ModuleType]