Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ndarray

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndarray - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

8

ndarray.js

@@ -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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc