例如,我有下面的表描述。在SpectrumL中,我想存储一个(谱图),我还不知道确切的大小。类似地,我想存储一些标记(将是字符串),它们的大小将因记录而异。但是,当我尝试为此执行build语句时,我得到以下错误:
TypeError: Passing an incorrect value to a table column. Expected a Col (or subclass) instance and got: "StringAtom(itemsize=20, shape=(), dflt='')". Please make use of the Col(), or descendant, constructor to properly initialize columns.
我执行的语句是:
^{pr2}$表语句类是:
class BuildTable(IsDescription):
artist_id = StringCol(100)
tags = StringAtom(itemsize = 20)
spectrumL = Float64Atom((5000, 1))
spectrumR = Float64Atom((5000, 1))
frequency = Float64Atom((5000, 1))
有人能帮忙看看这个吗?我在理解文档方面有点困难。谢谢!在
错误消息包含所有信息。您必须使用
Col
或子类,但您提供的是Atoms
。在table语句必须如下所示:
如果要在一个单元格中存储多个值,则必须依赖多维单元格(请参见here)。在
相关问题 更多 >
编程相关推荐