powellb / seapy

State Estimation and Analysis in Python
MIT License
28 stars 21 forks source link

Masked arrays with gen_std functions #17

Closed dalepartridge closed 8 years ago

powellb commented 8 years ago

This introduces an error. The len(time) - std_window + pad is correct. It is:

len(time) - (std_window - pad), which is the above.

For masked arrays: 1) No need to declare ma, just use np.ma 2) Time isn't a masked array ever 3) The better way to do it is a simple modification:

nc.variables[v][records, :].std(axis=0)

Then, no matter what type of array that it is, it will do the right thing.