home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1360984454

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1360984454 I_kwDOAMm_X85RHvmG 6983 calculating slope between sliding window of two xarray 1238713 closed 0     1 2022-09-03T23:46:14Z 2022-09-05T07:56:44Z 2022-09-05T07:56:44Z NONE      

What is your issue?

I am trying two calculate slope between sliding window(3x4) of two xarray dataset.you can imagine we want to calculate slope of dx and dy and put the value in the center of sliding window for x=3,y=4. I really appreciate if someone could help me to calculate slope or any function between sliding window of xarray in x,y dimension. Finally ,I want to interpolate the slope results into similar grid dataset of original dataset like dv

dv = xr.tutorial.open_dataset('air_temperature_gradient') dx=dv.Tair.mean(dim='time') de = dv.dTdx def linear_trend(x, y): pf = np.polyfit(x, y, 1) return xr.DataArray(pf[0]) slopes = xr.apply_ufunc(linear_trend, de.rolling(lat=3, lon=4, center=True), dx.rolling(lat=3, lon=4, center=True), vectorize=True, )

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6983/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 1 row from issue in issue_comments
Powered by Datasette · Queries took 79.188ms · About: xarray-datasette