Skip to content

[PYTEST WARNING] Decision tree #7302

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

Closed
CaedenPH opened this issue Oct 16, 2022 · 0 comments · Fixed by #7394
Closed

[PYTEST WARNING] Decision tree #7302

CaedenPH opened this issue Oct 16, 2022 · 0 comments · Fixed by #7394
Labels
enhancement This PR modified some existing files

Comments

@CaedenPH
Copy link
Contributor

Feature description

@nbrgr @hrishi84 @cclauss Please could you resolve this warning

machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
  <doctest machine_learning.decision_tree.DecisionTree.mean_squared_error[2]>:1: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
  /home/runner/work/Python/Python/machine_learning/decision_tree.py:148: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    squared_error_sum = np.float(0)

machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
  /home/runner/work/Python/Python/machine_learning/decision_tree.py:152: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    return np.float(squared_error_sum / labels.size)

machine_learning/decision_tree.py::machine_learning.decision_tree.DecisionTree.mean_squared_error
  <doctest machine_learning.decision_tree.DecisionTree.mean_squared_error[5]>:1: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

origin: #7211

@CaedenPH CaedenPH added the enhancement This PR modified some existing files label Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This PR modified some existing files
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant