Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
matrix-utilities
Advanced tools
Tiny, high performance utilities for performing 2/3D matrix calculations. Full unit test coverage, compatible with Node/CommonJS, AMD, and browser globals.
Weekly downloads
Readme
Tiny (607b gzipped), high performance utilities for performing 2/3D matrix calculations. Full unit test coverage, compatible with Node/CommonJS, AMD, and browser globals.
util = require 'matrix-utilities'
util.Identity() # returns new 3D identity matrix
util.add matrix1, matrix2 # returns matrix1 + matrix2
util.multiply matrix1, matrix2 # returns matrix1×matrix2
util.flip matrix # flip a matrix along x=y
util.to2d matrix
util.to3d matrix
util = require 'matrix-utilities'
# identity
matrix = util.Identity()
###
#=>
[
[1, 0, 0, 0]
[0, 1, 0, 0]
[0, 0, 1, 0]
[0, 0, 0, 1]
]
###
# to2d
util.to2d matrix
###
#=>
[
[1, 0, 0]
[0, 1, 0]
]
###
# flip
util.flip [
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
]
###
#=>
[
[1, 4, 7]
[2, 5, 8]
[3, 6, 9]
]
###
# add
one = [
[2, 4]
[6, 8]
]
two = [
[1, 3]
[5, 7]
]
util.add one, two
###
#=>
[
[3, 7]
[11, 15]
]
###
# multiply
one = [
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
]
two = [
[1, 2]
[3, 4]
[5, 6]
]
util.multiply one, two
###
#=>
[
[22, 28]
[49, 64]
[76, 100]
]
###
FAQs
Tiny, high performance utilities for performing 2/3D matrix calculations. Full unit test coverage, compatible with Node/CommonJS, AMD, and browser globals.
The npm package matrix-utilities receives a total of 711 weekly downloads. As such, matrix-utilities popularity was classified as not popular.
We found that matrix-utilities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.