Skip to content

Commit fb70afe

Browse files
author
Joe Petviashvili
committed
sum can change type
1 parent 902c409 commit fb70afe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wrap.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export upper, var_all, var_all_weighted, wrap, write_array, ycbcr2rgb
4343
function sum(_in::AFArray{T,N},dim::Integer) where {T,N}
4444
out = RefValue{af_array}(0)
4545
_error(ccall((:af_sum,af_lib),af_err,(Ptr{af_array},af_array,Cint),out,_in.arr,Cint(dim - 1)))
46-
AFArray{T,N}(out[])
46+
AFArray!(out[])
4747
end
4848

4949
function sum_nan(_in::AFArray{T,N},dim::Integer,nanval::Real) where {T,N}

0 commit comments

Comments
 (0)