From 2ab6354f8c77a5dae6dc65ef6c0c8ceeb204fe48 Mon Sep 17 00:00:00 2001 From: minhqdao Date: Fri, 2 Aug 2024 18:50:04 +0530 Subject: [PATCH] Rename one of the functions --- src/stdlib_io_np.fypp | 4 ++-- src/stdlib_io_np_load.fypp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/stdlib_io_np.fypp b/src/stdlib_io_np.fypp index 37ea2858d..399c4ae4b 100644 --- a/src/stdlib_io_np.fypp +++ b/src/stdlib_io_np.fypp @@ -144,10 +144,10 @@ module stdlib_io_np end end interface - interface allocate_array + interface allocate_array_from_shape #:for k1, t1 in KINDS_TYPES #:for rank in RANKS - module subroutine allocate_array_${t1[0]}$${k1}$_${rank}$ (array, vshape, stat) + module subroutine allocate_array_from_shape_${t1[0]}$${k1}$_${rank}$ (array, vshape, stat) !> Instance of the array to be allocated. ${t1}$, allocatable, intent(out) :: array${ranksuffix(rank)}$ !> Dimensions to allocate for. diff --git a/src/stdlib_io_np_load.fypp b/src/stdlib_io_np_load.fypp index e2d999090..31e1f392f 100644 --- a/src/stdlib_io_np_load.fypp +++ b/src/stdlib_io_np_load.fypp @@ -57,7 +57,7 @@ contains exit catch end if - call allocate_array(array, vshape, stat) + call allocate_array_from_shape(array, vshape, stat) if (stat /= 0) then msg = "Failed to allocate array of type '"//vtype//"' "//& & "with total size of "//to_string(product(vshape)) @@ -85,7 +85,7 @@ contains #:for k1, t1 in KINDS_TYPES #:for rank in RANKS - module subroutine allocate_array_${t1[0]}$${k1}$_${rank}$(array, vshape, stat) + module subroutine allocate_array_from_shape_${t1[0]}$${k1}$_${rank}$(array, vshape, stat) ${t1}$, allocatable, intent(out) :: array${ranksuffix(rank)}$ integer, intent(in) :: vshape(:) integer, intent(out) :: stat @@ -169,7 +169,7 @@ contains block ${t1}$, allocatable :: array${ranksuffix(rank)}$ - call allocate_array(array, vshape, stat) + call allocate_array_from_shape(array, vshape, stat) if (stat /= 0) then msg = "Failed to allocate array of type '"//this_type//"'."; return end if