[SciPy-user] ndimage.convolve and NaN...

Robert Kern robert.kern@gmail....
Mon Jul 2 11:23:45 CDT 2007

fred wrote:
> anirudh vij a écrit :
>> hi fred,
>> this is'nt a solution,but you might try replacing NaN by 0.That would 
>> ensure that they have no effect on the surrounding pixels.
> Hmm, 0 are _real_ values.

Yes, and in the context of a convolution, that's fine.

>> Edges work fine because of padding.
> Yes, but can't we think replace NaN by padding ?

That's what replacing them with 0 does.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list