2020.08 To Do List
numpy.repeat
(a, repeats, axis=None)
Repeat elements of an array.
(a요소를 반복해서 repeats만큼 배열을 만든다.)
Parameters: Type
a: array_like
Input array.
repeats: int or array of ints
The number of repetitions for each element. repeats is broadcasted to fit the shape of the given axis.
axis: int, optional
The axis along which to repeat values. By default, use the flattened input array, and return a flat output array.
Returns repeated_array: ndarray
Output array which has the same shape as a, except along the given axis.
Example Code
import numpy as np
ary = np.repeat(0,5)
# ary = [0,0,0,0,0]
x = np.array()