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

Extending C++ IProcess in Python causes ref counting issues #6

Open
thomasms opened this issue Feb 3, 2020 · 0 comments
Open

Extending C++ IProcess in Python causes ref counting issues #6

thomasms opened this issue Feb 3, 2020 · 0 comments

Comments

@thomasms
Copy link
Member

thomasms commented Feb 3, 2020

The following script shows the problem:

import peakingduck as pd


data = pd.core.NumericalData([2,3.4,5,123.,123.2,6453.42,3.5,345.34,23.4,524.542,89.3])

pm = pd.core.SimpleProcessManager()

# this causes problems, due to Python ref counting
# comment it out to find out
#pm.append(pd.core.SavitzkyGolaySmoother(3))

# this also causes issues
#sg = pd.core.SavitzkyGolaySmoother(3)
#pm.append(sg)
#del sg

# this is OK, since it is fro C++
pm.append(pd.core.MovingAverageSmoother(3))

# process the data
processeddata = pm.run(data).to_list()

print(processeddata)

Related to:

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

No branches or pull requests

1 participant