-
Notifications
You must be signed in to change notification settings - Fork 17
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
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject #66
Comments
Thanks for bringing this to our attention. What command did you run, that gave the error (seems like I just tested a version running fine pip installing tcrdist in a fresh python env with conda, numpy==1.20.3
|
Thanks for your reply. |
Great. Note that from tcrdist.rep_funcs import compute_pw_sparse_out_of_memory was developed before we had a more powerful way to do the same: import os
import pandas as pd
from tcrdist.repertoire import TCRrep
from tcrdist.sparse import add_sparse_pwd
tr = TCRrep(cell_df = df
organism = 'human',
chains = ['alpha','beta'],
deduplicate = True,
compute_distances = False)
# APPENDIX A: NOTE THE WE CAN COMPUTE ALL PAIRWISE DISTANCES IN SPARSE FORMAT
tr.compute_sparse_rect_distances(df = tr.clone_df, df2= tr.clone_df, radius = 100)
# If you want to add sparse matrices with different entries
tr.rw_alpha_beta = add_sparse_pwd(tr.rw_beta,tr.rw_alpha) This has benefit that you can use radius argument to dump all pairwise distance above some threshold. E.g., if radius is 100, only pairwise distances <= 100 will be retained. |
I was able to get tcrdist running again with the env file above. Thank you for your help. |
I am using
tcrdist3==0.2.0
withnumpy==1.20.0
. Because of changes in C API of numpy I am gettingValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
.I tried to uninstall and install numpy versions from 1.19.0 to 1.20.3 but I am still get the same error. Here's the error log for reference:
Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/local/lib/python3.8/dist-packages/tcrdist/rep_funcs.py", line 11, in <module> from tcrdist import memory File "/usr/local/lib/python3.8/dist-packages/tcrdist/memory.py", line 8, in <module> from hierdiff.tally import neighborhood_tally File "/usr/local/lib/python3.8/dist-packages/hierdiff/__init__.py", line 3, in <module> from .association_testing import cluster_association_test File "/usr/local/lib/python3.8/dist-packages/hierdiff/association_testing.py", line 15, in <module> from fishersapi import fishers_vec, fishers_frame, adjustnonnan File "/usr/local/lib/python3.8/dist-packages/fishersapi/__init__.py", line 3, in <module> from .fishersapi import * File "/usr/local/lib/python3.8/dist-packages/fishersapi/fishersapi.py", line 66, in <module> import fisher File "/usr/local/lib/python3.8/dist-packages/fisher/__init__.py", line 3, in <module> from .cfisher import * File "__init__.pxd", line 242, in init cfisher ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
The text was updated successfully, but these errors were encountered: