Skip to content

Pass a deep copy of dpbuffer to the process() method of a PythonDPStep

Bas van der Tol requested to merge pass-deep-copy-of-dpbuffer-to-python into master

Python steps that need to process multiple timesteps at once, such as a calibration step, need to buffer the data they receive. A convenient way to do that is to accumulate dpbuffers. Currently that does not work, because the dpbuffer contains a shallow copy of the data. The accumulated dpbuffers all contain a reference to same, most recent, data.

This MR fixes that by always passing a deep copy of the dpbuffer to python. This is somewhat inefficient in case the python step does not accumulate dpbuffers. However, the main purpose of python steps is convenience and rapid prototyping, not peak performance.

Edited by Bas van der Tol

Merge request reports

Loading