replace `not ... is` with `is not` + renamed misspelled test

master
pbrod 9 years ago
parent 29ab5007a7
commit d6a5d0e807

@ -123,10 +123,10 @@ class CovarianceEstimator(object):
except Exception: except Exception:
x = timeseries[:, 1:].flatten('F') x = timeseries[:, 1:].flatten('F')
dt = sampling_period(timeseries[:, 0]) dt = sampling_period(timeseries[:, 0])
if not (self.dt is None): if self.dt is not None:
dt = self.dt dt = self.dt
if not (self.tr is None): if self.tr is not None:
x = self.tr.dat2gauss(x) x = self.tr.dat2gauss(x)
n = len(x) n = len(x)

@ -1732,7 +1732,7 @@ class TestNct(TestCase):
[0.00153078, 0.00291093, 0.00525206, 0.00900815]]) [0.00153078, 0.00291093, 0.00525206, 0.00900815]])
assert_allclose(res, expected, rtol=1e-5) assert_allclose(res, expected, rtol=1e-5)
def text_variance_gh_issue_2401(self): def test_variance_gh_issue_2401(self):
# Computation of the variance of a non-central t-distribution resulted # Computation of the variance of a non-central t-distribution resulted
# in a TypeError: ufunc 'isinf' not supported for the input types, # in a TypeError: ufunc 'isinf' not supported for the input types,
# and the inputs could not be safely coerced to any supported types # and the inputs could not be safely coerced to any supported types

@ -219,7 +219,7 @@ class TrHermite(TrCommon2):
return return
def check_forward(self, x): def check_forward(self, x):
if not (self._x_limit is None): if self._x_limit is not None:
x00 = self._x_limit x00 = self._x_limit
txt2 = 'for the given interval x = [%g, %g]' % (x[0], x[-1]) txt2 = 'for the given interval x = [%g, %g]' % (x[0], x[-1])
@ -306,7 +306,7 @@ class TrHermite(TrCommon2):
# Km1 = np.sqrt(1.+2.*c3**2+6*c4**2) # Km1 = np.sqrt(1.+2.*c3**2+6*c4**2)
# q0 = x0**3-1.5*b1*(x0+xn*Km1) # q0 = x0**3-1.5*b1*(x0+xn*Km1)
# q0 = x0**3-1.5*b1*(x0+xn) # q0 = x0**3-1.5*b1*(x0+xn)
if not (self._x_limit is None): # % Three real roots if self._x_limit is not None: # % Three real roots
d = sqrt(-p1) d = sqrt(-p1)
theta1 = arccos(-q0 / d ** 3) / 3 theta1 = arccos(-q0 / d ** 3) / 3
th2 = np.r_[0, -2 * pi / 3, 2 * pi / 3] th2 = np.r_[0, -2 * pi / 3, 2 * pi / 3]

Loading…
Cancel
Save