Accueil / Tag archives : Xóa cột trong mảng dùng numpy

Tag archives : Xóa cột trong mảng dùng numpy

Delete columns in numpy.array

delete columns in matrix with numpy.array

a=array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [12, 13, 14, 15]]) delete(a, s_[1:3], axis=0) # remove rows 1 and 2 output: array([[ 0, 1, 2, 3], [12, 13, 14, 15]]) delete(a, s_[1:3], ...

Lire la suite...