#NEWLINE# def check_pdist( self , metric , kwargs , D_true ) : #NEWLINE# #INDENT# if ( ( metric == 'canberra' ) and ( cmp_version ( scipy . __version__ , '0.9' ) <= 0 ) ) : #NEWLINE# #INDENT# raise SkipTest ( 'Canberra distance incorrect in scipy < 0.9' ) #NEWLINE# #UNINDENT# dm = DistanceMetric . get_metric ( metric , ** kwargs ) #NEWLINE# D12 = dm . pairwise ( self . X1 ) #NEWLINE# assert_array_almost_equal ( dm , D_true )