return _NumPyArrayToRaster(*args, **kwargs) ValueError

المشرف العام

Administrator
طاقم الإدارة
I am trying to make an array to raster from the defined array below. However, I keep getting this error:

return _NumPyArrayToRaster(*args, **kwargs)ValueError: Argument in_array: A two or three dimensional NumPy array is required

channel_Array = arc.RasterToNumPyArray(channel_raster , nodata_to_value=0) channel_Array = ext.corner_remove(channel_Array , corner , dX) acc_Array = arc.RasterToNumPyArray(flow_acc_file , nodata_to_value=0)img = np.copy(channel_Array)mask = ~img.astype(bool)img = img.astype(float) temp_Array = channel_Array * acc_Arraym = np.where(temp_Array == np.max(temp_Array) , 0 , 1)menter code here = np.ma.masked_array(m, mask) dis = sk.distance(m) arc.NumPyArrayToRaster(dis,corner,dX,dX,value_to_nodata = 0).save(submap_out_folder + '/dist.tif')

أكثر...
 
أعلى