[Numpy-discussion] new MaskedArray class

Eric Firing efiring at hawaii.edu
Mon Jun 24 17:52:59 EDT 2019


On 2019/06/24 11:39 AM, Marten van Kerkwijk wrote:
> Hi Eric,
> 
> The easiest definitely is for the mask to just propagate, which that 
> even if just one point is masked, all points in the fft will be masked.

This is perfectly reasonable, and consistent with what happens with 
nans, of course.  My suggestion of raising an Exception is probably not 
a good idea, as I realized shortly after sending the message.

As a side note, I am happy to see the current burst of effort toward 
improved MaskedArray functionality, and very grateful for the work you, 
Allan, and others are doing in that regard.

Eric


> 
> On the direct point I made, I think it is correct that since one can 
> think of the Fourier transform of a sine/cosine fit, then there is a 
> solution even in the presence of some masked data, and this solution is 
> distinct from that for a specific choice of fill value. But of course it 
> is also true that the solution will be at least partially degenerate in 
> its result and possibly indeterminate (e.g., for the extreme example of 
> a real transform for which all but the first point are masked, all 
> cosine term amplitudes are equal to the value of the first term, and are 
> completely degenerate with each other, and all sine term amplitudes are 
> indeterminate; one has only one piece of information, after all). Yet 
> the inverse of any of those choices reproduces the input. That said, 
> clearly there is a choice to be made whether this solution is at all 
> interesting, which means that you are right that it needs an explicit 
> user decision.
> 
> All the best,
> 
> Marten
> 
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
> 



More information about the NumPy-Discussion mailing list