class_docstr: Points on the unit sphere.
  
  The sphere can be constructed using one of three conventions::
  
    Sphere(x, y, z)
    Sphere(xyz=xyz)
    Sphere(theta=theta, phi=phi)
  
  Parameters
  ----------
  x, y, z : 1-D array_like
      Vertices as x-y-z coordinates.
  theta, phi : 1-D array_like
      Vertices as spherical coordinates.  Theta and phi are the inclination
      and azimuth angles respectively.
  xyz : (N, 3) ndarray
      Vertices as x-y-z coordinates.
  faces : (N, 3) ndarray
      Indices into vertices that form triangular faces.  If unspecified,
      the faces are computed using a Delaunay triangulation.
  edges : (N, 2) ndarray
      Edges between vertices.  If unspecified, the edges are
      derived from the faces.
docstr: Subdivides each face of the sphere into four new faces.
  
  New vertices are created at a, b, and c. Then each face [x, y, z] is
  divided into faces [x, a, c], [y, a, b], [z, b, c], and [a, b, c].
  
  ::
  
          y
          /\
         /  \
       a/____\b
       /\    /\
      /  \  /  \
     /____\/____\
    x      c     z
  
  Parameters
  ----------
  n : int, optional
      The number of subdivisions to perform.
  
  Returns
  -------
  new_sphere : Sphere
      The subdivided sphere.
code: def subdivide(self, n=1):
      r"""Subdivides each face of the sphere into four new faces.
  
          New vertices are created at a, b, and c. Then each face [x, y, z] is
          divided into faces [x, a, c], [y, a, b], [z, b, c], and [a, b, c].
  
          ::
  
                  y
                  /\
                 /  \
               a/____\b
               /\    /\
              /  \  /  \
             /____\/____\
            x      c     z
  
          Parameters
          ----------
          n : int, optional
              The number of subdivisions to perform.
  
          Returns
          -------
          new_sphere : Sphere
              The subdivided sphere.
  
          """
      vertices = self.vertices
      faces = self.faces
      for _ in range(n):
          edges, mapping = unique_edges(faces, return_mapping=True)
          new_vertices = vertices[edges].sum(1)
          new_vertices /= vector_norm(new_vertices, keepdims=True)
          mapping += len(vertices)
          vertices = np.vstack([vertices, new_vertices])
  
          x, y, z = faces.T
          a, b, c = mapping.T
          face1 = np.column_stack([x, a, c])
          face2 = np.column_stack([y, b, a])
          face3 = np.column_stack([z, c, b])
          face4 = mapping
          faces = np.concatenate([face1, face2, face3, face4])
  
      if len(vertices) < 2**16:
          faces = np.asarray(faces, dtype="uint16")
      return Sphere(xyz=vertices, faces=faces)
  
imports: import numpy
  import warnings
  from scipy import optimize
  from dipy.core.geometry import cart2sphere, sphere2cart, vector_norm
  from dipy.core.onetime import auto_attr
  from dipy.reconst.recspeed import remove_similar_vertices
label_desc: Use image node_id 8 for calling the Sphere obj's underlying member method code with example usage: obj.subdivide(n) and returns: Sphere