Skip to content
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

REGR?: ExponentialMovingWindow.aggregate raises on main with np.mean #58299

Open
twoertwein opened this issue Apr 17, 2024 · 0 comments
Open

Comments

@twoertwein
Copy link
Member

import numpy as np
import pandas as pd

series = pd.Series(np.random.standard_normal(700))
series.ewm(span=10).aggregate(np.mean)
# 2.2.1: works but warns 'FutureWarning: The provided callable <function mean at 0x7f3e657cf7e0> is currently using ExponentialMovingWindow.mean. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "mean" instead.'

# main: errors:
# AttributeError: 'ExponentialMovingWindow' object has no attribute 'apply'. Did you mean: '_apply'?

series.ewm(span=10).aggregate("mean") # works on both 2.2.1 and main

The warning on 2.2.1 clearly indicates that the behavior will change, but I'm not sure whether the intended future behavior is raising an error :)

xref pandas-dev/pandas-stubs#904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant