Comments (2)
After discussing this in the meeting, I'm going to say this is working as intended and close the issue. If someone feels strongly about it, we can revisit at a later date.
from ilaff.
I'm happy to change this, but this is actually working as intended. I've been trying to make a quantity wrapping a numpy array behave as much like a numpy array as possible. When you compare two numpy arrays, you get a numpy array of booleans back. Once #16 is resolved, this should allow us to use numpy's array masking, like:
from ilaff import units
import numpy as np
t = np.arange(1,10) * units.fm
m = 1 / t
m[t > 3] # gives [0.04933174 0.0394654 0.03288783 0.02818957 0.02466587 0.02192522] GeV
Because the comparison operators on numpy return raw numpy arrays, you can call all
on the result like you would any numpy comparison. We could change our methods to apply that before returning, but that would be a divergence from the numpy interface.
from ilaff.
Related Issues (9)
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 ilaff.