numpy.js
v0.5.0
Published
Port of various Numpy functions to JavaScript
Downloads
5
Readme
numpy.js
AKA Yet-Another-Numpy-to-JS-Port.
Why
There are a number numpy-to-JS ports out there that cover a small subset of Numpy, especially on the easier stuff. This project also covers a small subset, but includes some harder to solve ports, and requires no dependencies. There is some overlap with other projects, but all ports in this repo were created due to incomplete or incorrect implementations.
Usage
const numpy = require('numpy.js');
Supported functions/classes and docs:
amax
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.amax.htmldigitize
- https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.digitize.html#numpy.digitizedstack
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.dstack.htmllinspace
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.htmlmeshgrid
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.meshgrid.htmlndarray.flat
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.flat.htmlnditer
- https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.nditer.htmlnonzero
- https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.nonzero.htmlravel_multi_index
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.ravel_multi_index.htmlshape
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.shape.htmlsubtract
- https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.subtract.htmltranspose
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.transpose.htmlunravel_index
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.unravel_index.html#numpy.unravel_indexvstack
- https://docs.scipy.org/doc/numpy/reference/generated/numpy.vstack.html
Testing
npm test
All (> 80) tests were designed and verified against official Python Numpy.
Contribution
Happy to take contributions. Better yet, if someone wants to own a full port of Numpy, feel free to take what you like.