Skip to content

BroadcastOperator doesn't work with scipy > 1.8.1 #1626

@Priscilla-

Description

@Priscilla-

Hello,

I'm reproducing the reconstruction example in https://odlgroup.github.io/odl/guide/pdhg_guide.html, and I found out that the BroadcastOperator raises an Error related to the format and sparsity of the data when computing the L operator. I'm on python3.10.1, scipy1.10 and numpy1.23.5 on an OSX. I've tried downgrading scipy to the v1.8.1, which solves the issue with the Broadcasting operator, but other problems with the data types to construct the phantom appear instead. I've tried hacking scipy commenting the lines 127-129 in "/scipy/sparse/_sputils.py":

    newdtype = np.dtype(dtype)
    # Commented the section below to fix problem with ODL's broadcasting operator
    #if newdtype == np.object_:
       # raise ValueError(
        #    "object dtype is not supported by sparse matrices"
        #)

And now the Broadcasting operator works.

Notice that scipy1.10.0 is installed with ODL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions