File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1051,7 +1051,7 @@ def extract_track(
1051
1051
geometry = self .geometry ,
1052
1052
n_elements = self .shape [1 ], # TODO is there a better way to find out this?
1053
1053
track = track ,
1054
- items = self .items ,
1054
+ items = deepcopy ( self .items ) ,
1055
1055
time_steps = time_steps ,
1056
1056
item_numbers = item_numbers ,
1057
1057
method = method ,
Original file line number Diff line number Diff line change @@ -792,12 +792,12 @@ def test_extract_track_from_dataset():
792
792
track = ds .extract_track (df )
793
793
794
794
# This should not change the original dataset
795
- track .rename ({"Sign. Wave Height" : "NewName " }, inplace = True )
796
- assert track ["NewName " ].name == "NewName "
795
+ track .rename ({"Sign. Wave Height" : "Hm0 " }, inplace = True )
796
+ assert track ["Hm0 " ].name == "Hm0 "
797
797
798
798
assert ds [0 ].name == "Sign. Wave Height"
799
799
800
- assert track [2 ].values [23 ] == approx (3.6284972794399653 )
800
+ assert track ["Hm0" ].values [23 ] == approx (3.6284972794399653 )
801
801
assert sum (np .isnan (track [2 ].to_numpy ())) == 26
802
802
assert np .all (track [1 ].to_numpy () == df .latitude .values )
803
803
You can’t perform that action at this time.
0 commit comments