You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have the option of getting the string representation of a derived unit directly, e.g. print 1V as 1V, instead of 1 kg m²s⁻³A⁻¹. I realise this might be contrary to the purpose of this package. The reason I want to do this is that I'm looking to store some data with their associated units, and so would like to be able to read strings like "mV" from a file and create an array of mV quantities. What I have tried so far is
_strunit = string(SIUnits.unit(first(data)))
which of course returns "kg m²s⁻³A⁻¹" for an array of voltage data.
Conversely, I would like to have something like
parse(SIUnit, "mV") = 1//1000 kg m²s⁻³A⁻¹
My apologies if this functionality is outside of the scope of the package.
The text was updated successfully, but these errors were encountered:
It would be nice to have the option of getting the string representation of a derived unit directly, e.g. print 1V as 1V, instead of 1 kg m²s⁻³A⁻¹. I realise this might be contrary to the purpose of this package. The reason I want to do this is that I'm looking to store some data with their associated units, and so would like to be able to read strings like "mV" from a file and create an array of mV quantities. What I have tried so far is
_strunit = string(SIUnits.unit(first(data)))
which of course returns "kg m²s⁻³A⁻¹" for an array of voltage data.
Conversely, I would like to have something like
parse(SIUnit, "mV") = 1//1000 kg m²s⁻³A⁻¹
My apologies if this functionality is outside of the scope of the package.
The text was updated successfully, but these errors were encountered: