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

Copying a spy.StructDict returns a dict #394

Closed
dfsp-spirit opened this issue Dec 14, 2022 · 2 comments
Closed

Copying a spy.StructDict returns a dict #394

dfsp-spirit opened this issue Dec 14, 2022 · 2 comments
Assignees
Labels
Minor Bug A flaw in the code or documentation that is clearly an error but does neither impede package functio

Comments

@dfsp-spirit
Copy link
Collaborator

dfsp-spirit commented Dec 14, 2022

Describe the bug
Copying a spy.StructDict returns a dict

To Reproduce

import syncopy as spy
dd = spy.StructDict()
type(dd)
Out[18]: syncopy.shared.tools.StructDict
type(dd.copy())
Out[19]: dict

Expected behavior

type(dd.copy())
Out[19]: syncopy.shared.tools.StructDict

System Profile:

  • OS: Ubuntu 22.04
  • Please paste the output of the following command here
   import syncopy as spy; spy.AnalogData().log
>>> SyNCopy v. v2022.08-623-g78070d6 <<< 
Created: Wed Dec 14 12:35:23 2022 
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 ---
|=== user@box: Wed Dec 14 12:43:30 2022 ===|
	__init__: created AnalogData object

Additional Information

  • Tested on current dev branch 7f31377
  • Workaround: wrap the copy in spy.StructDict constructor that takes a dict:
type(spy.StructDict(dd.copy()))
Out[22]: syncopy.shared.tools.StructDict
@dfsp-spirit dfsp-spirit added the Minor Bug A flaw in the code or documentation that is clearly an error but does neither impede package functio label Dec 14, 2022
@dfsp-spirit dfsp-spirit changed the title Copying a spy.structdict returns a dict Copying a spy.StructDict returns a dict Dec 14, 2022
dfsp-spirit added a commit that referenced this issue Dec 16, 2022
@dfsp-spirit dfsp-spirit self-assigned this Dec 16, 2022
dfsp-spirit added a commit that referenced this issue Dec 16, 2022
@tensionhead
Copy link
Contributor

This got addressed with #400 right?!

@dfsp-spirit
Copy link
Collaborator Author

Yes, closing as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Bug A flaw in the code or documentation that is clearly an error but does neither impede package functio
Projects
None yet
Development

No branches or pull requests

2 participants