def array(self, *dimensions):
        """Add array dimensions to this member.

        The dimensions passed to this method are `prepended` to the existing dimensions.
        For example, :py:`Out(1).array(2)` describes an array of 2 elements, whereas both
        :py:`Out(1).array(2, 3)` and :py:`Out(1).array(3).array(2)` both describe a two dimensional
        array of 2 by 3 elements.

        Dimensions are passed to :meth:`array` in the order in which they would be indexed.
        That is, :py:`.array(x, y)` creates a member that can be indexed up to :py:`[x-1][y-1]`.

        The :meth:`array` method is composable: calling :py:`member.array(x)` describes an array of
        :py:`x` members even if :py:`member` was already an array.

        Returns
        -------
        :class:`Member`
            A new :py:`member` with :py:`member.dimensions` extended by :py:`dimensions`, and
            identical to :py:`self` other than that.
        """
        for dimension in dimensions:
            if not (isinstance(dimension, int) and dimension >= 0):
                raise TypeError(f"Member array dimensions must be non-negative integers, "
                                f"not {dimension!r}")
        return Member(self._flow, self._description, init=self._init,
                      _dimensions=(*dimensions, *self._dimensions))
Add array dimensions to this member.

        The dimensions passed to this method are `prepended` to the existing dimensions.
        For example, :py:`Out(1).array(2)` describes an array of 2 elements, whereas both
        :py:`Out(1).array(2, 3)` and :py:`Out(1).array(3).array(2)` both describe a two dimensional
        array of 2 by 3 elements.

        Dimensions are passed to :meth:`array` in the order in which they would be indexed.
        That is, :py:`.array(x, y)` creates a member that can be indexed up to :py:`[x-1][y-1]`.

        The :meth:`array` method is composable: calling :py:`member.array(x)` describes an array of
        :py:`x` members even if :py:`member` was already an array.

        Returns
        -------
        :class:`Member`
            A new :py:`member` with :py:`member.dimensions` extended by :py:`dimensions`, and
            identical to :py:`self` other than that.
        
amaranth/lib/wiring.py