improved prime numbers implementation (#1606)

* improved prime numbers implementation

* fixup! Format Python code with psf/black push

* fix type hint

* fixup! Format Python code with psf/black push

* fix doctests

* updating DIRECTORY.md

* added prime tests with negative numbers

* using for instead filter

* updating DIRECTORY.md

* Remove unused typing.List

* Remove tab indentation

* print("Sorted order is:", " ".join(a))
This commit is contained in:
Níkolas Vargas
2019-12-07 02:39:08 -03:00
committed by Christian Clauss
parent ccc1ff2ce8
commit 938dd0bbb5
5 changed files with 41 additions and 27 deletions

View File

@ -176,10 +176,10 @@ class IndexCalculation:
def ARVI2(self):
"""
Atmospherically Resistant Vegetation Index 2
https://www.indexdatabase.de/db/i-single.php?id=396
:return: index
0.18+1.17*(self.nirself.red)/(self.nir+self.red)
Atmospherically Resistant Vegetation Index 2
https://www.indexdatabase.de/db/i-single.php?id=396
:return: index
0.18+1.17*(self.nirself.red)/(self.nir+self.red)
"""
return -0.18 + (1.17 * ((self.nir - self.red) / (self.nir + self.red)))