From 0041abe8f32d2b765ed5e113afd6cf2578d70627 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Mon, 4 Nov 2019 15:44:36 +0100 Subject: [PATCH] fix error in variable name in transformation function --- docs/build/html/_modules/function.html | 4 ++-- pylib/function.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/build/html/_modules/function.html b/docs/build/html/_modules/function.html index c9f43dd..1f35b3f 100644 --- a/docs/build/html/_modules/function.html +++ b/docs/build/html/_modules/function.html @@ -82,14 +82,14 @@ # check if f is a function than put it in a list and return only # the function, not the one element list if callable(f): - return function_transformation( + return transformation( [f], scale_vertical=a, scale_horizontal=b, shift_horizontal=c, shift_vertical=d)[0] # otherwise assume list of functions if not f: # if f is empty. End of the recursive fucntion return [] return [lambda x, t: a*f[0](b*(x-c), t)+d] +\ - function_transformation( + transformation( f[1:], scale_vertical=a, scale_horizontal=b, shift_horizontal=c, shift_vertical=d)
[docs]def sine_wave(A=1, k=1, f=1, phi=0, D=0, degree=False): diff --git a/pylib/function.py b/pylib/function.py index 3d224b3..2b330ba 100644 --- a/pylib/function.py +++ b/pylib/function.py @@ -47,14 +47,14 @@ def transformation(f, scale_vertical=1, scale_horizontal=1, # check if f is a function than put it in a list and return only # the function, not the one element list if callable(f): - return function_transformation( + return transformation( [f], scale_vertical=a, scale_horizontal=b, shift_horizontal=c, shift_vertical=d)[0] # otherwise assume list of functions if not f: # if f is empty. End of the recursive fucntion return [] return [lambda x, t: a*f[0](b*(x-c), t)+d] +\ - function_transformation( + transformation( f[1:], scale_vertical=a, scale_horizontal=b, shift_horizontal=c, shift_vertical=d) def sine_wave(A=1, k=1, f=1, phi=0, D=0, degree=False):