Closed kay-ro closed 1 week ago
proposed solution to be reviewed
N = len(data) # number of time steps
if(nr == None or nr > N - skip * N):
nr = max(1,int(N-skip*N))
evaluated_indices = np.ceil(np.linspace(skip*N, N-1, nr,))
func_result = [func(x, **kwargs) for x in tqdm(data[evaluated_indices])]
evaluated = np.array(func_result)
if indices:
return evaluated, np.mean(evaluated, axis=0), evaluated_indices
return evaluated, np.mean(evaluated, axis=0)
thanks, there is a small additional fix necessary:
evaluated_indices = np.ceil(np.linspace(skip*N, N-1, nr,))
must be changed to
evaluated_indices = np.array(np.ceil(np.linspace(skip*N, N-1, nr,)), dtype=int)
Description:
If
nr=Noneˋ or
nr>available frames` then one frame is missing.Code for reproduction:
Error message:
No response
Python and AMEP versions:
1.0.2
Additional information:
Solution:
How did you install AMEP?
None