Shape and Reshape

Sort by

recency

|

389 Discussions

|

  • + 0 comments
    import numpy
    a=list(map(int,input().split()))
    print(numpy.reshape(a,(3,3)))
    
  • + 0 comments

    For Python3 Platform

    import numpy
    
    arr = numpy.array(list(map(int, input().split())))
    
    print(numpy.reshape(arr, (3, 3)))
    
  • + 0 comments
    import numpy as np
    print(np.reshape(np.array(input().split(),int),(3,3)))
    
  • + 0 comments

    import numpy as np arr= np.array(list(map(int, input().split()))) shpa = arr.reshape(3,3) print(shpa)

  • + 0 comments

    import numpy a=list(map(int,input().split())) print(numpy.reshape(a,(3,3)))