netsse.tools.misc_func.wrap =========================== .. py:function:: netsse.tools.misc_func.wrap(U, axis=1, add=0) Wraps an array around one of its dimensions. :param U: Input array to be wrapped around. :type U: array_like of shape (n,m) or (n,) :param axis: If ``U`` is a 2d-array, the axis of ``U`` along which to wrap. The default is ``1``. :type axis: {1,0}, optional :param add: Term that is added to the repeated part of ``U`` before concatenation. :type add: float or array_like, default 0 :returns: **U_wrap** -- Extended array, where the first column (respectively, row) of ``U`` has been repeated by concatenation at the end of ``U``. .. note:: - If ``U`` is a 2d-array, then the output array has a shape of ``(n+1*(axis==0),m+1*(axis==1))``. - If ``U`` is a 1d-array, then the output array has a shape of ``(n+1,)``. The first element of ``U`` has been repeated at the end. :rtype: array_like .. seealso:: :obj:`pad` Adds zeros to an array along one of its dimensions. .. rubric:: Example >>> U_wrap = wrap(U,axis=1,add=0)