@@ -67,8 +67,8 @@ function _perm_blockvec(X::AbstractArray{T,3}, dims=1) where T
6767 end
6868 ret
6969end
70- function _perm_blockvec (X:: AbstractArray{T,4} , dims= 1 : 2 ) where T
71- @assert dims == 1 : 2
70+ function _perm_blockvec (X:: AbstractArray{T,4} , dims= ( 1 , 2 ) ) where T
71+ @assert dims == 1 : 2 || dims == ( 1 , 2 )
7272 X1 = _perm_blockvec (X[:,:,1 ,1 ])
7373 X2 = _perm_blockvec (X[1 ,1 ,:,:])
7474 ret = PseudoBlockMatrix {T} (undef, (axes (X1,1 ), axes (X2,1 )))
@@ -83,19 +83,19 @@ _interlace_const(n, m, ms...) = (m, n, _interlace_const(n, ms...)...)
8383
8484# we transform a piecewise transform into a tensor transform where each even dimensional slice corresponds to a different piece.
8585# that is, we don't transform the last dimension.
86- function plan_grid_transform (P:: PiecewisePolynomial , Ns:: NTuple{N,Block{1}} , dims= 1 : N ) where N
86+ function plan_transform (P:: PiecewisePolynomial , Ns:: NTuple{N,Block{1}} , dims= ntuple (identity, Val (N)) ) where N
8787 @assert dims == 1 : N || dims == ntuple (identity,Val (N)) || (N == dims == 1 )
88- x, F = plan_grid_transform (P. basis, _interlace_const (length (P. points)- 1 , Int .(Ns)... ), range (1 ; step= 2 , length= N))
89- repeatgrid ( axes (P . basis, 1 ), x, P . points), ApplyPlan (_perm_blockvec, F, (dims,))
88+ F = plan_transform (P. basis, _interlace_const (length (P. points)- 1 , Int .(Ns)... ), range (1 ; step= 2 , length= N))
89+ ApplyPlan (_perm_blockvec, F, (dims,))
9090end
9191
9292
9393# If one dimension is an integer then this means its a vector transform. That is, we are only transforming
9494# along one dimension.We add an extra dimension for the different entries in the vectors.
95- function plan_grid_transform (P:: PiecewisePolynomial , (M,n):: Tuple{Block{1},Int} , dims:: Int )
95+ function plan_transform (P:: PiecewisePolynomial , (M,n):: Tuple{Block{1},Int} , dims:: Int )
9696 @assert dims == 1
97- x, F = plan_grid_transform (P. basis, (Int (M), length (P. points)- 1 , n), dims)
98- repeatgrid ( axes (P . basis, 1 ), x, P . points), ApplyPlan (_perm_blockvec, F, (dims,))
97+ F = plan_transform (P. basis, (Int (M), length (P. points)- 1 , n), dims)
98+ ApplyPlan (_perm_blockvec, F, (dims,))
9999end
100100
101101function factorize (V:: SubQuasiArray{<:Any,2,<:PiecewisePolynomial,<:Tuple{Inclusion,BlockSlice}} , dims... )
0 commit comments