Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecations for deprecated APIs or functions #393

Merged
merged 7 commits into from
Jun 18, 2023
Merged

Add deprecations for deprecated APIs or functions #393

merged 7 commits into from
Jun 18, 2023

Conversation

chaoming0625
Copy link
Collaborator

For example, if users use brainpy.math.csr_matvec, it will give a deprecation warning:

import brainpy.math as bm
import brainpy as bp

csr = bp.conn.FixedProb(0.2, pre=10, post=10).require('csr')
print(bp.math.csr_matvec(1., csr[0], csr[1], bm.random.random(10), shape=(10, 10)))
D:\codes\projects\BrainPy\brainpy\_src\deprecations.py:34: 

DeprecationWarning: brainpy.math.csr_matvec is deprecated. Use brainpy.math.sparse.csrmv instead.
  _deprecate(message)

@chaoming0625 chaoming0625 requested a review from ztqakita June 18, 2023 09:51
Copy link
Collaborator

@ztqakita ztqakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition

@ztqakita ztqakita merged commit d4e8da5 into master Jun 18, 2023
@chaoming0625 chaoming0625 deleted the others branch January 2, 2024 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants