Added type hints

This commit is contained in:
Andrew Murray 2025-04-03 18:50:54 +11:00
parent 7e15c54cad
commit 58982c6081

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::