Skip to content

Commit 9ef8ae2

Browse files
authored
[SparseArraysBase] Rename SparseArrayInterface to SparseArraysBase (#1591)
1 parent 4e6552d commit 9ef8ae2

File tree

78 files changed

+248
-251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+248
-251
lines changed

NDTensors/src/backup/arraystorage/blocksparsearray/storage/contract.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TODO: Define in `SparseArrayInterface`.
1+
# TODO: Define in `SparseArraysBase`.
22
using ..SparseArrayDOKs: SparseArrayDOK
33

44
# TODO: This is inefficient, need to optimize.

NDTensors/src/backup/arraystorage/diagonalarray/storage/contract.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using .SparseArrayInterface: densearray
1+
using .SparseArraysBase: densearray
22
using .DiagonalArrays: DiagIndex, diaglength
33
using .TypeParameterAccessors: unwrap_array_type
44

NDTensors/src/imports.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ for lib in [
3838
:SymmetrySectors,
3939
:TensorAlgebra,
4040
:NestedPermutedDimsArrays,
41-
:SparseArrayInterface,
41+
:SparseArraysBase,
4242
:SparseArrayDOKs,
4343
:DiagonalArrays,
4444
:BlockSparseArrays,

NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysGradedAxesExt/test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ using NDTensors.GradedAxes:
1313
gradedrange,
1414
isdual
1515
using NDTensors.LabelledNumbers: label
16-
using NDTensors.SparseArrayInterface: stored_length
16+
using NDTensors.SparseArraysBase: stored_length
1717
using NDTensors.SymmetrySectors: U1
1818
using NDTensors.TensorAlgebra: fusedims, splitdims
1919
using LinearAlgebra: adjoint

NDTensors/src/lib/BlockSparseArrays/ext/BlockSparseArraysTensorAlgebraExt/test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Test: @test, @testset
33
using NDTensors.BlockSparseArrays: BlockSparseArray
44
using NDTensors.TensorAlgebra: contract
5-
using NDTensors.SparseArrayInterface: densearray
5+
using NDTensors.SparseArraysBase: densearray
66
@testset "BlockSparseArraysTensorAlgebraExt (eltype=$elt)" for elt in (
77
Float32, Float64, Complex{Float32}, Complex{Float64}
88
)

NDTensors/src/lib/BlockSparseArrays/src/BlockArraysExtensions/BlockArraysExtensions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using BlockArrays:
2222
using Compat: allequal
2323
using Dictionaries: Dictionary, Indices
2424
using ..GradedAxes: blockedunitrange_getindices, to_blockindices
25-
using ..SparseArrayInterface: SparseArrayInterface, stored_length, stored_indices
25+
using ..SparseArraysBase: SparseArraysBase, stored_length, stored_indices
2626

2727
# A return type for `blocks(array)` when `array` isn't blocked.
2828
# Represents a vector with just that single block.
@@ -534,7 +534,7 @@ function Base.setindex!(a::BlockView{<:Any,N}, value, index::Vararg{Int,N}) wher
534534
return a
535535
end
536536

537-
function SparseArrayInterface.stored_length(a::BlockView)
537+
function SparseArraysBase.stored_length(a::BlockView)
538538
# TODO: Store whether or not the block is stored already as
539539
# a Bool in `BlockView`.
540540
I = CartesianIndex(Int.(a.block))
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using BlockArrays: AbstractBlockArray, BlocksView
2-
using ..SparseArrayInterface: SparseArrayInterface, stored_length
2+
using ..SparseArraysBase: SparseArraysBase, stored_length
33

4-
function SparseArrayInterface.stored_length(a::AbstractBlockArray)
4+
function SparseArraysBase.stored_length(a::AbstractBlockArray)
55
return sum(b -> stored_length(b), blocks(a); init=zero(Int))
66
end
77

88
# TODO: Handle `BlocksView` wrapping a sparse array?
9-
function SparseArrayInterface.storage_indices(a::BlocksView)
9+
function SparseArraysBase.storage_indices(a::BlocksView)
1010
return CartesianIndices(a)
1111
end

NDTensors/src/lib/BlockSparseArrays/src/BlockSparseArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ include("abstractblocksparsearray/linearalgebra.jl")
2121
include("abstractblocksparsearray/cat.jl")
2222
include("blocksparsearray/defaults.jl")
2323
include("blocksparsearray/blocksparsearray.jl")
24-
include("BlockArraysSparseArrayInterfaceExt/BlockArraysSparseArrayInterfaceExt.jl")
24+
include("BlockArraysSparseArraysBaseExt/BlockArraysSparseArraysBaseExt.jl")
2525
include("../ext/BlockSparseArraysTensorAlgebraExt/src/BlockSparseArraysTensorAlgebraExt.jl")
2626
include("../ext/BlockSparseArraysGradedAxesExt/src/BlockSparseArraysGradedAxesExt.jl")
2727
include("../ext/BlockSparseArraysAdaptExt/src/BlockSparseArraysAdaptExt.jl")

NDTensors/src/lib/BlockSparseArrays/src/abstractblocksparsearray/abstractblocksparsearray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using BlockArrays:
22
BlockArrays, AbstractBlockArray, Block, BlockIndex, BlockedUnitRange, blocks
3-
using ..SparseArrayInterface: sparse_getindex, sparse_setindex!
3+
using ..SparseArraysBase: sparse_getindex, sparse_setindex!
44

55
# TODO: Delete this. This function was replaced
66
# by `stored_length` but is still used in `NDTensors`.

NDTensors/src/lib/BlockSparseArrays/src/abstractblocksparsearray/arraylayouts.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using ArrayLayouts: ArrayLayouts, DualLayout, MemoryLayout, MulAdd
22
using BlockArrays: BlockLayout
3-
using ..SparseArrayInterface: SparseLayout
3+
using ..SparseArraysBase: SparseLayout
44
using ..TypeParameterAccessors: parenttype, similartype
55

66
function ArrayLayouts.MemoryLayout(arraytype::Type{<:AnyAbstractBlockSparseArray})

0 commit comments

Comments
 (0)