-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image -> Arrow support #8330
base: main
Are you sure you want to change the base?
Image -> Arrow support #8330
Conversation
* Fixed format, only for 4 channel images
* structs can't be encoded this way, they need to have one child array per struct member. * i.e. struct of arrays, rather than an array of structs.
5ac1164
to
b5a261e
Compare
for more information, see https://pre-commit.ci
|
||
def __arrow_c_array__( | ||
self, requested_schema: object | None = None | ||
) -> Tuple[object, object]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) -> Tuple[object, object]: | |
) -> tuple[object, object]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's directly from here: https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html#protocol-typehints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyarrow still supports Python 3.8 - https://pypi.org/project/pyarrow/
Since we don't, it can be updated - https://peps.python.org/pep-0585/#implementation
Partial implementation of #8329.
This is for discussion -- there are a number of issues.
Changes proposed in this pull request:
__arrow_c_array__
and__arrow_c_schema__
support for reading Pillow images in Arrow capable libraries.Issues: