Repository: ManimCommunity/manim

Issue:
PMobject.add_points: `rgbas` argument has wrong shape in documentation
## Description of bug / unexpected behavior
The current documentation of the `PMobject.add_points` method makes it sound like the `rgbas` argument should be a Numpy array of shape (N, 3), just like `points`, when it must actually be (N, 4) or an error is produced. It is clear from the name of the argument `rgbas` that it should be an Nx4 array, but the documentation made me second guess it.

## Expected behavior
The documentation should state the shape of `rgbas` argument to be Nx4 if not `None`.

## How to reproduce the issue
The following code passes an Nx4 array for `rgbas` and works as expected.
```py
from manim import *
import numpy as np

class TestScene(ThreeDScene):
    def construct(self):
        points = PMobject()
        points.add_points(np.random.randn(500, 3), rgbas=np.random.rand(500, 4))
        self.set_camera_orientation(phi=np.pi/3, theta=np.pi/4)
        self.add(points)
        self.begin_ambient_camera_rotation(rate=np.pi/2)
        self.wait(4)
        self.stop_ambient_camera_rotation()

```

However, when passing an Nx3 array as suggested in the documentation an error is produced. To reproduce the error change `np.random.rand(500, 4)` to `np.random.rand(500, 3)` in the above code.

```
ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 4 and the array at index 1 has size 3
```



Discussion:

Resolving patch:
diff --git a/manim/mobject/types/opengl_point_cloud_mobject.py b/manim/mobject/types/opengl_point_cloud_mobject.py
--- a/manim/mobject/types/opengl_point_cloud_mobject.py
+++ b/manim/mobject/types/opengl_point_cloud_mobject.py
@@ -40,8 +40,10 @@ def get_array_attrs(self):
         return ["points", "rgbas"]
 
     def add_points(self, points, rgbas=None, color=None, opacity=None):
-        """
-        points must be a Nx3 numpy array, as must rgbas if it is not None
+        """Add points.
+
+        Points must be a Nx3 numpy array.
+        Rgbas must be a Nx4 numpy array if it is not None.
         """
         if rgbas is None and color is None:
             color = YELLOW
@@ -54,7 +56,7 @@ def add_points(self, points, rgbas=None, color=None, opacity=None):
         elif rgbas is not None:
             new_rgbas = rgbas
         elif len(rgbas) != len(points):
-            raise ValueError("points and rgbas must have same shape")
+            raise ValueError("points and rgbas must have same length")
         self.rgbas = np.append(self.rgbas, new_rgbas, axis=0)
         return self
 
diff --git a/manim/mobject/types/point_cloud_mobject.py b/manim/mobject/types/point_cloud_mobject.py
--- a/manim/mobject/types/point_cloud_mobject.py
+++ b/manim/mobject/types/point_cloud_mobject.py
@@ -63,8 +63,10 @@ def get_array_attrs(self):
         return super().get_array_attrs() + ["rgbas"]
 
     def add_points(self, points, rgbas=None, color=None, alpha=1):
-        """
-        Points must be a Nx3 numpy array, as must rgbas if it is not None
+        """Add points.
+
+        Points must be a Nx3 numpy array.
+        Rgbas must be a Nx4 numpy array if it is not None.
         """
         if not isinstance(points, np.ndarray):
             points = np.array(points)
@@ -74,7 +76,7 @@ def add_points(self, points, rgbas=None, color=None, alpha=1):
             color = Color(color) if color else self.color
             rgbas = np.repeat([color_to_rgba(color, alpha)], num_new_points, axis=0)
         elif len(rgbas) != len(points):
-            raise ValueError("points and rgbas must have same shape")
+            raise ValueError("points and rgbas must have same length")
         self.rgbas = np.append(self.rgbas, rgbas, axis=0)
         return self
 


Test patch: