Skip to content

Commit 71ee336

Browse files
authored
Add the D parameter to AbstractDimStack (#1128)
* put D parameter in AbstractDimStack * update CHANGELOG.md
1 parent d54b3c7 commit 71ee336

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Changelog.generate(
5757
metadata going forward, explicitly use `metadata(dims(obj, X))`
5858
- `val(obj)` no longer returns `map(val, dims(obj))` because that's just weird,
5959
val seems like it would return `parent` from that call. `lookup` does this anyway.
60+
- Added a `D` parameter to AbstractDimStack in ([#1128]) so that its more
61+
interoperable with AbstractDimArray
6062
- Removed two methods that don't have much use and cause lots of invalidations:
6163
- `Base.convert(Type{<:AbstractString}, name::DD.AbstractName)` is removed, use `string(name)` instead.
6264
- `Base.merge(stack::AbstractDimStack, pairs)` is removed, use `merge(stack, NamedTuple(pairs))` instead.
@@ -70,5 +72,6 @@ Changelog.generate(
7072
[#917]: https://github.com/rafaqz/DimensionalData.jl/issues/917
7173
[#1041]: https://github.com/rafaqz/DimensionalData.jl/issues/1041
7274
[#1071]: https://github.com/rafaqz/DimensionalData.jl/issues/1071
75+
[#1128]: https://github.com/rafaqz/DimensionalData.jl/issues/1128
7376
[@JoshuaBillson]: https://github.com/JoshuaBillson
7477
[@tiemvanderdeure]: https://github.com/tiemvanderdeure

src/stack/stack.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To extend `AbstractDimStack`, implement argument and keyword version of
2525
2626
The constructor of an `AbstractDimStack` must accept a `NamedTuple`.
2727
"""
28-
abstract type AbstractDimStack{K,T,N,L} end
28+
abstract type AbstractDimStack{K,T,N,L,D} end
2929
const AbstractVectorDimStack = AbstractDimStack{K,T,1} where {K,T}
3030
const AbstractMatrixDimStack = AbstractDimStack{K,T,2} where {K,T}
3131

@@ -442,7 +442,7 @@ julia> s[X(At(:a))] isa DimStack
442442
true
443443
```
444444
"""
445-
struct DimStack{K,T,N,L,D<:Tuple,R<:Tuple,LD,M,LM} <: AbstractDimStack{K,T,N,L}
445+
struct DimStack{K,T,N,L,D<:Tuple,R<:Tuple,LD,M,LM} <: AbstractDimStack{K,T,N,L,D}
446446
data::L
447447
dims::D
448448
refdims::R

0 commit comments

Comments
 (0)