Skip to content

Commit 6cef856

Browse files
committed
Using the right method
1 parent 7b1cd87 commit 6cef856

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pymc_marketing/mmm/builders/yaml.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
from typing import Any
2222

2323
import pandas as pd
24-
import xarray as xr
2524
import yaml # type: ignore
2625

26+
from pymc_marketing.utils import from_netcdf
27+
2728
from .deserializers import register_custom_deserializers
2829
from .factories import build
2930

@@ -96,6 +97,6 @@ def build_from_yaml(
9697
if (idata_fp := cfg.get("idata_path")) is not None:
9798
idata_path = Path(idata_fp)
9899
if os.path.exists(idata_path):
99-
model.idata = xr.open_dataset(idata_path)
100+
model.idata = from_netcdf(idata_path)
100101

101102
return model

0 commit comments

Comments
 (0)