Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy array [-1]

print(b)
>>array([[ 0,  1,  2,  3],
       [10, 11, 12, 13],
       [20, 21, 22, 23],
       [30, 31, 32, 33],
       [40, 41, 42, 43]])

print(b[-1])       # the last row. Equivalent to b[-1,:]
>>array([40, 41, 42, 43])
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #numpy #array
ADD COMMENT
Topic
Name
2+2 =