From 569900dc361eff18e47cdb81acd84c8e7a2ce09c Mon Sep 17 00:00:00 2001 From: Hongyang Zhou Date: Sun, 10 Nov 2024 07:57:29 -1000 Subject: [PATCH] Use regular vector but not Mvector --- src/Batsrus.jl | 2 +- src/io.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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