这是我第一次问问题。我正在尝试使用“pysheds”来分析一些水文DEM文件。开发人员将其视为一些非常彻底的“如何”视频,但当我尝试以他们显示的方式加载DEM文件时,我出现以下错误:
模块“pysheds.grid”没有属性“from\u”
这是我的密码
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import geopandas as gpd
import pysheds
import pysheds.grid as Grid
import mplleaflet
grid = Grid.from_raster('path.tif', data_name = 'dem')`
我在控制台中检查了print(dir(Grid))
,没有看到列出这个属性
我错过什么了吗? 谢谢
根据documentation,您应该像这样从
pysheds.grid
导入Grid
:而不是
相关问题 更多 >
编程相关推荐