Using array-like as a type in napoleon without warning

  numpydoc, python, python-sphinx, sphinx-napoleon

I have a project with some functions documented in the napoleon numpy style. In the spirit of numpyness, I have a bunch of function arguments that are of the class array-like. Here is an example:

def foo(x, y):
    Foo the arguments together to make a bar.

    x : array-like
        This is an argument.
    y : array-like
        I like it, give me another!

    bar : numpy.ndarray
        Works every time

This works just fine, and the type is included in the output without a link:


The problem is that I get a warning on every line of every function that has this:

/.../my_project/ of WARNING: py:class reference target not found: array-like
/.../my_project/ of WARNING: py:class reference target not found: array-like

I am fairly convinced that there is some solution. It appears that PR #7690 addressed this somehow, but I can’t find a meaningful reference "preprocessing" anywhere in the napoleon or broader sphinx documentation.

So how do I get rid of the warning?

Source: Python Questions