numpy.tile() in Python

The numpy.tile() function constructs an array by repeating the parameter ‘A’  the number of times as specified by the ‘reps’ parameter.

Syntax

Parameter

The numpy.tile() function consists of two parameters, which are as follows:

A: This parameter represents the input array.

reps: This parameter represents the number of repetitions of A along each axis.

Return

This function returns the tiled output array.

Example 1

Output

Example 2

Output

 

Pin It on Pinterest

Share This