加拉雷斯,晚秋 快播,王雨薇 宋蔚佳
转自stackoverflow。备忘用。
i want to create a matlab-like cell array in numpy. how can i accomplish this?
matlab cell arrays are most similar to python list
s, since they can hold any object - but scipy.io.loadmat
imports them as numpy object arrays - which is an array with dtype=object.
to be honest though you are just as well off using python list
s - if you are holding general objects you will loose almost all of the advantages of numpy arrays (which are designed to hold a sequence of values which each take the same amount of memory).
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
新手学习Python2和Python3中print不同的用法
Python基于os.environ从windows获取环境变量
网友评论