modin-project / modin

Modin: Scale your Pandas workflows by changing a single line of code
http://modin.readthedocs.io
Apache License 2.0
9.91k stars 653 forks source link

BUG: __imul__ uses __add__ instead of __mul__ #7379

Closed sfc-gh-joshi closed 2 months ago

sfc-gh-joshi commented 2 months ago

Modin version checks

Reproducible Example

import modin.pandas as pd
s = pd.Series([2])
s *= 3

Issue Description

The above code produces a 1-element series containing 5 instead of the expected 6, since a typo in our frontend code aliases __imul__ to __add__ instead of __mul__.

Expected Behavior

Multiply instead of adding.

Error Logs

```python-traceback Replace this line with the error backtrace (if applicable). ```

Installed Versions

INSTALLED VERSIONS ------------------ commit : f70176a796db92a5484ae4d3530906bdc3f5eb70 python : 3.10.13.final.0 python-bits : 64 OS : Darwin OS-release : 23.6.0 Version : Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020 machine : arm64 processor : arm byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 Modin dependencies ------------------ modin : 0.31.0+17.gf70176a7 ray : 2.34.0 dask : 2024.8.1 distributed : 2024.8.1 pandas dependencies ------------------- pandas : 2.2.2 numpy : 1.26.4 pytz : 2023.3.post1 dateutil : 2.8.2 setuptools : 68.0.0 pip : 23.3 Cython : None pytest : 8.3.2 hypothesis : None sphinx : 5.3.0 blosc : None feather : None xlsxwriter : None lxml.etree : 5.3.0 html5lib : None pymysql : None psycopg2 : 2.9.9 jinja2 : 3.1.4 IPython : 8.17.2 pandas_datareader : None adbc-driver-postgresql: None adbc-driver-sqlite : None bs4 : 4.12.2 bottleneck : None dataframe-api-compat : None fastparquet : 2024.5.0 fsspec : 2024.6.1 gcsfs : None matplotlib : 3.9.2 numba : None numexpr : 2.10.1 odfpy : None openpyxl : 3.1.5 pandas_gbq : 0.23.1 pyarrow : 17.0.0 pyreadstat : None python-calamine : None pyxlsb : None s3fs : 2024.6.1 scipy : 1.14.1 sqlalchemy : 2.0.32 tables : 3.10.1 tabulate : None xarray : 2024.7.0 xlrd : 2.0.1 zstandard : None tzdata : 2023.3 qtpy : None pyqt5 : None