@@ -224,11 +224,7 @@ function zernikejacobibandsX(Z::Zernike)
224224 du = sqrt .( (dufirst .+ dueven .+ duodd ) ./ quotient)
225225 dl = sqrt .( (dleven .+ dlodd .+ dlspecial) ./ quotient)
226226
227- return BlockHcat (
228- BlockBroadcastArray (hcat, du, Zeros ((axes (n,1 ),)), dl),
229- Zeros ((axes (n,1 ),Base. OneTo (3 ))),
230- Zeros ((axes (n,1 ),Base. OneTo (3 )))
231- )
227+ return BlockBroadcastArray (hcat, du, Zeros ((axes (n,1 ),)), dl)
232228end
233229
234230function zernikejacobibandsY (Z:: Zernike )
@@ -264,12 +260,8 @@ function zernikejacobibandsY(Z::Zernike)
264260 dl = (- 1 ) .* (nodd .* kodd .+ neven .* keven) .* Vcat (0 , d)
265261 du = (- 1 ) .* (nodd .* keven .+ neven .* kodd) .* d[2 : end ]
266262
267- # zero blocks for banded blockarray structure
268- z = Zeros ((axes (n,1 ),))
269- z5 = Zeros ((axes (n,1 ),Base. OneTo (5 )))
270-
271263 # generate and return bands
272- return dat = BlockHcat ( BlockBroadcastArray (hcat, dl, z, d, z, du), z5, z5)
264+ return dat = BlockBroadcastArray (hcat, dl, Zeros (( axes (n, 1 ),)), d, Zeros (( axes (n, 1 ),)), du)
273265end
274266
275267function getindex (b:: ZernikeJacobimatrixBandsX{T} ,i,j) where T
@@ -282,15 +274,15 @@ end
282274function jacobimatrix (:: Val{1} , Z:: Zernike{T} ) where T
283275 if iszero (Z. a)
284276 dat = ZernikeJacobimatrixBandsX {T} (Z)
285- return Symmetric (BlockBandedMatrices. _BandedBlockBandedMatrix (dat' , axes (dat,1 ), (1 ,1 ), (1 ,1 )))
277+ return Symmetric (BlockBandedMatrices. _BandedBlockBandedMatrix (dat' , axes (dat,1 ), (- 1 ,1 ), (1 ,1 )))
286278 else
287279 error (" Implement for non-zero first basis parameter." )
288280 end
289281end
290282function jacobimatrix (:: Val{2} , Z:: Zernike{T} ) where T
291283 if iszero (Z. a)
292284 dat = ZernikeJacobimatrixBandsY {T} (Z)
293- return Symmetric (BlockBandedMatrices. _BandedBlockBandedMatrix (dat' , axes (dat,1 ), (1 ,1 ), (2 ,2 )))
285+ return Symmetric (BlockBandedMatrices. _BandedBlockBandedMatrix (dat' , axes (dat,1 ), (- 1 ,1 ), (2 ,2 )))
294286 else
295287 error (" Implement for non-zero first basis parameter." )
296288 end
0 commit comments