def _asvector(relax=False):

    def __asvector(func):

        def wrapper(self, other):
            if (not isinstance(other, Vector)):
                try:
                    other = Vector(*other)
                except TypeError:
                    other = Vector(*(as_tuple(other) * len(self)))
            if ((relax is False) and (len(self) != len(other))):
                raise TypeError('Cannot operate with Vectors of different rank')
            return func(self, other)
        return wrapper
    return __asvector
def _asvector(relax=False):

    def __asvector(func):

        def wrapper(self, other):
            if (not isinstance(other, Vector)):
                try:
                    other = Vector(*other)
                except TypeError:
                    other = Vector(*(as_tuple(other) * len(self)))
            if ((relax is False) and (len(self) != len(other))):
                raise TypeError('Cannot operate with Vectors of different rank')
            return func(self, other)
        return wrapper
    return __asvector