@@ -80,30 +80,4 @@ Base.NamedTuple(x::ComponentVector) = _namedtuple(x)
8080
8181
8282# # AbstractAxis conversion and promotion
83- Base. convert (:: Type{Ax} , ax:: AbstractAxis ) where {Ax<: AbstractAxis } = ax # Ax()
84- # Base.convert(::Type{Axis}, ax::AbstractAxis) = ax #Ax()
85- Base. convert (:: Type{Ax} , ax:: AbstractAxis ) where {Ax<: VarAxes } = convert .(typeof .(getaxes (Ax)), (ax,))
86-
87- Base. promote_rule (AA:: Type{<:Axis} , :: Type{NullAxis} ) = AA
88- Base. promote_rule (AA:: Type{<:Axis} , :: Type{FlatAxis} ) = AA
89- Base. promote_rule (FA:: Type{FlatAxis} , :: Type{NullAxis} ) = FA
90- Base. promote_rule (FA:: Type{FlatAxis} , :: Type{FlatAxis} ) = FA
91- Base. promote_rule (NA:: Type{NullAxis} , :: Type{NullAxis} ) = NA
92- function Base. promote_rule (A1:: Type{<:VarAxes} , A2:: Type{<:VarAxes} )
93- # promote_type.(typeof.(getaxes(A1)), typeof.(getaxes(A2)))
94- ax = typeof (first .(promote .(getaxes (A1), getaxes (A2))))
95- end
96-
97- broadcast_promote_type (:: Type{FlatAxis} , ax2:: Type{<:Axis} ) = ax2
98- broadcast_promote_type (ax1:: Type{<:Axis} , :: Type{FlatAxis} ) = ax1
99- broadcast_promote_type (ax1:: Type{FlatAxis} , :: Type{NullAxis} ) = ax1
100- broadcast_promote_type (:: Type{NullAxis} , ax2:: Type{FlatAxis} ) = ax2
101- broadcast_promote_type (:: Type{<:Axis} , :: Type{<:Axis} ) = FlatAxis
102- broadcast_promote_type (ax1:: Type{Ax} , :: Type{Ax} ) where {Ax<: Axis } = ax1
103- function broadcast_promote_type (A1:: Type{<:VarAxes} , A2:: Type{<:VarAxes} )
104- ax = Tuple{broadcast_promote_typeof .(getaxes (A1), getaxes (A2))... }
105- end
106-
107- broadcast_promote_typeof (ax1, ax2) = broadcast_promote_type (typeof (ax1), typeof (ax2))
108-
109- broadcast_promote (ax1, ax2) = broadcast_promote_typeof (ax1, ax2)()
83+ Base. convert (:: Type{Ax} , ax:: AbstractAxis ) where {Ax<: AbstractAxis } = ax
0 commit comments