write a python function called getAP which:

has three input parameters: an array of measured voltages, the number of measurements n and the threshold voltage for an action potential; and

returns an array with n entries, containing a 0 if no action potential occurred at the corresponding time step, and 1 if an action potential did occur.

that's the question

ok, the point of this

is for the function to read a data file containing a number of voltages at particular time steps

if the voltage is above a certain value (tv)

then the function gives a value of 1

if the voltage is below that value it returns 0

I don't understand how to do it

Assuming the data set is already defined and established