diff --git a/.gitignore b/.gitignore index 0d1b0b0..6342e05 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ logs results npm-debug.log +package-lock.json node_modules/* \ No newline at end of file diff --git a/build.js b/build.js deleted file mode 100644 index aaaab5b..0000000 --- a/build.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict" - -var bake = require("cwise-bake") - -console.log("module.exports=require('cwise-compiler')(" + JSON.stringify( - bake({ - args: ["array", "scalar", "index"], - body: function(o, a, x) { -var v=a,i -for(i=0;i doConvert.js" + "test": "tap test/*.js" }, "repository": { "type": "git", diff --git a/test/test.js b/test/test.js index 2e62b68..36c535d 100644 --- a/test/test.js +++ b/test/test.js @@ -2,19 +2,19 @@ require("tap").test("ndarray-pack", function(t) { - var x = [[1, 0, 1], + var x = [[[1, 0, 1], [0, 1, 1], [0, 0, 1], - [1, 0, 0]] + [1, 0, 0]]] var y = require("../convert.js")(x) for(var i=0; i<4; ++i) { for(var j=0; j<3; ++j) { - t.equals(y.get(i,j), x[i][j]) + t.equals(y.get(0,i,j), x[0][i][j]) } } - + var x = [[[1, 2]], [[3,4]], [[5,6]]] var y = require("../convert.js")(x)