[Python.NET] Re: [Pythonnet] Python to c# long conversion time

2022-06-29 Thread jordan . guillot
Thanks for your answer. In my .Net example: ... long t0 = st.ElapsedMilliseconds; PyBuffer myarr = myPyByteArray.GetBuffer(); byte[] myCsharpByteArray = new byte[(int)myarr.Length]; myarr.Read(myCsharpByteArray, 0, (in

[Python.NET] Re: [Pythonnet] Python to c# long conversion time

2022-06-27 Thread LOST _
Please, use myPyByteArray.GetBuffer() and the PyBuffer.Read method to copy from a NumPy array. I created a feature request to make the default conversion mechanism take advantage of PyBuffer some time in the future. Regards,Victor From: Jordan GUILLOTSent: Monday, June 27, 2022 8:19 AMTo: pythonnet