Skip to content

Commit e1db6a2

Browse files
Handling updated kstest interface in scipy 1.10 (#454)
* handling updated kstest interface in scipy 1.10 * updating precommit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c637d6c commit e1db6a2

3 files changed

Lines changed: 22 additions & 26 deletions

File tree

.pre-commit-config.yaml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1-
21
repos:
3-
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.4.0
5-
hooks:
6-
- id: trailing-whitespace
7-
- id: end-of-file-fixer
8-
- id: debug-statements
9-
10-
- repo: https://github.com/PyCQA/isort
11-
rev: "5.11.4"
12-
hooks:
13-
- id: isort
14-
args: []
15-
additional_dependencies: [toml]
16-
exclude: docs/tutorials
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: debug-statements
178

18-
- repo: https://github.com/psf/black
19-
rev: "22.12.0"
20-
hooks:
21-
- id: black
9+
- repo: https://github.com/PyCQA/isort
10+
rev: "5.11.4"
11+
hooks:
12+
- id: isort
13+
args: []
14+
additional_dependencies: [toml]
15+
exclude: docs/tutorials
2216

23-
- repo: https://github.com/dfm/black_nbconvert
24-
rev: v0.4.0
25-
hooks:
26-
- id: black_nbconvert
17+
- repo: https://github.com/psf/black
18+
rev: "22.12.0"
19+
hooks:
20+
- id: black-jupyter

docs/tutorials/parallel.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@
255255
],
256256
"source": [
257257
"with open(\"script.py\", \"w\") as f:\n",
258-
" f.write(\"\"\"\n",
258+
" f.write(\n",
259+
" \"\"\"\n",
259260
"import sys\n",
260261
"import time\n",
261262
"import emcee\n",
@@ -284,7 +285,8 @@
284285
" sampler.run_mcmc(initial, nsteps)\n",
285286
" end = time.time()\n",
286287
" print(end - start)\n",
287-
"\"\"\")\n",
288+
"\"\"\"\n",
289+
" )\n",
288290
"\n",
289291
"mpi_time = !mpiexec -n {ncpu} python script.py\n",
290292
"mpi_time = float(mpi_time[0])\n",

src/emcee/tests/integration/test_proposal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ def _test_uniform(proposal, nwalkers=32, nsteps=2000, seed=1234):
9898
# Check that the resulting chain "fails" the K-S test.
9999
samps = sampler.get_chain(flat=True)
100100
np.random.shuffle(samps)
101-
ks, _ = stats.kstest(samps[::100], "uniform")
101+
ks, _ = stats.kstest(samps[::100, 0], "uniform")
102102
assert ks > 0.1, "The K-S test failed"

0 commit comments

Comments
 (0)