Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 python 中重新创建 NCL 的bin_avg函数。该函数接收这些点的纬度、经度和观测值列表,并计算某个网格中每个框内包含的观测值的平均值。
我能想到的最接近的是 using scipy.spatial.cKDTree.query_ball_point,但这会找到半径内的所有点,而不是网格框内的所有点......
scipy.spatial.cKDTree.query_ball_point
看起来我要找的东西在scipy.stats.binned_statistic
scipy.stats.binned_statistic