Define and test behaviour of get_data #114
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change in behaviour (really a bugfix) for get_data for a CellSpace variable in a Domain with one cell: now returns a Vector ie spatial dimension is squeezed out (previously, returned a Vector-of-length-1-Vectors)
Get data records in raw format. Only recommended for variables with scalar data ie one value per record.
records
may benothing
to get all records,an
Int
to select a single record, or a range to select multiple records.If
squeeze_all_single_dims=true
(the default), if each record represents a scalar (eg a PALEO Variable with Space PB.ScalarSpace, or a PB.CellSpace variable in a Domain with a single cell), then data is returned as a Vector. NB: ifrecords
is an Int, the single record requested is returned as a length-1 Vector.Non-scalar data (eg a non-ScalarSpace variable from a Domain with > 1 cell) is returned in internal format as a Vector-of-Vectors.