-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add support for flat uint8 arrow arrays for multi channel images #8908
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
base: main
Are you sure you want to change the base?
Conversation
Tests/test_pyarrow.py
Outdated
("HSV", UINT, [0, 1, 2]), | ||
), | ||
) | ||
def test_fromarray(mode: str, data_tp: tuple, mask: list[int] | None) -> None: |
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.
def test_fromarray(mode: str, data_tp: tuple, mask: list[int] | None) -> None: | |
def test_fromarray( | |
mode: str, data_tp: tuple[Any, list[int] | float, int], mask: list[int] | None | |
) -> None: |
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.
To channel Raymond Hettinger -- Why not a named tuple?
Tests/test_pyarrow.py
Outdated
("HSV", INT32, [0, 1, 2]), | ||
), | ||
) | ||
def test_from_int32array(mode: str, data_tp: tuple, mask: list[int] | None) -> None: |
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.
def test_from_int32array(mode: str, data_tp: tuple, mask: list[int] | None) -> None: | |
def test_from_int32array( | |
mode: str, data_tp: tuple[Any, int, int], mask: list[int] | None | |
) -> None: |
02159f7
to
6bf791a
Compare
|
||
UINT_ARR = DataShape( | ||
dtype=fl_uint8_4_type, | ||
elt=[1, 2, 3, 4], # array of 4 uint 8 per pixel |
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.
elt=[1, 2, 3, 4], # array of 4 uint 8 per pixel | |
elt=[1, 2, 3, 4], # array of 4 uint8 per pixel |
Fixes #8907 .
Changes proposed in this pull request:
Image.fromarrow
Image.fromarrow