inducer/pycuda — pull request #49 by untom (2014-08-12 08:22:46+00:00)
Title: ENH: gpuarray.minimum/maximum accept scalar argument

This PR makes it possible to pass a scalar argument to `gpuarray.maximum` and `gpuarray.minimum`, which allows the following:

a_pos_gpu = gpuarray.maximum(a_gpu, 0) # all entries are >= 0
a_neg_gpu = gpuarray.minimum(0, a_gpu) # all entries are <= 0

(This is useful e.g. for enforcing lower/upper bounds on the entries of a matrix)