yarp
yarp copied to clipboard
YARP 3.9: compatibility with python 3.12 when handling images
trafficstars
Describe the bug Dear support, I get a segmentation fault when handling images on python 3.12. In particular something goes wrong when I wrap images with yarp_image.setExternal() . The same code runs well on python < 3.11 .
To Reproduce I've experienced the error on my personal code but here's a snippet to reproduce the error.
# Create the array with random data
img_array = numpy.random.uniform(0., 255., (240, 320)).astype(numpy.float32)
# Create the yarp image and wrap it around the array
yarp_image = yarp.ImageFloat()
yarp_image.setExternal(img_array, img_array.shape[1], img_array.shape[0])
Configuration (please complete the following information):
- OS: Ubuntu 24.04 - MacOS Sonoma 14.5
- yarp version: latest stable release of YARP 3.9