def _values_of_same_type(self, val1, val2):
        """Checks if two values agree in type.

        The array parameter is less restrictive than the parameter. If both values
        are arrays, matrices or tuples, they are considered to be of same type
        regardless of their size and values they contain.

        """
        if (type(val1) in (np.ndarray, tuple, np.matrix)) and (type(val2) is type(val1)):
            return True
        else:
            return super(ArrayParameter, self)._values_of_same_type(val1, val2)