code: def filechunk(f, chunksize):
      
      while True:
          chunk = tuple(itertools.islice(f, chunksize))
          if not chunk:
              return
          yield np.loadtxt(iter(chunk), dtype=np.float64)
docs: Iterator that allow for piecemeal processing of a file.