Skip to content

Commit 2dc5196

Browse files
committed
- select_timedim -> select_time
- also updates internal code
1 parent 78211b4 commit 2dc5196

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "TimeAxes"
22
uuid = "9a9fc9a6-283d-47e9-a2f6-b3a44e559ea3"
33
authors = ["Zachary P. Christensen <[email protected]>"]
4-
version = "0.3.1"
4+
version = "0.4"
55

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

1414
[compat]
15-
AxisIndices = "0.5"
15+
AxisIndices = "0.6"
1616
AbstractFFTs = "0.5"
1717
FFTW = "1"
1818
IntervalSets = "0.4, 0.5"

src/TimeAxes.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export
3232
time_end,
3333
onset,
3434
duration,
35-
select_timedim,
35+
select_time,
3636
sampling_rate,
3737
assert_timedim_last,
3838
lag,

src/utils.jl

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
@inline function _noshift_axis(axis::A, inds::I) where {A,I}
33
if is_indices_axis(axis)
4-
return to_axis(axis, nothing, inds, false, AxisIndices.Interface.Staticness(axis))
4+
return to_axis(axis, nothing, inds, false)
55
else
6-
return to_axis(axis, keys(axis), inds, false, AxisIndices.Interface.Staticness(axis))
6+
return to_axis(axis, keys(axis), inds, false)
77
end
88
end
99

@@ -19,15 +19,13 @@ end
1919
nothing,
2020
parent_index,
2121
false,
22-
AxisIndices.Interface.Staticness(axis)
2322
)
2423
else
2524
return to_axis(
2625
axis,
2726
@inbounds(keys(axis)[indexing_index]),
2827
parent_index,
2928
false,
30-
AxisIndices.Interface.Staticness(axis)
3129
)
3230
end
3331
end

test/runtests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ nia = NamedAxisArray(reshape(1:6, 2, 3), x = 2:3, time = 3.0:5.0)
1616
@test @inferred(ntime(nia)) == 3
1717
@test @inferred(time_indices(nia)) == 1:3
1818
@test @inferred(timedim(nia)) == 2
19-
@test @inferred(select_timedim(nia, 2)) == selectdim(parent(parent(nia)), 2, 2)
19+
@test @inferred(select_time(nia, 2)) == selectdim(parent(parent(nia)), 2, 2)
2020
@test @inferred(time_axis_type(nia)) <: Float64
2121
@test @inferred(time_end(nia)) == 5.0
2222
@test @inferred(onset(nia)) == 3.0

0 commit comments

Comments
 (0)