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 7295fea commit 73c8f2bCopy full SHA for 73c8f2b
src/scalar.jl
@@ -368,16 +368,14 @@ end
368
for T in SCALINGNUMBERTYPES[2:end]
369
@eval function Base.:*(α::ScalarOperator, x::$T)
370
if isconstant(α)
371
- T2 = promote_type($T, eltype(α))
372
- return ScalarOperator(convert(T2, α) * x, α.update_func)
+ return ScalarOperator(concretize(α) * x)
373
else
374
return ComposedScalarOperator(α, ScalarOperator(x))
375
end
376
377
@eval function Base.:*(x::$T, α::ScalarOperator)
378
379
380
381
382
return ComposedScalarOperator(ScalarOperator(x), α)
383
0 commit comments