superneuromat.accessor_classes.ModelListView#

class superneuromat.accessor_classes.ModelListView(model: SNN | None = None, indices: list[int] | slice | None = None, max_len: int | None = None)[source]#

Base class for NeuronListView and SynapseListView.

Inherits from collections.abc.MutableSequence.

Attributes:
m

The SNN that this object is associated with.

num_onmodel

Methods

add(other[, right])

Concatenate this ListView with another iterable.

append(x)

Append a compatible object to this ListView.

clear()

Make this ListView empty by clearing the indices of this ListView.

copy([model])

Create a copy of this ListView with the same indices, referring to the same SNN.

count(value)

Return the number of occurrences of value in this ListView.

extend(li)

Extend this ListView with the given iterable of compatible objects.

index(value[, start, stop])

Return the index of value in this ListView.

info([max_entries])

Generate a summary of the objects in this ListView.

insert(i, x)

Insert a compatible object at the given index in this ListView.

pop([index])

Remove and return the last item, or the item at the given index.

remove(value)

Remove the first occurrence of value from this ListView.

reverse()

Reverse the order of the items in this ListView.

sort([key, reverse])

Sort the items in this ListView.

tolist()

Returns a list of the objects in this ListView.

using_model(model)

Returns a copy of the listview using the given model.

__init__(model: SNN | None = None, indices: list[int] | slice | None = None, max_len: int | None = None)[source]#

Methods

__init__([model, indices, max_len])

add(other[, right])

Concatenate this ListView with another iterable.

append(x)

Append a compatible object to this ListView.

clear()

Make this ListView empty by clearing the indices of this ListView.

copy([model])

Create a copy of this ListView with the same indices, referring to the same SNN.

count(value)

Return the number of occurrences of value in this ListView.

extend(li)

Extend this ListView with the given iterable of compatible objects.

index(value[, start, stop])

Return the index of value in this ListView.

info([max_entries])

Generate a summary of the objects in this ListView.

insert(i, x)

Insert a compatible object at the given index in this ListView.

pop([index])

Remove and return the last item, or the item at the given index.

remove(value)

Remove the first occurrence of value from this ListView.

reverse()

Reverse the order of the items in this ListView.

sort([key, reverse])

Sort the items in this ListView.

tolist()

Returns a list of the objects in this ListView.

using_model(model)

Returns a copy of the listview using the given model.

Attributes

m

The SNN that this object is associated with.

model_cachename

num_onmodel

accessor_type

list_type