Skip to content

Commit

Permalink
InteractiveActivationIntegrator: handle 0d np arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
kmantel committed Feb 20, 2025
1 parent ad9a152 commit b48c2b6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2070,15 +2070,15 @@ def _validate_params(self, request_set, target_set=None, context=None):

if RATE in request_set and request_set[RATE] is not None:
rate = request_set[RATE]
if np.isscalar(rate):
if is_numeric_scalar(rate):
rate = [rate]
if not all_within_range(rate, 0, 1):
raise FunctionError("Value(s) specified for {} argument of {} ({}) must be in interval [0,1]".
format(repr(RATE), self.__class__.__name__, rate))

if DECAY in request_set and request_set[DECAY] is not None:
decay = request_set[DECAY]
if np.isscalar(decay):
if is_numeric_scalar(decay):
decay = [decay]
if not all(0.0 <= d <= 1.0 for d in decay):
raise FunctionError("Value(s) specified for {} argument of {} ({}) must be in interval [0,1]".
Expand Down

0 comments on commit b48c2b6

Please sign in to comment.