- Notifications
You must be signed in to change notification settings - Fork338
Draft of potential masked array implementation.#849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Is the endgoal of this PR (and further work) to be as close as possible tothe ones in numpy? I ask because I'm a long time user of numpy, as is everyone in the company I work for, and nobody used this In brief, I see 3 problems with this (not your PR spedifically, but the concept)
What I would gladly use is a
but this is somewhat irrelevant to the current discussion :) |
I appreciate reading your sketch andrei, you're more productive than me, just having a go at a draft instead of trying to make something perfect. I think it's been mentioned before yeah, the question whether to have masked arrays or masked operations on arrays. I dread the complexity of either. Thanks nilgoyette for the candid thoughts too. I think we should start with masked operations. I think that's what a masked array type (if it were to exist) would need as basis anyway. And it allows having a separate mask too - which should hopefully be more efficent (packed or sparse bitmap?) |
There are two files:
src/ma/mod.rs
- masked array implementation, all the types and traits live there.tests/ma.rs
- a couple of tests that demonstrate the potential public API of masked array.The main idea is to have a
Mask
trait which is pretty generic and can be implemented not just byArrayBase
, but by for example a set of whitelist/blacklist indices, set of whitelisted/blacklisted values, etc.