Filling gaps in a numpy array
I just want to interpolate, in the simplest possible terms, a 3D dataset. Linear interpolation, nearest neighbour, all that would suffice (this is to start off some algorithm, so no accurate estimate is required). In new scipy versions, things like griddata would be useful, but currently I only have scipy 0.8. So I have a "cube" ( data[:,:,:] , (NixNjxNk)) array, and an array of flags ( flags[:,:,:,] , True or False ) of the same size. I want to interpolate my data for the elements of data where the corresponding element of flag is False, using eg the nearest valid datapoint in data, or some