NodeList#

class brainpy.math.NodeList(seq=())[source]#

A sequence of BrainPyObject, which is compatible with vars() and nodes() operations in a BrainPyObject.

That is to say, any nodes that are wrapped into NodeList will be automatically retieved when using nodes() function.

>>> import brainpy as bp
>>> l = bm.node_list([bp.dnn.Dense(1, 2),
>>>                   bp.dnn.LSTMCell(2, 3)])
append(element)[source]#

Append object to the end of the list.

Return type:

NodeList

extend(iterable)[source]#

Extend list by appending elements from the iterable.

Return type:

NodeList