@@ -70,8 +70,8 @@ For multiple arrays, the iterable contains all indices where at least one input
70
70
The type of indices can be controlled through `style`, which will default to a compatible style for all
71
71
inputs.
72
72
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).
75
75
76
76
See also [`storedvalues`](@ref), [`storedpairs`](@ref) and [`storedlength`](@ref).
77
77
"""
@@ -90,7 +90,8 @@ function storedlength end
90
90
An iterable over all stored indices and their corresponding stored values.
91
91
The indices are compatible with `IndexStyle(A)`.
92
92
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).
94
95
"""
95
96
function storedpairs end
96
97
@@ -99,7 +100,8 @@ function storedpairs end
99
100
100
101
An iterable over all stored values.
101
102
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).
103
105
"""
104
106
function storedvalues end
105
107
379
381
380
382
@interface :: AbstractSparseArrayInterface storedlength (A:: AbstractArray ) =
381
383
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
384
387
385
388
#=
386
389
All sparse array interfaces are mapped through layout_getindex. (is this too opinionated?)
0 commit comments