code: def segment_radii(neurites, neurite_type=NeuriteType.all):
      '''arithmetic mean of the radii of the points in segments in a collection of neurites'''
      def _seg_radii(sec):
          '''vectorized mean radii'''
          pts = sec.points[:, COLS.R]
          return np.divide(np.add(pts[:-1], pts[1:]), 2.0)
  
      return map_segments(_seg_radii, neurites, neurite_typef segment_radii(neurites, neurite_type=NeuriteType.all):
      '''arithmetic mean of the radii of the points in segments in a collection of neurites'''
      def _seg_radii(sec):
          '''vectorized mean radii'''
          pts = sec.points[:, COLS.R]
          return np.divide(np.add(pts[:-1], pts[1:]), 2.0)
  
      return map_segments(_seg_radii, neurites, neurite_type)
docs: arithmetic mean of the radii of the points in segments in a collection of neurites