You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expected_return() function in stats.py has deprecated code, which causes the following warning when generating a tearsheet with a benchmark:
/path/to/python/lib/python3.12/site-packages/numpy/core/fromnumeric.py:86: FutureWarning: The behavior of DataFrame.prod with axis=None is deprecated, in a future version this will reduce over both axes and return a scalar. To retain the old behavior, pass axis=0 (or do not pass axis)
return reduction(axis=axis, out=out, **passkwargs)
The expected_return() function in stats.py has deprecated code, which causes the following warning when generating a tearsheet with a benchmark:
Here is the deprecated code:
The corrected version is this:
In addition to explicitly specifying axis=0 to fix the FutureWarning, it also changes _np.product to _np.prod to fix another deprecation issue:
https://github.com/numpy/numpy/blob/maintenance/1.26.x/numpy/core/fromnumeric.py#L3837-L3839
I will submit a pull request.
The text was updated successfully, but these errors were encountered: