Skip to content

Commit

Permalink
Fix critical bug caused by newer numpy versions
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed Sep 16, 2024
1 parent a6ca72a commit 6a6d946
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion stnmf/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion stnmf/preprocessing/spiketriggered.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6a6d946

Please sign in to comment.