remove_duplicates()
without in_place = True
causes signature_value
to be not updated after write
.
#179
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to the copy of
Sequence
object being made whenin_place=False
, assignments to theself
inwrite()
function is done to the copy, not the original. As a result, those values are not assigned after the call returns. AFAIK, only signature only these three lines are effected:pypulseq/pypulseq/Sequence/write_seq.py
Lines 261 to 263 in 10820cd
As a dummy workaround, I just passed
in_place=True
to theremove_duplicates()
, but I think that is not what we want, as it will modify theSequence
object, is that true? In that case, my suggestion is to rename the copy, instead of assigning it toself
, and still assigning signatures toself
to keep old behavior. I can make that commit if you can confirm this is the desired behavior.