Skip to content

Commit

Permalink
feat(pandas): implement radians
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and kszucs committed May 23, 2022
1 parent 18843c0 commit 6816b75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 5 additions & 0 deletions ibis/backends/pandas/execution/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions ibis/backends/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 6816b75

Please sign in to comment.