Rolls the elements of the Array.
(self, n, inplace=False)
| 320 | return self |
| 321 | |
| 322 | def roll(self, n, inplace=False): |
| 323 | """ Rolls the elements of the Array. """ |
| 324 | n = n % self.size |
| 325 | a = self[-n:] + self[:-n] |
| 326 | if inplace: |
| 327 | return self.__setinplace(a, inplace) |
| 328 | return a |
| 329 | |
| 330 | def roll_(self, n): |
| 331 | """ Rolls the elements of the Array in-place. """ |