Explain this 4D numpy array indexing intuitively

前端 未结 3 1596
被撕碎了的回忆
被撕碎了的回忆 2021-01-03 10:49
x = np.random.randn(4, 3, 3, 2)
print(x[1,1])

output:
[[ 1.68158825 -0.03701415]
[ 1.0907524  -1.94530359]
[ 0.25659178  0.00475093]]

I am python n

3条回答
  •  心在旅途
    2021-01-03 11:12

    This page explains the concept of higher dimensional arrays with a very clear analogy together with some illustrations. I recommend to those people looking for an answer to this question

    https://cognitiveclass.ai/blog/nested-lists-multidimensional-numpy-arrays

提交回复
热议问题