diff --git a/docs/requirements.txt b/docs/requirements.txt index 974cccd..b513c16 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ PyYAML==6.0.1 -requests==2.31.0 +requests==2.32.3 sphinx==7.2.6 sphinx-carousel==1.2.0 sphinx-copybutton==0.5.2 diff --git a/pyproject.toml b/pyproject.toml index 23d07cc..aa5045d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ dependencies = [ "cycler>=0.12.1", "matplotlib>=3.7.0", - "numpy>=1.22.0", + "numpy>=1.22.0,<=2.1.1", "scikit-image>=0.22.0", "scipy>=1.11.0", "shapely>=2.0.0", diff --git a/stnmf/plot.py b/stnmf/plot.py index 5bc8b85..734c0fb 100644 --- a/stnmf/plot.py +++ b/stnmf/plot.py @@ -375,7 +375,7 @@ def weights(w, m, colors=default_color, ax=None, yticks=True, **kwargs): plt.rcParams['font.family']) ax.grid(axis='y', color='lightgray') ax.get_ygridlines()[0].set_xdata((0.05, 1)) - margin = w.ptp() * 0.1 + margin = np.ptp(w) * 0.1 ax.set_ylim(min(w.min(), 0) - margin, max(w.max(), 0) + margin) diff --git a/stnmf/preprocessing/spiketriggered.py b/stnmf/preprocessing/spiketriggered.py index 3851351..ef6372e 100644 --- a/stnmf/preprocessing/spiketriggered.py +++ b/stnmf/preprocessing/spiketriggered.py @@ -344,7 +344,7 @@ def stimulusensemble(stimulus, spikes, sta_temp, continuous=False, ind = np.nonzero(sp)[0] for i in ind: np.dot(stim[..., i:i+tau], sta_temp, out=sts[..., 0]) - num_sp = sp[i, 0] + num_sp = int(sp[i, 0]) np.copyto(ste[..., s_ind:s_ind+num_sp], sts) s_ind += num_sp