-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
rank() for int64 gives NAN for most negative value #32859
Comments
I debugged this to the extent that the problem is in the following method: Line 794 in 44de8dc
Trying to debug further using: http://docs.cython.org/en/latest/src/userguide/debugging.html as I haven't debugged @jbrockmendel FYI as I see that you have added this code earlier. |
So basically it looks like this is just following the Lines 842 to 843 in bfac136
If
Not sure there's a good way to handle this without major restructuring. Maybe just be more explicit this can happen for int64? |
Some other cython methods have a |
take |
Code to recreate the issue
Problem description
rank for
np.int64
most negative value gives NaN as rank.np.int32
works fine for similar case.Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.6.9.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.0.2
numpy : 1.17.3
pytz : 2019.3
dateutil : 2.8.1
pip : 19.3.1
setuptools : 41.6.0.post20191030
Cython : 0.29.13
pytest : 5.2.2
hypothesis : None
sphinx : 1.8.2
blosc : None
feather : None
xlsxwriter : 1.2.2
lxml.etree : 4.3.0
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.9.0
pandas_datareader: None
bs4 : 4.8.1
bottleneck : 1.2.1
fastparquet : 0.1.6
gcsfs : None
lxml.etree : 4.3.0
matplotlib : 3.1.1
numexpr : 2.7.0
odfpy : None
openpyxl : 2.5.12
pandas_gbq : None
pyarrow : 0.13.0
pytables : None
pytest : 5.2.2
pyxlsb : None
s3fs : None
scipy : 1.3.1
sqlalchemy : 1.3.10
tables : 3.6.1
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.2
numba : 0.42.0
The text was updated successfully, but these errors were encountered: