Hi,

This piece of code (Win64, v0.4)

    add_off = 1;
    range = 254. / (G.hdr[6] - G.hdr[5])
    img = zeros(UInt8,  G.n_rows, G.n_columns)
    for (k = 1:G.n_columns * G.n_rows)
        img[k] = UInt8(((G.z[k] - G.hdr[5]) * range) + add_off)
    end


 errors with (just that)

ERROR: InexactError()

I cannot reproduce this in the REPL (actually I can but only in my local 
build with MinGW).
However, during my several attempts to understand the problem I saw a 
deprecation warning saying something like 
using  "convert(x::FloatingPoint, ...) is deprecated, use round(UInt8, x)"
and indeed if I replace the command in the loop by

img[k] = round(UInt8, (((G.z[k] - G.hdr[5]) * range) + add_off))

than things work. So this is not exactly a deprecation but a compatibility 
break.

BTW, I really don't understand these deprecations (plus all other ints vs 
Ints). They look contra-natura to me, are a pain if one tries to maintain 
0.3 compatibility and surely won't help the transition from other 
languages. 

Reply via email to