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

Code before:
    def get_anchors(self) -> np.ndarray:
        """Returns the anchors of the curves forming the VMobject.

        Returns
        -------
        np.ndarray
            The anchors.
        """
        if self.points.shape[0] == 1:
            return self.points
        return np.array(
            list(
                it.chain(
                    *zip(
                        self.get_start_anchors(),
                        self.get_end_anchors(),
                    )
                )
            )
        )

    def get_points_defining_boundary(self):
        # Probably returns all anchors, but this is weird regarding  the name of the method.
        return np.array(list(it.chain(*[sm.get_anchors() for sm in self.get_family()])))

    def get_arc_length(self, sample_points_per_curve: Optional[float] = None) -> float:
        """Return the approximated length of the whole curve.

        Parameters
        ----------
        sample_points_per_curve
            Number of sample points per curve used to approximate the length. More points result in a better approximation.

        Returns
        -------
        float
            The length of the :class:`VMobject`.
        """
        kwargs = {}
        if sample_points_per_curve is not None:
            kwargs["sample_points"] = sample_points_per_curve
        return np.sum(
            [length for _, length in self.get_curve_functions_with_lengths(**kwargs)]
        )

    # Alignment
    def align_points(self, vmobject):
        # This probably makes the current vmobject and the given one have the same number of points,
        # by adding extra points to the last sub-path. This method is never used in the whole library.
        self.align_rgbas(vmobject)
        if self.get_num_points() == vmobject.get_num_points():

Review comment (suggestion):
`np.linspace` actually can't accept a float as the third argument.
```suggestion
    def get_arc_length(self, sample_points_per_curve: Optional[int] = None) -> float:
```

Code after:
        nppcc = self.n_points_per_cubic_curve
        return self.points[nppcc - 1 :: nppcc]

    def get_anchors(self) -> np.ndarray:
        """Returns the anchors of the curves forming the VMobject.

        Returns
        -------
        np.ndarray
            The anchors.
        """
        if self.points.shape[0] == 1:
            return self.points
        return np.array(
            list(
                it.chain(
                    *zip(
                        self.get_start_anchors(),
                        self.get_end_anchors(),
                    )
                )
            )
        )

    def get_points_defining_boundary(self):
        # Probably returns all anchors, but this is weird regarding  the name of the method.
        return np.array(list(it.chain(*[sm.get_anchors() for sm in self.get_family()])))

    def get_arc_length(self, sample_points_per_curve: Optional[int] = None) -> float:
        """Return the approximated length of the whole curve.

        Parameters
        ----------
        sample_points_per_curve
            Number of sample points per curve used to approximate the length. More points result in a better approximation.

        Returns
        -------
        float
            The length of the :class:`VMobject`.
        """

        return np.sum(
            length
            for _, length in self.get_curve_functions_with_lengths(
                sample_points=sample_points_per_curve
            )
        )

    # Alignment
    def align_points(self, vmobject):