quantstats icon indicating copy to clipboard operation
quantstats copied to clipboard

UnsupportedFunctionCall: numpy operations are not valid with resample.

Open awfales opened this issue 1 year ago • 7 comments

Is this just me in google colab or is this an issue for others?

image

[/usr/local/lib/python3.10/dist-packages/pandas/compat/numpy/function.py](https://localhost:8080/#) in validate_resampler_func(method, args, kwargs)
    374     if len(args) + len(kwargs) > 0:
    375         if method in RESAMPLER_NUMPY_OPS:
--> 376             raise UnsupportedFunctionCall(
    377                 "numpy operations are not valid with resample. "
    378                 f"Use .resample(...).{method}() instead"

UnsupportedFunctionCall: numpy operations are not valid with resample. Use .resample(...).sum() instead

awfales avatar Nov 02 '24 02:11 awfales

Have the same problem

JomaDeveloper avatar Nov 05 '24 15:11 JomaDeveloper

It was issued by brunch in "Issues" https://github.com/ranaroussi/quantstats/pull/375

JomaDeveloper avatar Nov 06 '24 10:11 JomaDeveloper

temporary fix is to use the previous version pip install quantstats==0.0.62. I could resolve the issue using this and I am currently using pandas==2.0.2 and numpy==1.26.4

devanshu125 avatar Nov 17 '24 08:11 devanshu125

temporary fix is to use the previous version pip install quantstats==0.0.62. I could resolve the issue using this and I am currently using pandas==2.0.2 and numpy==1.26.4

thankss

jitdarkfighter avatar Dec 25 '24 17:12 jitdarkfighter

what if i cant downgrade pandas?

Nod1l avatar Jan 25 '25 18:01 Nod1l

what if i cant downgrade pandas?

for me, downgrading numpy only worked

ichrnkv avatar Feb 19 '25 17:02 ichrnkv

Same issue here

Mayurifag avatar Apr 06 '25 18:04 Mayurifag

Closing this issue as it's older than 2025 and has been specifically addressed in release 0.0.64. The pandas resampling compatibility issues have been resolved with the comprehensive compatibility layer implementation.

ranaroussi avatar Jul 18 '25 14:07 ranaroussi