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

ndarray-complex

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndarray-complex

Complex arithmetic for ndarrays

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-22.22%
Maintainers
1
Weekly downloads
 
Created
Source

ndarray-complex

Complex arithmetic operations for ndarrays.

Example

var ndarray = require("zeros")
var cops = require("ndarray-complex")

//Generate some arrays
var a_r = zeros([10, 10])
  , a_i = zeros([10, 10])
  , b_r = zeros([10, 10])
  , b_i = zeros([10, 10])
  , c_r = zeros([10, 10])
  , c_i = zeros([10, 10])
  
//  ... do stuff ...

//Multiply a and b, storing result in c:
cops.mul(c_r, c_i, a_r, a_i, b_r, b_i)

Install

npm install ndarray-complex

API

The API follows the same conventions as ndarray-ops. The following methods are exposed:

  • add[s,eq,seq] - Addition
  • sub[s,eq,seq] - Subtraction
  • neg[eq] - Negation
  • mul[s,eq,seq] - Multiplication
  • div[s,eq,seq] - Division
  • recip[eq] - Reciprocal
  • conj[eq] - Complex conjugate
  • exp[eq] - Complex exponent
  • mag - Complex magnitude (squared length)
  • abs - Complex length
  • arg - Complex argument

Credits

(c) 2013 Mikola Lysenko. MIT License

Keywords

FAQs

Package last updated on 11 May 2015

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