-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format docstrings automatically (#580)
- Loading branch information
1 parent
4861313
commit f84b722
Showing
168 changed files
with
1,825 additions
and
1,908 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Code for creating performance plots | ||
"""Code for creating performance plots. | ||
.. codeauthor:: David Zwicker <[email protected]> | ||
""" | ||
|
@@ -32,7 +31,7 @@ | |
|
||
|
||
def time_function(func, arg, repeat=3, use_out=False): | ||
"""estimates the computation speed of a function | ||
"""Estimates the computation speed of a function. | ||
Args: | ||
func (callable): The function to test | ||
|
@@ -54,7 +53,7 @@ def time_function(func, arg, repeat=3, use_out=False): | |
|
||
|
||
def get_performance_data(periodic=False): | ||
"""obtain the data used in the performance plot | ||
"""Obtain the data used in the performance plot. | ||
Args: | ||
periodic (bool): The boundary conditions of the underlying grid | ||
|
@@ -90,7 +89,7 @@ def get_performance_data(periodic=False): | |
|
||
|
||
def plot_performance(performance_data, title=None): | ||
"""plot the performance data | ||
"""Plot the performance data. | ||
Args: | ||
performance_data: The data obtained from calling | ||
|
@@ -129,7 +128,7 @@ def plot_performance(performance_data, title=None): | |
|
||
|
||
def main(): | ||
"""run main scripts""" | ||
"""Run main scripts.""" | ||
data = get_performance_data(periodic=False) | ||
plot_performance(data, title="2D Laplacian (reflecting BCs)") | ||
plt.savefig("performance_noflux.pdf", transparent=True) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.