I’m trying to run the following code from Tim Holy’s blog post to learn about Cartesian indices:

```
function boxcar3(A::AbstractArray)
out = similar(A)
R = CartesianIndices(A)
Ifirst, Ilast = first(R), last(R)
I1 = oneunit(Ifirst) # <------------------------------------
for I in R
n, s = 0, zero(eltype(out))
for J in max(Ifirst, I - I1):min(Ilast, I + I1)
s += A[J]
n += 1
end
out[I] = s/n
end
return out
end
a = zeros(Int, 10, 10); a[5, 5] = 1
boxcar3(a)
```

but I get the following error:

```
ERROR: LoadError: MethodError: no method matching CartesianIndex{2}(::CartesianIndex{2})
Closest candidates are:
CartesianIndex{2}() where N at multidimensional.jl:73
CartesianIndex{2}(::Integer...) where N at multidimensional.jl:69
CartesianIndex{2}(::Tuple{Vararg{Integer,N}}) where N at multidimensional.jl:64
...
Stacktrace:
[1] oneunit(::CartesianIndex{2}) at ./number.jl:320
```