Comments (7)
Hi! I appreciate you taking a look. I can live with 3.7.1.27, but if you fix the latest version, it will be awesome!
Windows 10 - Visual Studio 2022 - create project WinForms for dotnet 6.0 - add Nuget package "Numpy" 3.11.1.31 - add a button to the form - add button event handler with code
NDarray a = np.zeros(2048, 2048);
or
NDarray a = np.zeros((2048, 2048));
Run. It freezes. Break all, look at execution stack:
[External code]
[Waiting on Async Operation, double-click or press enter to view Async Call Stacks]
[External code]
TestNumPy.dll!TestNumPy.Form1.button1_Click(object sender, System.EventArgs e) Line 14
at C:\SRC\TestNumPy\Form1.cs(14)
kill it, delete obj and bin folders, downgrade numpy to 3.7.1.27, rebuild - it works fine.
I have seen it on 3 or 4 different computers running Windows 10. Earlier I have seen it freezing on exit, lately - during the execution. It might be because earlier I have been trying versions like 3.8 and it behave differently from 3.11, or maybe there is some other reason?
Thank you very much for this component! It is the only fast way to run heavy math with complex numbers from C#!
from numpy.net.
This is quite unspecific and no way for anyone to verify your claims. You need to come up with a simple example that demonstrates the issue.
from numpy.net.
Hi, I have a similar problem, i.e. the program doesn't exit normally after using Numpy.net.
- Windows 11 22621.963
- Visual Studio 2022 17.4.2
- .Net Core 6
- Numpy.Net 3.11.1.31
Problem reproduction process:
- Create a new WPF project in visual studio;
- Reference Numpy.dll via Nuget;
- Just add any Numpy code in the
MainWindow.xaml.cs
, e.g.:
using Numpy; //Add
...
public MainWindow()
{
InitializeComponent();
np.array(new int[] { 1, 2, }); //Add
}
...
- Start the debugger, then close the MainWindow.
After the main window is closed, we can see that the program is still running in the background.
Any help is greatly appreciated, thanks.
Update: According to @BalashovK tips, I tested different versions, among which 3.7.1.28
is the last normal version, and the above problems appeared after 3.10.1.29
.
from numpy.net.
Right, I noticed it too that my test suite would run through successfully but hang at the end.
from numpy.net.
My bad, @bianwenbo is correct, last stable version is 3.7.1.28, not 3.7.1.27
from numpy.net.
In v3.10.1.29 I updated to the new pythonnet version which supports python 3. I'll look into it.
from numpy.net.
@BalashovK I have committed a new WPF example showing how to avoid hanging at the end.
The important part is to use PythonEngine.BeginAllowThreads();
and wrap all calculations inside using (Py.GIL()) { }
. In your application you need to call np.arange(1);
before allowing the threads to make sure the python engine has been initialized by the first-time usage of np
.
See the source code for details.
from numpy.net.
Related Issues (20)
- np.array leaks memory HOT 12
- Support for CuPy HOT 1
- Please Sign and assign StrongName for Numpy Nuget package
- np.split HOT 12
- `Half` type arrays HOT 7
- Set conditions as NDArray Type HOT 3
- fft() failed: βindex -2 is out of bounds for axis 0 with size 1β HOT 9
- Problem with passing imaginery numbers HOT 3
- NDarray of DateTime HOT 3
- Azure AppService and System.DllNotFoundException: Could not load python311.dll with flags RTLD_NOW | RTLD_GLOBAL: python311.dll: cannot open shared object file: No such file or directory HOT 5
- Could not find platform dependent libraries <exec_prefix> HOT 6
- System.TypeLoadException: Could not load type 'Python.Runtime.PyLong' from assembly 'Python.Runtime, Version=3.0.1.0, Culture=neutral, PublicKeyToken=5000fea6cba702dd'. HOT 5
- Numpy.Bare build for Python 3.11 HOT 3
- np.sum(NDArray, axis:1) not supported? HOT 5
- Unable to use Numpy.NET from linux environment HOT 1
- Hello, has SciSharp/NumSharp stopped development and maintenance? HOT 1
- Unable to cast System.Double[][] to NDarray HOT 2
- failed to use "where" in Numpy.NET HOT 2
- NDArray operation '&' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from numpy.net.