There are two features in this pull request, both motivated by launching many instances of PyPopStar through PopSyCLE on a supercomputer. The warnings that PyPopStar produces are clogging up my output files and these commits clear them away.
First, the current implementation does not support a fixed seed of 0. This pull explicitly asks if if seed is None, instead of asking if seed, in order to fix this problem.
Second, the RuntimeWarning: invalid value encountered in greater result = getattr(super(), op)(other) warning will be gone by casting nan values to 0 before asking if the values in the array or greater than 5 or less than 101.
The last error that I want to suppress (RuntimeWarning: invalid value encountered in true_divide slope = (y_hi - y_lo) / (x_hi - x_lo)[:, None]) will be easier to fix once the random seed issue is fixed, so expect that coming later.
There are two features in this pull request, both motivated by launching many instances of PyPopStar through PopSyCLE on a supercomputer. The warnings that PyPopStar produces are clogging up my output files and these commits clear them away.
First, the current implementation does not support a fixed seed of 0. This pull explicitly asks if
if seed is None
, instead of askingif seed
, in order to fix this problem.Second, the
RuntimeWarning: invalid value encountered in greater result = getattr(super(), op)(other)
warning will be gone by casting nan values to 0 before asking if the values in the array or greater than 5 or less than 101.The last error that I want to suppress (
RuntimeWarning: invalid value encountered in true_divide slope = (y_hi - y_lo) / (x_hi - x_lo)[:, None]
) will be easier to fix once the random seed issue is fixed, so expect that coming later.