Skip to content

Commit c2f0abf

Browse files
committed
Update eye func:
1. `merge` -> `optval` inside.
1 parent 8745725 commit c2f0abf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Makefile.manual

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ stdlib_string_type.o: stdlib_ascii.o \
149149
stdlib_strings.o: stdlib_ascii.o \
150150
stdlib_string_type.o \
151151
stdlib_optval.o
152-
stdlib_math.o: stdlib_kinds.o
152+
stdlib_math.o: stdlib_kinds.o \
153+
stdlib_optval.o
153154
stdlib_math_linspace.o: \
154155
stdlib_math.o
155156
stdlib_math_logspace.o: \

src/stdlib_linalg.fypp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module stdlib_linalg
55
!! ([Specification](../page/specs/stdlib_linalg.html))
66
use stdlib_kinds, only: sp, dp, qp, &
77
int8, int16, int32, int64
8+
use stdlib_optval, only: optval
89
implicit none
910
private
1011

@@ -95,7 +96,7 @@ contains
9596
integer :: dim2_
9697
integer :: i
9798

98-
dim2_ = merge(dim2, dim1, present(dim2))
99+
dim2_ = optval(dim2, dim1)
99100
allocate(result(dim1, dim2_))
100101

101102
result = 0

0 commit comments

Comments
 (0)