问题
I'm a relatively new convert to Python. I've written some code to grab/graph data from various sources to automate some weekly reports and forecasts. I've been intrigued by the Jython concept, and would like to port some Python code that I've written to Jython. In order to do this quickly, I need a NumPy clone for Jython (or Java). Is there anything like this out there?
回答1:
I can't find anything that's a clone of numpy, but there's a long list of Java numerics packages here - these should all be usable from Jython. Which one meets your requirements depends on what you're doing with numpy, I guess.
回答2:
Wilberforce is essentially corrrect.
However, I suggest looking at the Apache Commons Math library -- that would be a better choice for a replacement Java numerics package than any of those listed in wilberforce's answer.
回答3:
Incanter, a Clojure scientific/statistical computing library, uses the Parallel Colt Java libraries with great success: http://incanter.org/. One route may be to start using the PColt classes in Jython, and slowly build up Python-esque bindings for it, as Incanter provides? (Let me know if you have interest in this.)
回答4:
There is a build called JNumeric available on sourceforge:
The sourceforge version has not had a release in a long time, but it seems like an updated version for Jython 2.51 is also available (have not tried it myself):
http://bitbucket.org/zornslemon/jnumeric-ra/downloads/
来源:https://stackoverflow.com/questions/316410/is-there-a-good-numpy-clone-for-jython