2017-11-24T16:06:51Z||2017-11-24T16:06:51Z
import numpy as np
a = np.array([[1, 2, 3], [4, 5, 6]])
print(a[0, 2])
# 3
print(a[(0, 2)])
# 3
print(a[0])
# [1 2 3]
print(a[0][2])
# 3
print(a[:])
# [[1 2 3]
# [4 5 6]]
print(a[1:])
# [[4 5 6]]
2017-11-24T16:06:51Z||2017-11-24T16:06:51Z
import numpy as np
a = np.array([[1, 2, 3], [4, 5, 6]])
print(a[0, 2])
# 3
print(a[(0, 2)])
# 3
print(a[0])
# [1 2 3]
print(a[0][2])
# 3
print(a[:])
# [[1 2 3]
# [4 5 6]]
print(a[1:])
# [[4 5 6]]