Skip to content

Commit 3e75060

Browse files
authored
Merge pull request #70 from bashtage/sync-with-numpy
SYNC: Synchronize with changes in NumPy
2 parents 21c6f25 + 91c8bab commit 3e75060

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ matrix:
2626
- CYTHON=0.23
2727
- env:
2828
- PYTHON=3.5
29-
29+
- env:
30+
- PYTHON=3.6
31+
3032
before_install:
3133
- if [ ${TRAVIS_OS_NAME} = "osx" ]; then wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh -O miniconda.sh; fi
3234
- if [ ${TRAVIS_OS_NAME} = "linux" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; fi

randomstate/randomstate.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ cdef class RandomState:
11871187
Py_INCREF(temp) # needed to get around Pyrex's automatic reference-counting
11881188
# rules because EnsureArray steals a reference
11891189
arange = <np.ndarray>np.PyArray_EnsureArray(temp)
1190-
if not np.isfinite(arange).all():
1190+
if not np.all(np.isfinite(arange)):
11911191
raise OverflowError('Range exceeds valid bounds')
11921192
return cont(&self.rng_state, &random_uniform, size, self.lock, 2,
11931193
alow, '', CONS_NONE,
@@ -2287,7 +2287,7 @@ cdef class RandomState:
22872287
a good estimate of the true mean.
22882288
22892289
The derivation of the t-distribution was first published in
2290-
1908 by William Gisset while working for the Guinness Brewery
2290+
1908 by William Gosset while working for the Guinness Brewery
22912291
in Dublin. Due to proprietary issues, he had to publish under
22922292
a pseudonym, and so he used the name Student.
22932293

randomstate/tests/tests_numpy_mt19937.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,8 @@ def test_uniform_range_bounds(self):
810810
assert_raises(OverflowError, func, -np.inf, 0)
811811
assert_raises(OverflowError, func, 0, np.inf)
812812
assert_raises(OverflowError, func, fmin, fmax)
813+
assert_raises(OverflowError, func, [-np.inf], [0])
814+
assert_raises(OverflowError, func, [0], [np.inf])
813815

814816
# (fmax / 1e17) - fmin is within range, so this should not throw
815817
mt19937.uniform(low=fmin, high=fmax / 1e17)

0 commit comments

Comments
 (0)