home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 273459295

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
273459295 MDU6SXNzdWUyNzM0NTkyOTU= 1715 Error accessing isnull() and notnull() on Dataset 3169620 closed 0     3 2017-11-13T14:59:30Z 2017-11-13T16:07:01Z 2017-11-13T16:07:01Z CONTRIBUTOR      

Code Sample, a copy-pastable example if possible

```python

Create basic Dataset

import numpy as np import pandas as pd import xarray as xr

temp = 15 + 8 * np.random.randn(2, 2, 3)

precip = 10 * np.random.rand(2, 2, 3) lon = [[-99.83, -99.32], [-99.79, -99.23]] lat = [[42.25, 42.21], [42.63, 42.59]]

for real use cases, its good practice to supply array attributes such as

units, but we won't bother here for the sake of brevity

ds = xr.Dataset({'temperature': (['x', 'y', 'time'], temp), 'precipitation': (['x', 'y', 'time'], precip)}, coords={'lon': (['x', 'y'], lon), 'lat': (['x', 'y'], lat), 'time': pd.date_range('2014-09-06', periods=3), 'reference_time': pd.Timestamp('2014-09-05')})

Both of these throw attribute errors

ds.notnull()

ds.isnull()

```

Problem description

The above methods throw AttributeError: 'Variable' object has no attribute '_constructor' errors when called on Datasets. It's not clear if this operation is currently supported, but if it's not then it probably shouldn't be exposed through the API.

Expected Output

Dataset of boolean DataArrays indicating null-ness.

Output of xr.show_versions()

Show_versions() doesn't seem to exist in 0.9.6, but presumably this covers it: Numpy version: 1.13.1 Pandas version: 0.21.0 XArray version: 0.9.6
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1715/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

  • 0 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 1.169ms · About: xarray-datasette