numes
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

numes

Install

npm i numes

or

yarn add numes

Usage

numes dosn't require any specific class, the regular two dimensional array is good enough, e.g.

const ndarray = [[1, 2, 3], [4, 5, 6]]
const ndarray2 = [[1, 2], [3, 4]]

therefore the library approach is just a composition of functions

add(transpose(ndarray2), ndarray2)

Operations

  • add sums 2+ matrices/numbers
  • divide divides 2+ matrices/numbers
  • dot makes a dot product of 2+ matrices
  • exponent returns an exponent of a matrix
  • multiply multiplies 2+ matrices/numbers
  • negative returns negative values for a matrix (literally multiply by -1)
  • random generates a random matrix
  • reciprocal returns a matrix with reciprocal of all elements
  • shape returns {rows, cols} of a matrix
  • subtract subtracts 2+ matrices/numbers
  • transpose tranposes (flips) a matrix over its diagonal

Readme

Keywords

none

Package Sidebar

Install

npm i numes

Weekly Downloads

7

Version

1.1.0

License

MIT

Unpacked Size

75.3 kB

Total Files

67

Last publish

Collaborators

  • alexile