Repository: ManimCommunity/manim
File: manim/mobject/mobject.py (Python)

Code before:
    def get_coord(self, dim, direction=ORIGIN):
        """Meant to generalize ``get_x``, ``get_y`` and ``get_z``"""
        return self.get_extremum_along_dim(dim=dim, key=direction[dim])

    def get_x(self, direction=ORIGIN):
        """Returns x coordinate of the center of the mobject as ``numpy.float64`` """
        return self.get_coord(0, direction)

    def get_y(self, direction=ORIGIN):
        """Returns y coordinate of the center of the mobject as ``numpy.float64`` """
        return self.get_coord(1, direction)

    def get_z(self, direction=ORIGIN):
        """Returns z coordinate of the center of the mobject as ``numpy.float64`` """
        return self.get_coord(2, direction)

    def get_start(self):
        """Returns the point, where the stroke that surrounds the :class:`~.Mobject` starts. 
        self.throw_error_if_no_points()
        if config["use_opengl_renderer"]:
            return np.array(self.data["points"][0])
        else:
            return np.array(self.points[0])

    def get_end(self):
        """Returns the point, where the stroke that surrounds the mobject ends.  Type is a ``numpy.ndarray`` with 3 elements, e.g. [+1,0,0] """
        self.throw_error_if_no_points()
        if config["use_opengl_renderer"]:
            return np.array(self.data["points"][-1])
        else:
            return np.array(self.points[-1])

    def get_start_and_end(self):
        """Returns starting and ending point of a stroke as a ``tuple``. """
        return self.get_start(), self.get_end()

    def point_from_proportion(self, alpha):
        raise NotImplementedError("Please override in a child class.")

    def get_pieces(self, n_pieces):
        template = self.copy()
        template.submobjects = []
        alphas = np.linspace(0, 1, n_pieces + 1)
        return Group(
            *[
                template.copy().pointwise_become_partial(self, a1, a2)
                for a1, a2 in zip(alphas[:-1], alphas[1:])
            ]
        )

    def get_z_index_reference_point(self):

Review comment (suggestion):
```suggestion
        """Returns the point, where the stroke that surrounds the :class:`~.Mobject` ends.  
```

Code after:
            np.max, np.max, dim
        ) - self.reduce_across_dimension(np.min, np.min, dim)

    def get_coord(self, dim, direction=ORIGIN):
        """Meant to generalize ``get_x``, ``get_y`` and ``get_z``"""
        return self.get_extremum_along_dim(dim=dim, key=direction[dim])

    def get_x(self, direction=ORIGIN) -> np.float64:
        """Returns x coordinate of the center of the :class:`~.Mobject` as ``float`` """
        return self.get_coord(0, direction)

    def get_y(self, direction=ORIGIN) -> np.float64:
        """Returns y coordinate of the center of the :class:`~.Mobject` as ``float`` """
        return self.get_coord(1, direction)

    def get_z(self, direction=ORIGIN) -> np.float64:
        """Returns z coordinate of the center of the :class:`~.Mobject` as ``float`` """
        return self.get_coord(2, direction)

    def get_start(self):
        """Returns the point, where the stroke that surrounds the :class:`~.Mobject` starts."""
        self.throw_error_if_no_points()
        if config["use_opengl_renderer"]:
            return np.array(self.data["points"][0])
        else:
            return np.array(self.points[0])

    def get_end(self):
        """Returns the point, where the stroke that surrounds the :class:`~.Mobject` ends."""
        self.throw_error_if_no_points()
        if config["use_opengl_renderer"]:
            return np.array(self.data["points"][-1])
        else:
            return np.array(self.points[-1])

    def get_start_and_end(self):
        """Returns starting and ending point of a stroke as a ``tuple``. """
        return self.get_start(), self.get_end()

    def point_from_proportion(self, alpha):
        raise NotImplementedError("Please override in a child class.")

    def get_pieces(self, n_pieces):
        template = self.copy()
        template.submobjects = []
        alphas = np.linspace(0, 1, n_pieces + 1)
        return Group(
            *[
                template.copy().pointwise_become_partial(self, a1, a2)
                for a1, a2 in zip(alphas[:-1], alphas[1:])
            ]