Skip to content

Commit

Permalink
DOC: Added parameter list to open_dataarray (#1758)
Browse files Browse the repository at this point in the history
* Added parameter list to open_dataarray

* Added inputs to open_dataset at L400

* Changed input to open_dataset on L400
  • Loading branch information
Ray Bell authored and fujiisoup committed Jan 19, 2018
1 parent 6aa225f commit f2ea7b6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ def maybe_decode_store(store, lock=False):
return maybe_decode_store(store)


def open_dataarray(*args, **kwargs):
def open_dataarray(filename_or_obj, group=None, decode_cf=True,
mask_and_scale=True, decode_times=True, autoclose=False,
concat_characters=True, decode_coords=True, engine=None,
chunks=None, lock=None, cache=None, drop_variables=None):
"""Open an DataArray from a netCDF file containing a single data variable.
This is designed to read netCDF files with only one data variable. If
Expand Down Expand Up @@ -394,7 +397,13 @@ def open_dataarray(*args, **kwargs):
--------
open_dataset
"""
dataset = open_dataset(*args, **kwargs)
dataset = open_dataset(filename_or_obj, group=group, decode_cf=decode_cf,
mask_and_scale=mask_and_scale,
decode_times=decode_times, autoclose=autoclose,
concat_characters=concat_characters,
decode_coords=decode_coords, engine=engine,
chunks=chunks, lock=lock, cache=cache,
drop_variables=drop_variables)

if len(dataset.data_vars) != 1:
raise ValueError('Given file dataset contains more than one data '
Expand Down

0 comments on commit f2ea7b6

Please sign in to comment.