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 0.0.1 to 0.0.2

41

lib/view1.js
"use strict";
var ViewN = require("./viewn.js");
function View1(data, shape, stride, offset) {

@@ -40,36 +42,9 @@ this.data = data;

}
View1.prototype.lo = function(i) {
return new View1(this.data,
[this.shape[0]-i],
this.stride.slice(0),
this.offset + i * this.stride[0]);
}
View1.prototype.hi = function(i) {
return new View1(this.data,
[this.shape[0]-i],
this.stride.slice(0),
this.offset);
}
View1.prototype.step = function(s) {
if(s < 0) {
return new View1(this.data,
[Math.ceil(-this.shape[0]/s)],
[this.stride[0] * s],
this.offset + (this.shape[0]-1) * this.stride[0]);
} else if(s > 0) {
return new View1(this.data,
[Math.ceil(this.shape[0]/s)],
[this.stride[0] * s],
this.offset);
} else {
return new View1(this.data,
this.shape.slice(0),
this.stride.slice(0),
this.offset);
}
}
View1.prototype.transpose = function() {
return new View1(this.data, this.shape.slice(0), this.stride.slice(0), this.offset);
}
View1.prototype.lo = ViewN.prototype.lo;
View1.prototype.hi = ViewN.prototype.hi;
View1.prototype.step = ViewN.prototype.step;
View1.prototype.transpose = ViewN.prototype.transpose;
View1.prototype.toString = ViewN.prototype.toString;
module.exports = View1;

2

package.json
{
"name": "ndarray",
"version": "0.0.1",
"version": "0.0.2",
"description": "Multidimensional Arrays",

@@ -5,0 +5,0 @@ "main": "index.js",

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