[SciPy-user] PIL and gaussian_filter?

Anne Archibald peridot.faceted at gmail.com
Wed May 21 22:00:06 EDT 2008


2008/5/21 Alan G Isaac <aisaac at american.edu>:
>>>>>> x[mask] -= threshold
>
>>> 2008/5/21 Anne Archibald <peridot.faceted at gmail.com>:
>>>>> Or if you want it inplace:
>>>>> np.subtract(x,threshold,x)
>
>
>> On Wed, May 21, 2008 at 5:58 PM, Alan G Isaac
>> <aisaac at american.edu> wrote:
>>> Could you please elaborate on the differences between these?
>
>
> On Wed, 21 May 2008, Robert Kern apparently wrote:
>> One is masked and the other isn't.
>
>
> Well, OK.
>
> Trying again ...
>
> Why did Anne switch to ``subtract`` in order to
> illustrate in place subtraction?

Mostly because I was going to have to use maximum() that way, so it
seemed more consistent. I think - might be worth checking - that the
performance of A -= 3 and np.subtract(A,3,A) should be identical. They
might even call the same code.

Anne



More information about the SciPy-User mailing list