tuple to numpy array code example
Example 1: convert tuple to array python
import numpy
my_tuple = ([8, 4, 6], [1, 2, 3])
print("Tuple to array: ")
print(numpy.asarray(my_tuple))
Example 2: numpy array from list
>>> a = [1, 2]
>>> np.asarray(a)
array([1, 2])