Follow-up from "Resolve "Multiple steps in probe""
The following discussions from !45 (merged) should be addressed:
@snuverink_j started a discussion: (+1 comment)
sorry for being late with commenting. You could use the
hypotfunction as well: https://docs.scipy.org/doc/numpy/reference/generated/numpy.hypot.html
@snuverink_j started a discussion: (+2 comments)
Can the range become very large? In that case append might not be cpu efficient, and it is better to preallocate the array (e.g. https://stackoverflow.com/questions/2641691/building-up-an-array-in-numpy-scipy-by-iteration-in-python):
x = np.zeros(1,self.ds.size) for s in range(self.ds.size): x[i] = self.ds.getData('x', step=s)