vendredi 22 juin 2018

Python3 get lowest value from 3 points in array

I'm looking for an idea to calc my current matrixpoint with the lowest value of three points in my matrix:

the pseudo-code is:

matrix[i][j] += lowest(matrix[i-1][j-1],matrix[i][j-1],matrix[i-1][j]

of course I could do a three way if-else statement, but is there a simpler, more convenient method?

thx in advance

Aucun commentaire:

Enregistrer un commentaire