0

Looking for a method which can be used to adjust the lenth of a numpy array by repeating its elements. I know this can be implemented in many ways. I am looking for the most elegant or numpy supported functionlities. Thanks to your input.

Example:

import numpy as np
input = np.array([1,2,3,4,5,6])
# Increase its length to 11
expected_output = [1,2,3,4,5,6,1,2,3,4,5]
shad0w_wa1k3r
  • 12,955
  • 8
  • 67
  • 90
idkman
  • 169
  • 1
  • 15

0 Answers0