elephant.neo_tools.extract_neo_attributes

elephant.neo_tools.extract_neo_attributes(neo_object, parents=True, child_first=True, skip_array=False, skip_none=False)[source]

Given a Neo object, return a dictionary of attributes and annotations.

Parameters:
neo_objectneo.BaseNeo

Object to get attributes and annotations.

parentsbool, optional

If True, also include attributes and annotations from parent Neo objects (if any). Default: True

child_firstbool, optional

If True, values of child attributes are used over parent attributes in the event of a name conflict. If False, parent attributes are used. This parameter does nothing if parents is False. Default: True

skip_arraybool, optional

If True, skip attributes that store non-scalar array values. Default: False

skip_nonebool, optional

If True, skip annotations and attributes that have a value of None. Default: False

Returns:
dict

A dictionary where the keys are annotations or attribute names and the values are the corresponding annotation or attribute value.