mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Enable ruff ICN001 rule (#11329)
* Enable ruff ICN001 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -3,7 +3,7 @@ Implementation of gradient descent algorithm for minimizing cost of a linear hyp
|
||||
function.
|
||||
"""
|
||||
|
||||
import numpy
|
||||
import numpy as np
|
||||
|
||||
# List of input, output pairs
|
||||
train_data = (
|
||||
@ -116,7 +116,7 @@ def run_gradient_descent():
|
||||
temp_parameter_vector[i] = (
|
||||
parameter_vector[i] - LEARNING_RATE * cost_derivative
|
||||
)
|
||||
if numpy.allclose(
|
||||
if np.allclose(
|
||||
parameter_vector,
|
||||
temp_parameter_vector,
|
||||
atol=absolute_error_limit,
|
||||
|
Reference in New Issue
Block a user