MATLAB / Numpy 列向量的盲转化

不管是对于行向量、列向量,还是矩阵来说,都可以通过一行代码统一转化成列向量。如下:

1
a = a(:);

Numpy does this using flatten function:

1
a = a.flatten()
DNS欺骗攻击 Go语言map数据类型使用注意

评论

You forgot to set the shortname for Disqus. Please set it in _config.yml.
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×