Numpy Utilities (ligo.skymap.util.numpy
)¶
- ligo.skymap.util.numpy.add_newdoc_ufunc(func, doc)[source]¶
Set the docstring for a Numpy ufunc.
The function
numpy._core.umath._add_newdoc_ufunc()
can only change a ufunc’s docstring if it isNULL
. This workaround avoids an exception when the user tries toreload()
this module.Notes
numpy._core.umath._add_newdoc_ufunc()
is not part of Numpy’s public API, but according to upstream developers it is unlikely to go away any time soon.