# encoding: utf-8
'''
@author: yangsen
@license:
@contact:
@software:
@file: numpy_mat.py
@time: 18-8-25 下午9:56
@desc:
'''
import numpy as np
a = np.arange(9).reshape(3,3)


# 行
a[1]
a[[1,2]]
a[np.array([1,2])]

# 列
a[:,1]
a[:,[1,2]]
a[:,np.array([1,2])]
[((12, 4, 12, 16), 'numpy.arange', 'np.arange', ({(12, 14, 12, 15): '9'}, {}), '(9)', True, 'import numpy as np\n'), ((18, 2, 18, 17), 'numpy.array', 'np.array', ({(18, 11, 18, 16): '[1, 2]'}, {}), '([1, 2])', True, 'import numpy as np\n'), ((23, 4, 23, 19), 'numpy.array', 'np.array', ({(23, 13, 23, 18): '[1, 2]'}, {}), '([1, 2])', True, 'import numpy as np\n')]