def _get_multiply_function(multiplier):
    """Returns function that multiplies by scalar.

    :param multiplier: Function will multiply all inputs by this scalar.
    :return: multiply_function: Function handle (see below).
    """

    def multiply_function(input_array):
        """Multiplies input by scalar.

        :param input_array: numpy array.
        :return: output_array: numpy array.
        """

        return input_array * multiplier

    return multiply_function