Answers for "python slice second element of list of lists"

0

python slice second element of list of lists

import numpy as np

A = np.array([[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]])
A[:,:3]

Out[3]: 
array([[1, 2, 3],
       [1, 2, 3],
       [1, 2, 3]])
Posted by: Guest on April-02-2020

Code answers related to "python slice second element of list of lists"

Python Answers by Framework

Browse Popular Code Answers by Language