Skip to content

issparse is not defined but is requested for a view's parent #486

Description

@bertini97

Describe the bug 🐞

On certain operations, issparse(::SubArray) is called, and it calls issparse on the parent, but it's not defined in the case of AbstractVectorOfArray.

Expected behavior

issparse(::SubArray) is defined, to false.

Error & Stacktrace ⚠️

> U = mapreduce(u -> view(u, :, :), hcat, us)
MethodError: no method matching issparse(::ODESolution{...})

Additional context

Solution:

import SparseArrays: issparse
issparse(::AbstractVectorOfArray) = false

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions