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:
Maxim Smolskiy
2024-03-28 21:03:23 +03:00
committed by GitHub
parent efb7463cde
commit f2246ce7fd
8 changed files with 121 additions and 128 deletions

View File

@ -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,