def _check_dipole(dip, n_dipoles):
 assert_equal(len(dip), n_dipoles)
 assert_equal(dip.pos.shape, (n_dipoles, 3))
 assert_equal(dip.ori.shape, (n_dipoles, 3))
 assert_equal(dip.gof.shape, (n_dipoles,))
 assert_equal(dip.amplitude.shape, (n_dipoles,))

def _check_dipole ( dip , n_dipoles ) : assert_equal ( len ( dip ) , n_dipoles ) assert_equal ( dip . pos . shape , ( n_dipoles , 3 ) ) assert_equal ( dip . ori . shape , ( n_dipoles , 3 ) ) assert_equal ( dip . gof . shape , ( n_dipoles , ) ) assert_equal ( dip . amplitude . shape , ( n_dipoles , ) )
check dipole sizes .