Skip to content

Handling of last batch? #82

Answered by jhamman
Hoeze asked this question in Q&A
Discussion options

You must be logged in to vote

I know this is an old question but I there's a simple answer so I'll go ahead and answer it. Partial batches are currently discarded. Here's a quick demo that shows this behavior:

In [1]: import xbatcher

In [2]: import xarray as xr

In [3]: ds = xr.tutorial.open_dataset('air_temperature')

In [4]: ds['air']
Out[4]:
<xarray.DataArray 'air' (time: 2920, lat: 25, lon: 53)>
[3869000 values with dtype=float32]
Coordinates:
  * lat      (lat) float32 75.0 72.5 70.0 67.5 65.0 ... 25.0 22.5 20.0 17.5 15.0
  * lon      (lon) float32 200.0 202.5 205.0 207.5 ... 322.5 325.0 327.5 330.0
  * time     (time) datetime64[ns] 2013-01-01 ... 2014-12-31T18:00:00
Attributes:
    long_name:     4xDaily Air t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by maxrjones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #5 on August 12, 2022 17:25.