Array Interface
Contains information about array buffers, data types and other details for interoperability for array like python objects.
x = np.array([[1, 2], [3, 4]])
x.__array_interface__
# {'data': (105553174888512, False),
#'strides': None,
#'descr': [('', '<i8')],
#'typestr': '<i8',
#'shape': (2, 2),
#'version': 3}
Image library from pillow provides array interface to make it interoperable with numpy arrays.
from PIL import Image
img = Image.open('data/test.png')
img.__array_interface__
x = np.asarray(img)
x.shape