Hello,
I do have sometimes functions that return (unstructured) lists or inhomogenous arrays like as examples:
def tsp_algorithm(coordinates, distance_matrix):
...
route = np.array(idx_h) # array of indices
distance = distance_calc(distance_matrix, [route, 1]) # float
return route, distance # or sometimes
return [route, distance]
or
def convexHull(points):
...
return (hull, usedPoints) # 2 arrays of different length
In later functions I woud normally (without numba) fetch the results as:
tspIndices, totalDistanceNew = tsp_algorithm(points, distMatrix)
and
hull, usedpoints = convexHull(coordinates)
Is there a way to deliver this kind of results [(unstructured) lists or inhomogenous arrays] from functions compatible to numba?
How do I code it?
Are there type definitions for these kind of results?