使用scipy.io.savemat时(怎么不覆盖.MAT文件)? [英] How NOT to overwrite the .mat file when using scipy.io.savemat()?

查看:3470
本文介绍了使用scipy.io.savemat时(怎么不覆盖.MAT文件)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直使用Python的 scipy.io.savemat()来挽救我的数据格式.MAT,高效的方式在二者之间传输数据:的 http://docs.scipy.org/doc/scipy-0.9.0 /reference/tutorial/io.html

I have been using Python's scipy.io.savemat() to save my data in .mat format, efficient way to transfer data between the two: http://docs.scipy.org/doc/scipy-0.9.0/reference/tutorial/io.html.

不知怎的,它覆盖该文件。如何设置功能,这样我就可以附加到文件.MAT,而不是覆盖就像MATLAB保存()的'-append'选项?或者是有工作的它比其他任何scipy.io.savemat方式()?

Somehow it overwrite the file. How to set the function so I can append to the .mat file instead of overwriting just like MATLAB save()'s '-append' option? Or is there any ways to work it out other than scipy.io.savemat()?

推荐答案

有没有出现有一种方法与追加scipy.io.savemat()

There doesn't appear to be a way to append with scipy.io.savemat().

您可以 scipy.io.loadmat(),追加新的值来返回的字典,然后调用 scipy.io。 savemat()试。

You can scipy.io.loadmat(), append your new values to the dict that is returned, and then call scipy.io.savemat() again.

下面是 scipy.io.loadmat的文档()

http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.io.loadmat.html

这篇关于使用scipy.io.savemat时(怎么不覆盖.MAT文件)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