bundles / numpy 2.4.4 / numpy / matlib / repmat
function
numpy.matlib:repmat
source: /numpy/matlib.py :332
Signature
def repmat ( a , m , n ) Summary
Repeat a 0-D to 2-D array or matrix MxN times.
Parameters
a: array_likeThe array or matrix to be repeated.
m, n: intThe number of times
ais repeated along the first and second axes.
Returns
out: ndarrayThe result of repeating
a.
Examples
import numpy.matlib a0 = np.array(1) np.matlib.repmat(a0, 2, 3)✓
a1 = np.arange(4) np.matlib.repmat(a1, 2, 2)✓
a2 = np.asmatrix(np.arange(6).reshape(2, 3)) np.matlib.repmat(a2, 2, 3)✓
Aliases
-
numpy.matlib.repmat