Skip to content

Commit 3fcb544

Browse files
committed
remove ndims parameter
1 parent 51184d9 commit 3fcb544

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/abstractsparsearray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using DerivableInterfaces: @array_aliases
66

77
using DerivableInterfaces: DerivableInterfaces
88
function DerivableInterfaces.interface(::Type{A}) where {A<:AnyAbstractSparseArray}
9-
return SparseArrayInterface{ndims(A)}()
9+
return SparseArrayInterface()
1010
end
1111

1212
using DerivableInterfaces: @derive

src/abstractsparsearrayinterface.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ end
2525
# Fallbacks for dense/non-sparse arrays.
2626

2727
"""
28-
AbstractSparseArrayInterface{N} <: AbstractArrayInterface{N}
28+
AbstractSparseArrayInterface <: AbstractArrayInterface
2929
3030
Abstract supertype for any interface associated with sparse array types.
3131
"""
32-
abstract type AbstractSparseArrayInterface{N} <: AbstractArrayInterface{N} end
32+
abstract type AbstractSparseArrayInterface <: AbstractArrayInterface end
3333

3434
"""
35-
SparseArrayInterface{N} <: AbstractSparseArrayInterface{N}
35+
SparseArrayInterface <: AbstractSparseArrayInterface
3636
3737
Interface for array operations that are centered around sparse storage types, typically assuming
3838
fast `O(1)` random access/insertion, but slower sequential access.
3939
"""
40-
struct SparseArrayInterface{N} <: AbstractSparseArrayInterface{N} end
40+
struct SparseArrayInterface <: AbstractSparseArrayInterface end
4141

4242
# by default, this interface is stronger than other interfaces (is this fair?)
4343

src/wrappers.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ end
164164

165165
using LinearAlgebra: LinearAlgebra, Diagonal
166166

167-
DerivableInterfaces.interface(::Diagonal) = SparseArrayInterface{2}()
167+
DerivableInterfaces.interface(::Diagonal) = SparseArrayInterface()
168168

169169
@interface ::AbstractSparseArrayInterface storedvalues(D::Diagonal) = LinearAlgebra.diag(D)
170170

0 commit comments

Comments
 (0)