Answers for "taking subarray of numpy array"

1

taking subarray of numpy array

>>> a
array([[1, 2, 3],
       [4, 5, 6],
       [7, 8, 9]])
>>> a[:2,:2]
array([[1, 2],
       [4, 5]])
Posted by: Guest on September-05-2020

Python Answers by Framework

Browse Popular Code Answers by Language