Apply np.asanyarray to calculate_total_error inputs