Skip to content

Commit

Permalink
SharedParameter: direct get_previous, get_delta to source Parameter (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kmantel authored Oct 13, 2021
1 parent 826379a commit e99c010
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions psyneulink/core/globals/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e99c010

Please sign in to comment.