Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix read-only array error in FractionalBacktest indicator scaling#1359

Open
atharvajoshi01 wants to merge 1 commit intokernc:masterkernc/backtesting.py:masterfrom
atharvajoshi01:fix/read-only-fractional-indicatoratharvajoshi01/backtesting.py:fix/read-only-fractional-indicatorCopy head branch name to clipboard
Open

Fix read-only array error in FractionalBacktest indicator scaling#1359
atharvajoshi01 wants to merge 1 commit intokernc:masterkernc/backtesting.py:masterfrom
atharvajoshi01:fix/read-only-fractional-indicatoratharvajoshi01/backtesting.py:fix/read-only-fractional-indicatorCopy head branch name to clipboard

Conversation

@atharvajoshi01
Copy link
Copy Markdown

Fixes the CI failure in test_FractionalBacktest where indicator /= self._fractional_unit raises ValueError: output array is read-only on newer pandas.

The in-place division fails because the underlying numpy array from pandas is read-only (copy-on-write). Replaced with a non-mutating division that creates a new array and updates the list entry directly.

Ref: #1354

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

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.