AttributeError:'AstypeContext'对象没有属性'dtype'

问题描述 投票:0回答:1
sal_maps_hf.shape
(11, 32, 32, 3)

我想将sal_maps_hf的dtype更改为nint8,所以>>

sal_maps_hf.dtype
dtype('<f4')

sal_maps_hf = sal_maps_hf.astype(np.uint8)
print(sal_maps_hf.dtype)

------------------------------------------------ --------------------------- AttributeError追溯(最近一次调用最后)----> 1次打印(sal_maps_hf.dtype)

[AttributeError:'AstypeContext'对象没有属性'dtype']

sal_maps_hf.shape(11,32,32,3)我想将sal_maps_hf的dtype更改为nint8,所以sal_maps_hf.dtype dtype('

types computer-vision pytorch h5py
1个回答
0
投票

h5py.dataset astype方法的文档:

© www.soinside.com 2019 - 2024. All rights reserved.