获取 shape size


t.shape

获取有多少个维度,直接 len 就行


len(t.shape)