Skip to content

Commit 724c089

Browse files
committed
docs: update examples and links to reflect changes in brainpy.state module
1 parent daeae02 commit 724c089

5 files changed

Lines changed: 23 additions & 11 deletions

File tree

brainpy/inputs/currents.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121

2222
__all__ = [
2323
'section_input',
24-
'constant_input', 'constant_current',
25-
'spike_input', 'spike_current',
26-
'ramp_input', 'ramp_current',
24+
'constant_input',
25+
'constant_current',
26+
'spike_input',
27+
'spike_current',
28+
'ramp_input',
29+
'ramp_current',
2730
'wiener_process',
2831
'ou_process',
2932
'sinusoidal_input',

brainpy/state/_lif.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ class IF(Neuron):
7474
7575
Examples
7676
--------
77-
>>> import brainpy.state as brainpy
77+
>>> import brainpy
7878
>>> import brainstate
7979
>>> import brainunit as u
8080
>>>
8181
>>> # Create an IF neuron layer with 10 neurons
82-
>>> if_neuron = brainpy.IF(10, tau=8*u.ms, V_th=1.2*u.mV)
82+
>>> if_neuron = brainpy.state.IF(10, tau=8*u.ms, V_th=1.2*u.mV)
8383
>>>
8484
>>> # Initialize the state
8585
>>> if_neuron.init_state(batch_size=1)
@@ -89,7 +89,7 @@ class IF(Neuron):
8989
>>>
9090
>>> # Create a network with IF neurons
9191
>>> network = brainstate.nn.Sequential([
92-
... brainpy.IF(100, tau=5.0*u.ms),
92+
... brainpy.state.IF(100, tau=5.0*u.ms),
9393
... brainstate.nn.Linear(100, 10)
9494
... ])
9595

docs_classic/index.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ Learn more
114114
:link: https://brainmodeling.readthedocs.io
115115

116116

117-
.. note::
118-
BrainPy is still an experimental research project.
119-
APIs may be changed over time. Please always keeps
120-
in mind what BrainPy version you are using.
117+
.. grid-item::
118+
:columns: 6 6 6 4
121119

120+
.. card:: :material-regular:`settings;2em` ``brainpy.state`` module
121+
:class-card: sd-text-black sd-bg-light
122+
:link: https://brainpy-state.readthedocs.io/
122123

123124

124125
----

docs_state/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
`brainpy.state` provides a new ``State``-based programming paradigm for building and simulating spiking neural networks.
55

66

7+
Compared to ``brainpy.dyn``, ``brainpy.state`` provides:
8+
9+
- A more intuitive and flexible way to define and manage the state of neural network components (neurons, synapses, etc.).
10+
11+
- Improved performance and scalability for large-scale simulations.
12+
13+
- Seamless integration with `BrainX <https://brainmodeling.readthedocs.io>`_ ecosystem.
14+
715

816
.. note::
917

docs_state/quickstart/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Getting Help
150150
If you encounter issues:
151151

152152
- Check the `GitHub Issues <https://github.com/brainpy/BrainPy/issues>`_
153-
- Read the documentation at `https://brainpy.readthedocs.io/ <https://brainpy.readthedocs.io/>`_
153+
- Read the documentation at `https://brainpy-state.readthedocs.io/ <https://brainpy-state.readthedocs.io/>`_
154154
- Join our community discussions
155155

156156
Next Steps

0 commit comments

Comments
 (0)