elephant.neo_tools.get_all_events

elephant.neo_tools.get_all_events(container)[source]

Get all neo.Event objects from a container.

The objects can be any list, dict, or other iterable or mapping containing events, as well as any neo object that can hold events: neo.Block and neo.Segment.

Containers are searched recursively, so the objects can be nested (such as a list of blocks).

Parameters:
containerlist, tuple, iterable, dict, neo.Block, neo.Segment

The container for the events.

Returns:
list

A list of the unique neo.Event objects in container.