Skip to content

Commit

Permalink
Better error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
caiw committed Jan 15, 2024
1 parent 77906f2 commit 8e311fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions invokers/run_gridsearch.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from pathlib import Path
import argparse

from matplotlib import pyplot

from kymata.gridsearch.plain import do_gridsearch
from kymata.io.functions import load_function
from kymata.io.mne import load_emeg_pack
Expand Down
4 changes: 2 additions & 2 deletions kymata/entities/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def __init__(self,
data = data[i]
data = self._init_prep_data(data)
# Check validity of input data dimensions
assert len(channels) == data.shape[0], f"{channel_coord_name} mismatch for {f}"
assert len(latencies) == data.shape[1], f"Latencies mismatch for {f}"
assert len(channels) == data.shape[0], f"{channel_coord_name} mismatch for {f}: {len(channels)} {channel_coord_name} versus data shape {data.shape}"
assert len(latencies) == data.shape[1], f"Latencies mismatch for {f}: {len(latencies)} latencies versus data shape {data.shape}"
dataset_dict[layer] = DataArray(
data=data,
dims=self._dims,
Expand Down

0 comments on commit 8e311fc

Please sign in to comment.