python小问题记录:
2014-05-18 17:03
260 查看
numpy.chararray.flatten
chararray.flatten(order='C')Return a copy of the array collapsed into one dimension.
Parameters : | order : {‘C’, ‘F’, ‘A’}, optional Whether to flatten in C (row-major), Fortran (column-major) order, or preserve the C/Fortran ordering from a. The default is ‘C’. |
---|---|
Returns : | y : ndarray A copy of the input array, flattened to one dimension. |
ravelReturn a flattened array.flatA 1-D flat iterator over the array.
Examples
>>> a = np.array([[1,2], [3,4]]) >>> a.flatten() array([1, 2, 3, 4]) >>> a.flatten('F') array([1, 3, 2, 4])
相关文章推荐
- MAC OS中安装MySQLdb-python的问题解决记录.
- Python:通过自定义系统级快捷键来控制程序开始或停止记录日志(使用小技巧解决一个貌似无解的问题)
- Android + Python(Django) + Mysql 问题记录
- Python 学习问题记录
- python 中文异常问题记录
- Python 学习记录(1)对象命名导致的问题
- 记录python数据持久存储的一点问题
- Python 碎碎念 -- 不定期记录遇到的各种小问题(藤原豆腐坊自家用)
- C++调用Python脚本遇到的问题记录《后续还会添加 方便查阅》
- 简单记录python存取中文字符的小问题
- python初学常见问题记录(1)--linux下和win7下安装python
- python 开发问题记录(二)
- python初学常见问题记录(4.1)-解决了输出覆盖和提示不对应问题
- 关于python2.7.6+django1.4.2的admin样式无效问题记录
- Python问题记录
- Python:通过自定义系统级快捷键来控制程序开始或停止记录日志(使用小技巧解决一个貌似无解的问题)
- python初学常见问题记录(4)
- python 字符编码 调用其他程序 的一些问题记录
- python遇到的问题解决方法的记录
- python 编码问题记录