.. index:: 
  !DocumentImage.toNumpy Method
  
.. _id3_document_document_image_to_numpy_class_method:

===============================================================================
DocumentImage.toNumpy Method
===============================================================================

Module: :ref:`DocumentImage<id3_document_document_image_class>`

Definition
----------

Exports the image to a numpy array (Python only)


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        to_numpy(self) -> bytearray

      **Returns**

        .. line-block::

          ``bytearray``
          Output numpy array.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.



