Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
0.6 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Mar 20, 2018
1 parent 9c0492e commit 3d8c46a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/vec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ function setindex!{T<:Integer}(x::Vec, v::Number, I::Range{T})
return v
else
# use invoke here to avoid a recursion loop
return invoke(setindex!, (Vec,typeof(v),AbstractVector{T}), x,v,I)
return invoke(setindex!, Tuple{Vec,typeof(v),AbstractVector{T}}, x,v,I)
end
end

Expand Down Expand Up @@ -933,7 +933,7 @@ function map!{F,T,T2}(f::F, dest::Vec{T}, src1::Vec{T}, src2::Vec{T2}, src_rest
n = length(srcs)
len = 0
len_prev = 0
src_arrs = Array(LocalVectorRead{T2}, n)
src_arrs = Array{LocalVectorRead{T2}}(n)
use_length_local = false

dest_arr = LocalVector(dest)
Expand Down Expand Up @@ -1113,7 +1113,7 @@ getindex(varr::LocalVector, i) = getindex(varr.a, i)
setindex!(varr::LocalVectorWrite, v, i) = setindex!(varr.a, v, i)
Base.unsafe_convert{T}(::Type{Ptr{T}}, a::LocalVector{T}) = Base.unsafe_convert(Ptr{T}, a.a)
Base.stride(a::LocalVector, d::Integer) = stride(a.a, d)
Base.similar(a::LocalVector, T=eltype(a), dims=size(a)) = similar(a.a, T, dims)
Base.similar(a::LocalVector, T::Type=eltype(a), dims::Dims{1}=size(a)) = similar(a.a, T, dims)

function (==)(x::LocalVector, y::AbstractArray)
return x.a == y
Expand Down
6 changes: 3 additions & 3 deletions test/mat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ end
end
vt = RC(complex(3., 3.))
@testset "array indexing" begin
vals = RC(complex(rand(3, 2), rand(3,2)))
vals = RC(complex.(rand(3, 2), rand(3,2)))
idx = Array(1:3)
idy = Array(1:2)
@testset "view indexing" begin
Expand All @@ -176,7 +176,7 @@ end
end
@testset "y indexing" begin
mat = PETSc.Mat(ST, 3, 3)
vals = RC( complex(rand(3), rand(3)))
vals = RC( complex.(rand(3), rand(3)))
mat[1, idx] = vals
assemble(mat)
matj = zeros(ST, 3,3)
Expand Down Expand Up @@ -499,7 +499,7 @@ end
PETSc.assemble(mat1)
PETSc.assemble(mat2)
@test ishermitian(mat1)
@test issym(mat2)
@test issymmetric(mat2)

mat3 = mat1.'*mat2
mat3j = mat1j.'*mat2j
Expand Down
2 changes: 1 addition & 1 deletion test/vec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
vec4_j[i] = RC(complex(Float64(-i), Float64(-i)))
end
@testset "testing abs" begin
vec4_j = abs(vec4_j)
vec4_j = abs.(vec4_j)
absv4 = abs(vec4)
abs!(vec4)
if VERSION >= v"0.5.0-dev+0"
Expand Down

0 comments on commit 3d8c46a

Please sign in to comment.