holoviz-topics / EarthML

Tools for working with machine learning in earth science
https://earthml.holoviz.org
BSD 3-Clause "New" or "Revised" License
94 stars 21 forks source link

Bug at end of resampling docs in tutorial #96

Closed nickhand closed 4 years ago

nickhand commented 4 years ago

At the end of this page of the docs, the resampling section has a couple of bugs.

I think it should read:

res_1000 = 1000
x_1000 = np.arange(xmin, xmax, res_1000)
y_1000 = np.arange(ymin, ymax, res_1000)

diff_res_1000 = (
    diff_regridded.groupby_bins("x", x_1000, labels=x_1000[:-1])
    .mean(dim="x")
    .groupby_bins("y", y_1000, labels=y_1000[:-1])
    .mean(dim="y")
    .rename(x_bins="x", y_bins="y")
)
diff_res_1000
nickhand commented 4 years ago

Happy to put a PR in (and thanks for the great docs and examples!)

jbednar commented 4 years ago

Ooh, I think you're right. A PR will be gratefully accepted.