numpy基础——matrix.transpose() 和 matrix.getA()
来源:互联网 发布:易语言 网页源码 编辑:程序博客网 时间:2024/05/21 22:45
numpy.matrix.getA
matrix.getA()[source]
返回一个数组对象
Return self as an ndarray object.
Equivalent to np.asarray(self).
Parameters: None
Returns: ret : ndarray
self as an ndarray
Examples
>>> x = np.matrix(np.arange(12).reshape((3,4))); xmatrix([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]])>>> x.getA()array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]])
numpy.matrix.transpose
矩阵转置
Returns a view of the array with axes transposed.
For a 1-D array, this has no effect. (To change between column and row vectors, first cast the 1-D array into a matrix object.) For a 2-D array, this is the usual matrix transpose. For an n-D array, if axes are given, their order indicates how the axes are permuted (see Examples). If axes are not provided and a.shape = (i[0], i[1], … i[n-2], i[n-1]), then a.transpose().shape = (i[n-1], i[n-2], … i[1], i[0]).
、
Examples
>>> a = np.array([[1, 2], [3, 4]])>>> aarray([[1, 2], [3, 4]])>>> a.transpose()array([[1, 3], [2, 4]])>>> a.transpose((1, 0))array([[1, 3], [2, 4]])>>> a.transpose(1, 0)array([[1, 3], [2, 4]])
阅读全文
0 0
- numpy基础——matrix.transpose() 和 matrix.getA()
- UVA 10895——Matrix Transpose
- Matrix Transpose
- python.matrix.getA()
- Inverse transpose matrix
- Uva 10895 - Matrix Transpose
- uva 10895 Matrix Transpose
- UVA 10895 Matrix Transpose
- UVA - 10895 Matrix Transpose
- UVa 10895 Matrix Transpose
- UVa 10895 - Matrix Transpose
- Sparse Matrix's Transpose
- numpy中的matrix和array
- numpy的array和matrix
- UVA 10895 - Matrix Transpose(STL)
- uva 10895 - Matrix Transpose(STL)
- UVA - 10895Matrix Transpose(vector)
- numpy中matrix 和 array的区别
- 如何编写自动读取任意大小文本的程序
- 全排列(DFS递归+STL set)
- web.xml 中的listener、 filter、servlet 加载顺序及其详解
- java设计模式之单例模式
- 简单的多条件分页查询
- numpy基础——matrix.transpose() 和 matrix.getA()
- technology && manager
- android studio library打包jar
- 归并排序
- 如何优化数据库
- Eclipse将引用了第三方jar包的Java项目打包成jar文件的两种方法
- E
- C++输入输出格式的控制
- 我觉得ok#6