ImportExport class
(Shortest import: from brian2 import ImportExport)
- class brian2.importexport.importexport.ImportExport[source]
Bases:
object
Class for registering new import/export methods (via static methods). Also the base class that should be extended for such methods (
ImportExport.export_data
,ImportExport.import_data
, andImportExport.name
have to be overwritten).Attributes
A dictionary mapping import/export methods names to
ImportExport
objectsAbstract property giving a method name.
Methods
export_data
(group, variables)Asbtract static export data method with two obligatory parameters.
import_data
(group, data)Import and set state variables.
register
(importerexporter)Register a import/export method.
Details
- methods
A dictionary mapping import/export methods names to
ImportExport
objects
- name
Abstract property giving a method name.
- abstract static export_data(group, variables)[source]
Asbtract static export data method with two obligatory parameters. It should return a copy of the current state variable values. The returned arrays are copies of the actual arrays that store the state variable values, therefore changing the values in the returned dictionary will not affect the state variables.