在以下代码中,
t = numpy.arange(25, dtype=np.float64)
a = pyarrow.array(t)
s1 = base64.b64encode(t) # this works
s2 = base64.b64encode(a)
这引发错误,说
a bytes-like object is required
not 'pyarrow.lib.DoubleArray'
ndarray
是一个类似字节的对象吗?有什么不同?并且base64可以编码pyarrow
对象吗?