def print_arr(text, a):
    """print the contents of an array to the console"""
    n, m = a.shape
    print('%s[][] = (' % text)
    for i in range(n):
        print(' (', end='')
        for j in range(m):
            print(' %g, ' % a[i][j], end='')
        print('),')
    print(')')
