From 6816b75cf065668d0a8b30be475ad1bf07a6081b Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Sun, 22 May 2022 09:32:44 -0400 Subject: [PATCH] feat(pandas): implement radians --- ibis/backends/pandas/execution/generic.py | 5 +++++ ibis/backends/tests/test_numeric.py | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ibis/backends/pandas/execution/generic.py b/ibis/backends/pandas/execution/generic.py index 08095a7eee13..c904256a4e51 100644 --- a/ibis/backends/pandas/execution/generic.py +++ b/ibis/backends/pandas/execution/generic.py @@ -251,6 +251,11 @@ def execute_series_trig(op, data, **kwargs): return call_numpy_ufunc(function, op, data, **kwargs) +@execute_node.register(ops.Radians, (pd.Series, *numeric_types)) +def execute_series_radians(_, data, **kwargs): + return np.radians(data) + + @execute_node.register((ops.Ceil, ops.Floor), pd.Series) def execute_series_ceil(op, data, **kwargs): return_type = np.object_ if data.dtype == np.object_ else np.int64 diff --git a/ibis/backends/tests/test_numeric.py b/ibis/backends/tests/test_numeric.py index 1245896babc5..d6a15bf55578 100644 --- a/ibis/backends/tests/test_numeric.py +++ b/ibis/backends/tests/test_numeric.py @@ -155,14 +155,7 @@ def test_isnan_isinf( L(5.556).radians(), math.radians(5.556), id='radians', - marks=pytest.mark.notimpl( - [ - "dask", - "datafusion", - "impala", - "pandas", - ] - ), + marks=pytest.mark.notimpl(["dask", "datafusion", "impala"]), ), param( L(5.556).degrees(),