Shape and Reshape

Sort by

recency

|

382 Discussions

|

  • + 0 comments

    import numpy as np

    user_list = list(map(int,input().split()))

    print(np.reshape(user_list,(3,3)))

  • + 0 comments

    Here is HackerRank Shape and Reshape in Python solution - https://programmingoneonone.com/hackerran-shape-and-reshape-problem-solution-in-python.html

  • + 0 comments
    A= numpy.reshape([list(map(int,input().split()))],(3,3))
    
  • + 0 comments

    import numpy user_input = input().split() user_input = numpy.array(user_input,dtype = 'int') print(numpy.reshape(user_input,(3,3)))

    Check this out :)

  • + 0 comments

    import numpy

    inp=list(map(int,input().split())) change_array=numpy.array(inp) change_array.shape=(3,3) print(change_array)