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

Skip to content

Commit e86e325

Browse files
committed
some docstring cleanup on recs_join and align_iterators
svn path=/trunk/matplotlib/; revision=7747
1 parent 2909ee3 commit e86e325

3 files changed

Lines changed: 27 additions & 16 deletions

File tree

lib/matplotlib/cbook.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def read_cache(self):
390390
for url, (fn, x, y) in cache.items():
391391
if not os.path.isabs(fn):
392392
cache[url] = (self.in_cache_dir(fn), x, y)
393-
393+
394394
# If any files are deleted, drop them from the cache
395395
for url, (fn, _, _) in cache.items():
396396
if not os.path.exists(fn):
@@ -525,7 +525,7 @@ def get_sample_data(self, fname, asfileobj=True):
525525
msg = 'file %s not in cache; received %s when trying to retrieve' \
526526
% (fname, error)
527527
raise KeyError(msg)
528-
528+
529529
fname = cached[0]
530530

531531
if asfileobj:
@@ -1627,11 +1627,13 @@ def quad2cubic(q0x, q0y, q1x, q1y, q2x, q2y):
16271627
return mlab.quad2cubic(q0x, q0y, q1x, q1y, q2x, q2y)
16281628

16291629
def align_iterators(func, *iterables):
1630-
"""
1631-
This generator takes a bunch of iterables that are ordered by func
1632-
It sends out ordered tuples (func(row), [rows from all iterators matching func(row)])
1633-
1634-
It is used by mlab.recs_join to join record arrays
1630+
"""
1631+
This generator takes a bunch of iterables that are ordered by func
1632+
It sends out ordered tuples:
1633+
1634+
(func(row), [rows from all iterators matching func(row)])
1635+
1636+
It is used by :func:`matplotlib.mlab.recs_join` to join record arrays
16351637
"""
16361638
class myiter:
16371639
def __init__(self, it):

lib/matplotlib/mlab.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,15 +1884,26 @@ def mapped_r2field(name):
18841884
return newrec
18851885

18861886
def recs_join(key, name, recs,missing=0.):
1887-
"""
1888-
*key* is the column name that acts as a key
1889-
*name* is the name that we want to join
1890-
*missing" is what the missing fields are replaced by
1891-
*recarrays* is a list of record arrays to join
1887+
"""
1888+
Join a sequence of record arrays on key
1889+
1890+
*key*
1891+
is the column name that acts as a key
1892+
1893+
*name*
1894+
is the name that we want to join
1895+
1896+
*missing"
1897+
is what the missing fields are replaced by
1898+
1899+
*recarrays*
1900+
is a list of record arrays to join
18921901
18931902
returns a record array with columns [rowkey, name1, name2, ... namen]
18941903
1895-
>>> r = recs_join("date", "close", recs=[r0, r1], missing=0.)
1904+
Example::
1905+
1906+
r = recs_join("date", "close", recs=[r0, r1], missing=0.)
18961907
18971908
"""
18981909
results = []

make.osx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ freetype: zlib
6161
cd freetype-${FREETYPEVERSION} &&\
6262
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\
6363
export CFLAGS=${CFLAGS_DEPS} &&\
64-
export LDFLAGS=${LDFLAGS_DEPS} &&\
64+
export LDFLAGS=${LDFLAGS_DEPS} &&\python/svn/bison/scripts/
6565
./configure --prefix=${PREFIX} &&\
6666
make -j3 install &&\
6767
cp objs/.libs/libfreetype.a . &&\
@@ -76,8 +76,6 @@ mpl_build:
7676
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\
7777
export CFLAGS=${CFLAGS_DEPS} &&\
7878
export LDFLAGS=${LDFLAGS_DEPS} &&\
79-
export LD_LIBRARY_PATH=${PREFIX}/lib &&\
80-
export DYLD_LIBRARY_PATH=${PREFIX}/lib &&\
8179
python setup.py build
8280

8381
mpl_install:

0 commit comments

Comments
 (0)