Python,numpy,矩阵

tha*_*ing 2 python numpy matrix

A=[['2' '7' 'fas']
 ['4' '8' 'sda']
 ['1' '5' 'daf']
 ['2' '24' 'gag']]
Run Code Online (Sandbox Code Playgroud)

我怎样才能得到矩阵A,而不是每一行中的"atribute":

A=[['2' '7']
 ['4' '8']
 ['1' '5' ]
 ['2' '24']]
Run Code Online (Sandbox Code Playgroud)

我知道行中的最后一个元素是[:-1]

我尝试了numpy:

A[:,  ?? ]
Run Code Online (Sandbox Code Playgroud)

矩阵A是随机元素,所以我以这种方式思考:A[:,end-1]但是numpy不知道结局是什么

Cla*_*diu 6

>>> arr=np.array([[1,2,3],[4,5,6],[7,8,9]])
>>> arr[:,:-1]
array([[1, 2],
       [4, 5],
       [7, 8]])
Run Code Online (Sandbox Code Playgroud)