ITensor / ITensor/SparseArraysBase.jl
[ENHANCEMENT] Define an `SparseArraysBase.issparse` trait function and associated trait
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 1
- Forks
- 1
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Description
Define an SparseArraysBase.issparse trait function with an associated type trait SparseArraysBase.IsSparse, in the style of SimpleTraits.jl.
We could use SparseArraysBase.issparse(a) = interface(a) isa AbstractSparseArrayInterface as a default definition.
Possibly we can overload/repurpose Base.issparse for this but I don't know how general that is meant to be, for example:
julia> using SparseArrays: issparse
julia> using LinearAlgebra: Diagonal
julia> issparse(Diagonal(randn(4)))
false
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing SparseArraysBase interface, especially interface(a) and AbstractSparseArrayInterface, then compare the proposed trait with SimpleTraits.jl. Determine the intended relationship between SparseArraysBase.issparse, IsSparse, and Base.issparse; done means the trait API and its default behavior are defined consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100