Skip to content

Commit

Permalink
this is running alright
Browse files Browse the repository at this point in the history
  • Loading branch information
MaceKuailv committed Apr 4, 2024
1 parent b2cecdc commit ff24a1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions seaduck/eulerian.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging

import numpy as np
import xarray as xr

from seaduck.get_masks import get_masked
from seaduck.kernel_weight import KnW, _find_pk_4d, _translate_to_tendency
Expand Down Expand Up @@ -257,6 +256,7 @@ def from_bool_array(
self.ocedata["Vol"]
except KeyError:
self.ocedata._add_missing_vol()
self.tp = self.ocedata.tp

Check warning on line 259 in seaduck/eulerian.py

View check run for this annotation

Codecov / codecov/patch

seaduck/eulerian.py#L254-L259

Added lines #L254 - L259 were not covered by tests

inds = np.where(bool_array)
try:
Expand Down Expand Up @@ -305,7 +305,7 @@ def from_bool_array(
if isinstance(t, (int, float, np.floating)):
t = np.ones(self.N, float) * t

Check warning on line 306 in seaduck/eulerian.py

View check run for this annotation

Codecov / codecov/patch

seaduck/eulerian.py#L306

Added line #L306 was not covered by tests
elif isinstance(t, np.ndarray):
if len(t)!=self.N:
if len(t) != self.N:
raise ValueError("Mismatch between input t and final particle number")

Check warning on line 309 in seaduck/eulerian.py

View check run for this annotation

Codecov / codecov/patch

seaduck/eulerian.py#L309

Added line #L309 was not covered by tests
if t is not None:
self.t = copy.deepcopy(t)

Check warning on line 311 in seaduck/eulerian.py

View check run for this annotation

Codecov / codecov/patch

seaduck/eulerian.py#L311

Added line #L311 was not covered by tests
Expand Down
4 changes: 2 additions & 2 deletions seaduck/lagrangian.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(
):
Position.__init__(self)
if "bool_array" in kwarg.keys():
self.from_bool_array(kwarg)
self.from_bool_array(**kwarg)

Check warning on line 105 in seaduck/lagrangian.py

View check run for this annotation

Codecov / codecov/patch

seaduck/lagrangian.py#L105

Added line #L105 was not covered by tests
else:
self.from_latlon(**kwarg)

Expand Down Expand Up @@ -866,7 +866,7 @@ def to_list_of_time(
for i, tl in enumerate(stops):
timestr = str(np.datetime64(round(tl), "s"))
logging.info(timestr)
# print(timestr)
print(timestr)
if self.save_raw:
# save the very start of everything.
self.note_taking(stamp=15)
Expand Down

0 comments on commit ff24a1b

Please sign in to comment.