Zeros and Ones

  • + 0 comments

    Sample code is wrong :P written for python 2 instead of python 3, and either a different version of numpy than what is in the run environment, or a typo for numpy.int

    in any case:

    import numpy
    shape = tuple(int(i) for i in input().split())
    print(np.zeros(shape, int))
    print(np.ones(shape, int))
    

    this comment editor is also broken :P (no scrolling when the input exceeds the text box size)