Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-fft

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-fft - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

2

package.json
{
"name": "ml-fft",
"version": "1.3.1",
"version": "1.3.2",
"description": "fft",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -212,3 +212,3 @@ 'use strict'

*/
convolute:function(data, kernel, nRows, nCols){
convolute:function(data, kernel, nRows, nCols, opt){
var ftSpectrum = new Array(nCols * nRows);

@@ -221,3 +221,4 @@ for (var i = 0; i<nRows * nCols; i++){

var dim = kernel.length;
var dimR = kernel.length;
var dimC = kernel[0].length;
var ftFilterData = new Array(nCols * nRows);

@@ -229,8 +230,9 @@ for(var i=0;i<nCols * nRows;i++){

var iRow, iCol;
var shift = (dim - 1) / 2;
var shiftR = (dimR - 1) / 2;
var shiftC = (dimC - 1) / 2;
//console.log(dim);
for (var ir = 0; ir < dim; ir++) {
iRow = (ir - shift + nRows) % nRows;
for (var ic = 0; ic < dim; ic++) {
iCol = (ic - shift + nCols) % nCols;
for (var ir = 0; ir < dimR; ir++) {
iRow = (ir - shiftR + nRows) % nRows;
for (var ic = 0; ic < dimC; ic++) {
iCol = (ic - shiftC + nCols) % nCols;
ftFilterData[iRow * nCols + iCol] = kernel[ir][ic];

@@ -237,0 +239,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc