MCPcopy
hub / github.com/pandas-dev/pandas / test_use_global_config

Function test_use_global_config

pandas/tests/window/test_numba.py:381–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

379
380@td.skip_if_no("numba")
381def test_use_global_config():
382 def f(x):
383 return np.mean(x) + 2
384
385 s = Series(range(10))
386 with option_context("compute.use_numba", True):
387 result = s.rolling(2).apply(f, engine=None, raw=True)
388 expected = s.rolling(2).apply(f, engine="numba", raw=True)
389 tm.assert_series_equal(expected, result)
390
391
392@td.skip_if_no("numba")

Callers

nothing calls this directly

Calls 4

SeriesClass · 0.90
option_contextFunction · 0.90
applyMethod · 0.45
rollingMethod · 0.45

Tested by

no test coverage detected