<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_array(self, name, shape, dtype, **kwargs):
 """ Register an array with this cube. .. code-block:: python cube.register_array("model_vis", ("ntime", "nbl", "nchan", 4), np.complex128) Parameters name : str Array name shape : A tuple containing either Dimension names or ints Array shape schema dtype : Array data type """


        # Complain if array exists
        if name in self._arrays:
            raise ValueError(('Array %s is already registered '
                'on this cube object.') % name)

        # OK, create a record for this array
        A = self._arrays[name] = AttrDict(name=name,
            dtype=dtype, shape=shape,
            **kwargs)

        return A