Python ValueError: matriz de tamaño cero a operación de reducción máxima que no tiene identidad

#In this situation, the easiest solution is often:
try:
    # Your code
except ValueError:  #raised if `x` is empty.
    pass
Powerful Penguin