Shape and Reshape
-
Practice>Python>Numpy>Shape and Reshapehackerrank.com 2019. 3. 26. 12:45
hackerrank.comShape and ReshapeProblem link : https://www.hackerrank.com/challenges/np-shape-reshape/problemDifficulty : Easy TipMost of thing to resolve problem, is described in descriptionJust add 'int' when you create numpy arrary, like numbpy.array(arr, int)It is to covert string to int Solution import numpy arr = input().split(' ') arr = numpy.array(arr, int) print(numpy.reshape(arr,(3,3)))