mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-26 07:04:45 +03:00
Typing: __array_interface__
This commit is contained in:
parent
e33706bc33
commit
a0666ccb7c
|
@ -631,7 +631,7 @@ class Image(object):
|
||||||
# type: (Optional[Text], Optional[Text], **Any) -> Text
|
# type: (Optional[Text], Optional[Text], **Any) -> Text
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
suffix = ''
|
suffix = '' # type: Text
|
||||||
if format:
|
if format:
|
||||||
suffix = '.'+format
|
suffix = '.'+format
|
||||||
|
|
||||||
|
@ -690,9 +690,9 @@ class Image(object):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def __array_interface__(self):
|
def __array_interface__(self):
|
||||||
# type: () -> Dict[Text, Any]
|
# type: () -> Dict[unicode, Any]
|
||||||
# numpy array interface support
|
# numpy array interface support
|
||||||
new = {}
|
new = {} # type: Dict[unicode, Any]
|
||||||
shape, typestr = _conv_type_shape(self)
|
shape, typestr = _conv_type_shape(self)
|
||||||
new['shape'] = shape
|
new['shape'] = shape
|
||||||
new['typestr'] = typestr
|
new['typestr'] = typestr
|
||||||
|
|
Loading…
Reference in New Issue
Block a user