def _validate_image_rank ( self , img_array ) : if img_array . ndim == 1 or img_array . ndim > 3 : msg = "{0}D imagery is not allowed." . format ( img_array . ndim ) raise IOError ( msg )
invalid dimensions for image data in python
Images must be either 2D or 3D .
def _validate_image_rank(self, img_array):
        """
        Images must be either 2D or 3D.
        """
        if img_array.ndim == 1 or img_array.ndim > 3:
            msg = "{0}D imagery is not allowed.".format(img_array.ndim)
            raise IOError(msg)