Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning for np.bool in Y_from_censored function #331

Closed
Ali-RT opened this issue Apr 26, 2023 · 2 comments
Closed

Deprecation warning for np.bool in Y_from_censored function #331

Ali-RT opened this issue Apr 26, 2023 · 2 comments

Comments

@Ali-RT
Copy link

Ali-RT commented Apr 26, 2023

Package Name: ngboost
Package Version: 0.4.1
Operating System: MacOS
Python Version: 3.9

Describe the bug:
We encountered a deprecation warning when using the Y_from_censored function in the NGBoost library. Specifically, the line Y = np.empty(dtype=[("Event", np.bool), ("Time", np.float64)], shape=T.shape[0]) produces the warning: "FutureWarning: In the future np.bool will be defined as the corresponding NumPy scalar."

The error message suggests that np.bool is a deprecated alias for the built-in bool type, and advises using bool instead. This warning may impact the functionality of the library going forward.

To Reproduce:
All that was required was running the python examples/simulations/survival_sim.py, which caused the program to stop halfway when using the current Y_from_censored function in helpers.py. However, with a slight adjustment made to helpers.py, the program was able to run normally.

@ryan-wolbeck ryan-wolbeck linked a pull request Apr 28, 2023 that will close this issue
@jack-mcivor
Copy link
Contributor

This is also addressed in #320

@ryan-wolbeck
Copy link
Collaborator

This should be fixed but let us know if you still have issues

pip install ngboost==0.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants