[PYTHON MATRIX-SIG] handling missing data values in NumPy

Geoffrey Furnish furnish@acl.lanl.gov
Thu, 5 Jun 1997 08:32:13 -0600 (MDT)

James Boyle writes:
 > I often deal with time sequences of 2D arrays that have
 > some values missing at random times. I want to obtain
 > an average of these sequences along the time axis
 > taking into account the missing values.
 > I may just be dense but I do not see any slick way to
 > accomplish this task without writing an extension 
 > like the add.reduce but checking each element for
 > a missing value.
 > Does anyone have any insight to this problem or is an
 > extension the solution?
 > Thanks for any information.

I suggest using two arrays.  One with abscissa (time) values, and one
with ordinate (the real data) values.  You could think of missing data
on regular intervals as being just another form of data on irregular

Geoffrey Furnish                email: furnish@lanl.gov
LANL CIC-19 POOMA/RadTran       phone: 505-665-4529     fax: 505-665-7880

"Here are your ball-peen hammers.  Now go malleate some heads!"   -Jim Morel

MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org