fangwei123456 / spikingjelly

SpikingJelly is an open-source deep learning framework for Spiking Neural Network (SNN) based on PyTorch.
https://spikingjelly.readthedocs.io
Other
1.4k stars 244 forks source link

Replace np.int with int for compatibility with NumPy 1.20+ #584

Closed Doudou-Wu closed 2 weeks ago

Doudou-Wu commented 1 month ago

Description

Replaced np.int with Python's built-in int to address the deprecation warning in NumPy 1.20+.

Issue

Fixes compatibility issue with NumPy 1.20+, which deprecated np.int.

Testing

All tests were run successfully, and no existing functionality was broken.

fangwei123456 commented 5 days ago

This change will cause an error:

Python 3.9.20 (main, Oct  3 2024, 07:27:41) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> int_
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'int_' is not defined
fangwei123456 commented 5 days ago

I fixed it in: https://github.com/fangwei123456/spikingjelly/commit/5e95cddc25962e5119682711defec3f020910bba