Menu

#3 Python assignment

open
nobody
None
5
2011-01-11
2011-01-11
No

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

Discussion


Log in to post a comment.