Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/condor/contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,11 @@ def resample(self, dt, include_output=True, include_events=True, max_deg=3):
return self

new_self = model.__new__(model)
new_self.implementation = self.implementation
# TODO: add option to rebuild the implemention
if getattr(self, "implementation", False):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try hasattr(self, "implementation") for just checking whether or not the attribute exists

new_self.implementation = self.implementation
else: # override include_output if implementation is not found
include_output = False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we aren't (yet) automatically constructing the implementation, this should probably emit a warning (only if the user set include_output=True).

new_self._original_instance = original_instance
new_self.bind_field(self.parameter)
new_self.input_kwargs = self.input_kwargs
Expand Down
Loading