File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333from MDAnalysis .selections import gromacs as mda_gmx
3434import numpy as np
3535from scipy import stats
36- from scipy .stats import circmean , circvar , circstd
36+ from scipy .stats import circmean , circstd
3737from matplotlib import pyplot as plt
3838
3939
@@ -56,7 +56,8 @@ def analyze(self):
5656 if not self .periodic :
5757 self .mean = self .values .mean ()
5858 self .stdev = self .values .std ()
59- self .var = self .values .var ()
59+ # Same behavior as for periodic data
60+ self .var = self .stdev ** 2
6061 else :
6162 p_high = 180
6263 if self .atype == "angle" :
@@ -65,7 +66,9 @@ def analyze(self):
6566 p_low = - 180
6667 self .mean = circmean (self .values , low = p_low , high = p_high )
6768 self .stdev = circstd (self .values , low = p_low , high = p_high )
68- self .var = circvar (self .values , low = p_low , high = p_high )
69+ # Use circstd**2 instead of circvar to
70+ # have same behavior across SciPy versions
71+ self .var = self .stdev ** 2
6972
7073 def mean_squared (self ):
7174 """Returns (value-mean)**2 """
Original file line number Diff line number Diff line change 2626 install_requires = [
2727 'MDAnalysis>1.0.0' ,
2828 'numpy' ,
29- 'scipy<1.8 ' ,
29+ 'scipy' ,
3030 'matplotlib' ,
3131 ],
3232)
You can’t perform that action at this time.
0 commit comments