code: def to_file(self, filename, **kwargs):
          
          f = open(filename, 'w')
          f.write(self.to_json(**kwargs))
          f.close()
          return filename
docs: dump a representation of the nparray object to a json-formatted file.
          The nparray object should then be able to be fully restored via
          nparray.from_file
  
          @parameter str filename: path to the file to be created (will overwrite
              if already exists)
          @rtype: str
          @returns: the filename