Skip to content

BUG: Fix series.round() handling of EA #26817

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

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
TST: add td.skip_if_no_NEP18
  • Loading branch information
pilkibun committed Jun 15, 2019
commit 6c2ca298de5a959ab0afceaee31806d077248b30
5 changes: 4 additions & 1 deletion pandas/compat/numpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
_np_version_under1p16 = _nlv < LooseVersion('1.16')
_np_version_under1p17 = _nlv < LooseVersion('1.17')
_is_numpy_dev = '.dev' in str(_nlv)

try:
_NEP18_enabled = np.core.overrides.ENABLE_ARRAY_FUNCTION
except Exception:
_NEP18_enabled = False

if _nlv < '1.13.3':
raise ImportError('this version of pandas is incompatible with '
Expand Down
4 changes: 3 additions & 1 deletion pandas/util/_test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_foo():
import pytest

from pandas.compat import is_platform_32bit, is_platform_windows
from pandas.compat.numpy import _np_version
from pandas.compat.numpy import _NEP18_enabled, _np_version

from pandas.core.computation.expressions import (
_NUMEXPR_INSTALLED, _USE_NUMEXPR)
Expand Down Expand Up @@ -165,6 +165,8 @@ def skip_if_no(
"installed->{installed}".format(
enabled=_USE_NUMEXPR,
installed=_NUMEXPR_INSTALLED))
skip_if_no_NEP18 = pytest.mark.skipif(not _NEP18_enabled,
reason="numpy NEP-18 disabled")


def skip_if_np_lt(ver_str, reason=None, *args, **kwds):
Expand Down