Search
 
SCRIPT & CODE EXAMPLE
 

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])
Comment

PREVIOUS NEXT
Code Example
Python :: class __call__ method python 
Python :: python string first letter uppercase and second letter in lowercase 
Python :: .translate python 
Python :: simple python game code 
Python :: python range from n to 0 
Python :: python - convert a list column into miltiple columns 
Python :: pd df set index 
Python :: strip plot (normal) 
Python :: np.append 
Python :: python test coverage 
Python :: break input loop 
Python :: python - merge and incluse only specific columns 
Python :: gtk label set label 
Python :: Tree Traversals inorder,preorder and postorder 
Python :: hexdigest python 
Python :: django button 
Python :: picture plot 
Python :: numpy insert 
Python :: python math packege power e 
Python :: how to normalize scipy cross correlation 
Python :: sorted 
Python :: django middleware 
Python :: convert sentence to list of words python 
Python :: truncatechars django 
Python :: __all__ python 
Python :: frequency meaning 
Python :: length of an empty array in python 
Python :: or operator in python 
Python :: merge sorting in python 
Python :: how to find ascii value by python 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =