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

394 fix structdict copy #400

Merged
merged 28 commits into from
Dec 22, 2022
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
95c3c6f
NEW: add unit test to illustrate issue 394
dfsp-spirit Dec 16, 2022
5c77340
NEW: fixes #394
dfsp-spirit Dec 16, 2022
dbeca2e
NEW: also implement deepcopy for spy.StructDict
dfsp-spirit Dec 16, 2022
6ec431a
FIX: adapt cfg copying in unit test
dfsp-spirit Dec 16, 2022
28e7e08
CHG: remove deepcopy
dfsp-spirit Dec 16, 2022
67ec760
remove deepcopy test
dfsp-spirit Dec 16, 2022
ab92fe4
CHG: update changelog for #394 fix
dfsp-spirit Dec 16, 2022
a2ab883
NEW: add test to ensure construction of StructDict from dict still works
dfsp-spirit Dec 16, 2022
17a917f
CHG: add more asserts to ensure proper copying of cfg
dfsp-spirit Dec 16, 2022
40dbe34
add more cfg copy tests, something is weird.
dfsp-spirit Dec 16, 2022
a4f2015
add more cfg copy tests, something is weird.
dfsp-spirit Dec 16, 2022
9b02810
close matplotplib plots
dfsp-spirit Dec 16, 2022
84bc2ef
CHG: use copy.copy in Welch test
dfsp-spirit Dec 16, 2022
c9ad959
CHG: remove test return values to remove annoying pytest messages
dfsp-spirit Dec 16, 2022
59acaf1
CHG: remove asserts
dfsp-spirit Dec 16, 2022
c1d2ff7
CHG: use .copy
dfsp-spirit Dec 16, 2022
0640724
CHG: cleanup old code in Welch test
dfsp-spirit Dec 16, 2022
9511ea9
FIX: remove useless import
dfsp-spirit Dec 16, 2022
78aea15
CHG: remove pointless test
dfsp-spirit Dec 20, 2022
3a7b617
CHG: move teardown function to separate file for reuse
dfsp-spirit Dec 20, 2022
9560672
NEW: implement deepcopy for structdict
dfsp-spirit Dec 20, 2022
139d963
NEW: support self-reference in deepcopy (prevent endless loops in unl…
dfsp-spirit Dec 20, 2022
05e26f3
CHG: close plots irrespective whether running interactive or not
dfsp-spirit Dec 20, 2022
ddecf3b
CHG: better doc strings for StructDict copy functions.
dfsp-spirit Dec 21, 2022
caacd1e
CHG: use deepcopy of StructDict in Welch test
dfsp-spirit Dec 21, 2022
754253e
NEW: default to deep copy in StructDict.copy, via new param deep
dfsp-spirit Dec 22, 2022
a986cc4
CHG: can now simply use .copy instead of .deepcopy in Welch test for cfg
dfsp-spirit Dec 22, 2022
eb56f83
FIX: Always deepcopy selection dicts
tensionhead Dec 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CHG: use deepcopy of StructDict in Welch test
dfsp-spirit committed Dec 21, 2022
commit caacd1e560c426d5fdccac39fc29b7adc1414472
4 changes: 2 additions & 2 deletions syncopy/tests/test_welch.py
Original file line number Diff line number Diff line change
@@ -188,9 +188,9 @@ def test_welch_size_effect(self):
# Check the number of windows that Welch will average over.
# To do this, we run mtmconvol and check the output size.
# This is to verify that the number of windows is equal, and as expected.
cfg_mtm_long = cfg_long_no_overlap.copy()
cfg_mtm_long = cfg_long_no_overlap.deepcopy()
cfg_mtm_long.method = "mtmconvol"
cfg_mtm_short = cfg_short_with_overlap.copy()
cfg_mtm_short = cfg_short_with_overlap.deepcopy()
cfg_mtm_short.method = "mtmconvol"

spec_long_no_overlap = spy.freqanalysis(cfg_long_no_overlap, wn_long)