Remove numpy from default PythonInterpreter and potentially introduce PythonNumpyInterpreter
See original GitHub issueRight now only Python uses third party library (specifically numpy
) for linear algebra. This is inconsistent with:
- our mission “with zero dependencies”
- other languages.
The first step was to drop numpy
from cases without vectors, implemented in PR https://github.com/BayesWitnesses/m2cgen/pull/111 .
As the second step I want to suggest dropping numpy
altogether from PythonInterpreter
and potentially implement PythonNumpyInterpreter
to use in cases where it would be beneficial.
As for the user API I see 2 options:
- Adding a new method
export_to_python_with_numpy
- Adding a arameter
with_numpy
to an existingexport_to_python
method which would beFalse
by default.
I personally think first option is better as users would have higher chances of noticing extra method than extra parameter with a default value.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Setting up and using your development environment - NumPy
When using pytest as a target (the default), you can match test names using python operators by passing the -k argument to pytest:....
Read more >The m2cgen from BayesWitnesses - GithubHelp
Remove numpy from default PythonInterpreter and potentially introduce PythonNumpyInterpreter. Right now only Python uses third party library (specifically ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is how assumptions work. They always seem to make sense until they don’t 😃
In general I always try to make as few assumptions as possible, as every assumption creates a dependency. In this case we would create an artificial dependency “Every language will have only one implementation with linear algebra library”. It seems like it makes sense (and it probably does), but why would we bring this unnecessary limitation?
Especially given that we are talking about our API, which should arguably be the most though-out component as that is exactly what users depend on and making backward incompatible changes in a well established API has never been an easy problem.
@StrikerRUS Yeah, I agree. I see no benefits either. I think we should close this. Thank you!