clEsperanto / pyclesperanto_prototype

GPU-accelerated bio-image analysis focusing on 3D+t microscopy image data
http://clesperanto.net
BSD 3-Clause "New" or "Revised" License
208 stars 44 forks source link

np.flip overwrites clesperanto array with the content of the first element of the respective axis #294

Closed thawn closed 1 year ago

thawn commented 1 year ago

Hi Robert,

thanks for fixing the last bug so quickly. Here is another one ;-)

pyclesperanto_prototype version: 0.23.6

the title describes the problem and this notebook reproduces it:

https://gitlab.mn.tu-dresden.de/tkorten/clesperanto_bug_minimal_example/-/blob/main/minimal_example.ipynb

Cheers,

Till

haesleinhuepf commented 1 year ago

Good catch @thawn !

The issue is releated to cle.range(), it cannot deal with negative step size. That's why cle_array[::-1] has the above mentioned wrong output... I'm on it.

haesleinhuepf commented 1 year ago

Hi Till @thawn ,

I just fixed this and released pyclesperanto-prototype==0.24.0. Let me know if the issue persists!

Thanks for reporting!

Best, Robert

thawn commented 1 year ago

Hi Robert @haesleinhuepf ,

I can confirm that np.flip works as expected with pyclesperanto-prototype==0.24.0 on my system. Thanks for the lightning fast bugfix :-)

Cheers,

Till