Comments (3)
Hi Yoel,
Yes, it is an issue with pint. It is also an issue I have faced before. The solution I did before was to manually code a wrapper as can be seen for some functions in fluids: https://github.com/CalebBell/fluids/blob/master/fluids/units.py#L471
Nothing has been coded in chemicals yet about this issue. There are existing issues, like speed_of_sound which has two different types of outputs.
One option would be to only ever have a function return a fixed type. I don't find that user friendly/convenient. Too much documentation duplication and it's harder to remember function names.
After working with numba, it occurs to me that so long as the types of the inputs define what the types of the outputs are, it should be possible to write a general wrapper function, and manually write metadata about how to handle types in these cases (without writing new functions). I'm thinking a dictionary in units.py and some smarts in the units.py of fluids. It is an existing issue, but thank you for reminding me of the fact it hasn't gone away while I wasn't looking at it :)
Cheers,
Caleb
from chemicals.
Would this conflict with the support for pint Quantities?
from chemicals.
Thanks for the quick reply! I should be done with this soon, so I'll go ahead and close the issue.
from chemicals.
Related Issues (20)
- identifiers.py HOT 1
- DIPPR 801 2019? HOT 1
- conda-forge Package Missing HOT 5
- Update GWPs for IPCC Report version 5 HOT 2
- Pandas' new high-precision csv float parser is sometimes quite low precision HOT 1
- Problem with Antoine's coefficients for Toluene HOT 1
- The vectorized submodule is not fully supported throughout the package HOT 6
- numba_vectorized reports TypeError HOT 3
- incorrect separators on water synonyms HOT 7
- Incorrect calculation of density when using saturation temperature as input HOT 2
- Get chemical name from chemical notation HOT 3
- GWP IPCC 5th edition (2018)
- Nitrogen Lennard-Jones values missing HOT 2
- Searching for CO returns methanol. HOT 2
- Vs in COSTALD_compressed should be Vsat?
- Many chemicals input are found but no data given
- Incorrect formula for dichlorosilane and trichlorosilane
- `TypeError` when operating in no-JIT mode HOT 2
- Steam density calculations change significantly with new release 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 chemicals.