Comparing version 1.0.10 to 1.0.11
@@ -261,6 +261,8 @@ "use strict" | ||
for(var i=0; i<dimension; ++i) { | ||
tShape[i] = ["a[i", i, "|0]"].join("") | ||
tStride[i] = ["b[i", i, "|0]"].join("") | ||
tShape[i] = ["a[i", i, "]"].join("") | ||
tStride[i] = ["b[i", i, "]"].join("") | ||
} | ||
code.push(["proto.transpose=function ",className,"_transpose(",args,"){var a=this.shape,b=this.stride;return new ", className, "(this.data,", tShape.join(","), ",", tStride.join(","), ",this.offset)}"].join("")) | ||
code.push(["proto.transpose=function ",className,"_transpose(",args,"){", | ||
args.map(function(n,idx) { return n + "=(" + n + "===undefined?" + idx + ":" + n + "|0)"}).join(";"), | ||
";var a=this.shape,b=this.stride;return new ", className, "(this.data,", tShape.join(","), ",", tStride.join(","), ",this.offset)}"].join("")) | ||
@@ -267,0 +269,0 @@ //view.pick(): |
{ | ||
"name": "ndarray", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "Multidimensional Arrays", | ||
@@ -5,0 +5,0 @@ "main": "ndarray.js", |
@@ -131,3 +131,3 @@ ndarray | ||
```javascript | ||
function get(i,j, ...) { | ||
function get(i,j,...) { | ||
return this.data[this.offset + this.stride[0] * i + this.stride[1] * j + ... ] | ||
@@ -137,7 +137,7 @@ } | ||
### `array.set(i,j ..., v)` | ||
### `array.set(i,j,...,v)` | ||
Sets element `i,j,...` to `v`. Again, in psuedocode this works like this: | ||
```javascript | ||
function set(i,j, ..., v) { | ||
function set(i,j,...,v) { | ||
return this.data[this.offset + this.stride[0] * i + this.stride[1] * j + ... ] = v | ||
@@ -144,0 +144,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21677
330