Tupel in Array Python konvertieren
import numpy
my_tuple = ([8, 4, 6], [1, 2, 3])
print("Tuple to array: ")
print(numpy.asarray(my_tuple))
adriendums
import numpy
my_tuple = ([8, 4, 6], [1, 2, 3])
print("Tuple to array: ")
print(numpy.asarray(my_tuple))
def arrayToTuple(arr):
for i in range(len(arr)):
try:
arr[i] = tuple(arr[i])
except:
arr[i]
return arr