Cast float to "returns.min()" and to "benchmark.min()"
As described in the issue, line 361 in core.py was comparing a <class 'numpy.float64'> with a <class 'pandas.core.series.Series'>, which was causing an error.
Simply casting a float to both variables ensures that the comparison is made between equal types and fixes the issue without breaking the reports.html() function mentioned in the issue.
Description by Korbit AI
What change is being made?
Convert minimum and maximum return and benchmark values to floats in plot_timeseries() within core.py to fix error in reports.full().
Why are these changes being made?
The error was caused by incompatible data types used for y-axis limit calculations; converting these values to floats ensures compatibility and accuracy in plotting. This change addresses the issue without affecting related functionalities, providing a simple and effective solution.
Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description
This Pull requests Fixes #55
Changes:
As described in the issue, line 361 in core.py was comparing a <class 'numpy.float64'> with a <class 'pandas.core.series.Series'>, which was causing an error.
Simply casting a float to both variables ensures that the comparison is made between equal types and fixes the issue without breaking the reports.html() function mentioned in the issue.
Description by Korbit AI
What change is being made?
Convert minimum and maximum return and benchmark values to floats in
plot_timeseries()
withincore.py
to fix error inreports.full()
.Why are these changes being made?
The error was caused by incompatible data types used for y-axis limit calculations; converting these values to floats ensures compatibility and accuracy in plotting. This change addresses the issue without affecting related functionalities, providing a simple and effective solution.