I am trying to round up to nearest 10 for Max
and Min
. However, for Max
, the nearest 10 should be greater than Max
and for Min
, the nearest 10 should be less than Min
. The current and the expected outputs are presented.
import numpy as np
Max = [99.91540553]
Min = [8.87895014]
Amax=round(Max[0],-1)
Amin=round(Min[0],-1)
The current output is
Amax=100
Amin=10.0
The expected output is
Amax=100
Amin=0.0