Skip to content

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

Open
@thomasms

Description

@thomasms

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions