@@ -70,8 +70,8 @@ For multiple arrays, the iterable contains all indices where at least one input
7070The type of indices can be controlled through `style`, which will default to a compatible style for all
7171inputs.
7272
73- The order of the iterable is not fixed, but for a single input it may be assumed to be compatible
74- with [`storedvalues`](@ref).
73+ The order of the iterable is not guaranteed to be fixed or sorted, and should not be assumed
74+ to be the same as [`storedvalues`](@ref).
7575
7676See also [`storedvalues`](@ref), [`storedpairs`](@ref) and [`storedlength`](@ref).
7777"""
@@ -90,7 +90,8 @@ function storedlength end
9090An iterable over all stored indices and their corresponding stored values.
9191The indices are compatible with `IndexStyle(A)`.
9292
93- The order of the iterable is not fixed, but is compatible with [`eachstoredindex`](@ref).
93+ The order of the iterable is not guaranteed to be fixed or sorted.
94+ See also [`eachstoredindex`](@ref) and [`storedvalues`](@ref).
9495"""
9596function storedpairs end
9697
@@ -99,7 +100,8 @@ function storedpairs end
99100
100101An iterable over all stored values.
101102
102- The order of the iterable is not fixed, but is compatible with [`eachstoredindex`](@ref).
103+ The order of the iterable is not guaranteed to be fixed or sorted, and should not be assumed
104+ to be the same as [`eachstoredindex`](@ref).
103105"""
104106function storedvalues end
105107
379381
380382@interface :: AbstractSparseArrayInterface storedlength (A:: AbstractArray ) =
381383 length (storedvalues (A))
382- @interface :: AbstractSparseArrayInterface storedpairs (A:: AbstractArray ) =
383- Iterators. map (=> , eachstoredindex (A), storedvalues (A))
384+ @interface :: AbstractSparseArrayInterface function storedpairs (A:: AbstractArray )
385+ return Iterators. map (I -> (I => A[I]), eachstoredindex (A))
386+ end
384387
385388#=
386389All sparse array interfaces are mapped through layout_getindex. (is this too opinionated?)
0 commit comments