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
I'm not very familiar with the ArrayFlags mechanism. It seems to me that the problem is that empty_like doesn't set the strides argument of the GPUArray-constructor. But I don't know the repercussions of doing this, so I didn't send a PR.
The text was updated successfully, but these errors were encountered:
Matching the original strides is not a plausible strategy, since the argument array could be non-contiguous or have negative strides, neither of which would go well in a newly-allocated buffer that matches the argument's shape. Numpy's strategy seems to be to look at the original strides and see if they are more Fortran-like or C-like (increasing or decreasing) and appears to assign strides based on that.
I'd be happy to take a patch that implements a strategy like this. Bonus points if it matches numpy exactly.
Consider:
I'm not very familiar with the
ArrayFlags
mechanism. It seems to me that the problem is thatempty_like
doesn't set thestrides
argument of theGPUArray
-constructor. But I don't know the repercussions of doing this, so I didn't send a PR.The text was updated successfully, but these errors were encountered: