28

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?

jbrogdon
  • 671
  • 1
  • 7
  • 15
  • 1
    Six years later, the fundamental problem remains: Python provides such rich and opinionated interfaces to C and Fortran for embedding/extending Python that it remains too much work for Numpy/Scipy to generalize their work to other runtimes like JVM, JavaScript, CLR, etc. Each runtime is left to rewrite the glue to the base libraries. – Ahmed Fasih Sep 23 '14 at 12:24

4 Answers4

12

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.

babbageclunk
  • 8,523
  • 1
  • 33
  • 37
10

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.

Frank Hardisty
  • 133
  • 1
  • 8
  • JScience Java library is an amazingly powerful library that covers many aspects of math in Java, even symbolic calculus - http://www.jscience.org/ – JohnnySoftware Jan 02 '10 at 02:46
2

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.)

Ahmed Fasih
  • 6,458
  • 7
  • 54
  • 95
1

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/

rajsite
  • 880
  • 1
  • 8
  • 10