# Documenter.jl - Warnings could use advice

**URL:** https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299
**Category:** General Usage
**Created:** [September 29, 2019, 8:26pm UTC](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299 "2019-09-29T20:26:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)
#### Post date: [September 29, 2019, 8:26pm UTC](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299/1 "2019-09-29T20:26:41Z")

</div>

Hey all I need some help understanding how to fix some warnings in my documentation.

I see a lot of these:

```julia

┌ Warning: Replacing docs for `ChemometricsTools.Center :: Tuple{Any}` in module `ChemometricsTools`
└ @ Base.Docs docs/Docs.jl:223

```

Not sure what it means or how I fix it?

Also some of these :

```julia
WARNING: Method definition MakeIntervals(Int64) in module ChemometricsTools at /src/Ensembles.jl:7 overwritten at

```

Which comes from methods which have different input types

```julia
"""
    MakeIntervals( columns::Int, intervalsize::Int = 20 )

Returns an 1-Array of intervals from the range: 1 - `columns` of size `intervalsize`.
"""
function MakeIntervals( columns::Int, intervalsize::Int = 20 )
    ...
end

"""
    MakeIntervals( columns::Int, intervalsize::Union{Array, Tuple} = [20, 50, 100] )

Creates an Dictionary whose key is the interval size and values are an array of intervals from the range: 1 - `columns` of size `intervalsize`.
"""
function MakeIntervals( columns::Int, intervalsizes::Union{Array, Tuple} = [20, 50, 100] )
...
end

```

Are these functions not legal?

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [September 29, 2019, 9:39pm UTC](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299/2 "2019-09-29T21:39:30Z")

</div>

Documenter is not responsible for either of the warnings.  
The problem is that you overwrite a method, which then overrides the docs. In particular, the `MakeIntervals(::Int)` method is overwritten here.

---

<div class="post-metadata">

### Author: ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)
#### Post date: [September 29, 2019, 9:49pm UTC](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299/3 "2019-09-29T21:49:09Z")

</div>

I am confused - can you elaborate a bit?

Can I not have functions of the same name with different input arguments/types?

My center function is confusing me too… Nothing overwrites it? Or is it because I documented a constructor function rather then the struct?

Here’s all references to Center in my package.

```julia
struct Center{B} <: Transform
    Mean::B
    invertible::Bool
end

"""
    Center(Z)

Acquires the mean of each column in `Z` provided and returns a transform that will subtract those column means from any future data.
"""
Center(Z) = Center( StatsBase.mean(Z, dims = 1), true )

"""
    (T::Center)(Z; inverse = false)

Centers data in array `Z` column-wise according to learned mean centers in Center object `T`.
"""
(T::Center)(Z; inverse = false) = (inverse) ? (Z .+ T.Mean) : (Z .- T.Mean)

```

---

<div class="post-metadata">

### Author: ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)
#### Post date: [September 29, 2019, 10:27pm UTC](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299/4 "2019-09-29T22:27:00Z")

</div>

> [@anon92994695](#):
>
> Can I not have functions of the same name with different input arguments/types?

Both those `MakeIntervals` methods have an optional second argument, so they both define what to do in the case of a single `Int` argument, and so the second one overwrites the first one for this case.

So yes, you can have functions of the same name with input arguments of different types, but in this case you actually define it for the same type of argument twice.

---

<div class="post-metadata">

### Author: ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)
#### Post date: [September 29, 2019, 10:29pm UTC](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299/5 "2019-09-29T22:29:20Z")

</div>

Wow… I must be really tired. Appreciate that one.

I’ll have to look over the Center thing later to see what I’m doing.

---

<div class="post-metadata">

### Author: ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)
#### Post date: [September 29, 2019, 10:49pm UTC](https://discourse.julialang.org/t/documenter-jl-warnings-could-use-advice/29299/6 "2019-09-29T22:49:11Z")

</div>

Okay interesting. Fixing that error fixed all the others? Great, I’ll take it. Thank you
