diff --git a/src/Batsrus.jl b/src/Batsrus.jl index 5abe5ad1..bc704ebc 100644 --- a/src/Batsrus.jl +++ b/src/Batsrus.jl @@ -8,7 +8,7 @@ using Printf, Reexport, Requires using Parsers using Interpolations: cubic_spline_interpolation, BSpline, Linear, scale, interpolate import NaturalNeighbours as NN -using StaticArrays: SVector, @SMatrix, SA, MVector +using StaticArrays: SVector, @SMatrix, SA export BATS, load, readlogdata, readtecdata, showhead, # io diff --git a/src/io.jl b/src/io.jl index be4756e6..35a5ec35 100644 --- a/src/io.jl +++ b/src/io.jl @@ -328,7 +328,7 @@ function getfilesize(fileID::IOStream, lenstr::Int32, ::Val{Real4Bat}) tmp = read(fileID, Int32) nw = read(fileID, Int32) skip(fileID, 2*TAG) - nx = MVector{Int(ndim), Int32}(undef) + nx = Vector{Int32}(undef, ndim) read!(fileID, nx) skip(fileID, 2*TAG) if tmp > 0 @@ -353,7 +353,7 @@ function getfilesize(fileID::IOStream, lenstr::Int32, ::Val{Real8Bat}) tmp = read(fileID, Int32) nw = read(fileID, Int32) skip(fileID, 2*TAG) - nx = MVector{Int(ndim), Int32}(undef) + nx = Vector{Int32}(undef, ndim) read!(fileID, nx) skip(fileID, 2*TAG) if tmp > 0