
Product
Introducing Immutable Scans
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.
ndarray-convolve
Advanced tools
Convolutions and cross correlations on ndarrays.
//Read in test image
var lena = require("luminance")(require("lena"))
//Generate a 5-point Laplace filter
var filter = require("ndarray-pack")([[0, 1, 0],
[1, -4, 1],
[0, 1, 0]])
//Convolve them together
require("ndarray-convolve")(lena, filter)
This produces the following array:
npm install ndarray-convolve
var convolve = require("ndarray-convolve")
convolve( ... )Performs a convolution between two images with zero boundary conditions. There are four ways you can call this function:
convolve(a, b)Convolves a and b storing the result in a
convolve(out, a, b)Convolves a and b storing the result in out
convolve(a_r, a_i, b_r, b_i)Convolves two complex arrays storing the result in a_r, a_i
convolve(out_r, out_i, a_r, a_i, b_r, b_i)Convolves two complex array storing the result in out_r, out_i
convolve.wrap( ... )Convolves two arrays with periodic boundary conditions. Same convention as convolve
convolve.correlate( ... )Cross correlates two arrays with zero boundary conditions. Same convention.
convolve.correlate.wrap( ... )Cross correlates two arrays with wrapped boundary conditions. Same convention again.
(c) 2013 Mikola Lysenko. MIT License
FAQs
Convolution and cross correlation functions for ndarrays
The npm package ndarray-convolve receives a total of 19 weekly downloads. As such, ndarray-convolve popularity was classified as not popular.
We found that ndarray-convolve demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.