Comments (12)
I'll remove split
and matmul
members and for all others that should not be there I leave it up to users to find out and remove on demand when reported. It is kinda dangerous to remove all which are not listed on that page, maybe some do work and are not documented. Who knows.
from numpy.net.
yes, that is also a good idea
from numpy.net.
I'll add the overload for you
from numpy.net.
this test proves it works now:
[TestMethod]
public async Task IssueByMartinDevans()
{
//>>> x = np.arange(9)
//>>> np.split(x, 3)
//[array([0, 1, 2]), array([3, 4, 5]), array([6, 7, 8])]
var x = np.arange(9);
var b = np.split(x, 3).repr();
var a = "(array([0, 1, 2]), array([3, 4, 5]), array([6, 7, 8]))";
Assert.AreEqual(a, b);
//>>> x = np.arange(8.0)
//>>> np.split(x, [3, 5, 6, 10])
//[array([0., 1., 2.]),
//array([3., 4.]),
//array([5.]),
//array([6., 7.]),
//array([], dtype = float64)]
x = np.arange(8);
b = np.split(x, new[] { 3, 5, 6, 10 }).repr();
a = "(array([0, 1, 2]), array([3, 4]), array([5]), array([6, 7]), array([], dtype=int32))";
Assert.AreEqual(a, b);
}
Update on Nuget: https://www.nuget.org/packages/Numpy/3.11.1.32
from numpy.net.
Wow! Thanks for the incredibly fast fix, very much appreciated ❤️
from numpy.net.
Unfortunately calling x.split(3, axis:-1)
caused this error:
Python.Runtime.PythonException: ''numpy.ndarray' object has no attribute 'split''
Using np.split(x, 3, axis: -1);
is fine though.
from numpy.net.
Unfortunately calling
x.split(3, axis:-1)
caused this error:Python.Runtime.PythonException: ''numpy.ndarray' object has no attribute 'split''
Can you show the code how you come by that x
which you call split
on ?
from numpy.net.
Even something as simple as this triggers it for me:
NDarray x = np.array(new[] { 1, 2, 3 });
x.split(3, axis: -1);
While working with other things I noticed this causes a similar error:
NDarray x = np.array(new[] { 1, 2, 3 });
x.matmul(x);
Python.Runtime.PythonException: ''numpy.ndarray' object has no attribute 'matmul''
So this may be a broader issue of NDarray.whatever methods vs np.whatever helpers?
from numpy.net.
I don't know if it's relevant, but I do have this somewhat cryptic message in the log:
Could not find platform dependent libraries <exec_prefix>
from numpy.net.
So this may be a broader issue of NDarray.whatever methods vs np.whatever helpers?
Yes, you are right, if you look here, not all methods are defined on NDArray: https://numpy.org/doc/stable/reference/arrays.ndarray.html#array-methods
I obviously made a wrong assumption here by generating all methods as static functions of np
as well as members of NDarray
. Looks like the members should only be generated for the supported ones.
from numpy.net.
Is it worth generating all of the np.whatever methods as static extension methods? That way you get member-like calls for free.
from numpy.net.
You can try it in https://www.nuget.org/packages/Numpy/3.11.1.33 once it is online.
from numpy.net.
Related Issues (20)
- Slow Conversion for 3D arrays HOT 3
- np.load of np.savez impossible to get values back out? HOT 3
- np.array leaks memory HOT 12
- Numpy hangs on exit since version 3.10.1.29 (last stable 3.7.1.28) HOT 7
- Support for CuPy HOT 1
- Please Sign and assign StrongName for Numpy Nuget package
- `Half` type arrays HOT 7
- Set conditions as NDArray Type HOT 3
- fft() failed: “index -2 is out of bounds for axis 0 with size 1” HOT 9
- Problem with passing imaginery numbers HOT 3
- NDarray of DateTime HOT 3
- Azure AppService and System.DllNotFoundException: Could not load python311.dll with flags RTLD_NOW | RTLD_GLOBAL: python311.dll: cannot open shared object file: No such file or directory HOT 5
- Could not find platform dependent libraries <exec_prefix> HOT 6
- System.TypeLoadException: Could not load type 'Python.Runtime.PyLong' from assembly 'Python.Runtime, Version=3.0.1.0, Culture=neutral, PublicKeyToken=5000fea6cba702dd'. HOT 5
- Numpy.Bare build for Python 3.11 HOT 3
- np.sum(NDArray, axis:1) not supported? HOT 5
- Unable to use Numpy.NET from linux environment HOT 1
- Hello, has SciSharp/NumSharp stopped development and maintenance? HOT 1
- Unable to cast System.Double[][] to NDarray HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from numpy.net.