Skip to content

Commit

Permalink
Merge pull request scipy#9615 from larsoner/encoding
Browse files Browse the repository at this point in the history
ENH: Add test for encoding
  • Loading branch information
rgommers authored Dec 21, 2018
2 parents bacc926 + e87cd85 commit a2ffe09
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scipy/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding:utf-8 -*-
"""
# -*- coding: utf-8 -*-
u"""
==================================
Input and output (:mod:`scipy.io`)
==================================
Expand Down
13 changes: 7 additions & 6 deletions scipy/stats/_continuous_distns.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
#
# Author: Travis Oliphant 2002-2011 with contributions from
# SciPy Developers 2004-2011
Expand Down Expand Up @@ -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. 113, 1997.
pp. 1-13, 1997.
%(example)s
Expand Down Expand Up @@ -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.
Expand All @@ -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`.
Expand Down Expand Up @@ -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,)]
Expand Down
3 changes: 2 additions & 1 deletion scipy/stats/_stats_mstats_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'rvalue', 'pvalue',
'stderr'))


def linregress(x, y=None):
"""
Calculate a linear least-squares regression for two sets of measurements.
Expand Down Expand Up @@ -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. 409413, 1992.
Discrete Algorithms, pp. 409-413, 1992.
Examples
--------
Expand Down

0 comments on commit a2ffe09

Please sign in to comment.