Repository navigation
TST: Add more tests for np.pad - #11961
Conversation
There was a problem hiding this comment.
I think it is best if we keep this test just for 'mean'. The other functions will not suffer from this bug.
There was a problem hiding this comment.
Why not test them anyway?
There was a problem hiding this comment.
I get it, but this is very convoluted targeted test.
I think it can definitely make use of a "in source" comment summarizing the issue.
We are essentially testing the implementation of the algorithm as well as the peculiarities of floating point numbers. it is easy to understand why maximum and minimum are not likely to suffer from this bug. median will also not suffer from this.
If we want to test the general behaviour for all 4 other modes, I think it is better to have them in a more general different test and keep this particular test very targeted.
|
Would this be a good opportunity to include a test covering the behavior described in #11358 (comment): as well? |
20c754c to
59c0e51
Compare
|
@lagru: I don't thing the current output is really correct for that either. I suppose I could add another xfailing test for that. |
|
@eric-wieser That is the behavior of the old pad function. Would you expect the output to be |
|
@lagru: Indeed it is, and yes I would. I think the best option here is |
59c0e51 to
40f9c68
Compare
|
Added that test, and updated the comments in the other test |
The test is marked xfail right now as it is not fixed in master
…ently rounds to `float`
40f9c68 to
d26ad30
Compare
|
Thanks Eric. |
Extracted from #11358 + the addition of an
xfailmarker.