Numpy Utilities (ligo.skymap.util.numpy)

ligo.skymap.util.numpy.add_newdoc_ufunc(func, doc)[source] [edit on github]

The function np.lib.add_newdoc_ufunc can only change a ufunc’s docstring if it is NULL. This workaround avoids an exception when the user tries to reload() this module.

ligo.skymap.util.numpy.require_contiguous_aligned(func)[source] [edit on github]

Wrap a Numpy ufunc to guarantee that all of its inputs are C-contiguous arrays.