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

Ensure transform.Function returns writable arrays #35

Merged
merged 7 commits into from
Jul 5, 2024
Merged

Conversation

hagenw
Copy link
Member

@hagenw hagenw commented Jul 4, 2024

Closes #31

I added tests that run all the single transforms on a read-only signal, and none of them fails. I only can achieve the error when I combine the transforms with another transforms, that sets the signal to read-only. The tests fail for single transforms or combined transforms, see #35 (comment).

The error is fixed by copying the signal inside auglib.transform.Base.__call__(), if it is set to read-only.

@hagenw hagenw marked this pull request as draft July 4, 2024 12:12
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.0%. Comparing base (aa87c89) to head (7c23966).

Additional details and impacted files
Files Coverage Δ
auglib/core/transform.py 100.0% <100.0%> (ø)

@hagenw hagenw changed the title Ensure transform.Functino returns writeable arrays Ensure transform.Function returns writeable arrays Jul 4, 2024
@hagenw hagenw changed the title Ensure transform.Function returns writeable arrays Let transform.Function return writable arrays Jul 4, 2024
@hagenw hagenw changed the title Let transform.Function return writable arrays Ensure transform.Function returns writable arrays Jul 4, 2024
@hagenw hagenw marked this pull request as ready for review July 4, 2024 14:31
@hagenw hagenw requested a review from audeerington July 4, 2024 14:33
@hagenw hagenw merged commit a665a49 into main Jul 5, 2024
9 checks passed
@hagenw hagenw deleted the fix-readonly-array branch July 5, 2024 07:41
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.

Handle read-only input signals
2 participants