# ndarray-blas-gemv

> BLAS Level 2 GEMV (Matrix-Vector multiply) for ndarrays

Latest version **1.0.4** (published 2015-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install ndarray-blas-gemv
pnpm add ndarray-blas-gemv
yarn add ndarray-blas-gemv
bun add ndarray-blas-gemv
```

## 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.4 |
| Published | 2015-05-14 |
| First published | 2015-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Ricky Reusser |
| Maintainers | rreusser |
| Keywords | blas, ndarray, scijs, linearalgebra |

## Links

- npm: https://www.npmjs.com/package/ndarray-blas-gemv
- Repository: https://github.com/scijs/ndarray-blas-gemv
- Issues: https://github.com/scijs/ndarray-blas-gemv/issues
- npm.io page: https://npm.io/package/ndarray-blas-gemv

## Dependencies (2)

- [cwise](https://npm.io/package/cwise.md) ^1.0.5
- [ndarray-blas-level1](https://npm.io/package/ndarray-blas-level1.md) ^1.0.1

## Recent versions

- 1.0.4 (latest) — 2015-05-14
- 1.0.3 — 2015-05-14
- 1.0.2 — 2015-05-14

## README

# ndarray-blas-gemv

[![Build Status](https://travis-ci.org/scijs/ndarray-blas-gemv.svg?branch=master)](https://travis-ci.org/scijs/ndarray-blas-gemv) [![npm version](https://badge.fury.io/js/ndarray-blas-gemv.svg)](http://badge.fury.io/js/ndarray-blas-gemv) [![Dependency Status](https://david-dm.org/scijs/ndarray-blas-gemv.svg)](https://david-dm.org/scijs/ndarray-blas-gemv)

BLAS Level 2 GEMV (matrix-vector multiply) for [ndarrays](https://github.com/scijs/ndarray)

## Usage

#### `gemv( alpha, A, x, beta, y )`
Calculate `y <- alpha * A * x + beta * y` for scalar alpha, matrix A, vector x, scalar beta, and vector y. Result is overwritten in vector y. All other inputs are unchanged.

## Example

```javascript
var gemv = require('ndarray-blas-gemv')

var A = ndarray([1,2,5,3], [2,2]),
    x = ndarray([-4,7]),
    y = ndarray([3,-2])

gemv( -4, A, x, 2, y )

// Result: y = [-34, -8]
```

To multiply using the transpose of A, you can simply use `.transpose(1,0)` to transpose the input (note that this calculates new strides and offsets but does not rearrange the physical memory).

```javascript
var A = ndarray([1,2,5,3], [2,2]),
    x = ndarray([-4,7]),
    y = ndarray([3,-2])

gemv( -4, A.transpose(1,0), x, 2, y )

// Result: y = [-118, -56]
```


## Credits
(c) 2015 Ricky Reusser. MIT License

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