From 428fc826b47192f7ef31978499c4fab3d4a7ae85 Mon Sep 17 00:00:00 2001 From: chaoming Date: Sun, 5 Nov 2023 17:49:35 +0800 Subject: [PATCH 1/2] fix bug --- brainpy/_src/dynsys.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/brainpy/_src/dynsys.py b/brainpy/_src/dynsys.py index db3d574ae..9ef7e89d7 100644 --- a/brainpy/_src/dynsys.py +++ b/brainpy/_src/dynsys.py @@ -733,13 +733,13 @@ def __init__( self.slice_vars[k] = bm.VariableView(v, index) # sub-nodes - nodes = target.nodes(method='relative', level=1, include_self=False).subset(DynamicalSystem) - for k, node in nodes.items(): - if isinstance(node, Dynamic): - node = DynView(node, self.index) - else: - node = DynView(node, self.index) - setattr(self, k, node) + # nodes = target.nodes(method='relative', level=0, include_self=True).subset(DynamicalSystem) + # for k, node in nodes.items(): + # if isinstance(node, Dynamic): + # node = DynView(node, self.index) + # else: + # node = DynView(node, self.index) + # setattr(self, k, node) # initialization # get size From 1c0e38d740989cb104d1c8a7643bd39098703337 Mon Sep 17 00:00:00 2001 From: chaoming Date: Sun, 5 Nov 2023 17:49:43 +0800 Subject: [PATCH 2/2] [doc] update doc --- docs/_templates/ion_template.rst | 10 ++++++++++ docs/apis/brainpy.dyn.channels.rst | 10 +++++----- docs/apis/brainpy.dyn.ions.rst | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 docs/_templates/ion_template.rst diff --git a/docs/_templates/ion_template.rst b/docs/_templates/ion_template.rst new file mode 100644 index 000000000..334cf0600 --- /dev/null +++ b/docs/_templates/ion_template.rst @@ -0,0 +1,10 @@ +.. role:: hidden + :class: hidden-section +.. currentmodule:: {{ module }} + + +{{ name | underline}} + +.. autoclass:: {{ name }} + :members: master_type + diff --git a/docs/apis/brainpy.dyn.channels.rst b/docs/apis/brainpy.dyn.channels.rst index e6f687b6a..47802851e 100644 --- a/docs/apis/brainpy.dyn.channels.rst +++ b/docs/apis/brainpy.dyn.channels.rst @@ -36,7 +36,7 @@ Base Classes .. autosummary:: :toctree: generated/ :nosignatures: - :template: classtemplate.rst + :template: ion_template.rst IonChannel @@ -48,7 +48,7 @@ Calcium Channels .. autosummary:: :toctree: generated/ :nosignatures: - :template: classtemplate.rst + :template: ion_template.rst CalciumChannel ICaN_IS2008 @@ -65,7 +65,7 @@ Potassium Channels .. autosummary:: :toctree: generated/ :nosignatures: - :template: classtemplate.rst + :template: ion_template.rst PotassiumChannel IKDR_Ba2002v2 @@ -95,7 +95,7 @@ Sodium Channels .. autosummary:: :toctree: generated/ :nosignatures: - :template: classtemplate.rst + :template: ion_template.rst SodiumChannel INa_Ba2002 @@ -112,7 +112,7 @@ Other Channels .. autosummary:: :toctree: generated/ :nosignatures: - :template: classtemplate.rst + :template: ion_template.rst Ih_HM1992 Ih_De1996 diff --git a/docs/apis/brainpy.dyn.ions.rst b/docs/apis/brainpy.dyn.ions.rst index 13dfb5189..4c6cf510d 100644 --- a/docs/apis/brainpy.dyn.ions.rst +++ b/docs/apis/brainpy.dyn.ions.rst @@ -38,7 +38,7 @@ potential therapeutic interventions. .. autosummary:: :toctree: generated/ :nosignatures: - :template: classtemplate.rst + :template: ion_template.rst mix_ions Ion