Skip to content

Precomposition: error when passing CuPy arrays #200

@mrava87

Description

@mrava87

The _PrecompositionOperator currently does not support CuPy arrays for b because of this check if not isinstance(b, (float, np.ndarray)):. We should consider checking if not isinstance(b, (float, np.ndarray, cp.ndarray)):, however since we cannot directly import cupy this will likely require creating a cupy_type method in a new backend module (similar to the one of pylops) that returns cp.ndarray if cupy is available and np.ndarray if not... (note that this could be added to the PyLops backend module, however it would require bumping up the required minimal version of PyLops).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions