Returns a randomly-shuffled array.
(size, dtype)
| 148 | @staticmethod |
| 149 | @memoize |
| 150 | def random(size, dtype): |
| 151 | """ |
| 152 | Returns a randomly-shuffled array. |
| 153 | """ |
| 154 | arr = np.arange(size, dtype=dtype) |
| 155 | np.random.shuffle(arr) |
| 156 | return arr |
| 157 | |
| 158 | @staticmethod |
| 159 | @memoize |
no outgoing calls