powellb / seapy

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

tide_error, date arrays and bug fixes #7

Closed dalepartridge closed 8 years ago

dalepartridge commented 8 years ago
powellb commented 8 years ago

There are a number of problems, so I won't pull:

1) There doesn't seem to be a tide_error function.

2) Also, to add the ability for lists or arrays, you don't want to check type (ever). Just do:

day = np.atleast_1d(day) return [ epoch + datetime.timedelta(days=t) for t in day ]

3) The get_time fix is actually wrong. The original is intended to return a list of days. No need to slow it with a function call, and that function call would be date2day, anyhow. The error is that it should be:

np.array not ndarray

4) You need to update your code before checking in. Your tide.py is out-of-date, so it is trying to merge old stuff back in.