Skip to content

Commit

Permalink
Ignore scipy.stats._axis_nan_policy.SmallSampleWarning for LaxBackedS…
Browse files Browse the repository at this point in the history
…cipyStatsTests.testMode

It is to fix our CI, the warning itself started occurring on scipy 1.14

PiperOrigin-RevId: 676966398
  • Loading branch information
vam-google authored and Google-ML-Automation committed Sep 20, 2024
1 parent 9465d42 commit 833960a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/scipy_stats_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,10 @@ def evaluate_kde(kde, x):
contains_nans=[True, False],
keepdims=[True, False]
)
@jtu.ignore_warning(
category=scipy.stats._axis_nan_policy.SmallSampleWarning,
message="One or more sample arguments is too small; all returned values will be NaN"
)
def testMode(self, shape, dtype, axis, contains_nans, keepdims):
if scipy_version < (1, 9, 0) and keepdims != True:
self.skipTest("scipy < 1.9.0 only support keepdims == True")
Expand Down

0 comments on commit 833960a

Please sign in to comment.