Apply suggestions from code review

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Hugo van Kemenade 2025-04-01 07:16:14 +03:00 committed by GitHub
parent 3e28e05c76
commit 167864104a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -64,7 +64,7 @@ Unsupported Features
* Table/dataframe protocol. We support a single array.
* Null markers, producing or consuming. Null values are inferred from
the mode. e.g. RGB images are stored in the first three bytes of
the mode, e.g. RGB images are stored in the first three bytes of
each 32-bit pixel, and the last byte is an implied null.
* Schema negotiation. There is an optional schema for the requested
datatype in the Arrow source interface. We ignore that

View File

@ -586,7 +586,7 @@ ImagingBorrowArrow(
int offset_width,
PyObject *arrow_capsule
) {
// offset_width is the # of char* for a single offset from arrow
// offset_width is the number of char* for a single offset from arrow
Py_ssize_t y, i;
char *borrowed_buffer = NULL;
@ -735,7 +735,6 @@ ImagingNewArrow(
return im;
}
}
// linter: don't mess with the formatting here
if (strcmp(schema->format, "+w:4") == 0 // 4 up array
&& im->pixelsize == 4 // storage as 32 bpc
&& schema->n_children > 0 // make sure schema is well formed.