Skip to content

Commit

Permalink
REL: 6.0.0 (#104)
Browse files Browse the repository at this point in the history
- Configuring precision causes breaking API changes
- The threading layer optimisation radically improves throughput
  • Loading branch information
skailasa authored Jul 27, 2021
1 parent 4d20e9c commit 74e38f6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion fmm/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"""

__title__ = 'fmm'
__version__ = '5.0.1'
__version__ = '6.0.0'
__description__ = 'An adaptive, kernel-independent, particle FMM implementation Python'
44 changes: 22 additions & 22 deletions utils/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@
import time

def timeit(verbose=False):
"""
Time functions via decoration. Optionally output time to stdout.
"""
Time functions via decoration. Optionally output time to stdout.
Parameters:
-----------
verbose : bool
Parameters:
-----------
verbose : bool
Example Usage:
>>> @timeit(verbose=True)
>>> def foo(*args, **kwargs): pass
"""
def _timeit(f):
@wraps(f)
def wrapper(*args, **kwargs):
if verbose:
start = time.time()
res = f(*args, **kwargs)
runtime = time.time() - start
print(f'{f.__name__!r} in {runtime:.4f} s')
else:
res = f(*args, **kwargs)
return res
Example Usage:
>>> @timeit(verbose=True)
>>> def foo(*args, **kwargs): pass
"""
def _timeit(f):
@wraps(f)
def wrapper(*args, **kwargs):
if verbose:
start = time.time()
res = f(*args, **kwargs)
runtime = time.time() - start
print(f'{f.__name__!r} in {runtime:.4f} s')
else:
res = f(*args, **kwargs)
return res

return wrapper
return _timeit
return wrapper
return _timeit


def seconds_to_minutes(seconds):
Expand Down

0 comments on commit 74e38f6

Please sign in to comment.