https://github.com/distributive-network/npy-js
A javascript library to read and write basic numpy files.
https://github.com/distributive-network/npy-js
Last synced: 12 months ago
JSON representation
A javascript library to read and write basic numpy files.
- Host: GitHub
- URL: https://github.com/distributive-network/npy-js
- Owner: Distributive-Network
- Created: 2020-08-29T14:31:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-04T15:14:11.000Z (over 5 years ago)
- Last Synced: 2025-01-10T19:47:58.300Z (about 1 year ago)
- Language: HTML
- Size: 41 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npy-js
## A Numpy to JS and back utility tool
The purpose of this library is to allow the user to read and write `*.npy` files so long as they are standard and not compressed or pickled. This javascript utility builds off the work of [Nicholas Tancredi](https://github.com/NicholasTancredi/read-npy-file). We simply use this library as a tool to read `npy` files and have added functionality to write these `npy` files back to disk if needed.
## Installation
`npm i npy-js`
## Usage
```js
const { readNumpyFile, writeNumpyFile } = require('npy-js');
var da = readNumpyFile('./n.npy');
writeNumpyFile('/o.npy', da);
```
## Testing
To run tests simply run
```js
npm run test
```