File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 9
9
from numpy .testing import assert_almost_equal
10
10
11
11
import trackpy as tp
12
- from trackpy .utils import pandas_sort , pandas_concat
12
+ from trackpy .utils import pandas_sort , pandas_concat , is_pandas_since_220
13
13
from trackpy .tests .common import StrictTestCase
14
14
15
15
@@ -228,7 +228,10 @@ def setUp(self):
228
228
def test_theta_entropy (self ):
229
229
# just a smoke test
230
230
theta_entropy = lambda x : tp .motion .theta_entropy (x , plot = False )
231
- self .steppers .groupby ('particle' ).apply (theta_entropy , include_groups = False )
231
+ self .steppers .groupby ('particle' ).apply (
232
+ theta_entropy ,
233
+ ** ({"include_groups" : False } if is_pandas_since_220 else {}),
234
+ )
232
235
233
236
def test_relate_frames (self ):
234
237
# Check completeness of output
Original file line number Diff line number Diff line change 23
23
except ValueError : # Probably a development version
24
24
is_pandas_since_023 = True
25
25
26
+
27
+ try :
28
+ is_pandas_since_220 = (LooseVersion (pd .__version__ ) >=
29
+ LooseVersion ('2.2.0' ))
30
+ except ValueError : # Probably a development version
31
+ is_pandas_since_220 = True
32
+
33
+
26
34
# Emit warnings in refine.least_squares for scipy 1.5
27
35
try :
28
36
is_scipy_15 = LooseVersion ("1.5.0" ) <= LooseVersion (scipy .__version__ ) < LooseVersion ('1.6.0' )
You can’t perform that action at this time.
0 commit comments