You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Copy the data to that array [line 189 of PythonConnection.cs] System.IntPtr ptr = (System.IntPtr)PyInt.AsInt(pydata.__array_interface__["data"][0]).ToInt32(); Marshal.Copy(data, 0, ptr, nbytes) //Error
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.
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...
@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 bythe 2 issues raised through these examples.
I know people who use successfully pythonnet with SciPy and PyData
ecosystem by not pushing the limits of language interop - keep it simple!
If that issue is urgent to you, then please upvote it and better provide
some feedback. I spent few hours on it and I was not close to solution. The
regression happened before I joined the project during massive merge
between various branches.
My goals are tied to general health of the project and helping new
contributors and users.
On Sun, Jan 29, 2017, 10:19 AM JimSw2016 ***@***.***> wrote:
@Lodomir <https://github.com/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 <https://github.com/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.*
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgZ5ZD-tLu9ueh9HA8luAwJVl8ulOBLks5rXLv3gaJpZM4LvSHG>
.
@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.
Q1: "pythonnet" is just a synonym for "Python for .NET". Brian Lloyd
started this project in 2003 while working at Zope. Then Christian Heimes,
Barton Cline, David Anthoff, and Tony Roberts consecutively took ownership
of the project. Currently we have 4 active core developers. IronPython and
IronClad are very different in purpose and design, you can find more info
online. Perhaps you can turn this into a blog post or a wiki page?
Q2: I agree, we need a section in documentation or tutorial about current
limitations. Please file an issue for this.
Q3: Vertical contributions are the ones marked as hard or meta-issue or
project(s) on github page.
Q4: I think all hard issues should have a separate github project page. Let
me work on this.
You are welcome! Checkout v2.2.2.
On Sun, Jan 29, 2017, 11:26 AM JimSw2016 ***@***.***> wrote:
@denfromufa <https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgZ5SydU17HXeN_nGiordxb238d8d5hks5rXMvUgaJpZM4LvSHG>
.
@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.
@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.
Activity
JimSEOW commentedon Jan 27, 2017
Done!
den-run-ai commentedon Jan 27, 2017
@Lodomir would you be interested in contributing this back to pythonnet project, maybe as part of separate repo?
JimSEOW commentedon Jan 27, 2017
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 regressiondynamic 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.
ncgeib commentedon Jan 28, 2017
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.
JimSEOW commentedon Jan 29, 2017
@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.
den-run-ai commentedon Jan 29, 2017
JimSEOW commentedon Jan 29, 2017
@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.
den-run-ai commentedon Jan 30, 2017
JimSEOW commentedon Jan 30, 2017
@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.
JimSEOW commentedon Jan 30, 2017
@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.