Skip to content
This repository was archived by the owner on Sep 28, 2024. It is now read-only.

Commit 9c4a5ac

Browse files
committed
revise preprocess
1 parent c394788 commit 9c4a5ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/preprocess.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ function get_data(; n=1000, Δsamples=2^3, grid_size=div(2^13, Δsamples))
2525
y_data = collect(read(file, "u")[1:n, 1:Δsamples:end]')
2626
close(file)
2727

28-
x_loc_data = Array{Float32, 3}(undef, grid_size, 2, n)
29-
x_loc_data[:, 1, :] .= reshape(repeat(LinRange(0, 1, grid_size), n), (grid_size, n))
30-
x_loc_data[:, 2, :] .= x_data
28+
x_loc_data = Array{Float32, 3}(undef, 2, grid_size, n)
29+
x_loc_data[1, :, :] .= reshape(repeat(LinRange(0, 1, grid_size), n), (grid_size, n))
30+
x_loc_data[2, :, :] .= x_data
3131

3232
return x_loc_data, y_data
3333
end

test/preprocess.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@testset "get data" begin
22
xs, ys = get_data()
33

4-
@test size(xs) == (1024, 2, 1000)
4+
@test size(xs) == (2, 1024, 1000)
55
@test size(ys) == (1024, 1000)
66
end

0 commit comments

Comments
 (0)