Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Misc. docstring cleanups. #14441

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

Merged
merged 1 commit into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 8 additions & 4 deletions examples/animation/random_walk.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@

def gen_rand_line(length, dims=2):
"""
Create a line using a random walk algorithm

length is the number of points for the line.
dims is the number of dimensions the line has.
Create a line using a random walk algorithm.

Parameters
----------
length : int
The number of points of the line.
dims : int
The number of dimensions of the line.
"""
line_data = np.empty((dims, length))
line_data[:, 0] = np.random.rand(dims)
Expand Down
2 changes: 1 addition & 1 deletion examples/animation/strip_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def update(self, y):


def emitter(p=0.03):
'return a random value with probability p, else 0'
"""Return a random value in [0, 1) with probability p, else 0."""
while True:
v = np.random.rand(1)
if v > p:
Expand Down
4 changes: 1 addition & 3 deletions examples/axisartist/demo_axis_direction.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@


def setup_axes(fig, rect):
"""
polar projection, but in a rectangular box.
"""
"""Polar projection, but in a rectangular box."""

# see demo_curvelinear_grid.py for details
tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()
Expand Down
4 changes: 1 addition & 3 deletions examples/axisartist/demo_curvelinear_grid2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@


def curvelinear_test1(fig):
"""
grid for custom transform.
"""
"""Grid for custom transform."""

def tr(x, y):
sgn = np.sign(x)
Expand Down
4 changes: 1 addition & 3 deletions examples/axisartist/simple_axis_pad.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@


def setup_axes(fig, rect):
"""
polar projection, but in a rectangular box.
"""
"""Polar projection, but in a rectangular box."""

# see demo_curvelinear_grid.py for details
tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()
Expand Down
6 changes: 3 additions & 3 deletions examples/event_handling/pick_event_demo2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Pick Event Demo2
================

compute the mean and standard deviation (stddev) of 100 data sets and plot
mean vs stddev. When you click on one of the mu, sigma points, plot the raw
data from the dataset that generated the mean and stddev.
Compute the mean (mu) and standard deviation (sigma) of 100 data sets and plot
mu vs. sigma. When you click on one of the (mu, sigma) points, plot the raw
data from the dataset that generated this point.
"""
import numpy as np
import matplotlib.pyplot as plt
Expand Down