Skip to content

Commit

Permalink
Fix for py2/py3
Browse files Browse the repository at this point in the history
  • Loading branch information
colin committed Dec 11, 2016
1 parent 0150b75 commit 7b23fb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pymc3/tests/test_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def product(domains, n_samples=-1):
return []
all_vals = [zip(names, val) for val in itertools.product(*[d.vals for d in domains])]
if n_samples > 0 and len(all_vals) > n_samples:
return nr.choice(np.atleast_1d(all_vals), n_samples, replace=False)
return (all_vals[j] for j in nr.choice(len(all_vals), n_samples, replace=False))
return all_vals


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

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

Runif = Domain([-1, -.4, 0, .4, 1])
Rdunif = Domain([-10, 0, 10.])
Expand Down
6 changes: 3 additions & 3 deletions scripts/install_miniconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e # fail on first error

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

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

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


Expand Down

0 comments on commit 7b23fb5

Please sign in to comment.