Skip to content

Commit 4032843

Browse files
committed
upgrade to ndarray 1.0
1 parent 9485625 commit 4032843

File tree

7 files changed

+144
-94
lines changed

7 files changed

+144
-94
lines changed

.npmignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
lib-cov
2+
*.seed
3+
*.log
4+
*.csv
5+
*.dat
6+
*.out
7+
*.pid
8+
*.gz
9+
10+
pids
11+
logs
12+
results
13+
14+
npm-debug.log
15+
node_modules/*
16+
test/*
17+
example/*

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ var ndarray = require("ndarray")
2121

2222

2323
//Next, create some arrays
24-
var a = ndarray.zeros([128,128])
25-
, b = ndarray.zeros([128,128])
26-
, c = ndarray.zeros([128,128])
24+
var a = ndarray(new Float32Array(128*128))
25+
, b = ndarray(new Float32Array(128*128))
26+
, c = ndarray(new Float32Array(128*128))
2727

2828
//Initialize b with some random numbers:
2929
ops.random(b)

example/example.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//First, import libraries
22
var ndarray = require("ndarray")
3-
, ops = require("../index.js")
3+
, ops = require("../ndarray-ops.js")
44

55

66
//Next, create some arrays
7-
var a = ndarray.zeros([128,128])
8-
, b = ndarray.zeros([128,128])
9-
, c = ndarray.zeros([128,128])
7+
var a = ndarray(new Float32Array(128*128))
8+
, b = ndarray(new Float32Array(128*128))
9+
, c = ndarray(new Float32Array(128*128))
1010

1111
//Initialize b with some random numbers:
1212
ops.random(b)

example/list_api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var ops = require("../index.js")
1+
var ops = require("../ndarray-ops.js")
22

33
for(var i in ops) {
44
console.log("*", i)

0 commit comments

Comments
 (0)