human
Solve the following python programming problem given the following code:
@docfiller
def gaussian_gradient_magnitude(input, sigma, output=None, mode='reflect', cval=0.0, **kwargs):
assistant
#Here is the Python program you requested.

    """Multidimensional gradient magnitude using Gaussian derivatives.
    Parameters
    %(input)s
    sigma : scalar or sequence of scalars
    The standard deviations of the Gaussian filter are given for
    each axis as a sequence, or as a single number, in which case
    it is equal for all axes..
    %(output)s
    %(mode_multiple)s
    %(cval)s
    Extra keyword arguments will be passed to gaussian_filter().
    Returns
    gaussian_gradient_magnitude : ndarray
    Filtered array. Has the same shape as `input`.
    Examples
    >>> from scipy import ndimage, misc
    >>> import matplotlib.pyplot as plt
    >>> fig = plt.figure()
    >>> plt.gray()  # show the filtered result in grayscale
    >>> ax1 = fig.add_subplot(121)  # left side
    >>> ax2 = fig.add_subplot(122)  # right side
    >>> ascent = misc.ascent()
    >>> result = ndimage.gaussian_gradient_magnitude(ascent, sigma=5)
    >>> ax1.imshow(ascent)
    >>> ax2.imshow(result)
    >>> plt.show()
    """
    input = numpy.asarray(input)
    def derivative(input, axis, output, mode, cval, sigma, **kwargs):
        order = ([0] * input.ndim)
        order[axis] = 1
        return gaussian_filter(input, sigma, order, output, mode, cval, **kwargs)
    return generic_gradient_magnitude(input, derivative, output, mode, cval, extra_arguments=(sigma,), extra_keywords=kwargs)