IMPORTANT: THIS REPOSITORY HAS BEEN ARCHIVED AND JUMPY HAS BEEN MOVED
Jumpy has been migrated to a sub-module of the mono-repository here: https://github.com/deeplearning4j/deeplearning4j All future development will continue at that repository, which should be used for all issues and pull requests.
Jumpy allows you to use nd4j from python via pointers (no network communication required like a lot of python libraries).
Jumpy requires an uber jar (a jar file that contains nd4j and all its dependencies) and the path to this file is expected to be found in the environment variable
Easiest way to build the uber jar is by running
mvn package on the
git clone https://www.github.com/deeplearning4j/jumpy.git cd jumpy mvn package
This will create a jar file called
dl4j-1.0.0-SNAPSHOT.jar in the
target directory. Set
JUMPY_CLASS_PATH environment variable to path of this file.
Finally, either install jumpy via pip:
pip install jumpy
Or from source:
python setup.py install
Just like numpy, you can initialize an array using
import jumpy as jp x = jp.zeros((32, 16)) y = jp.ones((32, 16))
Converting numpy array to jumpy array
ndarray instance can be converted to a jumpy
ndarray instance (and vice-versa) without copying the data
import jumpy as jp import numpy as np x_np = np.random.random((100, 50)) x_jp = jp.array(x_np)
Converting jumpy array to numpy array
Simply call the
.numpy() method of
import jumpy as jp x_jp = jp.zeros((100,50)) x_np = x_jp.numpy()
- Basic operators like
/=are overloaded and broadcasting is supported.
- Indexing, slicing and assignment behaviour has been made as close to numpy as possible.
jumpy/ops/to see available ops.
- Check for open issues, or open a new issue to start a discussion around a feature idea or a bug.
- We could use more ops! Have a look at available ops (
jumpy/ops/), it's quite easy to add new ones.
- Send a pull request and bug us on Gitter until it gets merged and published. :)