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

ndarray-inv

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndarray-inv

invert a 2d matrix using Gaussian elimination

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ndarray-inv

calculates matrix inverses via Gauss-Jordan elimination. The algorithm has a computational complexity of O(n^3). It handles singular matrices by throwing an error when no non-zero pivot can be chosen during the algorithm.

Build Status

Install

npm install ndarray-inv

Load

Load function via

const inv = require("ndarray-inv");

Example usage:

const ndarray = require("ndarray");
const show = require("ndarray-show");
const ops = require("ndarray-ops");

const M = ndarray(new Float64Array( [2.3, 4.1, 1.8, 1.4] ), [2, 2] )

console.log( show( inv(M) ) );

Output:

-0.337    0.433
0.986   -0.553

Tests

Run tests via command npm test.

Keywords

FAQs

Package last updated on 09 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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