Closed kekeedme closed 1 year ago
Men sa li di:
(cpspp) tipanverella@blackwell76:~/git/cpspp$ make lint
pylint notebooks
************* Module UsefulMathFunctions.taylorapproximation
notebooks/UsefulMathFunctions/taylorapproximation.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module UsefulMathFunctions.nderivative
notebooks/UsefulMathFunctions/nderivative.py:1:0: C0114: Missing module docstring (missing-module-docstring)
notebooks/UsefulMathFunctions/nderivative.py:1:0: R0801: Similar lines in 2 files
==UsefulMathFunctions.nderivative:[16:28]
==UsefulMathFunctions.taylorapproximation:[16:44]
derivative = 0
# setting up a loop to perform the sum for the nth derivative
for k in range(order + 1):
derivative = derivative + (
(-1) ** (order + k)
* (fact(order) / (fact(k) * fact(order - k)))
* function(argument + k * stepsize)
) / (stepsize**order)
return derivative
def taylorapprox(function, argument, a_value, maxorder, stepsize):
"""This function outputs the taylor approximation
to nth-order of a user-specified function.
It takes:
:param function: the user-specified function
:param argument: the argument at which we evaluate the approximation
usually x-values for 1-D functions, can be a list.
:param a_value: the center around which the user seeks the approximation
:param maxorder: the maximum order of the approximation
:param stepsize: the stepsize used to evaluate the derivatives
Author: Kedy Edme
Date: Jan 20th 2023
""" (duplicate-code)
------------------------------------------------------------------
Your code has been rated at 8.24/10 (previous run: 8.24/10, +0.00)
An patikilye, li di ke fichye ou yo Missing module docstring (missing-module-docstring)
! Ki vle di ke fichye yo pa gen yon docstring
ki endike kisa fichye a ap fe, pa fonksyon ki andedan fichye a.
Mwen mete de placehoder docstring
pou ou lan fichye yo.
Men li poko ka pase make lint
, paske ou gen yon posyon kod lan UsefulMathFunctions.nderivative.py:[19:31]
ki idantik a posyon UsefulMathFunctions.taylorapproximation.py:[20:48]
. Lint
pap ka kouprann poukisa ou bezwen sa a.
O fet problem lan seke ou repete definisyon fonksyon nderivative
lan nan fichye notebooks/UsefulMathFunctions/taylorapproximation.py
.
notebooks/UsefulMathFunctions/nderivative.py
e rele li lan lot fichye a,notebooks/UsefulMathFunctions/nderivative.py
a(cpspp) tipanverella@blackwell76:~/git/cpspp$ make lint
pylint notebooks
************* Module UsefulMathFunctions.nderivative
notebooks/UsefulMathFunctions/nderivative.py:1:0: R0801: Similar lines in 2 files
==UsefulMathFunctions.nderivative:[19:31]
==UsefulMathFunctions.taylorapproximation:[20:48]
derivative = 0
# setting up a loop to perform the sum for the nth derivative
for k in range(order + 1):
derivative = derivative + (
(-1) ** (order + k)
* (fact(order) / (fact(k) * fact(order - k)))
* function(argument + k * stepsize)
) / (stepsize**order)
return derivative
def taylorapprox(function, argument, a_value, maxorder, stepsize):
"""This function outputs the taylor approximation
to nth-order of a user-specified function.
It takes:
:param function: the user-specified function
:param argument: the argument at which we evaluate the approximation
usually x-values for 1-D functions, can be a list.
:param a_value: the center around which the user seeks the approximation
:param maxorder: the maximum order of the approximation
:param stepsize: the stepsize used to evaluate the derivatives
Author: Kedy Edme
Date: Jan 20th 2023
""" (duplicate-code)
------------------------------------------------------------------
Your code has been rated at 9.41/10 (previous run: 9.41/10, +0.00)
make: *** [Makefile:8: lint] Error 8
Pou korije a pati de sa mwen fe yo: Sou laptop pa w la,
git fetch origin
git checkout issue006
git add -A
git commit -m "<komante ki di ki chwa ou fe>"
git push origin
Epi nou ka diskute e fe pull-requests
la ansanm.
I have written docstrings for my functions, and respected the synthax and format that I have read on multiple documentations. However, pylint keeps telling me that I faild the docstring test. Can you please take a look and let me know what I am missing?