diff --git a/samples/python/04_julia/julia.ipynb b/samples/python/04_julia/julia.ipynb index 50d40f8b..a544ce89 100644 --- a/samples/python/04_julia/julia.ipynb +++ b/samples/python/04_julia/julia.ipynb @@ -293,7 +293,7 @@ " cl.map_flags.READ, \n", " 0, width * height, np.uint32)\n", " with mapped_dst.base:\n", - " (r, g, b, a) = Image.fromarray(mapped_dst.reshape((width, height)), 'RGBA').split()\n", + " (r, g, b, a) = Image.fromarray(mapped_dst.view(np.uint8).reshape((height, width, 4))).split()\n", " image = Image.merge('RGB', (r, g, b))" ] }, diff --git a/samples/python/04_julia/julia.py b/samples/python/04_julia/julia.py index 8fa03214..ca462074 100644 --- a/samples/python/04_julia/julia.py +++ b/samples/python/04_julia/julia.py @@ -135,7 +135,7 @@ 0, gwx * gwy, np.uint32) with mapped_dst.base: # note: this generates a 24-bit .bmp file instead of a 32-bit .bmp file! - (r, g, b, a) = Image.fromarray(mapped_dst.reshape((gwy, gwx)), 'RGBA').split() + (r, g, b, a) = Image.fromarray(mapped_dst.view(np.uint8).reshape((gwy, gwx, 4))).split() image = Image.merge('RGB', (r, g, b)) image.save(filename) print('Wrote image file {}'.format(filename)) diff --git a/samples/python/requirements.txt b/samples/python/requirements.txt index efd73ed2..f11d661e 100644 --- a/samples/python/requirements.txt +++ b/samples/python/requirements.txt @@ -1,6 +1,6 @@ -matplotlib==3.8.2 +matplotlib==3.10.9 numpy==1.26.3 pyopencl==2023.1.4 -pillow==12.3.0 +pillow==13.0.0 jupyterlab==4.5.11