docstr: Dump GLM fit as npz file.
          
docstr_tok: ["Dump","GLM","fit","as","npz","file","."]
code: def dump(self, filename):
      """Dump GLM fit as npz file."""
      models = len(self.glm)
      if models == 1:
          self.glm[0].save(filename)
      else:
          for i in range(models):
              self.glm[i].save(filename + str(i))
  
imports: import numpy
  import scipy.stats
  from nibabel import Nifti1Image
  from nibabel.affines import apply_affine
  from ..algorithms.graph.field import field_from_graph_and_data
  from ..algorithms.graph.graph import wgraph_from_3d_grid
  from ..algorithms.statistics import empirical_pvalue
  from ..io.nibcompat import get_affine
  from .glm import glm
  from .group.permutation_test import permutation_test_onesample, permutation_test_twosample
label_desc: Use image node_id 2 for calling the LinearModel obj's underlying member method code with example usage: obj.dump(filename) without return types