From e99c01080d71aaa05cd976483eb8f4311eabd7f4 Mon Sep 17 00:00:00 2001 From: Katherine Mantel Date: Tue, 12 Oct 2021 23:36:49 -0400 Subject: [PATCH] SharedParameter: direct get_previous, get_delta to source Parameter (#2143) --- psyneulink/core/globals/parameters.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/psyneulink/core/globals/parameters.py b/psyneulink/core/globals/parameters.py index b9b99d9536c..5efbb1729a9 100644 --- a/psyneulink/core/globals/parameters.py +++ b/psyneulink/core/globals/parameters.py @@ -1763,6 +1763,20 @@ def _set_name(self, name): super(Parameter, self).__setattr__('name', name) + @handle_external_context() + def get_previous( + self, + context=None, + index: int = 1, + range_start: int = None, + range_end: int = None, + ): + return self.source.get_previous(context, index, range_start, range_end) + + @handle_external_context() + def get_delta(self, context=None): + return self.source.get_delta(context) + @property def source(self): try: