Oct-11-2020, 06:37 PM
(This post was last modified: Oct-11-2020, 06:43 PM by Yoriz.
Edit Reason: Added code tags
)
Hi,
I'm new to python and I'm trying to call a function and use it to calculate the median of a dataset but when I run it I get the following error:
I'm new to python and I'm trying to call a function and use it to calculate the median of a dataset but when I run it I get the following error:
if n % 2 == 0: a_median = a(n / 2) + a((n / 2) -1) / 2 else: a_median = a[n//2]
Error:TypeError: 'numpy.ndarray' object is not callable
I have tried to look about online to resolve this and I can see that it's something relating to calling an array as a function, but I don't know what that means or how to fix it.