# Aisynphys : show\_connectivity\_matrix error in the connectivity\_adjustments notebook

**URL:** https://community.brain-map.org/t/aisynphys-show-connectivity-matrix-error-in-the-connectivity-adjustments-notebook/1936
**Category:** Technical
**Tags:** synaptic-physiology
**Created:** [November 2, 2022, 5:31pm UTC](https://community.brain-map.org/t/aisynphys-show-connectivity-matrix-error-in-the-connectivity-adjustments-notebook/1936 "2022-11-02T17:31:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Margaux](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Margaux](https://community.brain-map.org/u/Margaux)
#### Post date: [November 2, 2022, 5:31pm UTC](https://community.brain-map.org/t/aisynphys-show-connectivity-matrix-error-in-the-connectivity-adjustments-notebook/1936/1 "2022-11-02T17:31:33Z")

</div>

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](https://github.com/AllenInstitute/aisynphys/blob/current-release/doc/connectivity_adjustments.ipynb)) but I get this error when I run the last cell :

```auto

Traceback (most recent call last):
  File "E:\MARGAUX\aisynphys\test3.py", line 380, in <module>
    im, cbar, labels = show_connectivity_matrix(
  File "E:\MARGAUX\aisynphys\aisynphys\ui\notebook.py", 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\notebook.py", line 61, in heatmap
    im = ax.imshow(data, **kwargs)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\_api\deprecation.py", line 454, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\ __init__.py", line 1423, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\axes\_axes.py", line 5577, in imshow
    im._scale_norm(norm, vmin, vmax)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\cm.py", line 412, in _scale_norm
    self.autoscale_None()
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\cm.py", line 645, in autoscale_None
    self.norm.autoscale_None(self._A)
  File "C:\Users\marga\anaconda3\envs\lib\site-packages\matplotlib\colors.py", 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\transforms.py", 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?  
Best,  
Margaux

---

<div class="post-metadata">

### Author: ![luke](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@luke](https://community.brain-map.org/u/luke)
#### Post date: [November 8, 2022, 11:24pm UTC](https://community.brain-map.org/t/aisynphys-show-connectivity-matrix-error-in-the-connectivity-adjustments-notebook/1936/2 "2022-11-08T23:24:44Z")

</div>

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

---

<div class="post-metadata">

### Author: ![luke](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@luke](https://community.brain-map.org/u/luke)
#### Post date: [November 10, 2022, 9:55pm UTC](https://community.brain-map.org/t/aisynphys-show-connectivity-matrix-error-in-the-connectivity-adjustments-notebook/1936/3 "2022-11-10T21:55:26Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Margaux](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Margaux](https://community.brain-map.org/u/Margaux)
#### Post date: [November 14, 2022, 6:17pm UTC](https://community.brain-map.org/t/aisynphys-show-connectivity-matrix-error-in-the-connectivity-adjustments-notebook/1936/4 "2022-11-14T18:17:47Z")

</div>

It helped, now it works !  
Thanks !  
Margaux
