File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,18 +164,17 @@ def clip_accumulate(
164164 Returns:
165165 np.array, copy of original.
166166 """
167- if isinstance (series , (list , np .ndarray )):
168- series = pd .Series (series , dtype = "float64" )
167+ series = np .array (series )
169168 if monotonicity ["sign" ] > 0 :
170169 series = np .maximum .accumulate (series )
171170 else :
172171 series = np .minimum .accumulate (series )
173172 if "lower" in monotonicity and "upper" in monotonicity :
174- series = series .clip (lower = monotonicity ["lower" ], upper = monotonicity ["upper" ])
173+ series = series .clip (min = monotonicity ["lower" ], max = monotonicity ["upper" ])
175174 elif "lower" in monotonicity :
176- series = series .clip (lower = monotonicity ["lower" ])
175+ series = series .clip (min = monotonicity ["lower" ])
177176 elif "upper" in monotonicity :
178- series = series .clip (upper = monotonicity ["upper" ])
177+ series = series .clip (max = monotonicity ["upper" ])
179178 return series
180179
181180
You can’t perform that action at this time.
0 commit comments