Skip to content

Commit c2cfbfb

Browse files
authored
Bump NCDatasets compat to v0.14 (#72)
* Bump NCDatasets compat to v0.14 * Assume only that groups iterate over pairs In NCDatasets v0.14, groups are now an `AbstractDict` and are not mappable.
1 parent ae37a3c commit c2cfbfb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "InferenceObjects"
22
uuid = "b5cf5a8d-e756-4ee3-b014-01d49d192c00"
33
authors = ["Seth Axen <[email protected]> and contributors"]
4-
version = "0.3.13"
4+
version = "0.3.14"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
@@ -31,7 +31,7 @@ DimensionalData = "0.24, 0.25"
3131
EvoTrees = "0.16"
3232
MCMCDiagnosticTools = "0.3.4"
3333
MLJBase = "1"
34-
NCDatasets = "0.12, 0.13"
34+
NCDatasets = "0.12, 0.13, 0.14"
3535
OffsetArrays = "1"
3636
OrderedCollections = "1"
3737
PosteriorStats = "0.1.1"

ext/InferenceObjectsNCDatasetsExt/InferenceObjectsNCDatasetsExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function InferenceObjects.from_netcdf(ds::NCDatasets.NCDataset; load_mode::Symbo
2020
end
2121

2222
function _from_netcdf(ds, load_mode)
23-
groups = map(ds.group) do (group_name, group)
23+
groups_iter = Iterators.map(ds.group) do (group_name, group)
2424
layerdims = (;
2525
map(NCDatasets.dimnames(group)) do dim_name
2626
index = collect(group[dim_name])
@@ -54,7 +54,7 @@ function _from_netcdf(ds, load_mode)
5454
end
5555
return Symbol(group_name) => Dataset(data; metadata=group_metadata)
5656
end
57-
return InferenceData(; groups...)
57+
return InferenceData(; groups_iter...)
5858
end
5959

6060
_var_to_array(var, load_mode) = var

0 commit comments

Comments
 (0)