ndarray-trace
Computes the trace of an ndarray (the sum of all diagonal entries of the array).
Example
var pack = var trace = var M = console
Output:
15
Install
npm install ndarray-trace
API
require('ndarray-trace')(M)
Computes the sum of all diagonal entries in the ndarray M
M
is an ndarray
Returns The sum of all diagonal entries
Credits
(c) 2014 Mikola Lysenko. MIT License