Issue
I am having an invalid syntax:
Upper_Stress=10 #Upper stress limit
Lower_Stress=0 #Lower stress limiy
Number_tests =[]
Normalized_Stress=[]
NumberStressLevels = [] #of stress levels for each component
base = [0.5,0.5,0.5] #True Value: Theta_0, theta_1 and Sigma
Time_Scale =(np.exp(base[0]+base[1]*0.25) #Generate failure time with scale = exp(alpha)
Time_Shape =(1/base[2]) #Generate failure time with shape =1/sigma
Time_Shape = 1/base[2]#Generate failure time with (shape =1/sigma)
^
SyntaxError: invalid syntax
If I delete the line that is causing the error, the invalid suntax moves to the next line which is:
s_0=[1,1]
It was working fine, suddenly it started giving invalid syntax. I am not seeing why !!
Solution
Here you miss parenthesis.
Time_Scale =(np.exp(base[0]+base[1]*0.25)) # <=== here
But you should write it like this :
Time_Scale = np.exp(base[0]+base[1]*0.25)
No need of parenthesis
Answered By - Florian Bernard
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.