properly initialize MNIST array for 1.0

This commit is contained in:
Dominique Luna 2018-08-16 18:17:43 -04:00
parent b460439484
commit 517dc58ce0

View File

@ -49,7 +49,7 @@ function labelheader(io::IO)
end end
function rawimage(io::IO) function rawimage(io::IO)
img = Array{Gray}(NCOLS, NROWS) img = Array{Gray}(undef, NCOLS, NROWS)
for i in 1:NCOLS, j in 1:NROWS for i in 1:NCOLS, j in 1:NROWS
img[i, j] = reinterpret(Colors.N0f8, read(io, UInt8)) img[i, j] = reinterpret(Colors.N0f8, read(io, UInt8))
end end