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

Fix bug on pow and rpow #2047

Merged
merged 3 commits into from
Feb 12, 2021
Merged

Fix bug on pow and rpow #2047

merged 3 commits into from
Feb 12, 2021

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Feb 10, 2021

Fixed incompatible behavior for pow and rpow.

In pandas:

>>> pd.Series([1, 2, 3]) ** np.nan
0    1.0
1    NaN
2    NaN
dtype: float64

>>> 1 ** pd.Series([np.nan, 2, 3])
0    1.0
1    1.0
2    1.0
dtype: float64

In Koalas:

>>> ks.Series([1, 2, 3]) ** np.nan
0    NaN  # doesn't match
1    NaN
2    NaN
dtype: float64

>>> 1 ** ks.Series([np.nan, 2, 3])
0    NaN  # doesn't match
1    1.0
2    1.0
dtype: float64

@codecov-io
Copy link

codecov-io commented Feb 10, 2021

Codecov Report

Merging #2047 (79bfd6c) into master (e6a9628) will decrease coverage by 0.88%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2047      +/-   ##
==========================================
- Coverage   94.71%   93.83%   -0.89%     
==========================================
  Files          54       54              
  Lines       11497    11394     -103     
==========================================
- Hits        10889    10691     -198     
- Misses        608      703      +95     
Impacted Files Coverage Δ
databricks/koalas/base.py 97.28% <100.00%> (+0.02%) ⬆️
databricks/koalas/usage_logging/__init__.py 27.58% <0.00%> (-64.92%) ⬇️
databricks/koalas/usage_logging/usage_logger.py 47.82% <0.00%> (-52.18%) ⬇️
databricks/koalas/__init__.py 84.00% <0.00%> (-8.00%) ⬇️
databricks/conftest.py 96.61% <0.00%> (-3.39%) ⬇️
databricks/koalas/testing/utils.py 80.00% <0.00%> (-1.32%) ⬇️
databricks/koalas/plot/core.py 93.52% <0.00%> (-0.26%) ⬇️
databricks/koalas/mlflow.py 95.12% <0.00%> (-0.12%) ⬇️
...ricks/koalas/tests/plot/test_series_plot_plotly.py 98.07% <0.00%> (-0.11%) ⬇️
databricks/koalas/generic.py 93.14% <0.00%> (-0.11%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6a9628...79bfd6c. Read the comment docs.

databricks/koalas/base.py Outdated Show resolved Hide resolved
databricks/koalas/base.py Outdated Show resolved Hide resolved
databricks/koalas/base.py Outdated Show resolved Hide resolved
databricks/koalas/base.py Outdated Show resolved Hide resolved
@itholic
Copy link
Contributor Author

itholic commented Feb 11, 2021

Thanks for the review, @ueshin :)

Copy link
Collaborator

@ueshin ueshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending tests.

@ueshin
Copy link
Collaborator

ueshin commented Feb 12, 2021

Thanks! merging.

@ueshin ueshin merged commit 87f5b18 into databricks:master Feb 12, 2021
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

Successfully merging this pull request may close these issues.

3 participants