File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ Base.length(bt::AbstractBlockTuple) = length(Tuple(bt))
3737
3838Base. lastindex (bt:: AbstractBlockTuple ) = length (bt)
3939
40+ function Base. map (f, bt:: AbstractBlockTuple )
41+ return unspecify_type_parameters (typeof (bt)){blocklengths (bt)}(map (f, Tuple (bt)))
42+ end
43+
4044# Broadcast interface
4145Base. broadcastable (bt:: AbstractBlockTuple ) = bt
4246struct AbstractBlockTupleBroadcastStyle{BlockLengths,BT} <: Broadcast.BroadcastStyle end
@@ -97,8 +101,6 @@ BlockedTuple(bt::AbstractBlockTuple) = BlockedTuple{blocklengths(bt)}(Tuple(bt))
97101# Base interface
98102Base. Tuple (bt:: BlockedTuple ) = bt. flat
99103
100- Base. map (f, bt:: BlockedTuple ) = BlockedTuple {blocklengths(bt)} (map (f, Tuple (bt)))
101-
102104# BlockArrays interface
103105function BlockArrays. blocklengths (:: Type{<:BlockedTuple{BlockLengths}} ) where {BlockLengths}
104106 return BlockLengths
You can’t perform that action at this time.
0 commit comments