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
213 stars 46 forks source link

Convert numpy array to OCLArray? #318

Closed ajsc4 closed 1 year ago

ajsc4 commented 1 year ago

Is it possible to convert a numpy array into the pyclesperanto OCLArray image type?

haesleinhuepf commented 1 year ago

Hi @ajsc4 ,

yes, using cle.asarray(np_array). Furthermore, all functions in pyclesperanto consume both kinds of images, opencl-based and numpy.

Let me know if this answers your question.

Best, Robert