NumPy-like syntax for Jython
Java Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



JNumeric provides the functionality for JPython that Numeric does for
CPython. As the Numeric documentation states, Numeric is "...a
collection of extension modules to provide high-performance
multidimensional numeric arrays to the Python programming language."
JNumeric provides the same functionality as the core of Numeric
module and aims to provide akk of the standard extensions to
Numeric modules (FFT, LinearAlgebra, RandomArray).


Go to src and type "make". The jar file should appear in the
release directory.

INSTALLATION (Hassan Siddiqui)

(This was an installation procedure suggested by Hassan.)

Install jython, download jnumeric-XXX.jar, and add
jython-XXX.jar to your $CLASSPATH'.

You can then use JNumeric in jython in exactly the same way as you would use Numerical
Python under Python (but check the DIFFERENCES.txt file).

INSTALLATION (Recent-Linux with Java2 already installed)

First, make sure you get recent version from Github:

> fill in

Next, go build it!

> ls

> cd jnumeric
> ls
CVS  jnumeric
> cd jnumeric
> ls
CHANGES.txt  CVS              lib          README.txt  src
classes      DIFFERENCES.txt  LICENSE.txt  release     tests
> cd src
> make
javac  -classpath ../lib/jython.jar  -d ../classes
JNumeric/ JNumeric/ JNumeric/
JNumeric/ JNumeric/ JNumeric/
JNumeric/ JNumeric/
cd ../classes; jar cf ../release/jnumeric-0.1a3.jar  Numeric.class FFT.class

Next, install it!

> cd ..
> cd lib
> su
> which java
> cp jython.jar /opt/IBMJava2-131/jre/lib/ext
> cd ..
> cd release
> ls
CVS  jnumeric-0.1a3.jar
> cp jnumeric-0.1a3.jar /opt/IBMJava2-131/jre/lib/ext
> exit

Next test it!

> java org.python.util.jython
*sys-package-mgr*: processing new jar, '/opt/IBMJava2-131/jre/lib/rt.jar'
*sys-package-mgr*: processing new jar, '/opt/IBMJava2-131/jre/lib/i18n.jar'
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
Jython 2.1 on java1.3.1 (JIT: jitc)
>>> from Numeric import *
>>> a = array(10)
>>> b = array( [[1,0],[0,1]])
>>> print b
[[1 0]
 [0 1]]

If you made it that far, you are ok!

Our home page is found at

Also, please see the file DIFFERENCES.txt for a list of intentional
differences between JNumeric and CNumeric.

I highly recomend that you also download at JPython1.1b1 or later. 
Earlier versions of JPython have a fairly serious bug in getslice.


In addition to tracking down any bugs, here are a couple of things
that I would like to do (or have done) with JNumeric at some point:
	* Add the standard extensions (FFT, LinearAlgebra, and RandomArray).
	* Cleaned up ufunc interface.
	* Other assorted code cleanup.

I would realy love FFT, LinearAlgebra, or RandomArray code -- (if you're
interested in working on LinearAlgebrea let me know I have some preliminary 
ideas for this). 


All files in this distribution are Copyright (c) 1998 , 1989 Timothy
Hochberg except where indicated otherwise in the source (includes
work by Daniel Lemire and Frank Gibbons as of July 2002). Do not
redistribute without an unmodified copy of this file. This code
provided in the hope that it will be useful, however it comes with no
warranty of any kind. See LICENCE.txt.

Note: Some recent code might be copyrighted by D. Lemire or D. Bagnell
but given the licensing scheme, copyright disputes are irrelevant.


Current maintainer: Trevor Bekolay (
Previous maintainer: Daniel Lemire (
Previous previous maintainer and founder: Tim Hochberg
Developers: Frank Gibbons, Drew Bagnell