def array_to_image(arr):
    '\n    Given image with numpy array will be converted to\n    darkent image\n    Remember to call free_image(im) function after using this image\n\n    :rtype: IMAGE\n    :param arr: numpy array\n    :return: darknet image\n    '
    data = arr.ctypes.data_as(POINTER(c_ubyte))
    im = ndarray_image(data, arr.ctypes.shape, arr.ctypes.strides)
    return im
Given image with numpy array will be converted to
darkent image
Remember to call free_image(im) function after using this image

:rtype: IMAGE
:param arr: numpy array
:return: darknet image
def array_to_image(arr):
    '\n    Given image with numpy array will be converted to\n    darkent image\n    Remember to call free_image(im) function after using this image\n\n    :rtype: IMAGE\n    :param arr: numpy array\n    :return: darknet image\n    '
    data = arr.ctypes.data_as(POINTER(c_ubyte))
    im = ndarray_image(data, arr.ctypes.shape, arr.ctypes.strides)
    return im