Skip to content

Commit 61623ae

Browse files
fix some julia 0.6 deprecations
1 parent 5106caf commit 61623ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/CIFAR10.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ end
1313

1414
function readdata(data::Vector{UInt8})
1515
n = Int(length(data)/3073)
16-
x = Array(Float64, 3072, n)
17-
y = Array(Int, n)
16+
x = Matrix{Float64}(3072, n)
17+
y = Vector{Int}(n)
1818
for i = 1:n
1919
k = (i-1) * 3073 + 1
2020
y[i] = Int(data[k])

src/CIFAR100.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ end
1313

1414
function readdata(data::Vector{UInt8})
1515
n = Int(length(data)/3074)
16-
x = Array(Float64, 3072, n)
17-
y = Array(Int, 2, n)
16+
x = Matrix{Float64}(3072, n)
17+
y = Matrix{Int}(2, n)
1818
for i = 1:n
1919
k = (i-1) * 3074 + 1
2020
y[:,i] = data[k:k+1]

0 commit comments

Comments
 (0)