Skip to content

Commit 8ddb0ce

Browse files
committed
STY: Giant whitespace cleanup.
Now is as good a time as any with open PR's at a low.
1 parent 13b0b27 commit 8ddb0ce

File tree

153 files changed

+1464
-1545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+1464
-1545
lines changed

BENTO_BUILD.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ No-frill version:
33
* Clone bento::
44

55
git clone git://github.com/cournape/Bento.git bento-git
6-
6+
77
* Bootstrap bento::
88

99
cd bento-git && python bootstrap.py

DEV_README.txt

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
Thank you for your willingness to help make NumPy the best array system
22
available.
33

4-
We have a few simple rules:
4+
We have a few simple rules:
55

66
* try hard to keep the Git repository in a buildable state and to not
77
indiscriminately muck with what others have contributed.
88

9-
* Simple changes (including bug fixes) and obvious improvements are
10-
always welcome. Changes that fundamentally change behavior need
11-
discussion on [email protected] before anything is
9+
* Simple changes (including bug fixes) and obvious improvements are
10+
always welcome. Changes that fundamentally change behavior need
11+
discussion on [email protected] before anything is
1212
done.
1313

1414
* Please add meaningful comments when you check changes in. These
15-
comments form the basis of the change-log.
15+
comments form the basis of the change-log.
1616

1717
* Add unit tests to exercise new code, and regression tests
1818
whenever you fix a bug.
19-

README.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
NumPy is the fundamental package needed for scientific computing with Python.
1+
NumPy is the fundamental package needed for scientific computing with Python.
22
This package contains:
33

44
* a powerful N-dimensional array object
55
* sophisticated (broadcasting) functions
66
* tools for integrating C/C++ and Fortran code
7-
* useful linear algebra, Fourier transform, and random number capabilities.
7+
* useful linear algebra, Fourier transform, and random number capabilities.
88

99
It derives from the old Numeric code base and can be used as a replacement for Numeric. It also adds the features introduced by numarray and can be used to replace numarray.
1010

doc/CAPI.rst.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ of the API) that will need to be changed:
1515

1616
* If you used any of the function pointers in the ``PyArray_Descr``
1717
structure you will have to modify your usage of those. First,
18-
the pointers are all under the member named ``f``. So ``descr->cast``
18+
the pointers are all under the member named ``f``. So ``descr->cast``
1919
is now ``descr->f->cast``. In addition, the
2020
casting functions have eliminated the strides argument (use
2121
``PyArray_CastTo`` if you need strided casting). All functions have
@@ -238,7 +238,7 @@ segfaults may result.
238238
There are 6 (binary) flags that describe the memory area used by the
239239
data buffer. These constants are defined in ``arrayobject.h`` and
240240
determine the bit-position of the flag. Python exposes a nice attribute-
241-
based interface as well as a dictionary-like interface for getting
241+
based interface as well as a dictionary-like interface for getting
242242
(and, if appropriate, setting) these flags.
243243

244244
Memory areas of all kinds can be pointed to by an ndarray, necessitating
@@ -254,7 +254,7 @@ PyArray_FromAny function.
254254
``NPY_FORTRAN``
255255
True if the array is (Fortran-style) contiguous in memory.
256256

257-
Notice that contiguous 1-d arrays are always both ``NPY_FORTRAN`` contiguous
257+
Notice that contiguous 1-d arrays are always both ``NPY_FORTRAN`` contiguous
258258
and C contiguous. Both of these flags can be checked and are convenience
259259
flags only as whether or not an array is ``NPY_CONTIGUOUS`` or ``NPY_FORTRAN``
260260
can be determined by the ``strides``, ``dimensions``, and ``itemsize``

doc/DISTUTILS.rst.txt

+22-22
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ Requirements for SciPy packages
2929

3030
SciPy consists of Python packages, called SciPy packages, that are
3131
available to Python users via the ``scipy`` namespace. Each SciPy package
32-
may contain other SciPy packages. And so on. Therefore, the SciPy
33-
directory tree is a tree of packages with arbitrary depth and width.
32+
may contain other SciPy packages. And so on. Therefore, the SciPy
33+
directory tree is a tree of packages with arbitrary depth and width.
3434
Any SciPy package may depend on NumPy packages but the dependence on other
3535
SciPy packages should be kept minimal or zero.
3636

