[Numpy-discussion] limit function

David Cournapeau cournape@gmail....
Thu Jan 15 08:32:32 CST 2009

On Thu, Jan 15, 2009 at 11:27 PM, Neal Becker <ndbecker2@gmail.com> wrote:
> Is there a function to apply a limit to an array?  I want to (efficiently) do:
> y = x if x < limit, otherwise limit

Would clip do ? For native types, it should be relatively fast, in
particular if you use the argout argument,


More information about the Numpy-discussion mailing list