• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ghiggi / gpm_api / 7798551251

06 Feb 2024 10:55AM UTC coverage: 59.56%. Remained the same
7798551251

push

github

ghiggi
Fix documentation

3305 of 5549 relevant lines covered (59.56%)

0.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/gpm_api/utils/xarray.py
1
#!/usr/bin/env python3
2
"""
×
3
Created on Sat Dec 10 18:44:56 2022
4

5
@author: ghiggi
6
"""
7

8

9
def xr_exclude_variables_without(ds, dim):
×
10
    # ds.filter.variables_without_dims()
11
    valid_vars = [var for var, da in ds.items() if dim in list(da.dims)]
×
12
    if len(valid_vars) == 0:
×
13
        raise ValueError(f"No dataset variables with dimension {dim}")
×
14
    ds_subset = ds[valid_vars]
×
15
    return ds_subset
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc