From 766adb15523fb0801bd25be80a413943575b578f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 14:22:46 +0000 Subject: [PATCH 1/2] Bump pillow from 12.3.0 to 13.0.0 in /samples/python Bumps [pillow](https://github.com/python-pillow/Pillow) from 12.3.0 to 13.0.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/12.3.0...13.0.0) --- updated-dependencies: - dependency-name: pillow dependency-version: 13.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- samples/python/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/python/requirements.txt b/samples/python/requirements.txt index efd73ed..79389d0 100644 --- a/samples/python/requirements.txt +++ b/samples/python/requirements.txt @@ -1,6 +1,6 @@ matplotlib==3.8.2 numpy==1.26.3 pyopencl==2023.1.4 -pillow==12.3.0 +pillow==13.0.0 jupyterlab==4.5.11 From 597b095508828bc6528ded537c3a06d7a4ff30bd Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Fri, 23 Oct 2026 10:54:11 -0700 Subject: [PATCH 2/2] update samples for pillow 13.0 --- samples/python/04_julia/julia.ipynb | 2 +- samples/python/04_julia/julia.py | 2 +- samples/python/requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/python/04_julia/julia.ipynb b/samples/python/04_julia/julia.ipynb index 50d40f8..a544ce8 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 8fa0321..ca46207 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 79389d0..f11d661 100644 --- a/samples/python/requirements.txt +++ b/samples/python/requirements.txt @@ -1,4 +1,4 @@ -matplotlib==3.8.2 +matplotlib==3.10.9 numpy==1.26.3 pyopencl==2023.1.4 pillow==13.0.0