def radius_of_gyration(neurite):
centre_mass = neurite_centre_of_mass(neurite)<EOL>sum_sqr_distance = <NUM_LIT:0><EOL>N = <NUM_LIT:0><EOL>dist_sqr = [distance_sqr(centre_mass, s) for s in nm.iter_segments(neurite)]<EOL>sum_sqr_distance = np.sum(dist_sqr)<EOL>N = len(dist_sqr)<EOL>return np.sqrt(sum_sqr_distance / N)<EOL>
Calculate and return radius of gyration of a given neurite.