Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Unitful compatibility #306

Open
jakewilliami opened this issue Jan 17, 2021 · 1 comment
Open

[Feature request] Unitful compatibility #306

jakewilliami opened this issue Jan 17, 2021 · 1 comment

Comments

@jakewilliami
Copy link

Issue discovered by @AndiMD originally in #295:

Possibly related, Unitful.jl compatibility:

julia> using Polynomials, Unitful
julia> fit([1.0,2.0,3.0,4.0].*u"m", [6.0,4.0,7.0,7.5].*u"m",2)
ERROR: DimensionError ...

Response from @jverzani on 5th Dec., 2020:

Yeah, [...] I'm not sure there is a proper fix. For fitting, a Vandermonde matrix is constructed with columns which would need units of u^0, u^1, ...,u^n. So currently there is an error as we type that matrix by eltype(x).

Some discussion on the issue of using units with matrices can be found here:
PainterQubits/Unitful.jl#46

with the simplest recommendation being to strip the units and add them back, as needed.

@jverzani
Copy link
Member

Thanks @jakewilliami . Hopefully we can close this someday, but at this moment, I'm no so sure how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants