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

CAUTION: dangerous fallbacks #84

Open
ggebbie opened this issue Aug 21, 2023 · 0 comments
Open

CAUTION: dangerous fallbacks #84

ggebbie opened this issue Aug 21, 2023 · 0 comments

Comments

@ggebbie
Copy link
Owner

ggebbie commented Aug 21, 2023

PSA:

UnitfulLinearAlgebra.jl is designed by combining features of Unitful.jl and DimensionalData.jl. This design choice has consequences, such as using an AbstractArray type that makes many fallbacks work. The downside is that fallbacks can work even when they shouldn't, no error is produced, and the code continues by silently dropping the units. Discussion and guidance on these design issues is appreciated.

One example is indexing a UnitfulMatrix; the usual convention of A[1,1] will return a unitless value. Use getindexqty(A,1,1) to return a Quantity with units. Currently, this behavior is kept in order to optimize performance.

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

1 participant