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 347c2be commit ecebb0aCopy full SHA for ecebb0a
src/scalar.jl
@@ -379,16 +379,14 @@ end
379
for T in SCALINGNUMBERTYPES[2:end]
380
@eval function Base.:*(α::ScalarOperator, x::$T)
381
if isconstant(α)
382
- T2 = promote_type($T, eltype(α))
383
- return ScalarOperator(convert(T2, α) * x, α.update_func)
+ return ScalarOperator(concretize(α) * x)
384
else
385
return ComposedScalarOperator(α, ScalarOperator(x))
386
end
387
388
@eval function Base.:*(x::$T, α::ScalarOperator)
389
390
391
392
393
return ComposedScalarOperator(ScalarOperator(x), α)
394
0 commit comments