code: def save(self, filename, ftype='HDF5'): # pragma: no coverage
          
          from ..param import Param
  
          def gather_params(self, plist):
              if isinstance(self,Param):
                  plist.append(self)
          plist = []
          self.traverse(gather_params, plist)
          names = self.parameter_names(adjust_for_printing=True)
          if ftype=='HDF5':
              try:
                  import h5py
                  f = h5py.File(filename,'w')
                  for p,n in zip(plist,names):
                      n = n.replace('.','_')
                      p = p.values
                      d = f.create_dataset(n,p.shape,dtype=p.dtype)
                      d[:] = p
                  if hasattr(self, 'param_array'):
                      d = f.create_dataset('param_array',self.param_array.shape, dtype=self.param_array.dtype)
                      d[:] = self.param_array
                  f.close()
              except:
                  raise 'Fails to write the parameters into a HDF5 file!'
docs: Save all the model parameters into a file (HDF5 by default).
  
          This is not supported yet. We are working on having a consistent,
          human readable way of saving and loading GPy models. This only
          saves the parameter array to a hdf5 file. In order
          to load the model again, use the same script for building the model
          you used to build this model. Then load the param array from this hdf5
          file and set the parameters of the created model:
  
              >>> m[:] = h5_file['param_array']
  
          This is less then optimal, we are working on a better solution to that.