ValueError: all the input arrays must have same number of dimension
问题描述:
ty = np.zeros((len(lon_lat)),dtype= ‘int’)
lon_lat_n = np.hstack((lon_lat,ty))
在进行np.hstack时,出现dimension不匹配的问题,
最终解决方案:
ty = np.zeros((len(lon_lat),1),dtype= ‘int’)
lon_lat_n = np.hstack((lon_lat,ty))