Apply suggestions from code review

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
wiredfool 2025-05-30 10:40:35 +01:00 committed by GitHub
parent a4f477565a
commit 506691729a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ def _test_img_equals_pyarray(
px = img.load()
assert px is not None
if elts_per_pixel > 1 and mask is None:
# have to do element wise comparison when we're comparing
# have to do element-wise comparison when we're comparing
# flattened r,g,b,a to a pixel.
mask = list(range(elts_per_pixel))
for x in range(0, img.size[0], int(img.size[0] / 10)):
@ -56,7 +56,7 @@ def _test_img_equals_int32_pyarray(
px = img.load()
assert px is not None
if mask is None:
# have to do element wise comparison when we're comparing
# have to do element-wise comparison when we're comparing
# flattened rgba in an uint32 to a pixel.
mask = list(range(elts_per_pixel))
for x in range(0, img.size[0], int(img.size[0] / 10)):

View File

@ -757,7 +757,7 @@ ImagingNewArrow(
if (strcmp(schema->format, "C") == 0 // uint8
&& im->pixelsize == 4 // storage as 32 bpc
&& schema->n_children == 0 // make sure schema is well formed.
&& strcmp(im->arrow_band_format, "C") == 0 // Expected Format
&& strcmp(im->arrow_band_format, "C") == 0 // expected format
&& 4 * pixels == external_array->length) { // expected length
// single flat array, interleaved storage.
if (ImagingBorrowArrow(im, external_array, 1, array_capsule)) {