Added type hints (#8867)

This commit is contained in:
Andrew Murray 2025-04-03 21:24:37 +11:00 committed by GitHub
parent 8691112a2c
commit 9f4195752d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3326,7 +3326,9 @@ def fromarray(obj: SupportsArrayInterface, mode: str | None = None) -> Image:
return frombuffer(mode, size, obj, "raw", rawmode, 0, 1)
def fromarrow(obj: SupportsArrowArrayInterface, mode, size) -> Image:
def fromarrow(
obj: SupportsArrowArrayInterface, mode: str, size: tuple[int, int]
) -> Image:
"""Creates an image with zero-copy shared memory from an object exporting
the arrow_c_array interface protocol::