mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
The black formatter is no longer beta (#5960)
* The black formatter is no longer beta
* pre-commit autoupdate
* pre-commit autoupdate
* Remove project_euler/problem_145 which is killing our CI tests
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -49,7 +49,7 @@ def gabor_filter_kernel(
|
||||
|
||||
# fill kernel
|
||||
gabor[y, x] = np.exp(
|
||||
-(_x ** 2 + gamma ** 2 * _y ** 2) / (2 * sigma ** 2)
|
||||
-(_x**2 + gamma**2 * _y**2) / (2 * sigma**2)
|
||||
) * np.cos(2 * np.pi * _x / lambd + psi)
|
||||
|
||||
return gabor
|
||||
|
||||
@@ -203,7 +203,7 @@ class IndexCalculation:
|
||||
https://www.indexdatabase.de/db/i-single.php?id=391
|
||||
:return: index
|
||||
"""
|
||||
return self.nir * (self.red / (self.green ** 2))
|
||||
return self.nir * (self.red / (self.green**2))
|
||||
|
||||
def GLI(self):
|
||||
"""
|
||||
@@ -295,7 +295,7 @@ class IndexCalculation:
|
||||
"""
|
||||
return a * (
|
||||
(self.nir - a * self.red - b)
|
||||
/ (a * self.nir + self.red - a * b + X * (1 + a ** 2))
|
||||
/ (a * self.nir + self.red - a * b + X * (1 + a**2))
|
||||
)
|
||||
|
||||
def BWDRVI(self):
|
||||
@@ -363,7 +363,7 @@ class IndexCalculation:
|
||||
https://www.indexdatabase.de/db/i-single.php?id=25
|
||||
:return: index
|
||||
"""
|
||||
n = (2 * (self.nir ** 2 - self.red ** 2) + 1.5 * self.nir + 0.5 * self.red) / (
|
||||
n = (2 * (self.nir**2 - self.red**2) + 1.5 * self.nir + 0.5 * self.red) / (
|
||||
self.nir + self.red + 0.5
|
||||
)
|
||||
return n * (1 - 0.25 * n) - (self.red - 0.125) / (1 - self.red)
|
||||
|
||||
Reference in New Issue
Block a user