From 97c3f2ce0b2d850335cd125a2e30a3baf4d9c38d Mon Sep 17 00:00:00 2001 From: minhqdao Date: Fri, 2 Aug 2024 19:05:00 +0530 Subject: [PATCH] Use generic again --- src/stdlib_array.fypp | 1 + src/stdlib_io_np_load.fypp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stdlib_array.fypp b/src/stdlib_array.fypp index 00e611017..4f7aaf960 100644 --- a/src/stdlib_array.fypp +++ b/src/stdlib_array.fypp @@ -20,6 +20,7 @@ module stdlib_array contains #:for k1, t1 in KINDS_TYPES #:for rank in RANKS + generic :: allocate_array => allocate_array_${t1[0]}$${k1}$_${rank}$ procedure :: allocate_array_${t1[0]}$${k1}$_${rank}$ #:endfor #:endfor diff --git a/src/stdlib_io_np_load.fypp b/src/stdlib_io_np_load.fypp index 31e1f392f..843837309 100644 --- a/src/stdlib_io_np_load.fypp +++ b/src/stdlib_io_np_load.fypp @@ -180,7 +180,7 @@ contains & 'with total size of '//to_string(product(vshape)); return end if - call arrays(i)%allocate_array_${t1[0]}$${k1}$_${rank}$(array, stat, msg) + call arrays(i)%allocate_array(array, stat, msg) if (stat /= 0) then msg = "Failed to allocate array of type '"//this_type//"' "//& & 'with total size of '//to_string(product(vshape)); return