We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0f6761 commit faaadf9Copy full SHA for faaadf9
src/BlockArraysExtensions/blockedunitrange.jl
@@ -16,13 +16,16 @@ using BlockArrays:
16
findblockindex,
17
mortar
18
19
+# Get the axis of each block of a blocked unit
20
+# range.
21
function eachblockaxis(a::AbstractUnitRange)
- Base.require_one_based_indexing(a)
- return map(Base.OneTo, blocklengths(a))
22
+ return map(only ∘ axes, blocks(a))
23
end
24
-function mortar_axis(axeses)
25
- return blockedrange(length.(axeses))
+# Take a collection of axes and mortar them
26
+# into a single blocked axis.
27
+function mortar_axis(axs)
28
+ return blockedrange(length.(axs))
29
30
31
# Custom `BlockedUnitRange` constructor that takes a unit range
0 commit comments