-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Some of this package works fine with Unitful values thanks to its support for Numbers.
But maybe it hasn't actually been tested with Unitful values.
Now I am trying to use it with some and hit my first issue:
M = ones(3,2) * m
L = LinearMap(M)
Matrix(L) # works fine
S = 1s * L # runs, but has wrong eltype
Matrix(S) # throwsI think the issue is here:
LinearMaps.jl/src/scaledmap.jl
Line 17 in 50f5bf9
| ScaledMap{Base.promote_op(*, typeof(λ), eltype(lmap))}(λ, lmap) |
I may know how to fix so I'll aim for a PR.
FWIW, the docstring for promote_op says "Due to its fragility, use of promote_op should be avoided."
Metadata
Metadata
Assignees
Labels
No labels