-
Notifications
You must be signed in to change notification settings - Fork 12
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
Array slicing error with numpy 1.23.5 #16
Comments
I also get this in numpy 1.24.3 I don't really understand what the cslice is trying to do Debugging the example in the readme, cslice = [slice(None, None, None), None] @jpobrien499 does expand_dims work in all cases? |
Thanks @jpobrien499 for reporting this, and thanks @kevindarby for confirming! The idea there is to manipulate @kevindarby - FYI, I won't have a chance to dig in to fastKDE in depth until Aug 11 (I have time set aside then). Until then, I just want to verify: when you say
do you mean that the README example triggers this error in numpy 1.24.3 ? Strange if so, since the IndexError seems to indicate that |
Hi @taobrienlbl - the readme example does indeed trigger this error in np 1.24.3, however
fixed it! |
Thanks @kevindarby for testing that: glad it seems to be a simple fix! |
@kevindarby and @taobrienlbl Its been a while since I looked at this, but Im almost positive I tested expand_dims using both 2D and 3D cases and got the expected results for both. Regardless, glad this issue is closed either way! |
This error is associated with running
fastKDE.conditional(y,x)
(as in the github example usage), with Python 3.8 and Numpy 1.23.5. Here is the error message:It appears that indexing dxProd with cslice does not work in this version of numpy. I haven't tested it extensively, but replacing lines 773-775 with
dxProd = expand_dims(dxProd,-1)
seems to solve the issue.The text was updated successfully, but these errors were encountered: