#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.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks