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

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. #7

Open
alirizaaribas opened this issue Jun 12, 2022 · 1 comment

Comments

@alirizaaribas
Copy link

Hi,
Is this error the consequence of version incompatibility? What is your version? Can you share your environment? Thanks.

ValueError                                Traceback (most recent call last)
File <timed eval>:1, in <module>

File ~/miniconda3/lib/python3.9/site-packages/Pipeline/DPA.py:410, in DensityPeakAdvanced.fit(self, X, y)
    407 else:
    408     # TODO: implement option for kNN
    409     pass
--> 410 self.labels_, self.halos_, self.topography_, self.g_, self.centers_ = _DensityPeakAdvanced(self.densities_, 
    411                                                       self.err_densities_, self.k_hat_, 
    412                                                       self.nn_distances_, self.nn_indices_, self.Z)
    415 self.is_fitted_ = True
    417 return self

File ~/miniconda3/lib/python3.9/site-packages/Pipeline/DPA.py:80, in _DensityPeakAdvanced(densities, err_densities, k_hat, distances, indices, Z)
     30 def _DensityPeakAdvanced(densities, err_densities, k_hat, distances, indices, Z):  
     31     """Main function implementing the Density Peak Advanced clustering algorithm: 
     32 
     33     * Automatic detection of cluster centers
   (...)
     78 
     79     """
---> 80     from Pipeline import _DPA
     82     # We define as cluster centers the local maxima of g, where g is defined as density-err_density.
     83     g = [densities[i]-err_densities[i] for i in range(0,len(densities))]

File ~/PHDJUPYTER/TEMPP/DPA/src/Pipeline/_DPA.pyx:1, in init Pipeline._DPA()
----> 1 # !python
      2 # cython: boundscheck=False
      3 # cython: cdivision=False

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

@mariaderrico
Copy link
Owner

Hi,
It sounds like version incompatibility with the numpy package. In my environment I have numpy 1.21.6. Have you tried upgrading or reinstalling it?

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