Aisynphys : show_connectivity_matrix error in the connectivity_adjustments notebook

Hello !

I am working on the aisynphys database and more specifically on adjusting the connectivities. I tried to run the connectivity_adjustments notebook (aisynphys/connectivity_adjustments.ipynb at current-release · AllenInstitute/aisynphys · GitHub) but I get this error when I run the last cell :

Traceback (most recent call last):
  File "E:\MARGAUX\aisynphys\", line 380, in <module>
    im, cbar, labels = show_connectivity_matrix(
  File "E:\MARGAUX\aisynphys\aisynphys\ui\", line 242, in show_connectivity_matrix
    im, cbar = heatmap(cprob_rgba, pre_class_labels, post_class_labels, ax=ax, 
  File "E:\MARGAUX\aisynphys\aisynphys\ui\", line 61, in heatmap
    im = ax.imshow(data, **kwargs)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\_api\", line 454, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\", line 1423, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\axes\", line 5577, in imshow
    im._scale_norm(norm, vmin, vmax)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\", line 412, in _scale_norm
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\", line 645, in autoscale_None
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\", line 1720, in autoscale_None
    in_trf_domain = np.extract(np.isfinite(self._trf.transform(A)), A)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\", line 1500, in transform
    raise ValueError(
ValueError: Input values must have shape (N x 1) or (1).

I think the shape of adjusted_connectivity is the issue, but what should I put instead?

Hello Margaux, we are looking into this and will get back to you as soon as we can!

Hi again Margaux, I have not been able to reproduce this error. However I did encounter some other bugs in this notebook that have been fixed and pushed to the current-release branch that you linked to above. Perhaps you can try running a clean version of this notebook?

If that doesn’t help, can you post the output of conda list from your conda environment? I suspect your error may be due to a change in matplotlib version.

It helped, now it works !
Thanks !