

def load_matlab(self, name):
    " Read hash table from version saved by Matlab audfprint.\n        :params:\n          name : str\n            filename of .mat matlab fp dbase file\n        :returns:\n          params : dict\n            dictionary of parameters from the Matlab file including\n              'mat_version' : float\n                version read from Matlab file (must be >= 0.90)\n              'hoptime' : float\n                hoptime read from Matlab file (must be 0.02322)\n              'targetsr' : float\n                target sampling rate from Matlab file (must be 11025)\n        "
    mht = scipy.io.loadmat(name)
    params = {
        
    }
    params['mat_version'] = mht['HT_params'][0][0][(- 1)][0][0]
    assert (params['mat_version'] >= 0.9)
    self.hashbits = _bitsfor(mht['HT_params'][0][0][0][0][0])
    self.depth = mht['HT_params'][0][0][1][0][0]
    self.maxtimebits = _bitsfor(mht['HT_params'][0][0][2][0][0])
    params['hoptime'] = mht['HT_params'][0][0][3][0][0]
    params['targetsr'] = mht['HT_params'][0][0][4][0][0]
    params['nojenkins'] = mht['HT_params'][0][0][5][0][0]
    assert val['nojenkins']
    self.table = mht['HashTable'].T
    self.counts = mht['HashTableCounts'][0]
    self.names = [(str(val[0]) if (len(val) > 0) else []) for val in mht['HashTableNames'][0]]
    self.hashesperid = np.array(mht['HashTableLengths'][0]).astype(uint32)
    self.names.insert(0, '')
    self.hashesperid = np.append([0], self.hashesperid)
    self.dirty = False
    return params

dataset/ETHPy150Open dpwe/audfprint/hash_table.py HashTable.load_matlab/VarMisuse@224/485 `params`->`val`