diff --git a/.travis.yml b/.travis.yml index 620cffbb6674..f667ad969b4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,8 @@ matrix: # pyflakes doesn't respect "# noqa" and cannot ignore files, so filter out six.py - PYFLAKES_NODOCTEST=1 pyflakes scipy benchmarks/benchmarks | grep -E -v 'unable to detect undefined names|assigned to but never used|imported but unused|redefinition of unused|may be undefined, or defined from star imports' | grep -E -v 'scipy/_lib/six.py' > test.out; cat test.out; test \! -s test.out - pycodestyle scipy benchmarks/benchmarks + - | + grep -rlIP '[^\x00-\x7F]' scipy | grep '\.pyx\?' | sort > unicode.out; grep -rlI '# -\*- coding: \(utf-8\|latin-1\) -\*-' scipy | grep '\.pyx\?' | sort > coding.out; comm -23 unicode.out coding.out > test_code.out; cat test_code.out; test \! -s test_code.out - python: 3.7 dist: xenial # travis-ci/travis-ci/issues/9815 sudo: true diff --git a/scipy/io/__init__.py b/scipy/io/__init__.py index 64a7aa55d399..e991144a3bd8 100644 --- a/scipy/io/__init__.py +++ b/scipy/io/__init__.py @@ -1,5 +1,5 @@ -# -*- encoding:utf-8 -*- -""" +# -*- coding: utf-8 -*- +u""" ================================== Input and output (:mod:`scipy.io`) ================================== diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py index 44c05bb7d67f..bada811a2b6f 100644 --- a/scipy/stats/_continuous_distns.py +++ b/scipy/stats/_continuous_distns.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 @@ -3342,7 +3343,7 @@ class norminvgauss_gen(rv_continuous): O. Barndorff-Nielsen, "Normal Inverse Gaussian Distributions and Stochastic Volatility Modelling", Scandinavian Journal of Statistics, Vol. 24, - pp. 1–13, 1997. + pp. 1-13, 1997. %(example)s @@ -3379,7 +3380,7 @@ def _stats(self, a, b): class invweibull_gen(rv_continuous): - r"""An inverted Weibull continuous random variable. + u"""An inverted Weibull continuous random variable. This distribution is also known as the Fréchet distribution or the type II extreme value distribution. @@ -3392,7 +3393,7 @@ class invweibull_gen(rv_continuous): .. math:: - f(x, c) = c x^{-c-1} \exp(-x^{-c}) + f(x, c) = c x^{-c-1} \\exp(-x^{-c}) for :math:`x > 0`, :math:`c > 0`. @@ -4002,9 +4003,9 @@ def _cdf(self, x, alpha, beta): data_out[data_mask] = np.array([levy_stable._cdf_single_value_zolotarev(_x, _alpha, _beta) for _x, _alpha, _beta in data_subset]).reshape(len(data_subset), 1) else: - warnings.warn('FFT method is considered experimental for ' + - 'cumulative distribution function ' + - 'evaluations. Use Zolotarev’s method instead).', + warnings.warn(u'FFT method is considered experimental for ' + + u'cumulative distribution function ' + + u'evaluations. Use Zolotarev’s method instead).', RuntimeWarning) _alpha, _beta = pair _x = data_subset[:,(0,)] diff --git a/scipy/stats/_stats_mstats_common.py b/scipy/stats/_stats_mstats_common.py index e86c8287b487..8c17b7095386 100644 --- a/scipy/stats/_stats_mstats_common.py +++ b/scipy/stats/_stats_mstats_common.py @@ -11,6 +11,7 @@ 'rvalue', 'pvalue', 'stderr')) + def linregress(x, y=None): """ Calculate a linear least-squares regression for two sets of measurements. @@ -327,7 +328,7 @@ def siegelslopes(y, x=None, method="hierarchical"): .. [2] A. Stein and M. Werman, "Finding the repeated median regression line", Proceedings of the Third Annual ACM-SIAM Symposium on - Discrete Algorithms, pp. 409–413, 1992. + Discrete Algorithms, pp. 409-413, 1992. Examples --------