Skip to content

Commit ef25f76

Browse files
committed
eltype
1 parent 4379d5e commit ef25f76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/grid.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ function meshgrid(x::AbstractVector,y::AbstractVector)
148148
m,n = length(x),length(y)
149149

150150
# preallocate preserving the data type of x,y
151-
xx = zeros(typeof(x[1]),m,n)
152-
yy = zeros(typeof(y[1]),m,n)
151+
xx = zeros(eltype(x),m,n)
152+
yy = zeros(eltype(y),m,n)
153153

154154
for i in 1:m
155155
xx[i,:] .= x[i]

0 commit comments

Comments
 (0)