我在编写astropy.tables时遇到了问题,因为昨天我更新到astropy4.0时,无法将表写入文件中。
我甚至试图复制无粘性腹板中的示例,例如:
import numpy as np
from astropy.table import Table, Column, MaskedColumn
from astropy.io import ascii
x = np.array([1, 2, 3])
y = x ** 2
data = Table([x, y], names=['x', 'y'])
ascii.write(data, 'values.dat')我总是会犯同样奇怪的错误:
ValueError: Data type <class 'astropy.table.table.Table'> not allowed to init Table有人知道会发生什么吗?很抱歉有这个模糊的问题,但是我真的不明白为什么网络的例子都失败了……
注意:在MacOS10.14.6中,我在anaconda上使用python 3.7.3。
更新:
经过两次降级和升级,问题自行解决了.我还是不知道发生了什么,但现在
发布于 2020-01-13 15:09:23
经过两次降级和升级,问题自行解决了.我仍然不知道发生了什么,但它不再显示出这种奇怪的行为。无论如何,谢谢!
https://stackoverflow.com/questions/59705670
复制相似问题