Comments (1)
Actually an input could also potentially be just a unit (would be a bit weird but lets's say someone just wanted 1eV, he can just put spu.eV which is of type unit rather than Mul. 1* spu.eV would be Mul because that's a multiplication).
In general I almost feel like trying to do type checking in python is a bit of a fool's errand (for e.g. if you assert that your input needs to be float, it could break if someone passes in a np.float64, but for all intents and purposes the input is correct and would have worked if not for the assertion). I think it would be sufficient to pass the input to to_float, and if it blows up we could catch that exception and give a more helpful error message, like "Input was not in the correct unit! expected unit is ..."
from qmt.
Related Issues (16)
- environment_min.yml is broken HOT 4
- sympy=1.0 requirement is blocking the upgrade to kwant 1.4 HOT 1
- tests only work when qmt is installed
- Pickle load error in QMT example notebook HOT 1
- Remove openBLAS dependency
- make the code PEP8 compliant HOT 9
- setup.py is broken HOT 6
- running setup.py doesn't create materials.json
- bug: qmt is imported in the source files HOT 5
- Fix build order in tasks HOT 5
- Unwanted imports HOT 4
- freecad_dict format HOT 6
- Bare asterisk signatures HOT 1
- test_geo_task broken HOT 6
- QMS HOT 1
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 qmt.