diff --git a/dppy/exact_sampling.py b/dppy/exact_sampling.py index f65868e..7adc95d 100644 --- a/dppy/exact_sampling.py +++ b/dppy/exact_sampling.py @@ -1282,7 +1282,7 @@ def k_dpp_eig_vecs_selector(eig_vals, eig_vecs, size, N, k = eig_vecs.shape[0], size # as in np.linalg.matrix_rank - tol = np.max(eig_vals) * N * np.finfo(np.float).eps + tol = np.max(eig_vals) * N * np.finfo(float).eps rank = np.count_nonzero(eig_vals > tol) if k > rank: raise ValueError('size k={} > rank={}'.format(k, rank)) diff --git a/dppy/intermediate_sampling.py b/dppy/intermediate_sampling.py index b1c99dd..7844c50 100644 --- a/dppy/intermediate_sampling.py +++ b/dppy/intermediate_sampling.py @@ -268,7 +268,7 @@ def temp_func_with_root_in_desired_expected_size(x): alpha_star, opt_result = brentq( temp_func_with_root_in_desired_expected_size, - a=10.0 * np.finfo(np.float).eps, + a=10.0 * np.finfo(float).eps, b=1.0, full_output=True) @@ -619,7 +619,7 @@ def temp_func_with_root_in_desired_expected_size(x): return np.sum(1.0 - 1.0 / (x * eigvals_L_hat + 1.0)) - desired_expected_size alpha_hat, opt_result = brentq(temp_func_with_root_in_desired_expected_size, - a=10.0 * np.finfo(np.float).eps, + a=10.0 * np.finfo(float).eps, b=4.0, full_output=True) diff --git a/setup.py b/setup.py index b784666..4648ed9 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='0.3.2', + version='0.3.3', description='DPPy is a Python library for exact and approximate sampling of Determinantal Point Processes.', long_description=long_description,