Skip to content

Commit 156e598

Browse files
committed
Merge branch 'dl/scalarldiv' of https://github.com/JuliaApproximation/ContinuumArrays.jl into dl/scalarldiv
2 parents 1428327 + 9f8644e commit 156e598

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/bases/bases.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ function _broadcast_mul_ldiv(::Tuple{ScalarLayout,Any}, A, B)
119119
a,b = arguments(B)
120120
a * (A \ b)
121121
end
122+
123+
_broadcast_mul_ldiv(::Tuple{ScalarLayout,AbstractBasisLayout}, A, B) =
124+
_broadcast_mul_ldiv((ScalarLayout(),UnknownLayout()), A, B)
122125
_broadcast_mul_ldiv(_, A, B) = copy(Ldiv{typeof(MemoryLayout(A)),UnknownLayout}(A,B))
123126

124127
copy(L::Ldiv{<:AbstractBasisLayout,BroadcastLayout{typeof(*)}}) = _broadcast_mul_ldiv(map(MemoryLayout,arguments(L.B)), L.A, L.B)

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,11 @@ end
470470
@test_throws BoundsError K[Inclusion(0..0.5), Inclusion(0..0.5)][1,1]
471471
end
472472

473+
@testset "A \\ ( c .* B) == c .* (A\\B) #101" begin
474+
L = LinearSpline(0:5)
475+
@test L \ (2L) == 2(L\L)
476+
end
477+
473478
"""
474479
This is a simple implementation of Chebyshev for testing. Use ClassicalOrthogonalPolynomials
475480
for the real implementation.

0 commit comments

Comments
 (0)