numpy.array , , , . :
>> A = numpy.arange(27).reshape(3, 3, 3)
>> A[0, 0, 0].shape
()
>> A[:, 0, 0].shape
(3,)
>> A[:, :, 0].shape
(3, 3)
>> A[:1, :1, :1].shape
(1, 1, 1)
, , , .
, , numpy.matrix, 0
>> M = numpy.asmatrix(numpy.arange(9).reshape(3, 3))
>> M[0, 0].shape
()
>> M[:, 0].shape
(3, 1)
>> M[:1, :1].shape
(1, 1)
, , numpy.matrix:
>> x = numpy.matrix([[1],[3]])
>> M = numpy.matrix([[1,2],[3,4]])
>> y = M[:, 0]
>> x - y
matrix([[0],
[0]])