Issue
I have an array "voltage", See the image.
I want to find the maximum of the voltage.
vmax = max(voltage[:,1].tolist())
However I got the error when debugging in Spyder console:
-> vmax = max(voltage[:,1].tolist()) (Pdb) next
IndexError: 'too many indices'
So questions:
- What is wrong? I tried to convert the second column of the array to a list, then take the maximum value.
- How to check the value of
vmax
? I haven't seen it in the variable explorer. I just typed the commandprint(vmax)
in the console.
EDIT:
voltage is an array by the image below.
Solution
Thanks mdurant and WarrenWeckesser. They already answered in the comments.
vmax = voltage.max()
Answered By - user1108948
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.