Closed tkarna closed 7 years ago
Previous method delta = val[-1]-origin[-1])/(N-1) may fail if the coordinate array is masked (as in the case of fes2012) because val[-1] is not a value.
delta = val[-1]-origin[-1])/(N-1)
val[-1]
Instead, use numpy.diff to compute the differences. It handles masked arrays correctly.
numpy.diff
Also added another python3 fix that I bumped into.
Nice, thanks!
Previous method
delta = val[-1]-origin[-1])/(N-1)
may fail if the coordinate array is masked (as in the case of fes2012) becauseval[-1]
is not a value.Instead, use
numpy.diff
to compute the differences. It handles masked arrays correctly.