| {"repo": "markovmodel/msmtools", "pull_number": 117, "instance_id": "markovmodel__msmtools-117", "issue_numbers": "", "base_commit": "e6ea742c9a17d57071d1651647915caf724d439f", "patch": "diff --git a/msmtools/estimation/sparse/effective_counts.py b/msmtools/estimation/sparse/effective_counts.py\n--- a/msmtools/estimation/sparse/effective_counts.py\n+++ b/msmtools/estimation/sparse/effective_counts.py\n@@ -199,12 +199,7 @@ def statistical_inefficiencies(dtrajs, lag, C=None, truncate_acf=True, mact=2.0,\n # compute inefficiencies\n I, J = C.nonzero()\n if n_jobs > 1:\n- try:\n- from multiprocess.pool import Pool, MapResult\n- except ImportError:\n- raise RuntimeError('using multiple jobs requires the multiprocess library. '\n- 'Install it with conda or pip')\n-\n+ from multiprocessing.pool import Pool, MapResult\n from contextlib import closing\n import tempfile\n \n", "test_patch": "diff --git a/msmtools/estimation/tests/test_effective_count_matrix.py b/msmtools/estimation/tests/test_effective_count_matrix.py\n--- a/msmtools/estimation/tests/test_effective_count_matrix.py\n+++ b/msmtools/estimation/tests/test_effective_count_matrix.py\n@@ -27,13 +27,6 @@\n \n \"\"\"Unit tests for the transition_matrix module\"\"\"\n \n-have_multiprocess_lib = True\n-try:\n- import multiprocess\n- del multiprocess\n-except ImportError:\n- have_multiprocess_lib = False\n-\n \n class TestEffectiveCountMatrix(unittest.TestCase):\n \n@@ -70,9 +63,7 @@ def test_multitraj(self):\n assert np.array_equal(C.nonzero(), Ceff.nonzero())\n assert np.all(Ceff.toarray() <= C.toarray())\n \n- @unittest.skipIf(not have_multiprocess_lib, 'multiprocess lib missing')\n def test_multitraj_njobs(self):\n- import _multiprocess\n dtrajs = [[1, 0, 1, 0, 1, 1, 0, 0, 0, 1], [2], [0, 1, 0, 1]]\n # lag 1\n C = count_matrix(dtrajs, 1)\n@@ -94,8 +85,8 @@ def test_multitraj_njobs(self):\n assert np.array_equal(Ceff2.shape, C.shape)\n assert np.array_equal(C.nonzero(), Ceff2.nonzero())\n assert np.all(Ceff2.toarray() <= C.toarray())\n-\n- @unittest.skipIf(os.getenv('CI', False), 'need physical processors >=2, dont have on CI')\n+ \n+ @unittest.skipIf(os.getenv('CI', False), 'need physical cores')\n def test_njobs_speedup(self):\n artificial_dtraj = [np.random.randint(0, 100, size=10000) for _ in range(10)]\n import time\n", "problem_statement": "", "hints_text": "", "created_at": "2018-11-09T13:28:34Z"} | |