Skip to content

Commit 6c90583

Browse files
vnoelshoyer
authored andcommitted
missing return value in sample function calls (I think) (#1088)
* missing return value in sample function calls (I think) * Fixed indentation
1 parent 565c9a3 commit 6c90583

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/io.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ library::
423423
combined = xr.concat(dataset, dim)
424424
return combined
425425

426-
read_netcdfs('/all/my/files/*.nc', dim='time')
426+
combined = read_netcdfs('/all/my/files/*.nc', dim='time')
427427

428428
This function will work in many cases, but it's not very robust. First, it
429429
never closes files, which means it will fail one you need to load more than
@@ -454,8 +454,8 @@ deficiencies::
454454

455455
# here we suppose we only care about the combined mean of each file;
456456
# you might also use indexing operations like .sel to subset datasets
457-
read_netcdfs('/all/my/files/*.nc', dim='time',
458-
transform_func=lambda ds: ds.mean())
457+
combined = read_netcdfs('/all/my/files/*.nc', dim='time',
458+
transform_func=lambda ds: ds.mean())
459459

460460
This pattern works well and is very robust. We've used similar code to process
461461
tens of thousands of files constituting 100s of GB of data.

0 commit comments

Comments
 (0)