From 05ba09befb378a34109aa0533093fef864b47de1 Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Fri, 17 May 2024 22:21:16 -0400 Subject: [PATCH] Use Type not DataType --- test/mri/exp_xform.jl | 2 +- test/nufft/nufft.jl | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/mri/exp_xform.jl b/test/mri/exp_xform.jl index 90834e7d..68c12cd4 100644 --- a/test/mri/exp_xform.jl +++ b/test/mri/exp_xform.jl @@ -5,7 +5,7 @@ using Test: @test, @test_throws, @inferred # test for given data type -function exp_xform_test( ; T::DataType = ComplexF32) +function exp_xform_test( ; T::Type{<:Complex{<:AbstractFloat}} = ComplexF32) modes = (:element, :row, :column) diff --git a/test/nufft/nufft.jl b/test/nufft/nufft.jl index fd52eaea..fbfb5cc8 100644 --- a/test/nufft/nufft.jl +++ b/test/nufft/nufft.jl @@ -19,7 +19,8 @@ Simple 1D NUFFT tests. """ function nufft_test1( ; M::Int = 30, N::Int = 20, n_shift::Real = 1.7, - T::DataType = Float64, tol::Real = 7e-6, + T::Type{<:Number} = Float64, + tol::Real = 7e-6, ) w = (rand(M) .- 0.5) * 2π @@ -81,7 +82,8 @@ function nufft_test2( ; M::Int = 35, N::Dims = (10,8), n_shift::AbstractVector{<:Real} = [4,3], - T::DataType = Float64, tol::Real = 2e-6, + T::Type{<:Number} = Float64, + tol::Real = 2e-6, ) w = []