Skip to content

Commit 6f2f717

Browse files
mzaffalonstevengj
authored andcommitted
Replace deprecated repmat by repeat (#384)
* Replace deprecated repmat by repeat * Replace deprecated repmat by repeat
1 parent 8eeecf4 commit 6f2f717

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PyPlot.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,14 @@ for f in (:surf,:mesh,:plot_surface,:plot_wireframe,:contour3D,:contourf3D)
248248
@eval begin
249249
function $f(X::AbstractVector, Y::AbstractVector, Z::AbstractMatrix, args...; kws...)
250250
m, n = length(X), length(Y)
251-
$f(repmat(reshape(X,1,m),n,1), repmat(Y,1,m), Z, args...; kws...)
251+
$f(repeat(transpose(X),outer=(n,1)), repeat(Y,outer=(1,m)), Z, args...; kws...)
252252
end
253253
function $f(X::AbstractMatrix, Y::AbstractVector, Z::AbstractMatrix, args...; kws...)
254254
if size(X,1) != 1 && size(X,2) != 1
255255
throw(ArgumentError("if 2nd arg is column vector, 1st arg must be row or column vector"))
256256
end
257257
m, n = length(X), length(Y)
258-
$f(repmat(reshape(X,1,m),n,1), repmat(Y,1,m), Z, args...; kws...)
258+
$f(repeat(transpose(X),outer=(n,1)), repeat(Y,outer=(1,m)), Z, args...; kws...)
259259
end
260260
end
261261
end

0 commit comments

Comments
 (0)