lilab-bcb / harmony-pytorch

BSD 3-Clause "New" or "Revised" License
47 stars 9 forks source link

Reallocate X to avoid negative stride errors #4

Closed gokceneraslan closed 4 years ago

gokceneraslan commented 4 years ago

If X array has negative strides I end up getting the following error:

RuntimeError: some of the strides of a given numpy array are negative. This is currently not supported, but will be added in future releases.

Reallocating the matrix solves this. I don't know what actually might lead to negative stride, but I got this error once.

yihming commented 4 years ago

Hi Gokcen,

Thank you very much for finding out this issue, and providing a solution!

We've merged your pull request, and you will see it in our next release.