scipy warning with BroadcastOperator and sparse matrices
joaquimcampos opened this issue · 4 comments
joaquimcampos commented
I get the following warning from scipy/sparse/sputils.py:
"sputils.py:115: UserWarning: object dtype is not supported by sparse matrices
warnings.warn("object dtype is not supported by sparse matrices")" text.
I am using python 3.7.
Code to reproduce:
import numpy as np
from odl import BroadcastOperator
from odl.operator.tensor_ops import MatrixOperator
from scipy import sparse
A = np.array([[1., 0., 0.], [0., 2., 0.]])
B = np.array([[0., 3., 0.], [4., 0., 0.]])
A_op = MatrixOperator(A)
B_op = MatrixOperator(B)
stack_op = BroadcastOperator(A_op, B_op)
askorikov commented
Since SciPy 1.9.0 sparse matrices with object
datatype have been deprecated completely (scipy/scipy#15828) and now this issue breaks BroadcastOperator
and many examples/use cases that require it.