@@ -777,7 +777,7 @@ def clean_dict(d):
777777def _clean_numpy_scalar (v ):
778778 if isinstance (v , np .bool_ ):
779779 v = bool (v )
780- if isinstance (v , np .float_ ):
780+ if isinstance (v , np .float64 ):
781781 v = float (v )
782782 if isinstance (v , np .int_ ):
783783 v = int (v )
@@ -3098,7 +3098,7 @@ def plot_templates(
30983098 else :
30993099 colors = plt .rcParams ["axes.prop_cycle" ].by_key ()["color" ]
31003100
3101- gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax )
3101+ gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax . get_subplotspec () )
31023102
31033103 for i_n , n in enumerate (template_ids ):
31043104 r = i_n // ncols
@@ -3318,7 +3318,7 @@ def plot_waveforms(
33183318 nrows = 1
33193319 ncols = n_units
33203320
3321- gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax )
3321+ gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax . get_subplotspec () )
33223322
33233323 for i , wf in enumerate (waveforms ):
33243324 r = i // ncols
@@ -3336,7 +3336,7 @@ def plot_waveforms(
33363336 nrows = 1
33373337 ncols = len (spiketrain_id )
33383338
3339- gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax )
3339+ gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax . get_subplotspec () )
33403340
33413341 # find ylim
33423342 min_wf = 0
@@ -3488,7 +3488,7 @@ def plot_amplitudes(
34883488 nrows = 1
34893489 ncols = n_units
34903490
3491- gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax )
3491+ gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax . get_subplotspec () )
34923492
34933493 for i_n , n in enumerate (spiketrain_id ):
34943494 r = i_n // ncols
@@ -3626,7 +3626,7 @@ def plot_pca_map(
36263626
36273627 nrows = len (pc_dims ) * len (elec_dims )
36283628 ncols = nrows
3629- gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax )
3629+ gs = gridspec .GridSpecFromSubplotSpec (nrows , ncols , subplot_spec = ax . get_subplotspec () )
36303630
36313631 for p1 in pc_dims :
36323632 for i1 , ch1 in enumerate (elec_dims ):
0 commit comments