def __next__(self):
if self._done:<EOL><INDENT>raise StopIteration<EOL><DEDENT>if len(self._values) == <NUM_LIT:0>:<EOL><INDENT>line = self.f.readline()<EOL>if len(line) == <NUM_LIT:0>:<EOL><INDENT>raise StopIteration<EOL><DEDENT>self._values = [float(word) for word in line.split()]<EOL><DEDENT>value = self._values.pop(<NUM_LIT:0>)<EOL>vector = self.origin + self._counter0*self.axes[<NUM_LIT:0>]+ self._counter1*self.axes[<NUM_LIT:1>]+ self._counter2*self.axes[<NUM_LIT:2>]<EOL>self._counter2 += <NUM_LIT:1><EOL>if self._counter2 >= self.nrep[<NUM_LIT:2>]:<EOL><INDENT>self._counter2 = <NUM_LIT:0><EOL>self._counter1 += <NUM_LIT:1><EOL>if self._counter1 >= self.nrep[<NUM_LIT:1>]:<EOL><INDENT>self._counter1 = <NUM_LIT:0><EOL>self._counter0 += <NUM_LIT:1><EOL>if self._counter0 >= self.nrep[<NUM_LIT:0>]:<EOL><INDENT>self._done = True<EOL><DEDENT><DEDENT><DEDENT>return vector, value<EOL>
Read the next datapoint from the cube file

           This method is part of the iterator protocol.