Packs an array-of-arrays into an ndarray
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test 1.1.0 Apr 13, 2014
.gitignore adding files May 15, 2013
.npmignore
LICENSE adding files May 15, 2013
README.md Fix package name in npm install Jan 15, 2015
build.js file size improvements for browser distribution Apr 19, 2014
convert.js changed 'instanceof Array' to 'Array.isArray' because instanceof can … Jul 24, 2016
doConvert.js
package.json

README.md

ndarray-pack

Converts an array-of-arrays (ie numeric.js array) into a packed ndarray.

Example

//First create a numeric.js style array:
var x = [[1, 0, 1],
         [0, 1, 1],
         [0, 0, 1],
         [1, 0, 0]]

var y = require("ndarray-pack")(x)

Install

npm install ndarray-pack

require("ndarray-pack")(nested_array[,out])

Converts the nested array into a packed ndarray.

  • nested_array is an array-of-arrays (ie a numeric.js array)
  • out is an optional ndarray that gets the result of unpacking array

Returns A packed ndarray representation of the nested arrays.

Credits

(c) 2013 Mikola Lysenko. MIT License