Thank you for your reply. This is how I have updated the code to reflect the needs for my experiment, which are, run an experiment, update the experiment parameters based on the results, and then iterate on this process.
`
class KernelTimingTest(EnvExperiment):
def build(self, **kwargs):
self.setattr_device("core")
self.setattr_device("scheduler")
self.test_vals = np.array([1,10,5,7,6,2,8], dtype=np.int32)
def prepare(self):
pass
def run(self):
self.start_exp()
print(self.test_vals)
self.run_exp()
print(self.test_vals)
self.sort_list()
print(self.test_vals)
def sort_list(self):
self.test_vals = self.test_vals[np.argsort(self.test_vals)]
@kernel
def start_exp(self):
self.core.reset()
@kernel
def run_exp(self):
self.test_vals[0] = 100
`
I think I understand what is happening now, and this code is working, but I feel like the self.test_vals[0] = 100 executed on the kernel shouldn't be reflected on the host based on your explanation, but now it seems to be. The output of the code is
print:[ 1 10 5 7 6 2 8]
print:[100 10 5 7 6 2 8]
print:[ 2 5 6 7 8 10 100]
Which is the correct functionality I want, but feel like it is not consistent with how I understand the values are being stored.