Repository: invenia/NamedDims.jl (julia)

Issue:
`deleteat!` not defined for NamedDimsVector
```julia
julia> deleteat!(NamedDimsArray{(:a, )}([1, 2, 3.]), 1)
ERROR: MethodError: no method matching deleteat!(::NamedDimsArray{(:a,), Float64, 1, Vector{Float64}}, ::Int64)
Closest candidates are:
  deleteat!(::Vector, ::Integer) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/array.jl:1421
  deleteat!(::Vector, ::Any) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/array.jl:1468
  deleteat!(::BitVector, ::Integer) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/bitarray.jl:949
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[8]:1
```
related to https://github.com/mcabbott/AxisKeys.jl/issues/101

Pull request description:
Closes #193

Patch:
diff --git a/Project.toml b/Project.toml
index c386166..c9fd942 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
 name = "NamedDims"
 uuid = "356022a1-0364-5f58-8944-0da4b18d706f"
 authors = ["Invenia Technical Computing Corporation"]
-version = "0.2.45"
+version = "0.2.46"
 
 [deps]
 AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
diff --git a/src/functions.jl b/src/functions.jl
index 8b618fd..33e5c1d 100644
--- a/src/functions.jl
+++ b/src/functions.jl
@@ -212,3 +212,11 @@ function collect_product(x)
     all_names = tuple_cat(dimnames.(x.iter.iterators)...)
     return NamedDimsArray(data, all_names)
 end
+
+##############################################
+# NamedDimsVector only
+
+function Base.deleteat!(v::NamedDimsVector, inds)
+    deleteat!(parent(v), inds)
+    return v
+end


Test patch:
diff --git a/test/functions.jl b/test/functions.jl
index 5ce8d68..3a3996d 100644
--- a/test/functions.jl
+++ b/test/functions.jl
@@ -296,6 +296,12 @@ using Statistics
         @test isapprox(nda, nda4; atol=2π)
     end
 
+    @testset "deleteat!" begin
+        ndv = NamedDimsArray{(:a,)}([1, 2, 3, 4, 5, 6.0])
+        @test ndv == deleteat!(ndv, 1) == NamedDimsArray{(:a,)}([2, 3, 4, 5, 6.0])
+        @test ndv == deleteat!(ndv, 1:2) == NamedDimsArray{(:a,)}([4, 5, 6.0])
+        @test ndv == deleteat!(ndv, (1, 3)) == NamedDimsArray{(:a,)}([5.0])
+    end
 end  # Base
 
 @testset "Statistics" begin