You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current definition of Echotime, one can't pass in a Tuple with various element types, so, e.g., (0, 2.3) will throw an error. This is because of the <: in NTuple{N,<:T}; removing <: would allow for (0, 2.3).
Not sure if you intended to force all the types of the Tuple elements to be the same, but if not, it should be an easy change.
The text was updated successfully, but these errors were encountered:
My intension is to ensure that units are handled correctly:
using Unitful: ms
et = (0, 2.3ms)
et isa NTuple{2,<:Number} # false, as intended
et isa NTuple{2,Number} # true, which will cause downstream problems with incompatible units
I use oneunit(Te) in a few places...
I am open to other suggestions, but I don't want to have a package dependence on Unitful.
I just realized that [0, 2ms] isa Vector{<:Number} holds, so I am enforcing it more strongly for tuples than for vectors. Hmm.
With the current definition of
Echotime
, one can't pass in aTuple
with various element types, so, e.g.,(0, 2.3)
will throw an error. This is because of the<:
inNTuple{N,<:T}
; removing<:
would allow for(0, 2.3)
.Not sure if you intended to force all the types of the
Tuple
elements to be the same, but if not, it should be an easy change.The text was updated successfully, but these errors were encountered: