Eye and Identity

Sort by

recency

|

302 Discussions

|

  • [deleted]Challenge Author
    + 0 comments

    For Python3

    import numpy
    
    numpy.set_printoptions(legacy="1.13")
    
    n, m = map(int, input().split())
    
    print(numpy.eye(n, m))
    
  • + 0 comments

    import numpy numpy.set_printoptions(legacy='1.13')

    print(numpy.eye(*map(int,input().split())))

  • + 0 comments

    import numpy numpy.set_printoptions(legacy='1.13') N, M = map(int, input().strip().split()) print(numpy.eye(N, M))

  • + 0 comments

    numpy.set_printoptions(legacy='1.13')

    N, M = map(int, input().split()) eye = numpy.eye(N,M) print(eye)

  • + 0 comments
    import numpy
    numpy.set_printoptions(legacy='1.13')
    
    print(numpy.eye(*map(int,input().split())))
    

    '*' operator unpacks the two integers so they can be passed as arguements to numpy.eye