Shape and Reshape

  • + 0 comments

    import numpy import sys

    chars = sys.stdin.read().split() arr = numpy.array([int(char) for char in chars]) arr.shape = (3,3) print(arr)