Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy warning with BroadcastOperator and sparse matrices #1607

Open
joaquimcampos opened this issue Jul 28, 2021 · 1 comment
Open

scipy warning with BroadcastOperator and sparse matrices #1607

joaquimcampos opened this issue Jul 28, 2021 · 1 comment

Comments

@joaquimcampos
Copy link

joaquimcampos commented Jul 28, 2021

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
Copy link

askorikov commented Sep 2, 2022

Since SciPy 1.9.0 sparse matrices with objectdatatype have been deprecated completely (scipy/scipy#15828) and now this issue breaks BroadcastOperator and many examples/use cases that require it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants