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.
PSA:
UnitfulLinearAlgebra.jl
is designed by combining features ofUnitful.jl
andDimensionalData.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. Usegetindexqty(A,1,1)
to return aQuantity
with units. Currently, this behavior is kept in order to optimize performance.