Add BlockedOneTo as the axis type for a BlockedArray#348
Merged
jishnub merged 17 commits intorelease-1.0from Apr 4, 2024
Merged
Add BlockedOneTo as the axis type for a BlockedArray#348jishnub merged 17 commits intorelease-1.0from
BlockedOneTo as the axis type for a BlockedArray#348jishnub merged 17 commits intorelease-1.0from
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-1.0 #348 +/- ##
===============================================
+ Coverage 95.33% 95.35% +0.01%
===============================================
Files 16 16
Lines 1500 1527 +27
===============================================
+ Hits 1430 1456 +26
- Misses 70 71 +1 ☔ View full report in Codecov by Sentry. |
BlockedOneTo as the axis type for a BlockedArraysBlockedOneTo as the axis type for a BlockedArray
20e1716 to
ac0b14e
Compare
Contributor
|
Does it mean the axes of blockarrays have to start from 1, e.g. offset not allowed? |
Member
Author
|
Yes, this PR disallows this. Is there a use case for block arrays with offset axes? One may wrap it in an |
Contributor
|
I'm not particularly concerned about this. It'll simplify many other implementations. |
6a1945f to
4582f1d
Compare
4582f1d to
7c02524
Compare
jishnub
added a commit
that referenced
this pull request
Apr 7, 2024
* Add BlockedOneTo * axes for AbstractBlockedUnitRange returns BlockedOneTo * Rewrite test using blockedrange instead of BlockedUnitRange * Update BlockedUnitRange docstring and add for BlockedOneTo/blockedrange * Show for BlockedOneTo * Blocklengths for OrdinalRange block sizes * Update docs * Return BlockedOneTo in indexing with BlockRange * Be less fussy in show tests * Require 1-based lasts in blockedrange * Disallow offset arrays in BlockedUnitRange * undo unnecessary doc change * Test conversions between BlockedOneTo and BlockedUnitRange * Reduce the number of convert methods * Remove axes1 specialization * Disallow offset block axes and blocks in BlockArray constructor * Remove unused axes method
61 tasks
dlfivefifty
added a commit
that referenced
this pull request
May 17, 2024
* Compact show for `BlockRange` (#248) * Compact show for BlockRange * update docstrings * don't specialize show for zero dim * fix missing io in print * missing show tests * show for BlockIndexRange * Bump version to v1.0.0-dev * Add `BlockedOneTo` as the axis type for a `BlockedArray` (#348) * Add BlockedOneTo * axes for AbstractBlockedUnitRange returns BlockedOneTo * Rewrite test using blockedrange instead of BlockedUnitRange * Update BlockedUnitRange docstring and add for BlockedOneTo/blockedrange * Show for BlockedOneTo * Blocklengths for OrdinalRange block sizes * Update docs * Return BlockedOneTo in indexing with BlockRange * Be less fussy in show tests * Require 1-based lasts in blockedrange * Disallow offset arrays in BlockedUnitRange * undo unnecessary doc change * Test conversions between BlockedOneTo and BlockedUnitRange * Reduce the number of convert methods * Remove axes1 specialization * Disallow offset block axes and blocks in BlockArray constructor * Remove unused axes method * Infinite broadcast tests (#383) * Specialize blockedrange BroadcastStyle for LazyArrayStyle (#384) * Specialize blockedrange BroadcastStyle for LazyArrayStyle * Add compat for LazyArrays * Define dataids for PseudoBlockArrays (#364) (#385) * Define dataids for PseudoBlockArrays (#364) * Don't use dataids of axes * Banded Matrix extension (#388) * Move BandedMatrices+BlockArrays code in BlockBandedMatrices to extension * Bump julia-actions/setup-julia from 1 to 2 (#387) Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 1 to 2. - [Release notes](https://github.com/julia-actions/setup-julia/releases) - [Commits](julia-actions/setup-julia@v1...v2) --- updated-dependencies: - dependency-name: julia-actions/setup-julia dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Move over blockbanded code * Add tests * Update Project.toml * add tests * Update Project.toml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Generalize the element type of `BlockedUnitRange` (#337) * Allow more general BlockUnitRange element types * Restrict element type * Get tests passing * Fix some tests * Fix some doctests * Skip broken test in Julia v1.6 * Better support for unitful numbers * Fix tests * Stricter types in _BlockedUnitRange * Improve tests coverage * Allow non-Int eltypes in BlockedOneTo (#395) * Allow non-Int eltypes in BlockedOneTo * Specific constructors in BlockedOneTo * Restrict eltype to integers in BlockedOneTo constructors * Tests for construction from a Tuple * Move LazyArrays extension to LazyArrays.jl (#393) * Move LazyArrays extension to LazyArrays.jl * remove LazyArrays * Move over OneToCumsum This was type piracy in LazyBandedMatrices.jl * Update blockaxis.jl * move out InfiniteArrays.jl tests * Use FillArrays accumulate overloads (#397) * Bump julia-actions/setup-julia from 1 to 2 (#387) Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 1 to 2. - [Release notes](https://github.com/julia-actions/setup-julia/releases) - [Commits](julia-actions/setup-julia@v1...v2) --- updated-dependencies: - dependency-name: julia-actions/setup-julia dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Map imported names to correct parentmodules (#391) * Remove unused imported names (#392) * Don't import Base.Cartesian (#394) I don't think this is being used anymore * Use FillArrays accumulate * Bump julia-actions/cache from 1 to 2 (#398) Bumps [julia-actions/cache](https://github.com/julia-actions/cache) from 1 to 2. - [Release notes](https://github.com/julia-actions/cache/releases) - [Commits](julia-actions/cache@v1...v2) --- updated-dependencies: - dependency-name: julia-actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Project.toml * Update Project.toml * try running Pkg.update() --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jishnu Bhattacharya <jishnub.github@gmail.com> * Redefine blocksizes (#399) * Redefine blocksizes * Revert change to docstring * Add tests, fix some tests, add docstring * Fix more tests * Add test Project.toml * Git ignore vim temp files * Fixes to test Project.toml * Another test Project.toml fix * Move code, change type design, better code coverage * Backwards compatibility. Fix doctest. * Fix tests * Redesign BlockSizes to be AbstractArray subtype * Rename PseudoBlockArray to BlockedArray (#401) * v1.0, add README * rename files * Update README.md --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jishnu Bhattacharya <jishnub.github@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matt Fishman <mtfishman@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After this, the axes of a
BlockArrayareBlockedOneTos instead ofBlockedUnitRanges:blockedrangereturns aBlockedOneToby default:BlockedOneToare their own axes:blocklengthsmay avoid allocating if the block sizes are given by anOrdinalRange:Breaking change: this PR disallows offset vectors as arguments to
blockedrange, which used to be supported earlier. Supporting this correctly is a lot of work, and having theblocklastshave offset axes adds little value to the use case. Typically, we only care about the values ofblocklasts, and not theiraxes.