ratings[ratings<1.0] = 1.0
in
https://github.com/alexbw/Netflix-Prize/blob/master/src/pred...
Is it specific to NumPy? Or perhaps a Python trick I haven't seen before?
http://www.scipy.org/Cookbook/Indexing#head-86055279f6592d36...
http://blogs.mathworks.com/steve/2008/01/28/logical-indexing...
http://www.scipy.org/Cookbook/Indexing#head-86055279f6592d36...