Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Jul 15, 2019 · 1 comment
Labels

Comments

@xie233
Copy link

xie233 commented Jul 15, 2019

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)

@xie233 xie233 changed the title When Using numpy, we call np.split(x,2),np.hsplit(x,2),np.hsplit(x,2), x is a numpy array. But the command didn't output anything or report any mistakes 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 Jul 15, 2019
@xie233 xie233 changed the title 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 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 Jul 15, 2019
@Stewori
Copy link
Owner

Stewori commented Jul 15, 2019

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.

@Stewori Stewori added the bug label Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants