Giter Site home page Giter Site logo

Comments (10)

JimSEOW avatar JimSEOW commented on July 29, 2024

Done!

from pythoninterface.

den-run-ai avatar den-run-ai commented on July 29, 2024

@Lodomir would you be interested in contributing this back to pythonnet project, maybe as part of separate repo?

from pythoninterface.

JimSEOW avatar JimSEOW commented on July 29, 2024

There were two pitfalls which you may avoid by looking at my implementation:

[1] The conversion of multidimensional numpy arrays to C# arrays and back. Especially, ensure that the numpy arrays are contiguous.
[2] Redraw a matplotlib plot repeatedly without having memory leaks. This requires careful usage of the OO interface and manual calls to the garbage collector (apparently). Look at the implementation for details.

As described in the readme. These are 2 challenging issues.
For [1], the current embed python example for pythonnet using Numpy, there is regression issue. Has that be resolved. Without that, it is not trivial to get the example to work, every time numpy list is interoperate between c# and python.

/* this block is temporarily disabled due to regression
dynamic a = np.array(new List<float> { 1, 2, 3 });
dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32));
Console.WriteLine(a.dtype);
Console.WriteLine(b.dtype);
Console.WriteLine(a * b);
*/

For [2], redraw and update needs to be optimized. A critical example to show that pythonned embed could perform in practical and reliable way.

from pythoninterface.

ncgeib avatar ncgeib commented on July 29, 2024

I would be interested in contributing back, however, I do not think that the code is in a state that allows this. As I am currently not using this code (or PythonNet at all) I will not be able to invest much time in it. So, the answer is probably no...

And, yeah, redraw could be optimized.

from pythoninterface.

JimSEOW avatar JimSEOW commented on July 29, 2024

@Lodomir pushes the limits of pythonnet in persistent ways using these proof-of-concepts examples for embedding python in c# using pythonnet. I am sure many in community has benefited of this brave effort.
@denfromufa: A few people I came across have tried and tested pythonnet and "gave up". e.g. pythonnet and tensorflow [e.g. pythonnet not practical].

Pythonnet github forum is a very hot and active group and you have done an excellent job to response as timely as possible.

From my side. It would be great to understand your goals. It would be great if you could push the activities towards one that the "motivated" people do not give up BY ADDRESSING The CRITICAL part of pythonnet. e.g as illustrated by the 2 issues raised through these examples.

from pythoninterface.

den-run-ai avatar den-run-ai commented on July 29, 2024

from pythoninterface.

JimSEOW avatar JimSEOW commented on July 29, 2024

@denfromufa thanks for your feedback.
Q1: Was pythonnet originated from python.NET? Where I can read more about the transition from Python.NET to pythonnet. When u took over? Having the historical background helps to understand the challenges your faced. Does phytonnet combine the adv of both Python.NET, ironclad, and ironpython?
Q2: Making others know the current limitations help to position the expectations so experienced users new to pythonnet understand what are reasonable and what need to be done.
Q3: I appreciate your "Horizontal" effort - the general health of the project in all possible OS. It would be good to occasionally that you summarize where are the "vertical" contributions needed from experienced programmers in README, not just fragmented enhanced features distributed all over the ISSUES.
Q4: You have the helicopter view: If you could have a separated README-Second or an OPEN Vertical Issues to gather the "vertical discussions" e.g. Debugging in VS from python to c# to python or c# to python etc.

In summary: thanks for your PERSISTENT effort to keep the group's members motivated.

from pythoninterface.

den-run-ai avatar den-run-ai commented on July 29, 2024

from pythoninterface.

JimSEOW avatar JimSEOW commented on July 29, 2024

@denfromufa
Regression issue:
ironclad makes numpy accessible to .NET
Do you think ironclad code may have some tips on how to address the regression issue? Just guessing.

from pythoninterface.

JimSEOW avatar JimSEOW commented on July 29, 2024

@denfromufa
For some framework on tutorial, perhaps one could look at R.NET or RdotNET to see how the tutorials are organized for interoperability between Robjects and .NET counterparts. R.NET also has the challenging issue to do Graphic Redraw.

from pythoninterface.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.