home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 57857522

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/issues/214#issuecomment-57857522 https://api.github.com/repos/pydata/xarray/issues/214 57857522 MDEyOklzc3VlQ29tbWVudDU3ODU3NTIy 291576 2014-10-03T20:48:35Z 2014-10-03T20:48:35Z CONTRIBUTOR

Just managed to implement this using your suggestion for my data:

from scipy.spatial import cKDTree as KDTree kd = KDTree(zip(model['longitude'].values.ravel(), model['latitude'].values.ravel())) dists, indx = kd.query(zip(obs['longitude'], obs['latitude'])) indx = np.unravel_index(indx, mod['longitude'].shape) mod_points = xray.concat([mod.isel(x=x, y=y) for y, x in zip(*indx)], dim='station')

Not entirely certain why I needed to reverse y and x in that last part, but, oh well...

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