-
Notifications
You must be signed in to change notification settings - Fork 75
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop assuming that vectorial computation can be hidden from reusers that have to read or write formulas, and focus on making it understandable instead #673
Comments
I'm wondering if this should include deprecating formula helpers and replacing them with NumPy snippets? I see only 3 there, and they are not documented (openfisca/openfisca-doc#4). |
I am not so sure that pluralizing first argument will help a lot when the vector nature of the argument is made clearer and emphasized at the beginning of the training. |
Hi @MattiSG this is IMHO a good direction to move forward 😃. I've had experienced this issue myself.
I've passed quite a lot of time of my performance improvement efforts trying to understand the nature of the receiving arguments. Given the lack of native type check in I think naming should more or less reflect the duck-typing of the argument. Whether it is a (Note: it goes beyond the current RFC, but arguments, if not optional, should respect duck-typing, i.e. not passing
I see two other arguments for this:
Not sure about this one, as all code snippets I've seen so far in the internet use import numpy as np |
Closing as stale. This might well still be one of the core issues in OF, and some ideas are starting to emerge for addressing it from a different perspective (e.g. creating more affordances for directing computation based on conditions, which would eliminate the NumPy-idiomatic "logic multiply" operator in favor of something more salient and documented, as well as afford a large performance boost if initial trials prove a reliable indication). |
I'm reopening this issue as I'd like to arrive to a consensus on this. I'll probably split it into several other issues to have more targeted discussions. |
Current assumptions
Traditionally, vectorial computations have been hidden from newcomers, in the hope (#651 (comment)) that users would not need to grasp the complexity up front, and that they could be confronted to it later.
How this is problematic
Experiments that prove it is the good direction
Concrete steps that would be taken
import numpy as np
to increase discoverability of that library.NumPy
in all texts.Estimated impact
The text was updated successfully, but these errors were encountered: