Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace print with logging #133

Merged
merged 34 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c879769
Log instead of print
rparini Jan 4, 2020
2a7b2d4
Add progress bar
rparini Jan 4, 2020
46a7435
Removed unexpected verbose
rparini Jan 4, 2020
44cba9e
Black
rparini Mar 7, 2022
bb090e5
Revert "Black"
rparini Mar 9, 2022
0c1a2c0
run black
rparini Apr 8, 2022
44dd859
merge
rparini Apr 8, 2022
588c059
Merge branch 'master' of https://github.com/RParini/cxroots into feat…
rparini Apr 8, 2022
70e6fd0
Fix docstring
rparini Apr 8, 2022
41f57e3
Fix find_roots verbose
rparini Apr 8, 2022
7e1d2fc
Fix multiplicity tests
rparini Apr 8, 2022
a2225c0
Replace tqdm
rparini Apr 11, 2022
bdc8860
Replace progress with rich
rparini Apr 15, 2022
51c6274
fix rich version
rparini Apr 15, 2022
fa22553
Update docs
rparini Apr 24, 2022
4ac25ca
Unpin rich for python2
rparini Apr 26, 2022
7458cef
Merge remote-tracking branch 'origin/master' into feat/logging
rparini May 3, 2022
a9355eb
Merge branch 'master' into feat/logging
rparini May 3, 2022
1d6a0e9
Merge branch 'master' into feat/logging
rparini Jul 10, 2022
937c38d
Changelog
rparini Jul 10, 2022
d866292
Remove docs changes
rparini Jul 11, 2022
fb3bcb7
Changelog
rparini Jul 11, 2022
f014c1f
Changelog
rparini Jul 11, 2022
5392a82
Spelling
rparini Jul 11, 2022
ef63544
Add rich to changelog
rparini Jul 11, 2022
575c96a
Remove more verbose
rparini Jul 11, 2022
19c528f
Fix whitespace
rparini Jul 11, 2022
5a254fe
Update .gitignore
rparini Jul 11, 2022
97cadb2
Update changelog.md
rparini Jul 11, 2022
6afb5af
Update changelog.md
rparini Jul 11, 2022
84b9c2b
Update docs_src/docex_logging.py
rparini Jul 11, 2022
ec1efd2
Update docs_src/logging.rst
rparini Jul 11, 2022
c8540ba
Whitespace
rparini Jul 11, 2022
cefa07b
Merge branch 'feat/logging' of https://github.com/rparini/cxroots int…
rparini Jul 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove more verbose
  • Loading branch information
rparini committed Jul 11, 2022
commit 575c96a0984b71263db58b91a47a220a4b867037
6 changes: 2 additions & 4 deletions cxroots/Derivative.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


@np.vectorize
def CxDerivative(f, z0, n=1, contour=None, absIntegrationTol=1e-10, verbose=False):
def CxDerivative(f, z0, n=1, contour=None, absIntegrationTol=1e-10):
r"""
Compute the derivaive of an analytic function using Cauchy's
Integral Formula for Derivatives.
Expand All @@ -31,8 +31,6 @@ def CxDerivative(f, z0, n=1, contour=None, absIntegrationTol=1e-10, verbose=Fals
By default the contour is the circle |z-z_0|=1e-3.
absIntegrationTol : float, optional
The absolute tolerance required of the integration routine.
verbose : bool, optional
If True runtime information will be printed. False be default.

Returns
-------
Expand All @@ -47,7 +45,7 @@ def CxDerivative(f, z0, n=1, contour=None, absIntegrationTol=1e-10, verbose=Fals
C = lambda z0: contour

integrand = lambda z: f(z) / (z - z0) ** (n + 1)
integral = C(z0).integrate(integrand, absTol=absIntegrationTol, verbose=verbose)
integral = C(z0).integrate(integrand, absTol=absIntegrationTol)
return integral * math.factorial(n) / (2j * pi)


Expand Down
7 changes: 1 addition & 6 deletions cxroots/Paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ def show(self, saveFile=None, **plotKwargs):
else:
plt.show()

def integrate(
self, f, absTol=0, relTol=1e-12, divMax=15, intMethod="quad", verbose=False
):
def integrate(self, f, absTol=0, relTol=1e-12, divMax=15, intMethod="quad"):
"""
Integrate the function f along the path. The value of the
integral is cached and will be reused if the method is called
Expand All @@ -172,8 +170,6 @@ def integrate(
If 'quad' then :func:`scipy.integrate.quad` is used to
compute the integral. If 'romb' then Romberg integraion,
using :func:`scipy.integrate.romberg`, is used instead.
verbose : bool, optional
Passed as the `show` argument of :func:`scipy.integrate.romberg`.

Returns
-------
Expand Down Expand Up @@ -206,7 +202,6 @@ def integrate(
tol=absTol,
rtol=relTol,
divmax=divMax,
show=verbose,
)
elif intMethod == "quad":
integrand_real = lambda t: np.real(integrand(t))
Expand Down