Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
314 views
in Technique[技术] by (71.8m points)

python - 有没有办法用python连接matlab数组(例如,使用scipy.io)?(Is there a way to concatenate matlab arrays with python (e.g. using scipy.io)?)

I'm trying to write a large (~ 20GB) .fvp file, which behaves like a delimited text file to a matlab array and save it as a .mat with python 3. Right now, I am reading the file in python, converting the values to a single numpy array and saving it with scipy.io.savemat() .

(我正在尝试编写一个大的(?20GB).fvp文件,其行为类似于定界的文本文件到matlab数组,并使用python 3保存为.mat。现在,我正在python中读取文件,进行转换将值存储到单个numpy数组中,并使用scipy.io.savemat() 。)

However, my pc runs out of memory in the process, which I think is due to the large size of the numpy array since my code runs okay for smaller .fvp files.

(但是,我的电脑在此过程中内存不足,我认为这是由于numpy数组的大小很大,因为我的代码对于较小的.fvp文件可以正常运行。)

To solve this problem, I want to write and save sections of the .fvp file in multiple .mat files and join them up later, preferably in python.

(为了解决此问题,我想将.fvp文件的各个部分写入并保存到多个.mat文件中,并在以后(最好在python中)将它们加入。)

Is there a way to do it?

(有办法吗?)

I can't find it in scipy.io.

(我在scipy.io中找不到。)

  ask by ag3nt translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...