slicing 2d numpy array
- by MedicalMath
I have a 2d numpy array called FilteredOutput that has 2 columns and 10001 rows, though the number of rows is a variable.
I am trying to take the 2nd column of FilteredOutput and use it to populate a new 1d numpy array called timeSeriesArray using the following line of code:
timeSeriesArray=p.array(FilteredOutput[:,0])
I got this syntax from the following link.
But the problem is that I am getting the following error message:
TypeError: list indices must be integers, not tuple
Can anyone show me the proper syntax for populating the 1d array timeSeriesArray with the contents of the second column of the 2d array FilteredOutput?