def update(self, params, values):
<EOL>global_update, particles = self._update_type(params)<EOL>if global_update:<EOL><INDENT>self.set_values(params, values)<EOL>self.initialize()<EOL>return<EOL><DEDENT>oldargs = self._drawargs()<EOL>for n in particles:<EOL><INDENT>self._draw_particle(self.pos[n], *listify(oldargs[n]), sign=-<NUM_LIT:1>)<EOL><DEDENT>self.set_values(params, values)<EOL>newargs = self._drawargs()<EOL>for n in particles:<EOL><INDENT>self._draw_particle(self.pos[n], *listify(newargs[n]), sign=+<NUM_LIT:1>)<EOL><DEDENT>
Update the particles field given new parameter values