turicreate.SArray.shuffle

SArray.shuffle()

Randomly shuffles the elements of the SArray.

Returns:
out : [SArray]

An SArray with all the same elements but in a random order.

Examples

>>> sa = turicreate.SArray(["a", "b", "c", "d", "x", "Y", "z"])
>>> shuffled_sa = sa.shuffle()
>>> print(shuffled_sa)
['z', 'd', 'Y', 'c', 'a', 'x', 'b']