Skip to content

Commit

Permalink
import paddeddata to BlockArrays extension (#212)
Browse files Browse the repository at this point in the history
* import paddeddata

* Update test_infblock.jl
  • Loading branch information
dlfivefifty authored Dec 19, 2024
1 parent 13184d6 commit a282035
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "InfiniteArrays"
uuid = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
version = "0.15.2"
version = "0.15.3"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
7 changes: 3 additions & 4 deletions ext/InfiniteArraysBlockArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ using InfiniteArrays.ArrayLayouts, InfiniteArrays.LazyArrays, InfiniteArrays.Lin

import Base: length, size, axes, BroadcastStyle, copy, +, -, maximum, OneTo
import Base.Broadcast: Broadcasted
import ArrayLayouts: sub_materialize, axes_print_matrix_row
import InfiniteArrays: OneToInf, PosInfinity, InfRanges, RealInfinity, Infinity, InfStepRange, TridiagonalToeplitzLayout, InfiniteCardinal
import BlockArrays: AbstractBlockLayout, sizes_from_blocks, BlockTridiagonal, OneToCumsum, BlockSlice, AbstractBlockedUnitRange,
BlockLayout
import LazyArrays: PaddedColumns, LazyArrayStyle
import BlockArrays: AbstractBlockLayout, sizes_from_blocks, BlockTridiagonal, OneToCumsum, BlockSlice, AbstractBlockedUnitRange, BlockLayout
import InfiniteArrays.ArrayLayouts: sub_materialize, axes_print_matrix_row
import InfiniteArrays.LazyArrays: PaddedColumns, LazyArrayStyle, paddeddata

const OneToInfCumsum = RangeCumsum{Int,OneToInf{Int}}

Expand Down
5 changes: 4 additions & 1 deletion test/test_infblock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ const BlockTriPertToeplitz = InfiniteArraysBlockArraysExt.BlockTriPertToeplitz
end

@testset "padded" begin
c = BlockedArray([1; zeros(∞)], Vcat(2, Fill(3, ∞)))
c = BlockedArray([1; 0; 2; zeros(∞)], Vcat(2, Fill(3, ∞)))
@test c + c isa BlockedVector
@test MemoryLayout(c) isa LazyArrays.PaddedColumns
@test MemoryLayout(c[Block.(2:∞)]) isa LazyArrays.PaddedColumns
@test c[Block.(2:∞)][Block(1)] == [2,0,0]
end


Expand Down

2 comments on commit a282035

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/121693

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.15.3 -m "<description of version>" a2820353beb36545ea4a1f3526ee78589e3ef10e
git push origin v0.15.3

Please sign in to comment.