home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 388009096

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/2104#issuecomment-388009096 https://api.github.com/repos/pydata/xarray/issues/2104 388009096 MDEyOklzc3VlQ29tbWVudDM4ODAwOTA5Ng== 10050469 2018-05-10T09:56:15Z 2018-05-10T09:56:15Z MEMBER

BTW, do you have any idea about an example for the new interp feature?

A quick shot would be to use the existing sample dataset:

```python import matplotlib.pyplot as plt import xarray as xr import numpy as np

Raw data

ds = xr.tutorial.load_dataset('air_temperature') ds.air.isel(time=0).plot() plt.title('Raw data')

Interpolated data

new_lon = np.linspace(ds.lon[0], ds.lon[-1], ds.dims['lon'] * 4) new_lat = np.linspace(ds.lat[0], ds.lat[-1], ds.dims['lat'] * 4) dsi = ds.interp(lon=new_lon, lat=new_lat) dsi.air.isel(time=0).plot() plt.title('Interpolated data') ``` Which produces the plots:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  320275317
Powered by Datasette · Queries took 0.72ms · About: xarray-datasette