Stewori / JyNI

Enables Jython to load native CPython extensions.
https://jyni.12hp.de
Other
151 stars 17 forks source link

When using numpy, we call np.split(x,2),np.hsplit(x,2),np.vsplit(x,2), x is a numpy array. But the command didn't output anything or report any mistakes #35

Open xie233 opened 5 years ago

xie233 commented 5 years ago

Image

However when I replaced np.hsplit(x,2) with np.hsplit(x,[2]), it can work . So I wonder how can I use np.hsplit(x,2)

Stewori commented 5 years ago

It looks like you hit the limits of current numpy support. Actually it's good that you found such a concise workaround. I wasn't aware of this specific limit but note that JyNI is still experimental and numpy support is incomplete in manifold ways (e.g. buffer protocol, random module). Use with care! As of this writing I cannot tell when I will be able to resume work on JyNI, so your best bet is just to stick with your workaround using [2] in stead of 2. You are lucky that such an easy workaround does the trick.