In the R - python comparison, the R command is:
a[a>90] <- 90
and the python alternatives given are:
(a>90).choose(a,90) a.clip(min=None, max=90)
The simplest way to do this in python is
a[a > 90] = 90
Log in to post a comment.