Skip to content

Commit

Permalink
Make assert_timedim_last more generalized
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokazama committed Jul 6, 2020
1 parent a46bd3c commit 33d8660
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TimeAxes"
uuid = "9a9fc9a6-283d-47e9-a2f6-b3a44e559ea3"
authors = ["Zachary P. Christensen <[email protected]>"]
version = "0.3"
version = "0.3.1"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
4 changes: 2 additions & 2 deletions src/timedim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ sampling_rate(x) = 1 / time_step(x)
Throw an error if the `x` has a time dimension that is not the last dimension.
"""
@inline function assert_timedim_last(x::AbstractArray{T,N}) where {T,N}
@inline function assert_timedim_last(x::T) where {T}
if has_timedim(x)
if timedim(x) === N
if timedim(x) === ndims(T)
return nothing
else
error("time dimension is not last")
Expand Down

0 comments on commit 33d8660

Please sign in to comment.