You should write `~astropy.nddata.NDData` ... the Astropy Sphinx machinery has been changed recently so that references should point to the place the user is supposed to import from, not the actual module where it's implemented.