def rmse(obsvalues,  # type: Union[numpy.ndarray, List[Union[float, int]]]
             simvalues  # type: Union[numpy.ndarray, List[Union[float, int]]]
             ):
        # type: (...) -> Union[float, numpy.ScalarType]
        """Calculate RMSE.

        Args:
            obsvalues: observe values array
            simvalues: simulate values array

        Examples:
            >>> obs = [2.92, 2.75, 2.01, 1.09, 2.87, 1.43, 1.96,\
                       4.00, 2.24, 29.28, 5.88, 0.86, 13.21]
            >>> sim = [2.90, 2.87, 2.85, 2.83, 3.04, 2.81, 2.85,\
                       2.78, 2.76, 13.40, 2.70, 2.09, 1.62]
            >>> MathClass.rmse(obs, sim)  # doctest: +ELLIPSIS
            5.590926715533082...

        Returns:
            RMSE value
        """
        if len(obsvalues) != len(simvalues):
            raise ValueError("The size of observed and simulated values must be "
                             "the same for R-square calculation!")
        if not isinstance(obsvalues, numpy.ndarray):
            obsvalues = numpy.array(obsvalues)
        if not isinstance(simvalues, numpy.ndarray):
            simvalues = numpy.array(simvalues)
        return numpy.sqrt(numpy.mean((obsvalues - simvalues) ** 2.))
def rmse ( obsvalues , simvalues ) : if len ( obsvalues ) != len ( simvalues ) : raise ValueError ( "The size of observed and simulated values must be " "the same for R-square calculation!" ) if not isinstance ( obsvalues , numpy . ndarray ) : obsvalues = numpy . array ( obsvalues ) if not isinstance ( simvalues , numpy . ndarray ) : simvalues = numpy . array ( simvalues ) return numpy . sqrt ( numpy . mean ( ( obsvalues - simvalues ) ** 2. ) )
Calculate RMSE.

        Args:
            obsvalues: observe values array
            simvalues: simulate values array

        Examples:
            >>> obs = [2.92, 2.75, 2.01, 1.09, 2.87, 1.43, 1.96,\
                       4.00, 2.24, 29.28, 5.88, 0.86, 13.21]
            >>> sim = [2.90, 2.87, 2.85, 2.83, 3.04, 2.81, 2.85,\
                       2.78, 2.76, 13.40, 2.70, 2.09, 1.62]
            >>> MathClass.rmse(obs, sim)  # doctest: +ELLIPSIS
            5.590926715533082...

        Returns:
            RMSE value