简体   繁体   English

打印 python numpy 数组时,双嵌套括号意味着什么?

[英]What double nested brackets means in python numpy array when it is printed?

I have screenshot of python code:我有 python 代码的截图:

在此处输入图像描述

Is X row vector or one dimensional vector or just numpy array with no dimension? X 行向量或一维向量或只是 numpy 数组没有维度?

Is X2 column vector or 2 dimensional matrix? X2 是列向量还是二维矩阵? Does the the two nested brackets in X2 output means it is 2 dimensional matrix and if so how do I change it to column vector with single bracket when it is printed like the output of X? X2 output 中的两个嵌套括号是否意味着它是二维矩阵,如果是这样,当它像 X 的 output 一样打印时如何将其更改为带有单括号的列向量?

The double square bracket denotes that it is a 2-dimensional array.双方括号表示它是一个二维数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM