#! /usr/bin/env python # def r8col_transpose_print ( m, n, a, title ): #*****************************************************************************80 # ## R8COL_TRANSPOSE_PRINT prints an R8COL, transposed. # # Discussion: # # An R8COL is an M by N array of R8's, regarded as an array of N columns, # each of length M. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 24 February 2016 # # Author: # # John Burkardt # # Parameters: # # Input, integer M, the number of rows in A. # # Input, integer N, the number of columns in A. # # Input, real A(M,N), the matrix. # # Input, string TITLE, a title. # from r8col_transpose_print_some import r8col_transpose_print_some r8col_transpose_print_some ( m, n, a, 0, 0, m - 1, n - 1, title ) return def r8col_transpose_print_test ( ): #*****************************************************************************80 # ## R8COL_TRANSPOSE_PRINT_TEST tests R8COL_TRANSPOSE_PRINT. # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 24 February 2016 # # Author: # # John Burkardt # import numpy as np print '' print 'R8COL_TRANSPOSE_PRINT_TEST' print ' R8COL_TRANSPOSE_PRINT prints an R8COL.' m = 4 n = 3 v = np.array ( [ \ [ 11.0, 12.0, 13.0 ], [ 21.0, 22.0, 23.0 ], [ 31.0, 32.0, 33.0 ], [ 41.0, 42.0, 43.0 ] ], dtype = np.float64 ) r8col_transpose_print ( m, n, v, ' Here is an R8COL, transposed:' ) # # Terminate. # print '' print 'R8COL_TRANSPOSE_PRINT_TEST:' print ' Normal end of execution.' return if ( __name__ == '__main__' ): from timestamp import timestamp timestamp ( ) r8col_transpose_print_test ( ) timestamp ( )