Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy cKDTree: n_jobs has been renamed workers #49

Open
alexlenail opened this issue Sep 15, 2022 · 1 comment
Open

scipy cKDTree: n_jobs has been renamed workers #49

alexlenail opened this issue Sep 15, 2022 · 1 comment

Comments

@alexlenail
Copy link

alexlenail commented Sep 15, 2022

File ~/.conda/envs/py39/lib/python3.9/site-packages/mnnpy/mnn.py:178, in mnn_correct(var_index, var_subset, batch_key, index_unique, batch_categories, k, sigma, cos_norm_in, cos_norm_out, svd_dim, var_adj, compute_angle, mnn_order, svd_mode, do_concatenate, save_raw, n_jobs, *datas, **kwargs)
    176     new_batch_out = out_batches[target]
    177 print('  Looking for MNNs...')
--> 178 mnn_ref, mnn_new = find_mutual_nn(data1=ref_batch_in, data2=new_batch_in, k1=k, k2=k,
    179                                   n_jobs=n_jobs)
    180 print('  Computing correction vectors...')
    181 correction_in = compute_correction(ref_batch_in, new_batch_in, mnn_ref, mnn_new,
    182                                    new_batch_in, sigma)

File _ckdtree.pyx:786, in scipy.spatial._ckdtree.cKDTree.query()

File _ckdtree.pyx:390, in scipy.spatial._ckdtree.get_num_workers()

TypeError: Unexpected keyword argument {'n_jobs': 96}

From https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.cKDTree.query.html

The “n_jobs” argument was renamed “workers”. The old name “n_jobs” was deprecated in SciPy 1.6.0 and was removed in SciPy 1.9.0.

@CowanCS1
Copy link

Yeah, just hit this as well. Temporarily switching to scipy=1.8.1, which I can confirm works fine, but this should be an easy quick fix and pull request if someone has a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants