Comments (7)
What do other units packages do here? If there’s precedent it’s easier to decide on. e.g., what do Unitful, Pint, AstroPy do?
Also note there is @register_unit
in the meantime.
from dynamicquantities.jl.
Thanks, I will try to get to it this coming week
from dynamicquantities.jl.
Can we call it 1 Molar instead of 1 M? Otherwise I worry about ambiguity with M for Mega (SI prefix).
But apart from that I'm happy to review a PR on this.
from dynamicquantities.jl.
Don't think I've actually seen it written "Molar", not a full-blooded chemist/biologists though (but I could ask one how weird it would be). "Molar" is better than not having it at all though.
from dynamicquantities.jl.
If I interpret it correct, it is defined as M
in both Unitful and Pint:
Unitful (https://github.com/PainterQubits/Unitful.jl/blob/fbf71a66d475423c65bd6e981794e9298ded79da/src/pkgdefaults.jl#L179, line 350)
Pint (https://github.com/hgrecco/pint/blob/master/pint/default_en.txt, line 353
AstroPy has it defined as mol
, I think (https://github.com/astropy/astropy/blob/878cc772cd648300367930707f7f6a1f1e5e4172/astropy/units/physical.py#L45, line 45), while seems bad since it is easily confused with mole.
We also use it in Catalyst's current tests for units (which depends on Unitful, but which we want to move to DynamicQuantities): https://github.com/SciML/Catalyst.jl/blob/master/test/miscellaneous_tests/units.jl
from dynamicquantities.jl.
Thanks! Okay since Unitful and Pint both do M
, and since you have a use case, that seems like a good enough reason to do it here as well. So happy to take a PR for this.
from dynamicquantities.jl.
Closed with #128
from dynamicquantities.jl.
Related Issues (20)
- u"Ω" errors in precompilation HOT 6
- Base.isapprox fails for Vector{Quantity} HOT 14
- Meshes.jl test failure HOT 10
- Round tripping Quantities through String HOT 3
- `bionomial` and `factorial` functions not defined? HOT 5
- Why `one(1u"kg")` no dimension? HOT 2
- Pretty print element types of `QuantityArray` HOT 2
- Logo HOT 7
- Immutable constants for symbolic dimensions
- Registering custom unit propagation rules
- Choosing type of quantity value based on type used in construction HOT 1
- Further improvements to startup time HOT 1
- Behavior with `missing` HOT 6
- Adding "missing" units HOT 4
- Compatibility with `zero(::Type{T})` HOT 6
- Unitful conversion fails for symbolic units HOT 7
- Sweep: Define `NoDims` for indicating something is not a quantity HOT 2
- `reduce(vcat` returns corrupted result HOT 1
- `map` fails with `QuantityArray` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamicquantities.jl.