@@ -46,12 +46,12 @@ Their contents are described below.
4646
The ``setup.py`` file
4747
'''''''''''''''''''''
4848

49-
In order to add a Python package to SciPy, its build script (``setup.py``)
50-
must meet certain requirements. The most important requirement is that the
51-
package define a ``configuration(parent_package='',top_path=None)`` function
52-
which returns a dictionary suitable for passing to
53-
``numpy.distutils.core.setup(..)``. To simplify the construction of
54-
this dictionary, ``numpy.distutils.misc_util`` provides the
49+
In order to add a Python package to SciPy, its build script (``setup.py``)
50+
must meet certain requirements. The most important requirement is that the
51+
package define a ``configuration(parent_package='',top_path=None)`` function
52+
which returns a dictionary suitable for passing to
53+
``numpy.distutils.core.setup(..)``. To simplify the construction of
54+
this dictionary, ``numpy.distutils.misc_util`` provides the
5555
``Configuration`` class, described below.
5656

5757
SciPy pure Python package example
@@ -72,13 +72,13 @@ Below is an example of a minimal ``setup.py`` file for a pure SciPy package::
7272

7373
The arguments of the ``configuration`` function specifiy the name of
7474
parent SciPy package (``parent_package``) and the directory location
75-
of the main ``setup.py`` script (``top_path``). These arguments,
75+
of the main ``setup.py`` script (``top_path``). These arguments,
7676
along with the name of the current package, should be passed to the
7777
``Configuration`` constructor.
7878

7979
The ``Configuration`` constructor has a fourth optional argument,
8080
``package_path``, that can be used when package files are located in
81-
a different location than the directory of the ``setup.py`` file.
81+
a different location than the directory of the ``setup.py`` file.
8282

8383
Remaining ``Configuration`` arguments are all keyword arguments that will
8484
be used to initialize attributes of ``Configuration``
@@ -159,12 +159,12 @@ in writing setup scripts:
159159
sun.dat
160160
bar/
161161
car.dat
162-
can.dat
162+
can.dat
163163

164164
Path to data files can be a function taking no arguments and
165165
returning path(s) to data files -- this is a useful when data files
166166
are generated while building the package. (XXX: explain the step
167-
when this function are called exactly)
167+
when this function are called exactly)
168168

169169
+ ``config.add_data_dir(data_path)`` --- add directory ``data_path``
170170
recursively to ``data_files``. The whole directory tree starting at
@@ -174,14 +174,14 @@ in writing setup scripts:
174174
directory and the second element specifies the path to data directory.
175175
By default, data directory are copied under package installation
176176
directory under the basename of ``data_path``. For example,
177-
177+
178178
::
179179

180180
config.add_data_dir('fun') # fun/ contains foo.dat bar/car.dat
181181
config.add_data_dir(('sun','fun'))
182182
config.add_data_dir(('gun','/full/path/to/fun'))
183183

184-
will install data files to the following locations
184+
will install data files to the following locations
185185

186186
::
187187

@@ -204,7 +204,7 @@ in writing setup scripts:
204204
modules of the current package.
205205

206206
+ ``config.add_headers(*files)`` --- prepend ``files`` to ``headers``
207-
list. By default, headers will be installed under
207+
list. By default, headers will be installed under
208208
``<prefix>/include/pythonX.X/<config.name.replace('.','/')>/``
209209
directory. If ``files`` item is a tuple then it's first argument
210210
specifies the installation suffix relative to
@@ -216,7 +216,7 @@ in writing setup scripts:
216216
list. Scripts will be installed under ``<prefix>/bin/`` directory.
217217

218218
+ ``config.add_extension(name,sources,*kw)`` --- create and add an
219-
``Extension`` instance to ``ext_modules`` list. The first argument
219+
``Extension`` instance to ``ext_modules`` list. The first argument
220220
``name`` defines the name of the extension module that will be
221221
installed under ``config.name`` package. The second argument is
222222
a list of sources. ``add_extension`` method takes also keyword
@@ -269,10 +269,10 @@ in writing setup scripts:
269269
more information on arguments.
270270

271271
+ ``config.have_f77c()`` --- return True if Fortran 77 compiler is
272-
available (read: a simple Fortran 77 code compiled succesfully).
272+
available (read: a simple Fortran 77 code compiled succesfully).
273273

274274
+ ``config.have_f90c()`` --- return True if Fortran 90 compiler is
275-
available (read: a simple Fortran 90 code compiled succesfully).
275+
available (read: a simple Fortran 90 code compiled succesfully).
276276

277277
+ ``config.get_version()`` --- return version string of the current package,
278278
``None`` if version information could not be detected. This methods
@@ -405,7 +405,7 @@ The header of a typical SciPy ``__init__.py`` is::
405405
"""
406406
Package docstring, typically with a brief description and function listing.
407407
"""
408-
408+
409409
# py3k related imports
410410
from __future__ import division, print_function, absolute_import
411411

@@ -414,7 +414,7 @@ The header of a typical SciPy ``__init__.py`` is::
414414
...
415415

416416
__all__ = [s for s in dir() if not s.startswith('_')]
417-
417+
418418
from numpy.testing import Tester
419419
test = Tester().test
420420
bench = Tester().bench
@@ -441,7 +441,7 @@ will compile the ``library`` sources without optimization flags.
441441
It's recommended to specify only those config_fc options in such a way
442442
that are compiler independent.
443443

444-
Getting extra Fortran 77 compiler options from source
444+
Getting extra Fortran 77 compiler options from source
445445
-----------------------------------------------------
446446

447447
Some old Fortran codes need special compiler options in order to
@@ -452,7 +452,7 @@ pattern::
452452
CF77FLAGS(<fcompiler type>) = <fcompiler f77flags>
453453

454454
in the first 20 lines of the source and use the ``f77flags`` for
455-
specified type of the fcompiler (the first character ``C`` is optional).
455+
specified type of the fcompiler (the first character ``C`` is optional).
456456

457457
TODO: This feature can be easily extended for Fortran 90 codes as
458458
well. Let us know if you would need such a feature.

doc/HOWTO_DOCUMENT.rst.txt

+16-16
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ The sections of the docstring are:
142142
2. **Deprecation warning**
143143

144144
A section (use if applicable) to warn users that the object is deprecated.
145-
Section contents should include:
145+
Section contents should include:
146146

147147
* In what Numpy version the object was deprecated, and when it will be
148148
removed.
149149

150150
* Reason for deprecation if this is useful information (e.g., object
151151
is superseded, duplicates functionality found elsewhere, etc.).
152152

153-
* New recommended way of obtaining the same functionality.
153+
* New recommended way of obtaining the same functionality.
154154

155155
This section should use the note Sphinx directive instead of an
156156
underlined section header.
@@ -182,7 +182,7 @@ The sections of the docstring are:
182182
x : type
183183
Description of parameter `x`.
184184

185-
Enclose variables in single backticks. The colon must be preceded
185+
Enclose variables in single backticks. The colon must be preceded
186186
by a space, or omitted if the type is absent.
187187

188188
For the parameter types, be as precise as possible. Below are a
@@ -195,7 +195,7 @@ The sections of the docstring are:
195195
filename : str
196196
copy : bool
197197
dtype : data-type
198-
iterable : iterable object
198+
iterable : iterable object
199199
shape : int or tuple of int
200200
files : list of str
201201

@@ -370,7 +370,7 @@ The sections of the docstring are:
370370
Referencing sources of a temporary nature, like web pages, is
371371
discouraged. References are meant to augment the docstring, but
372372
should not be required to understand it. References are numbered, starting
373-
from one, in the order in which they are cited.
373+
from one, in the order in which they are cited.
374374

375375
11. **Examples**
376376

@@ -397,7 +397,7 @@ The sections of the docstring are:
397397

398398
>>> import numpy.random
399399
>>> np.random.rand(2)
400-
array([ 0.35773152, 0.38568979]) #random
400+
array([ 0.35773152, 0.38568979]) #random
401401

402402
You can run examples as doctests using::
403403

@@ -427,7 +427,7 @@ The sections of the docstring are:
427427
*matplotlib* for plotting, but should import it explicitly, e.g.,
428428
``import matplotlib.pyplot as plt``.
429429

430-
430+
431431
Documenting classes
432432
-------------------
433433

@@ -498,7 +498,7 @@ Document these as you would any other function. Do not include
498498
``self`` in the list of parameters. If a method has an equivalent function
499499
(which is the case for many ndarray methods for example), the function
500500
docstring should contain the detailed documentation, and the method docstring
501-
should refer to it. Only put brief summary and **See Also** sections in the
501+
should refer to it. Only put brief summary and **See Also** sections in the
502502
method docstring.
503503

504504

@@ -514,7 +514,7 @@ instances a useful docstring, we do the following:
514514
* Multiple instances: If multiple instances are exposed, docstrings
515515
for each instance are written and assigned to the instances'
516516
``__doc__`` attributes at run time. The class is documented as usual, and
517-
the exposed instances can be mentioned in the **Notes** and **See Also**
517+
the exposed instances can be mentioned in the **Notes** and **See Also**
518518
sections.
519519

520520

@@ -553,16 +553,16 @@ hard to get a good overview of all functionality provided by looking at the
553553
source file(s) or the ``__all__`` dict.
554554

555555
Note that license and author info, while often included in source files, do not
556-
belong in docstrings.
556+
belong in docstrings.
557557

558558

559559
Other points to keep in mind
560560
----------------------------
561-
* Equations : as discussed in the **Notes** section above, LaTeX formatting
562-
should be kept to a minimum. Often it's possible to show equations as
563-
Python code or pseudo-code instead, which is much more readable in a
564-
terminal. For inline display use double backticks (like ``y = np.sin(x)``).
565-
For display with blank lines above and below, use a double colon and indent
561+
* Equations : as discussed in the **Notes** section above, LaTeX formatting
562+
should be kept to a minimum. Often it's possible to show equations as
563+
Python code or pseudo-code instead, which is much more readable in a
564+
terminal. For inline display use double backticks (like ``y = np.sin(x)``).
565+
For display with blank lines above and below, use a double colon and indent
566566
the code, like::
567567

568568
end of previous sentence::
@@ -597,7 +597,7 @@ output. New paragraphs are marked with a blank line.
597597

598598
Use *italics*, **bold**, and ``monospace`` if needed in any explanations
599599
(but not for variable names and doctest code or multi-line code).
600-
Variable, module, function, and class names should be written between
600+
Variable, module, function, and class names should be written between
601601
single back-ticks (```numpy```).
602602

603603
A more extensive example of reST markup can be found in `this example

doc/Py3K.rst.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -483,21 +483,21 @@ So what is done in ``PyArray_FromAny`` currently is that:
483483
3118 buffers, so that::
484484

485485
array([some_3118_object])
486-
486+
487487
will treat the object similarly as it would handle an `ndarray`.
488488

489489
However, again, bytes (and unicode) have priority and will not be
490490
handled as buffer objects.
491491

492492
This amounts to possible semantic changes:
493493

494-
- ``array(buffer)`` will no longer create an object array
494+
- ``array(buffer)`` will no longer create an object array
495495
``array([buffer], dtype='O')``, but will instead expand to a view
496496
on the buffer.
497497

498498
.. todo::
499499

500-
Take a second look at places that used PyBuffer_FromMemory and
500+
Take a second look at places that used PyBuffer_FromMemory and
501501
PyBuffer_FromReadWriteMemory -- what can be done with these?
502502

503503
.. todo::
@@ -633,7 +633,7 @@ Currently, the following is done:
633633

634634
1) Numpy's integer types no longer inherit from Python integer.
635635
2) int is taken dtype-equivalent to NPY_LONG
636-
3) ints are converted to NPY_LONG
636+
3) ints are converted to NPY_LONG
637637

638638
PyInt methods are currently replaced by PyLong, via macros in npy_3kcompat.h.
639639

doc/TESTS.rst.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ but ``test_evens`` is a generator that returns a series of tests, using
206206
A problem with generator tests can be that if a test is failing, it's
207207
hard to see for which parameters. To avoid this problem, ensure that:
208208

209-
- No computation related to the features tested is done in the
209+
- No computation related to the features tested is done in the
210210
``test_*`` generator function, but delegated to a corresponding
211211
``check_*`` function (can be inside the generator, to share namespace).
212212
- The generators are used *solely* for loops over parameters.
@@ -236,7 +236,7 @@ for numpy.lib::
236236
The doctests are run as if they are in a fresh Python instance which
237237
has executed ``import numpy as np``. Tests that are part of a SciPy
238238
subpackage will have that subpackage already imported. E.g. for a test
239-
in ``scipy/linalg/tests/``, the namespace will be created such that
239+
in ``scipy/linalg/tests/``, the namespace will be created such that
240240
``from scipy import linalg`` has already executed.
241241

242242

doc/cython/README.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ To run it locally, simply type::
1717
make help
1818

1919
which shows you the currently available targets (these are just handy
20-
shorthands for common commands).
20+
shorthands for common commands).

0 commit comments

Comments
 (0)