Closed qumaciel closed 3 months ago
Describe the bug np.float was a deprecated alias for the builtin float. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
np.float
float
To Reproduce Steps to reproduce the behavior:
import numpy as np from dppy.finite_dpps import FiniteDPP rng = np.random.RandomState(1) r, N = 5, 10 # Random feature vectors Phi = rng.randn(r, N) DPP = FiniteDPP('likelihood', **{'L': Phi.T.dot(Phi)}) k = 4 for _ in range(10): DPP.sample_exact_k_dpp(size=k, random_state=rng) print(DPP.list_of_samples)
Expected behavior DPP.sample_exact_k_dpp(size=k, random_state=rng) to work.
Screenshots There is a call to np.float in dppy/exact_sampling.py and two calls in dppy/intermediate_sampling.py
dppy/exact_sampling.py
dppy/intermediate_sampling.py
Thanks @qumaciel for raising the issue and @leejamesss for the PR! Please note that a v1-dev branch had been initialized ; the proposed suggestion will also be incorporated.
Describe the bug
np.float
was a deprecated alias for the builtinfloat
. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsTo Reproduce Steps to reproduce the behavior:
Expected behavior DPP.sample_exact_k_dpp(size=k, random_state=rng) to work.
Screenshots There is a call to
np.float
indppy/exact_sampling.py
and two calls indppy/intermediate_sampling.py