JuliaGPU/ArrayFire.jl

Convert error

wenquan opened this issue · 0 comments

When I am trying to run the following code in an function

 ObjReconTmp[Nxysub+1:Nxy-Nxysub,Nxysub+1:Nxy-Nxysub] = resize(S_B,Nxy-Nxysub*2,Nxy-Nxysub*2,AF_INTERP_BILINEAR) 

It throws me the error

ERROR: LoadError: MethodError: Cannot convert an object of type ArrayFire.AFArray{Float64,2} to an object of type ArrayFire.AFArray{Float32,N} where N
This may have arisen from a call to the constructor ArrayFire.AFArray{Float32,N} where N(...), since type constructors fall back to convert methods.

Any idea how to fix this problem? Note that S_B and ObjReconTmp have exactly the same size and the same type.