0

Python minimize sum of connected or interconnected numpy array values

I have a 2D numpy array with the following values e.g: [[1 -2 -4 -3 1], [1 0 -1 -2 3], [-100 2 4 3 0], [ 1 -2 4 -3 3], [ 1 2 1 3 1]] I want to identify 1 or more Min values. The total amount of requested cells is defined as TOT_CELLS = 1,2,3....n. For example, if TOT_CELLS is 2, optimization  procedure must return values -100 and -2 that are connected. If TOT_CELLS=3, optimal values are -100,0 and -4 that are interconnected. How can i implement this?

9th Nov 2017, 9:39 AM
Loukas Katikas
Loukas Katikas - avatar
1 Resposta
+ 1
That array is 5D not 2D
29th Apr 2019, 4:21 PM
Abdul S Ansari
Abdul S Ansari - avatar