'Loads SVD transformation (U, Sigma and V matrices) from a ZIP file
:param filename: path to the SVD matrix transformation (a ZIP file)
:type filename: string'

def load_model(self, filename):

    try:
        zip = zipfile.ZipFile(filename, allowZip64=True)
    except:
        zip = zipfile.ZipFile((filename + '.zip'), allowZip64=True)
    options = dict()
    for line in zip.open('README'):
        data = line.strip().split(' DCTB ')
        options[data[0]] = data[1]
    try:
        k = int(options['k'])
    except:
        k = 100
    "\n                                #Python    2.6    only:\n                                #self._U    =    loads(zip.open('.U').read())\n                                #self._S    =    loads(zip.open('.S').read())\n                                #self._V    =    loads(zip.open('.V').read())\n                                "
    try:
        self._U = loads(zip.read('.U'))
    except:
        matrix = fromfile(zip.extract('.U', TMPDIR))
        vectors = []
        i = 0
        while (i < (len(matrix) / k)):
            v = DenseVector(matrix[(k * i):(k * (i + 1))])
            vectors.append(v)
            i += 1
        try:
            idx = [int(idx.strip()) for idx in zip.read('.row_ids').split('\n') if idx]
        except:
            idx = [idx.strip() for idx in zip.read('.row_ids').split('\n') if idx]
        self._U = DenseMatrix(vectors, OrderedSet(idx), None)
    try:
        self._V = loads(zip.read('.V'))
    except:
        matrix = fromfile(zip.extract('.V', TMPDIR))
        vectors = []
        i = 0
        while (i < (len(matrix) / k)):
            v = DenseVector(matrix[(k * i):(k * (i + 1))])
            vectors.append(v)
            i += 1
        try:
            idx = [int(idx.strip()) for idx in zip.read('.col_ids').split('\n') if idx]
        except:
            idx = [idx.strip() for idx in zip.read('.col_ids').split('\n') if idx]
        self._V = DenseMatrix(vectors, OrderedSet(idx), None)
    self._S = loads(zip.read('.S'))
    self._shifts = None
    if ('.shifts.row' in zip.namelist()):
        self._shifts = [loads(zip.read('.shifts.row')), loads(zip.read('.shifts.col')), loads(zip.read('.shifts.total'))]
    self._reconstruct_matrix(shifts=self._shifts, force=True)
    self._reconstruct_similarity(force=True)
