Package Exports
- pymport
- pymport/array
- pymport/proxified
Readme
pymport
Use Python libraries from Node.js
Quickstart
Install pymport
:
npm i pymport
Install numpy
, pandas
or whatever your favorite Python package is:
npx pympip3 install numpy
Start using from Node.js:
const { pymport, proxify } = require('pymport');
const np = proxify(pymport('numpy'));
const a = np.arange(15).reshape(3, 5);
const b = np.ones([2, 3], { dtype: np.int16 });
or
import { pymport, proxify } from 'pymport';
const np = proxify(pymport('numpy'));
const a = np.arange(15).reshape(3, 5);
const b = np.ones([2, 3], { dtype: np.int16 });
Then head to the wiki for the full documentation.