imagenie.grayscale
==================

.. py:module:: imagenie.grayscale


Functions
---------

.. autoapisummary::

   imagenie.grayscale.grayscale


Module Contents
---------------

.. py:function:: grayscale(image)

   Converts an image to grayscale.

   Parameters:
   ----------
   image : np.ndarray
       The input image, represented as a NumPy array. It can be a 3D array (RGB) or a 2D array (already grayscale).

   Returns:
   -------
   np.ndarray
       The grayscale image as a 2D NumPy array (dtype=uint8).

   Raises:
   ------
   TypeError
       If the input is not a NumPy array.
   ValueError
       If the input is not a 2D or 3D NumPy array, or if the 3D array does not have 3 channels.


