b19d0834272dbe109dbc38045f4fe02ed92c8b85,brian2/groups/group.py,Group,get_states,#Group#Any#Any#Any#Any#Any#,421
Before Change
"""
// For the moment, "dict" is the only supported format -- later this will
// be made into an extensible system, see github issue /룊
if format != "dict" :
raise NotImplementedError("Format "%s" is not supported" % format)
if vars is None:
vars = [name for name, var in self.variables.iteritems()
if not name.startswith("_") and
(subexpressions or not isinstance(var, Subexpression))]
data = {}
for var in vars:
data[var] = np.array(self.state(var, use_units=units,
level=level+1),
copy=True, subok=True)
return data
def set_states(self, values, units=True, format="dict", level=0):
"""
After Change
suggestions = checker.suggest(name)
if len(suggestions) == 1:
suggestion, = suggestions
error_msg += " Did you mean to write "%s%s"?" % (suggestion,
suffix)
elif len(suggestions) > 1:
error_msg += (" Did you mean to write any of the following: %s ?" %
(", ".join([""%s%s"" % (suggestion, suffix)
for suggestion in suggestions])))
error_msg += (" Use the add_attribute method if you intend to add "
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: brian-team/brian2
Commit Name: b19d0834272dbe109dbc38045f4fe02ed92c8b85
Time: 2015-07-22
Author: marcel.stimberg@ens.fr
File Name: brian2/groups/group.py
Class Name: Group
Method Name: get_states
Project Name: brian-team/brian2
Commit Name: f964791fd6fba44d35f76dfd78b4e56bfb7479a9
Time: 2016-05-07
Author: raymon92@gmail.com
File Name: brian2/groups/group.py
Class Name: VariableOwner
Method Name: set_states
Project Name: brian-team/brian2
Commit Name: f964791fd6fba44d35f76dfd78b4e56bfb7479a9
Time: 2016-05-07
Author: raymon92@gmail.com
File Name: brian2/groups/group.py
Class Name: VariableOwner
Method Name: get_states