29
29
30
30
# ToDo: Make rand return static arrays for statically-sized power measures.
31
31
32
- function _cartidxs (axs:: Tuple{Vararg{<: AbstractUnitRange,N}} ) where {N}
32
+ function _cartidxs (axs:: Tuple{Vararg{AbstractUnitRange,N}} ) where {N}
33
33
CartesianIndices (map (_dynamic, axs))
34
34
end
35
35
@@ -49,16 +49,16 @@ function Base.rand(rng::AbstractRNG, ::Type{T}, d::PowerMeasure) where {T}
49
49
end
50
50
end
51
51
52
- @inline _pm_axes (sz:: Tuple{Vararg{<: IntegerLike,N}} ) where {N} = map (one_to, sz)
53
- @inline _pm_axes (axs:: Tuple{Vararg{<: AbstractUnitRange,N}} ) where {N} = axs
52
+ @inline _pm_axes (sz:: Tuple{Vararg{IntegerLike,N}} ) where {N} = map (one_to, sz)
53
+ @inline _pm_axes (axs:: Tuple{Vararg{AbstractUnitRange,N}} ) where {N} = axs
54
54
55
- @inline function powermeasure (x:: T , sz:: Tuple{Vararg{<: Any,N}} ) where {T,N}
55
+ @inline function powermeasure (x:: T , sz:: Tuple{Vararg{Any,N}} ) where {T,N}
56
56
PowerMeasure (x, _pm_axes (sz))
57
57
end
58
58
59
59
marginals (d:: PowerMeasure ) = fill_with (d. parent, d. axes)
60
60
61
- function Base.:^ (μ:: AbstractMeasure , dims:: Tuple{Vararg{<: AbstractArray,N}} ) where {N}
61
+ function Base.:^ (μ:: AbstractMeasure , dims:: Tuple{Vararg{AbstractArray,N}} ) where {N}
62
62
powermeasure (μ, dims)
63
63
end
64
64
0 commit comments