Skip to content

Commit

Permalink
[UPDATE] README example.
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed May 30, 2015
1 parent 0866166 commit fb50bf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ The following `dtypes` are accepted:
If a __linear__ `numeric array` is not provided, the function initializes a __zero-filled__ matrix. To initialize a matrix, provide an input `data` array, whose length matches the specified `shape`.

``` javascript
var data = new Int8Array( 4 );
var data = new Int8Array( 6 );

for ( var i = 0; i < data.length; i++ ) {
data[ i ] = i;
}

var mat = matrix( data, [2,2] );
var mat = matrix( data, [2,3] ); // 2*3 = 6
/*
[ 0 1
2 3 ]
[ 0 1 2
3 4 5 ]
*/
```

Expand Down

0 comments on commit fb50bf8

Please sign in to comment.