return Cat(*matches).any()
def rotate_left(self, offset):
- """Rotate left by constant modulo 2**len(self).
+ """Rotate left by constant amount.
Parameters
----------
Returns
-------
Value, out
- The input rotated left by offset if offset is positive, else the input rotated right by -offset.
+ If the offset is positive, the input rotated left. Otherwise, the input rotated right.
"""
if not isinstance(offset, int):
raise TypeError("Rotate amount must be an integer, not {!r}".format(offset))
return Cat(self[-offset:], self[:-offset]) # meow :3
def rotate_right(self, offset):
- """Rotate right by constant modulo 2**len(self).
+ """Rotate right by constant amount.
Parameters
----------
Returns
-------
Value, out
- The input rotated right by offset if offset is positive, else the input rotated left by -offset.
+ If the offset is positive, the input rotated right. Otherwise, the input rotated right.
"""
if not isinstance(offset, int):
raise TypeError("Rotate amount must be an integer, not {!r}".format(offset))