def test_legendre_table():
 n = 10
 for ch_type in ['eeg', 'meg']:
  (lut1, n_fact1) = _get_legen_table(ch_type, n_coeff=25, force_calc=True)
  lut1 = lut1[:, :(n - 1)].copy()
  n_fact1 = n_fact1[:(n - 1)].copy()
  (lut2, n_fact2) = _get_legen_table(ch_type, n_coeff=n, force_calc=True)
  assert_allclose(lut1, lut2)
  assert_allclose(n_fact1, n_fact2)

def test_legendre_table ( ) : n = 10 for ch_type in [ 'eeg' , 'meg' ] : ( lut1 , n_fact1 ) = _get_legen_table ( ch_type , n_coeff = 25 , force_calc = True ) lut1 = lut1 [ : , : ( n - 1 ) ] . copy ( ) n_fact1 = n_fact1 [ : ( n - 1 ) ] . copy ( ) ( lut2 , n_fact2 ) = _get_legen_table ( ch_type , n_coeff = n , force_calc = True ) assert_allclose ( lut1 , lut2 ) assert_allclose ( n_fact1 , n_fact2 )
test legendre table calculation .