May-13-2017, 09:03 AM
One more point - default variable values; instead of this monstrosity
PS
def lambd(T,coeff1,coeff2): '''O si prends les valeurs exp, 1 si prends les valeurs entrées pour coeff1 et coeff2''' if coeff1==0 and coeff2==0: coeff1=lambda1 coeff2=lambda2that shorthand
def lambd(T, coeff1=lambda1, coeff2=lambda2):And
lambd(L[k][i],0,0)
turns into lambd(L[k][i])
PS
lambda
being a reserved word in Python, using names very similar to it may be not such a good idea
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.