Skip to content

[ENHANCEMENT] Base.map! needs refactor #112

Description

@ogauthe
#src/blocksparsearrayinterface/map.jl
@interface interface::AbstractBlockSparseArrayInterface function Base.map!(
  f, a_dest::AbstractArray, a_srcs::AbstractArray...
)

Base.map! is not compatible with the design of KroneckerMatrix.

  • line 27, indexing a SparseArraysBase.SparseMatrixDOK{KroneckerMatrix fails as it tries to call Base.similar(::Type{KroneckerMatrix{...}}, dims::Tuple{Int,Int}) which cannot be defined (there is not enough information in type + size to init a KroneckerMatrix).
  • line 39, it calls iszero on a SubArray{Float64, 2, KroneckerMatrix}. iszero is defined for a KroneckerMatrix, but the wrapper type prevents the dispatch and the fall back option errors on getindex

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions