Generic module for printing arrays
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=5), | private, | parameter | :: | default_format | = | "NUMPY" |
supported formats: NUMPY, MATHEMATICA, and PLAIN which resembles numpy |
character(len=*), | private, | parameter | :: | fmt_edge | = | "(A)" | |
character(len=*), | private, | parameter | :: | fmt_in | = | '(A, ", ")' |
Generic interface for printing arrays of different types
Usage: call print_array_v2(array, [optional] format) Where format can be: NUMPY, PLAIN, MATHEMATICA (can use lower caps)
Implemented types are:
array(:) -> int32, int64, sp, dp
array(:,:) -> int32, int64, sp, dp
array(:) (packed matrix) -> sp, dp
array(:,:,:) -> sp, dp
print a vector of int32 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | vector(:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a vector of int64 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | vector(:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a vector of sp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | vector(:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a vector of dp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | vector(:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a matrix of int32 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | matrix(:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a matrix of int64 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | matrix(:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a matrix of sp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | matrix(:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a matrix of dp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a packed lower triangular matrix of int32 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | packed(:) | |||
integer(kind=default_int), | intent(in) | :: | n_elements | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a packed lower triangular matrix of int64 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | packed(:) | |||
integer(kind=default_int), | intent(in) | :: | n_elements | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a packed lower triangular matrix of sp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | packed(:) | |||
integer(kind=default_int), | intent(in) | :: | n_elements | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a packed lower triangular matrix of dp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | packed(:) | |||
integer(kind=default_int), | intent(in) | :: | n_elements | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a 3D tensor of sp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | matrix(:,:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a 3D tensor of dp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | matrix(:,:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a 3D tensor of dp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | matrix(:,:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a 3D tensor of sp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | matrix(:,:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a matrix of dp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | matrix(:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a matrix of int32 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | matrix(:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a matrix of int64 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | matrix(:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a matrix of sp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | matrix(:,:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a packed lower triangular matrix of dp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | packed(:) | |||
integer(kind=default_int), | intent(in) | :: | n_elements | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a packed lower triangular matrix of int32 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | packed(:) | |||
integer(kind=default_int), | intent(in) | :: | n_elements | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a packed lower triangular matrix of int64 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | packed(:) | |||
integer(kind=default_int), | intent(in) | :: | n_elements | |||
character(len=*), | intent(in), | optional | :: | format_type |
Print a packed lower triangular matrix of sp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | packed(:) | |||
integer(kind=default_int), | intent(in) | :: | n_elements | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a vector of dp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | vector(:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a vector of int32 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | vector(:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a vector of int64 values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | vector(:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
print a vector of sp values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | vector(:) | |||
character(len=*), | intent(in), | optional | :: | format_type |
Set brackets based on output format type
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | format_type | |||
character(len=1), | intent(out) | :: | open_bracket | |||
character(len=1), | intent(out) | :: | close_bracket |