nicolaspanel / numjs

Like NumPy, in JavaScript
MIT License
2.4k stars 184 forks source link

Unexpected output from numjs.convolve #139

Open johnmhm opened 1 year ago

johnmhm commented 1 year ago

When using convolve on two arrays of numbers, I expect the output to be an array of numbers like in numpy:

>>> numpy.convolve((1,2,3),(4,5,6))
array([ 4, 13, 28, 27, 18])

But instead I get an array with only one number:

> numjs.convolve((1,2,3),(4,5,6))
NdArray {
  selection: View1darray { data: [ 18 ], shape: [ 1 ], stride: [ 1 ], offset: 0 }

What am I doing wrong or misunderstanding?