Numpy.NET icon indicating copy to clipboard operation
Numpy.NET copied to clipboard

Allow reinit of the np.self property if python engine has shutdown.

Open Casey-Bateman opened this issue 3 years ago • 1 comments

I understand that these changes will need to be made in the codeminion gen project

I wanted to suggest the following change to the np.module.gen.cs. In the event of a PythonEngine.Shutdown event, it makes sense to re-initialize the lazy variable for the np static class. I have personally encountered this as an issue when unit testing multiple uses of the Numpy library within my own code. This way after the shutdown has happened, if np.* is called again, the entire flow is re-initialized.

If this makes sense to yall and you give a 👍, I can convert these changes to the codeminion projects.

Casey-Bateman avatar Aug 16 '22 15:08 Casey-Bateman

sure, I am all for making things easier to test

henon avatar Aug 16 '22 17:08 henon

@henon the codeminion changes have been made. Is it usually on the contributor to regenerate the numpy library? Also, if this is accepted, when is the next scheduled bug fix/release of this repo?

Thanks!

Casey-Bateman avatar Aug 16 '22 20:08 Casey-Bateman

Thanks for taking the time to fix the code generator. I just released v30 with the new changes

henon avatar Aug 17 '22 11:08 henon