How to convert a set to an array?
I tried:
import numpy as np
mySet = {1,2,3,4,5}
myRandomArray = np.asarray(mySet, dtype=int, order="C")
print(myRandomArray)
Output
return array(a, dtype, copy=False, order=order)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'set'
Where am I making the mistake?