From ae77f0c2fb3fb28d3f88cc46b76f8171ffa188bb Mon Sep 17 00:00:00 2001 From: Chris Jarrett Date: Wed, 24 Mar 2021 12:56:54 -0700 Subject: [PATCH] Move up error --- python/cudf/cudf/core/series.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/cudf/cudf/core/series.py b/python/cudf/cudf/core/series.py index d6b9e7d5835..a664c4fb182 100644 --- a/python/cudf/cudf/core/series.py +++ b/python/cudf/cudf/core/series.py @@ -4775,6 +4775,11 @@ def cumprod(self, axis=0, skipna=True, *args, **kwargs): if axis not in (None, 0): raise NotImplementedError("axis parameter is not implemented yet") + if is_decimal_dtype(self.dtype): + raise NotImplementedError( + "cumprod does not currently support decimal types" + ) + skipna = True if skipna is None else skipna if skipna: @@ -4787,11 +4792,6 @@ def cumprod(self, axis=0, skipna=True, *args, **kwargs): ) result_col[first_index:] = None - if is_decimal_dtype(result_col.dtype): - raise NotImplementedError( - "cumprod does not currently support decimal types" - ) - # pandas always returns int64 dtype if original dtype is int or `bool` if np.issubdtype(result_col.dtype, np.integer) or np.issubdtype( result_col.dtype, np.bool_