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
It is not implemented yet and if you look closely you will notice that the code in the test case (which is auto-generated by the way) everything is commented out using #if TODO
I am looking into it if this can be implemented easily.
Ok, I see. Of course numpy will be faster if the arrays are really big. If they are small your c# code may be faster than Numpy because there is an overhead of calling into python. Anyway, I'll put this on my todo list and let you know when it's done.
Ok, I see. Of course numpy will be faster if the arrays are really big. If they are small your c# code may be faster than Numpy because there is an overhead of calling into python. Anyway, I'll put this on my todo list and let you know when it's done.
Thanks a lot buddy,hope everything in progress and peachy
Ok, I see. Of course numpy will be faster if the arrays are really big. If they are small your c# code may be faster than Numpy because there is an overhead of calling into python. Anyway, I'll put this on my todo list and let you know when it's done.
Hi bud,is that everything going as progressed or not?Is that feature published?
I've met a new problem with new version of Numpy.NET is that:when i running up the program,it will throw an warning message: Could not find platform dependent libraries <exec_prefix>
And then,when i call a numpy array in program,it may cause: PythonEngine is not initialized
I am pretty sure that you are doing something wrong. I updated the MatmulExample in the Numpy.NET source code to use the latest numpy library and ran it and it works just fine:
Output:
Efficient matrix multiplication with NumPy:
Could not find platform dependent libraries <exec_prefix>
execution time with NumPy: 70,4975ms
Result:
array([[ 1058680000, 1058699900, 1058719800, ..., 1066580300,
1066600200, 1066620100],
[-1644287296, -1644227396, -1644167496, ..., -1620506996,
-1620447096, -1620387196],
[ -52287296, -52187396, -52087496, ..., -12626996,
-12527096, -12427196],
...,
[ 1436277440, 1448177340, 1460077240, ..., 1865570444,
1877470344, 1889370244],
[-1266689856, -1254749956, -1242810056, ..., -821516852,
-809576952, -797637052],
[ 325310144, 337290044, 349269944, ..., 786363148,
798343048, 810322948]])
executing on bg thread
matmul on bg thread is done
Press key
Sure it also prints the Could not find platform dependent libraries <exec_prefix> And I don't know if that comes from PythonNet or from Python itself but it doesn't seem to be relevant.
I don't have time to debug your app so here is my advice. Use the MatmulExample as a base and add your code. Maybe that'll work for you.
I am pretty sure that you are doing something wrong. I updated the MatmulExample in the Numpy.NET source code to use the latest numpy library and ran it and it works just fine:
Output:
Efficient matrix multiplication with NumPy:
Could not find platform dependent libraries <exec_prefix>
execution time with NumPy: 70,4975ms
Result:
array([[ 1058680000, 1058699900, 1058719800, ..., 1066580300,
1066600200, 1066620100],
[-1644287296, -1644227396, -1644167496, ..., -1620506996,
-1620447096, -1620387196],
[ -52287296, -52187396, -52087496, ..., -12626996,
-12527096, -12427196],
...,
[ 1436277440, 1448177340, 1460077240, ..., 1865570444,
1877470344, 1889370244],
[-1266689856, -1254749956, -1242810056, ..., -821516852,
-809576952, -797637052],
[ 325310144, 337290044, 349269944, ..., 786363148,
798343048, 810322948]])
executing on bg thread
matmul on bg thread is done
Press key
Sure it also prints the Could not find platform dependent libraries <exec_prefix> And I don't know if that comes from PythonNet or from Python itself but it doesn't seem to be relevant.
I don't have time to debug your app so here is my advice. Use the MatmulExample as a base and add your code. Maybe that'll work for you.
Oh i see,My Anaconda base is Py3.10. Is that a related reason?
Activity
henon commentedon Feb 24, 2025
It is not implemented yet and if you look closely you will notice that the code in the test case (which is auto-generated by the way) everything is commented out using
#if TODOI am looking into it if this can be implemented easily.
ElinLiu0 commentedon Feb 24, 2025
Got it,I've use DeepSeek to trying implement this,hope it works as expected.
Temp Close.
henon commentedon Feb 25, 2025
Can you share your solution please?
ElinLiu0 commentedon Feb 25, 2025
Not testing so much with performance,but i got same result as original numpy implementation
henon commentedon Feb 25, 2025
Ok, I see. Of course numpy will be faster if the arrays are really big. If they are small your c# code may be faster than Numpy because there is an overhead of calling into python. Anyway, I'll put this on my todo list and let you know when it's done.
ElinLiu0 commentedon Feb 25, 2025
Thanks a lot buddy,hope everything in progress and peachy
ElinLiu0 commentedon Mar 16, 2025
Hi bud,is that everything going as progressed or not?Is that feature published?
henon commentedon Mar 22, 2025
I got it working. The following testcase shows the usage:
henon commentedon Mar 22, 2025
Released to nuget as as Numpy v3.11.1.35 (1f35173)
https://www.nuget.org/packages/Numpy/3.11.1.35
ElinLiu0 commentedon Mar 22, 2025
Nice work,Since it's 1:00 AM in China right now,I will bring your reply when I wake up and fire up my workstation,good night: )
ElinLiu0 commentedon Mar 24, 2025
Hi.I'm back here.
I've met a new problem with new version of Numpy.NET is that:when i running up the program,it will throw an warning message: Could not find platform dependent libraries <exec_prefix>
And then,when i call a numpy array in program,it may cause: PythonEngine is not initialized
ElinLiu0 commentedon Mar 24, 2025
It won't happend on 3.10.1.30 release
henon commentedon Mar 24, 2025
I am pretty sure that you are doing something wrong. I updated the MatmulExample in the Numpy.NET source code to use the latest numpy library and ran it and it works just fine:
Output:
Sure it also prints the
Could not find platform dependent libraries <exec_prefix>And I don't know if that comes from PythonNet or from Python itself but it doesn't seem to be relevant.I don't have time to debug your app so here is my advice. Use the MatmulExample as a base and add your code. Maybe that'll work for you.
Update MatmulExample to use latest Numpy nuget (#132)
ElinLiu0 commentedon Mar 24, 2025
Oh i see,My Anaconda base is Py3.10. Is that a related reason?
henon commentedon Mar 24, 2025
Yes, that would explain it. I can backport the change onto a 3.10 version of numpy.