docstr: Split the central edge between the origin and supremum of
  a cell and add the new vertex to the complex
docstr_tok: ["Split","the","central","edge","between","the","origin","and","supremum","of","a","cell","and","add","the","new","vertex","to","the","complex"]
code: def add_centroid(self):
      """Split the central edge between the origin and supremum of
      a cell and add the new vertex to the complex"""
      self.centroid = list(
          (np.array(self.origin) + np.array(self.supremum)) / 2.0
      )
      self.C0.add_vertex(self.V[tuple(self.centroid)])
      self.C0.centroid = self.centroid
  
      # Disconnect origin and supremum
      self.V[tuple(self.origin)].disconnect(
          self.V[tuple(self.supremum)]
      )
  
      # Connect centroid to all other vertices
      for v in self.C0():
          self.V[tuple(self.centroid)].connect(self.V[tuple(v.x)])
  
      self.centroid_added = True
      return
  
imports: import numpy
  import copy
label_desc: Use image node_id 6 for calling the Complex obj's underlying member method code with example usage: obj.add_centroid() without return types