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

In-place selections in Syncopy data classes silently wiped by unwrap_select #332

Closed
dfsp-spirit opened this issue Aug 10, 2022 · 1 comment
Assignees
Labels
Bug An error that is serious but does not break (parts of) the package. However, it clearly impedes the

Comments

@dfsp-spirit
Copy link
Collaborator

dfsp-spirit commented Aug 10, 2022

Describe the bug
In-place selections in Syncopy data objects silently wiped by unwrap_select()

To Reproduce
Given a syncopy data object data, (e.g. AnalogData instance) the following should be equivalent:

cfg = get_default_cf() # whatever
selected_trials = [3, 5, 7]

cfg.select = { 'trials': selected_trials }                                  # Select option 1
spy.selectdata(data, trials=selected_trials, inplace=True)  # Select option 2
freqanalysis(cfg, data)

but calling freqanalysis with the data, the 2nd slection is ignored and the function works on all trials.

Expected behavior
The selection gets honored by the cF function/frontend called, and it works on the 3 selected trials only.

Having a selection defined both as an in-place selection in data, and in the cfg, should lead to an error.

System Profile:

  • OS: Ubuntu 22.04
    import syncopy as spy; spy.AnalogData().log
System Profile: 
3.8.13 (default, Mar 28 2022, 11:38:47) 
[GCC 7.5.0] 
ACME:  2022.7
Dask:  2022.05.0
NumPy: 1.21.5
SciPy: 1.7.3

--- LOG ---

|=== schaefert@esi-lbfri101: Wed Aug 10 14:44:22 2022 ===|

        __init__: created AnalogData object

Additional Information
Please add any other context concerning the problem here.

Thank you again for your time!

@dfsp-spirit dfsp-spirit self-assigned this Aug 10, 2022
@tensionhead tensionhead added the Bug An error that is serious but does not break (parts of) the package. However, it clearly impedes the label Aug 10, 2022
@tensionhead tensionhead linked a pull request Aug 23, 2022 that will close this issue
15 tasks
tensionhead added a commit that referenced this issue Sep 15, 2022
@dfsp-spirit
Copy link
Collaborator Author

Closing as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An error that is serious but does not break (parts of) the package. However, it clearly impedes the
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants