Fix mypy errors for arithmetic analysis algorithms (#4053)

This commit is contained in:
Dhruv Manilawala
2020-12-23 15:22:43 +05:30
committed by GitHub
parent 2ff2ccbeec
commit ad5108d6a4
5 changed files with 90 additions and 60 deletions

View File

@ -1,10 +1,11 @@
# https://www.geeksforgeeks.org/newton-forward-backward-interpolation/
import math
from typing import List
# for calculating u value
def ucal(u, p):
def ucal(u: float, p: int) -> float:
"""
>>> ucal(1, 2)
0
@ -19,9 +20,9 @@ def ucal(u, p):
return temp
def main():
def main() -> None:
n = int(input("enter the numbers of values: "))
y = []
y: List[List[float]] = []
for i in range(n):
y.append([])
for i in range(n):