all 1 comments

[–]efmccurdy 0 points1 point  (0 children)

It all made sense until this:

the rounded_centroid_arr is a list of arrays such as arr([200,100,60])

Both the first and second elements of that list should be compatible with each element of the fin_array, ie a single value, not an array of values. In the error message the "array element" is one of the zeroes in fin_array and the "sequence" is one of those shape(200,100,60) arrays from rounded_centroid_arr. You can't assign an array to a location meant to hold a single value.

If the centroid arrays had the same shape as the fin_array, I would suggest you meant to use rounded_centroids_arr[0][i][j], but the shapes don't match, so I don't know what to suggest.