Skip to content

TST: add test for numpy ops, esp. nanmin/max bug for np<1.13 #19753

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

Merged
merged 1 commit into from
Feb 19, 2018

Conversation

topper-123
Copy link
Contributor

The bug in #8383 concerns np.nanmin and np.nanmax only, don't know if I'm testing too much.

@@ -15,6 +16,7 @@
import pandas.util._test_decorators as td

use_bn = nanops._USE_BOTTLENECK
np_version113 = LooseVersion(np.__version__) >= LooseVersion('1.13')
Copy link
Contributor

Choose a reason for hiding this comment

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

import from pandas
we already define this

(np.nanmax, False, 4),
])
def test_numpy_ops(numpy_op, passes_all_numpy_version, expected):
# GH8383
Copy link
Contributor

Choose a reason for hiding this comment

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

you can just make 2 tests
1 for numpy >= 1.13 and 1 for < 1.13 which assert those functions which exist there

@jreback jreback added Numeric Operations Arithmetic, Comparison, and Logical operations Compat pandas objects compatability with Numpy or Python functions labels Feb 18, 2018
@topper-123
Copy link
Contributor Author

topper-123 commented Feb 18, 2018

Comments addressed. Not sure if I understood your second, but please look at changed test functions.

@jreback jreback added this to the 0.23.0 milestone Feb 18, 2018
@jreback
Copy link
Contributor

jreback commented Feb 18, 2018

lgtm ping on green

@codecov
Copy link

codecov bot commented Feb 19, 2018

Codecov Report

Merging #19753 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19753      +/-   ##
==========================================
- Coverage    91.6%    91.6%   -0.01%     
==========================================
  Files         150      150              
  Lines       48864    48864              
==========================================
- Hits        44763    44761       -2     
- Misses       4101     4103       +2
Flag Coverage Δ
#multiple 89.97% <ø> (-0.01%) ⬇️
#single 41.75% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/testing.py 83.64% <0%> (-0.21%) ⬇️

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 5bb5e33...07b2995. Read the comment docs.

@topper-123
Copy link
Contributor Author

all green.

@jreback jreback merged commit 02b59b6 into pandas-dev:master Feb 19, 2018
@jreback
Copy link
Contributor

jreback commented Feb 19, 2018

thanks @topper-123

harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
@topper-123 topper-123 deleted the np_nanmin_nanmax branch May 18, 2018 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nanmin no longer works with series
2 participants