From c0ac87518af9e1973fdcf94185b098f2a078b328 Mon Sep 17 00:00:00 2001 From: Dealga McArdle Date: Thu, 9 Sep 2021 20:13:57 +0200 Subject: [PATCH] tested int casting --- nodes/number/number_range.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nodes/number/number_range.py b/nodes/number/number_range.py index 257510615..8d4c2624b 100644 --- a/nodes/number/number_range.py +++ b/nodes/number/number_range.py @@ -36,15 +36,14 @@ def range_step_stop(start, stop, step, n_type, out_numpy): def range_stop_count(start, stop, count, n_type, out_numpy): ''' Gives count total values in [start,stop] ''' # we are casting to int here because the input can be floats. - result = np.linspace(start, stop, num=count, dtype=n_type) + result = np.linspace(start, stop, num=int(count), dtype=n_type) return result if out_numpy else result.tolist() def range_step_count(start, step, count, n_type, out_numpy): ''' Gives count values with step from start''' stop = start + step * (count-1) - result = np.linspace(start, stop, num=count, dtype=n_type) - + result = np.linspace(start, stop, num=int(count), dtype=n_type) return result if out_numpy else result.tolist() -- GitLab