Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions hierarchicalforecast/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,6 @@ def reconcile(
S_nw_cols_ex_id_col = S_nw.columns
S_nw_cols_ex_id_col.remove(id_col)
if any_sparse:
if not nw.dependencies.is_pandas_dataframe(
Y_hat_df
) or not nw.dependencies.is_pandas_dataframe(S_df):
raise ValueError(
"You have one or more sparse reconciliation methods. Please convert `S_df` and `Y_hat_df` to a pandas DataFrame."
)
try:
S_for_sparse = sparse.csr_matrix(
S_nw.select(nw.col(S_nw_cols_ex_id_col)).to_native().sparse.to_coo()
Expand All @@ -437,10 +431,6 @@ def reconcile(
)

if Y_nw is not None:
if any_sparse and not nw.dependencies.is_pandas_dataframe(Y_df):
raise ValueError(
"You have one or more sparse reconciliation methods. Please convert `Y_df` to a pandas DataFrame."
)
y_insample = self._prepare_Y(
Y_nw=Y_nw,
S_nw=S_nw,
Expand Down
Loading