Reputation: 141
I have a python script which import the bottleneck as follow:
from bottleneck import argpartsort
I have the following error:
ImportError: cannot import name argpartsort
I have installed python bottleneck package from the link and tested a simple program and it execute successfully. However, I still encountered the above mentioned error for another script. I am not including the python script in the post because the error is in script statement from bottleneck import argpartsort
Upvotes: 2
Views: 347
Reputation: 1215
I believe this would help:
Functions partsort and argpartsort have been renamed to partition and argpartition to match NumPy. Additionally the meaning of the input arguments have changed: bn.partsort(a, n) is now equivalent to bn.partition(a, kth=n-1). Similarly for bn.argpartition.
from here
So, now it would be like:
from bottleneck import argpartition
Upvotes: 3