从该getValues()
方法中,AFXComTableKeyword
该类返回一个字符串,如:
test = "('mat_huehne_2008', '0.125', '24.0'),('', '', '-24.0'),('', '', '41.0')"+\
",('', '', '-41.0'),('', '', ''),('', '', ''),('', '', ''),('','', ''),"+\
"('', '', ''),('', '', ''),('', '', ''),('', '', ''),('', '', ''),"+\
"('', '', ''),('', '', ''),('', '', ''),('', '', ''),('', '', ''),"+\
"('', '', ''),('', '', ''),('', '', ''),('', '', ''),('', '', ''),"+\
"('', '', ''),('', '', ''),('', '', ''),('', '', ''),('', '', ''),"+\
"('', '', ''),('', '', ''),('', '', ''),('', '', ''),('', '', ''),"+\
"('', '', ''),('', '', ''),('', '', ''),('', '', ''),('', '', ''),"+\
"('', '', ''),('', '', '')"
最后,我们需要一个numpy.array
of shape=(40,3)
,对于这种情况,它看起来像:
test = [['mat_huehne_2008', '0.125', '24.0'],
[ '', '', '-24.0'],
... and so on ... ]
有谁知道在 Python / Numpy 中执行此操作的快捷方式?