Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX - reducing all dimensions in cluster viz should at least raise a more informative error. #116

Open
mmagnuski opened this issue Jan 28, 2023 · 0 comments

Comments

@mmagnuski
Copy link
Owner

When all dimensions of a cluster are reduced the error that pops up is not very informative.

For example when one has borsar.Clusters with two dimensions, ['chan', 'time'], then doing:

clst.plot(chan=5, time='75%')

produces just one timepoint for plotting and gives the following error:

  File "C:\Users\mmagn\AppData\Local\Temp\ipykernel_20764\2443041672.py", line 1, in <cell line: 1>
    clst_load['maint'].plot(chan=5, time='75%')

  File "c:\src\borsar\borsar\cluster\obj.py", line 624, in plot
    return plot_cluster_chan(self, cluster_idx, dims=dims, vmin=vmin,

  File "c:\src\borsar\borsar\cluster\viz.py", line 238, in plot_cluster_chan
    topo = Topo(show, clst.info, vmin=vmin, vmax=vmax, show=False,

  File "c:\src\borsar\borsar\viz.py", line 73, in __init__
    self.values = self.values[:, np.newaxis]

IndexError: invalid index to scalar variable.

At minimum, this should raise an error erlier, with some explanation.
Another way out is to plot a bar for example. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant