home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 185826486

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/767#issuecomment-185826486 https://api.github.com/repos/pydata/xarray/issues/767 185826486 MDEyOklzc3VlQ29tbWVudDE4NTgyNjQ4Ng== 4160723 2016-02-18T17:31:29Z 2016-02-18T17:31:29Z MEMBER

Thanks for the tip. So I finally obtain the desired result when selecting the band 'bar' by doing this:

In [21]: (da.sel(band_wavenumber='bar') ...: .unstack('band_wavenumber') ...: .dropna('band', how='all') ...: .dropna('wavenumber', how='any') ...: .sel(band='bar')) Out[21]: <xarray.DataArray (wavenumber: 3)> array([ 1.20000000e-04, 1.00000000e-04, 8.50000000e-05]) Coordinates: band <U3 'bar' * wavenumber (wavenumber) float64 4.1e+03 4.1e+03 4.1e+03

But it's still a lot of code to write for such a common operation.

I'd be happy to think more deeply about this and contribute to the development of this great package ! (within the limits of my skills)

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