Skip to content

Commit 7b23fb5

Browse files
author
colin
committed
Fix for py2/py3
1 parent 0150b75 commit 7b23fb5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pymc3/tests/test_distributions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def product(domains, n_samples=-1):
8080
return []
8181
all_vals = [zip(names, val) for val in itertools.product(*[d.vals for d in domains])]
8282
if n_samples > 0 and len(all_vals) > n_samples:
83-
return nr.choice(np.atleast_1d(all_vals), n_samples, replace=False)
83+
return (all_vals[j] for j in nr.choice(len(all_vals), n_samples, replace=False))
8484
return all_vals
8585

8686

@@ -90,7 +90,7 @@ def product(domains, n_samples=-1):
9090
Rminusbig = Domain([-inf, -2, -1.5, -1, -.99, -.9, -.5, -0.01, 0])
9191
Unit = Domain([0, .001, .1, .5, .75, .99, 1])
9292

93-
Circ = Domain([-np.pi -2.1, -1, -.01, .0, .01, 1, 2.1, np.pi])
93+
Circ = Domain([-np.pi, -2.1, -1, -.01, .0, .01, 1, 2.1, np.pi])
9494

9595
Runif = Domain([-1, -.4, 0, .4, 1])
9696
Rdunif = Domain([-10, 0, 10.])

scripts/install_miniconda.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e # fail on first error
44

55
if conda --version > /dev/null 2>&1; then
6-
echo "conda appears to alreaday be installed"
6+
echo "conda appears to already be installed"
77
exit 0
88
fi
99

@@ -22,10 +22,10 @@ DOWNLOAD_PATH="miniconda.sh"
2222

2323
if [ ${PYTHON_VERSION} == "2.7" ]; then
2424
wget http://repo.continuum.io/miniconda/Miniconda-latest-$URL_OS-x86_64.sh -O ${DOWNLOAD_PATH};
25-
INSTALL_FOLDER="$HOME/minconda2"
25+
INSTALL_FOLDER="$HOME/miniconda2"
2626
else
2727
wget http://repo.continuum.io/miniconda/Miniconda3-latest-$URL_OS-x86_64.sh -O ${DOWNLOAD_PATH};
28-
INSTALL_FOLDER="$HOME/minconda3"
28+
INSTALL_FOLDER="$HOME/miniconda3"
2929
fi
3030

3131

0 commit comments

Comments
 (0)