SciSharp / NumSharp

High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
https://github.com/SciSharp
Apache License 2.0
1.38k stars 192 forks source link

`np.convolve` return null exception #505

Open behroozbc opened 11 months ago

behroozbc commented 11 months ago

I am new to this repository, and I want to test a convolve funcation but I got System.NullReferenceException: Object reference not set to an instance of an object.. I am using the NumSharp version: 0.30.0 and .net sdk version: 8.0.100 my code is simple, which I wrote in a console app.

using NumSharp;
var f = np.array(new int[] { 3, 3, 2, 1, 2 });
var g = np.array(new int[] { -1, 2, 1 });
var outp=np.convolve(f,g, "valid");
Console.WriteLine(outp.ToString());

the full error message

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at Program.<Main>$(String[] args) in E:\repos\ConsoleApp7\ConsoleApp7\Program.cs:line 7