mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 11:26:27 +03:00
Try type comment
This commit is contained in:
parent
8e47a6f2c8
commit
37ed8c337d
|
@ -41,7 +41,7 @@ import warnings
|
||||||
from collections.abc import Callable, MutableMapping
|
from collections.abc import Callable, MutableMapping
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from types import ModuleType
|
from types import ModuleType
|
||||||
from typing import IO, TYPE_CHECKING, Any
|
from typing import IO, Optional, TYPE_CHECKING, Any
|
||||||
|
|
||||||
# VERSION was removed in Pillow 6.0.0.
|
# VERSION was removed in Pillow 6.0.0.
|
||||||
# PILLOW_VERSION was removed in Pillow 9.0.0.
|
# PILLOW_VERSION was removed in Pillow 9.0.0.
|
||||||
|
@ -3069,7 +3069,10 @@ def frombuffer(mode, size, data, decoder_name="raw", *args):
|
||||||
return frombytes(mode, size, data, decoder_name, args)
|
return frombytes(mode, size, data, decoder_name, args)
|
||||||
|
|
||||||
|
|
||||||
def fromarray(obj: numpy.typing.ArrayLike, mode: Optional[str] = None) -> Image:
|
def fromarray(
|
||||||
|
obj, # type: numpy.typing.ArrayLike
|
||||||
|
mode: Optional[str] = None
|
||||||
|
) -> Image:
|
||||||
"""
|
"""
|
||||||
Creates an image memory from an object exporting the array interface
|
Creates an image memory from an object exporting the array interface
|
||||||
(using the buffer protocol)::
|
(using the buffer protocol)::
|
||||||
|
|
Loading…
Reference in New Issue
Block a user