# ndarray-complex

> Complex arithmetic for ndarrays

Latest version **1.0.3** (published 2015-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install ndarray-complex
pnpm add ndarray-complex
yarn add ndarray-complex
bun add ndarray-complex
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-05-11 |
| First published | 2013-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | complex, imaginary, real, ndarray, component-wise, array, math, linear, algebra, exponent, abs, multiply, divide, reciprocal |

## Links

- npm: https://www.npmjs.com/package/ndarray-complex
- Repository: https://github.com/mikolalysenko/ndarray-complex
- Issues: https://github.com/mikolalysenko/ndarray-complex/issues
- npm.io page: https://npm.io/package/ndarray-complex

## Dependencies (2)

- [cwise](https://npm.io/package/cwise.md) ^1.0.5
- [ndarray-ops](https://npm.io/package/ndarray-ops.md) ^1.1.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-05-11
- 1.0.2 — 2014-09-27
- 1.0.1 — 2014-04-25
- 1.0.0 — 2013-06-26
- 0.0.1 — 2013-05-21
- 0.0.0 — 2013-05-13

## README

ndarray-complex
===============
Complex arithmetic operations for [ndarrays](https://github.com/mikolalysenko/ndarray).


## Example

```javascript
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](https://github.com/mikolalysenko/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

---
_Source: https://npm.io/package/ndarray-complex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
