-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Series.rmod called with scalar returns inconsistent results based on size of series #29602
Comments
Seems to be fixed on master. s1 = pd.Series([2] * 10001, name='long_series').rmod(-1)
s2 = pd.Series([2] * 10000, name='short_series').rmod(-1)
print(s1.loc[0:9].to_frame().join(s2.loc[0:9]))
## -- End pasted text --
long_series short_series
0 1 1
1 1 1
2 1 1
3 1 1
4 1 1
5 1 1
6 1 1
7 1 1
8 1 1
9 1 1 @kmacdough can you try with master? |
i'm getting the same issue on master (and also getting the incorrect behaviour on '0.26.0.dev0+910.g71b78685a' (master on 14/11/2019))
INSTALLED VERSIONS commit : 49bc8d8 pandas : 1.1.0.dev0+1068.g49bc8d8c9 |
with uint64 casts to float, Int64 works as expected and UInt64 raises TypeError
|
@simonjayhawkins didnt you have a recent numexpr-related PR on a issue similar to this? |
I'm getting the correct behavior on master again. Maybe worth having a test to see if it's not platform or package related
|
@phofl not sure if I should be pinging you on this but I have a test written that's pretty straightforward:
two questions: 1) does the test look okay, 2) I'm trying to test against 1.1.0 to confirm it fails (it passes on the latest main) but having some issues building. To test against 1.1.0 I'm checking out
Any pointers? Thanks! |
Test looks ok I think, You don't have to build from source there. You can simply create another environment and install the released pandas 1.1.0 |
in tests.arithmetic.switch_numexpr_min_elements we change the numexpr cutoff so that we shouldn't need a long Series to test this |
Code Sample, a copy-pastable example if possible
In
Out
Problem description
Series.rmod
called on a scalar behaves differently depending on the size of the series.On my machine:
%
operator)Appears to behave properly when called on other Series.
Series.mod
does not appear to have any such issues.Expected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit : None
python : 3.6.7.final.0
python-bits : 64
OS : Darwin
OS-release : 18.7.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 0.25.3
numpy : 1.17.3
pytz : 2019.3
dateutil : 2.8.1
pip : 19.1
setuptools : 41.0.1
Cython : 0.29.14
pytest : 5.0.1
hypothesis : None
sphinx : 2.2.1
blosc : None
feather : None
xlsxwriter : 1.2.2
lxml.etree : 4.4.1
html5lib : 1.0.1
pymysql : None
psycopg2 : 2.7.3.2 (dt dec pq3 ext lo64)
jinja2 : 2.10.3
IPython : 7.9.0
pandas_datareader: None
bs4 : 4.8.1
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : 4.4.1
matplotlib : 3.1.2
numexpr : 2.7.0
odfpy : None
openpyxl : 3.0.0
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : 1.3.1
sqlalchemy : 1.3.10
tables : 3.6.1
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.2
The text was updated successfully, but these errors were encountered: