From 9da0c3480c4b6b62e6d4edc2d3e8b8a16079b020 Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Wed, 28 Jul 2021 13:41:15 +0100 Subject: [PATCH] updating code to do sampling differnetly --- binarycpython/utils/grid.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index b8553a339..293215d04 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -1918,6 +1918,7 @@ class Population: # + "\n" # ) + # TODO: make sure this works # Adding for loop structure code_string += ( indent * depth @@ -1927,6 +1928,27 @@ class Population: + "\n" ) + # code_string += ( + # indent * depth + # + "for {}_sample_number in range({}):".format( + # grid_variable["name"], grid_variable["resolution"] + # ) + # + "\n" + # ) + # code_string += ( + # indent * (depth+1) + # + "{} = sampled_values_{}[0] + ((sampled_values_{}[-1]-sampled_values_{}[0])/{}) * {}_sample_number".format( + # grid_variable["name"], grid_variable["name"], grid_variable["name"], grid_variable["name"], grid_variable["resolution"], grid_variable["name"] + # ) + # + "\n" + # ) + + + + + + + ################################################################################# # Check condition and generate for loop -- GitLab