Hi Benedikt,
I'm facing some issue with your code. When I instance a = numpy.array([1.0, 2.0, 3.0, 4.0, 5.0]) and trying to execute this, resampling.jackknife(a). I got the next error message. Please could you help me with the issue?
Many thanks
Parfait
TypeError Traceback (most recent call last)
in
----> 1 resampling.jackknife(a)
~/Documents/Parfait/UB/IL3/resampling.py in jackknife(a, func, func_axis, dtype)
101 n = __number_measurements(a, func_axis)
102 # Evaluate the function on the jackknife means
--> 103 jackknife_values = [func(*(__array_mean_indices(a, range(0,i) + range(i+1, n), func_axis=func_axis, dtype=dtype))) for i in range(n)]
104
105 # Return the average value and the error of this averaged value
~/Documents/Parfait/UB/IL3/resampling.py in (.0)
101 n = __number_measurements(a, func_axis)
102 # Evaluate the function on the jackknife means
--> 103 jackknife_values = [func(*(__array_mean_indices(a, range(0,i) + range(i+1, n), func_axis=func_axis, dtype=dtype))) for i in range(n)]
104
105 # Return the average value and the error of this averaged value
TypeError: unsupported operand type(s) for +: 'range' and 'range'
Hi Benedikt,
I'm facing some issue with your code. When I instance a = numpy.array([1.0, 2.0, 3.0, 4.0, 5.0]) and trying to execute this, resampling.jackknife(a). I got the next error message. Please could you help me with the issue?
Many thanks
Parfait
TypeError Traceback (most recent call last)
in
----> 1 resampling.jackknife(a)
~/Documents/Parfait/UB/IL3/resampling.py in jackknife(a, func, func_axis, dtype)
101 n = __number_measurements(a, func_axis)
102 # Evaluate the function on the jackknife means
--> 103 jackknife_values = [func(*(__array_mean_indices(a, range(0,i) + range(i+1, n), func_axis=func_axis, dtype=dtype))) for i in range(n)]
104
105 # Return the average value and the error of this averaged value
~/Documents/Parfait/UB/IL3/resampling.py in (.0)
101 n = __number_measurements(a, func_axis)
102 # Evaluate the function on the jackknife means
--> 103 jackknife_values = [func(*(__array_mean_indices(a, range(0,i) + range(i+1, n), func_axis=func_axis, dtype=dtype))) for i in range(n)]
104
105 # Return the average value and the error of this averaged value
TypeError: unsupported operand type(s) for +: 'range' and 'range'