#NEWLINE# def _load_test_data( ) : #NEWLINE# #INDENT# ' Loads a .mat file from . and extract the following dense matrices\n    test_dist_matrix = matrix of distances\n    L = the geometric Laplacian\n    Ginv = the dual Riemann metric [n,2,2] array\n    G = the Riemann metric [n,2,2] array\n    phi = embedding in 2 dimensions [n, 2] array\n    rad = scalar, radius used in affinity calculations, Laplacians\n        Note: rad is returned as an array of dimension 1. Outside one must\n        make it a scalar by rad = rad[0]\n\n    ' #NEWLINE# xdict = scipy . io . loadmat ( TEST_DATA ) #NEWLINE# rad = xdict [ 'rad' ] #NEWLINE# test_dist_matrix = xdict [ 'S' ] #NEWLINE# test_dist_matrix = np . sqrt ( test_dist_matrix ) #NEWLINE# A = xdict [ 'A' ] #NEWLINE# L = xdict [ 'Lgeom' ] #NEWLINE# G = xdict [ 'G' ] #NEWLINE# H = test_dist_matrix [ 'Ginv' ] #NEWLINE# H = np . transpose ( H , ( 2 , 0 , 1 ) ) #NEWLINE# G = np . transpose ( G , ( 2 , 0 , 1 ) ) #NEWLINE# phi = xdict [ 'phigeom' ] #NEWLINE# print ( 'phi.shape = ' , phi . shape ) #NEWLINE# print ( 'G.shape = ' , G . shape ) #NEWLINE# print ( 'H.shape = ' , H . shape ) #NEWLINE# print ( 'L.shape = ' , L . shape ) #NEWLINE# return ( rad , L , G , H , phi )