brainpy.math.dyn_seq#

class brainpy.math.dyn_seq(iterable=(), /)[source]#

A list to represent a dynamically changed numerical sequence in which its element can be changed during JIT compilation.

Note

The element must be numerical, like bool, int, float, jax.Array, numpy.ndarray, brainpy.math.Array.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

append(element)

Append object to the end of the list.

clear()

Remove all items from list.

copy()

Return a shallow copy of the list.

count(value, /)

Return number of occurrences of value.

extend(iterable)

Extend list by appending elements from the iterable.

index(value[, start, stop])

Return first index of value.

insert(index, object, /)

Insert object before index.

pop([index])

Remove and return item at index (default last).

remove(value, /)

Remove first occurrence of value.

reverse()

Reverse IN PLACE.

sort(*[, key, reverse])

Stable sort IN PLACE.