Skip to content

Commit

Permalink
- select_timedim -> select_time
Browse files Browse the repository at this point in the history
- also updates internal code
  • Loading branch information
Tokazama committed Jul 29, 2020
1 parent 78211b4 commit 2dc5196
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions 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.1"
version = "0.4"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand All @@ -12,7 +12,7 @@ NamedDims = "356022a1-0364-5f58-8944-0da4b18d706f"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
AxisIndices = "0.5"
AxisIndices = "0.6"
AbstractFFTs = "0.5"
FFTW = "1"
IntervalSets = "0.4, 0.5"
Expand Down
2 changes: 1 addition & 1 deletion src/TimeAxes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export
time_end,
onset,
duration,
select_timedim,
select_time,
sampling_rate,
assert_timedim_last,
lag,
Expand Down
6 changes: 2 additions & 4 deletions src/utils.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

@inline function _noshift_axis(axis::A, inds::I) where {A,I}
if is_indices_axis(axis)
return to_axis(axis, nothing, inds, false, AxisIndices.Interface.Staticness(axis))
return to_axis(axis, nothing, inds, false)
else
return to_axis(axis, keys(axis), inds, false, AxisIndices.Interface.Staticness(axis))
return to_axis(axis, keys(axis), inds, false)
end
end

Expand All @@ -19,15 +19,13 @@ end
nothing,
parent_index,
false,
AxisIndices.Interface.Staticness(axis)
)
else
return to_axis(
axis,
@inbounds(keys(axis)[indexing_index]),
parent_index,
false,
AxisIndices.Interface.Staticness(axis)
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ nia = NamedAxisArray(reshape(1:6, 2, 3), x = 2:3, time = 3.0:5.0)
@test @inferred(ntime(nia)) == 3
@test @inferred(time_indices(nia)) == 1:3
@test @inferred(timedim(nia)) == 2
@test @inferred(select_timedim(nia, 2)) == selectdim(parent(parent(nia)), 2, 2)
@test @inferred(select_time(nia, 2)) == selectdim(parent(parent(nia)), 2, 2)
@test @inferred(time_axis_type(nia)) <: Float64
@test @inferred(time_end(nia)) == 5.0
@test @inferred(onset(nia)) == 3.0
Expand Down

2 comments on commit 2dc5196

@Tokazama
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

  • select_timedim -> select_time
  • Internal fixes following updates to dependencies

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/18685

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.0 -m "<description of version>" 2dc519631faae995b1a849b768218cd39724f5dc
git push origin v0.4.0

Please sign in to comment.