I want to define a condition such that whenever an element of sigma1 becomes equal to or less than 0.010545, the element is replaced by 0.010545. The current and desired outputs are attached.
import numpy as np
sigma0=0.02109
a=0.001
b=0.001
t=np.linspace(0,20,10)
sigma1=sigma0-b*t
print("sigma1 =",[sigma1])
The current output is
sigma1 = [array([0.02109 , 0.01886778, 0.01664556, 0.01442333, 0.01220111,
0.00997889, 0.00775667, 0.00553444, 0.00331222, 0.00109 ])]
The desired output is
sigma1 = [array([0.02109 , 0.01886778, 0.01664556, 0.01442333, 0.01220111,
0.010545, 0.010545, 0.010545, 0.010545, 0.010545 ])]