(image, init_level_set)
Check that shapes of `image` and `init_level_set` match.
Check that shapes of `image` and `init_level_set` match.
Check that shapes of image and init_level_set match .
def _check_input(image, init_level_set):
    """Check that shapes of `image` and `init_level_set` match."""
    if image.ndim not in [2, 3]:
        raise ValueError("`image` must be a 2 or 3-dimensional array.")

    if len(image.shape) != len(init_level_set.shape):
        raise ValueError("The dimensions of the initial level set do not "
                         "match the dimensions of the image.")
def _check_input ( image , init_level_set ) : if image . ndim not in [ 2 , 3 ] : raise ValueError ( "`image` must be a 2 or 3-dimensional array." ) if len ( image . shape ) != len ( init_level_set . shape ) : raise ValueError ( "The dimensions of the initial level set do not " "match the dimensions of the image." )