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

Skip to content

Commit 8c448a3

Browse files
committed
ran reindent
1 parent 1bb5bb5 commit 8c448a3

20 files changed

Lines changed: 78 additions & 80 deletions

File tree

numpy/core/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def name_to_defsymb(name):
6767

6868
# Mandatory functions: if not found, fail the build
6969
mandatory_funcs = ["sin", "cos", "tan", "sinh", "cosh", "tanh", "fabs",
70-
"floor", "ceil", "sqrt", "log10", "log", "exp", "asin",
71-
"acos", "atan", "fmod", 'modf', 'frexp', 'ldexp']
70+
"floor", "ceil", "sqrt", "log10", "log", "exp", "asin",
71+
"acos", "atan", "fmod", 'modf', 'frexp', 'ldexp']
7272

7373
if not check_funcs_once(mandatory_funcs):
7474
raise SystemError("One of the required function to build numpy is not"

numpy/core/tests/test_multiarray.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ def setUp(self):
955955
self.x = 2*ones((3,),dtype=int)
956956
self.y = 3*ones((3,),dtype=int)
957957
self.x2 = 2*ones((2,3), dtype=int)
958-
self.y2 = 3*ones((2,3), dtype=int)
958+
self.y2 = 3*ones((2,3), dtype=int)
959959
self.ind = [0,0,1]
960960

961961
def test_basic(self):
@@ -965,11 +965,11 @@ def test_basic(self):
965965
def test_broadcast1(self):
966966
A = np.choose(self.ind, (self.x2, self.y2))
967967
assert_equal(A, [[2,2,3],[2,2,3]])
968-
968+
969969
def test_broadcast2(self):
970970
A = np.choose(self.ind, (self.x, self.y2))
971971
assert_equal(A, [[2,2,3],[2,2,3]])
972-
972+
973973

974974
if __name__ == "__main__":
975975
run_module_suite()

numpy/distutils/command/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ def _check_compiler (self):
5353
self.compiler.initialize()
5454
except IOError, e:
5555
msg = """\
56-
Could not initialize compiler instance: do you have Visual Studio
56+
Could not initialize compiler instance: do you have Visual Studio
5757
installed ? If you are trying to build with mingw, please use python setup.py
5858
build -c mingw32 instead ). If you have Visual Studio installed, check it is
5959
correctly installed, and the right version (VS 2008 for python 2.6, VS 2003 for
60-
2.5, etc...). Original exception was: %s, and the Compiler
60+
2.5, etc...). Original exception was: %s, and the Compiler
6161
class was %s
6262
============================================================================""" \
6363
% (e, self.compiler.__class__.__name__)

numpy/distutils/fcompiler/gnu.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -272,40 +272,40 @@ def get_flags_linker_so(self):
272272

273273
def get_library_dirs(self):
274274
opt = GnuFCompiler.get_library_dirs(self)
275-
if sys.platform == 'win32':
276-
c_compiler = self.c_compiler
277-
if c_compiler and c_compiler.compiler_type == "msvc":
278-
target = self.get_target()
279-
if target:
275+
if sys.platform == 'win32':
276+
c_compiler = self.c_compiler
277+
if c_compiler and c_compiler.compiler_type == "msvc":
278+
target = self.get_target()
279+
if target:
280280
d = os.path.normpath(self.get_libgcc_dir())
281-
root = os.path.join(d, os.pardir, os.pardir, os.pardir, os.pardir)
282-
mingwdir = os.path.normpath(os.path.join(root, target, "lib"))
283-
full = os.path.join(mingwdir, "libmingwex.a")
284-
if os.path.exists(full):
285-
opt.append(mingwdir)
286-
return opt
281+
root = os.path.join(d, os.pardir, os.pardir, os.pardir, os.pardir)
282+
mingwdir = os.path.normpath(os.path.join(root, target, "lib"))
283+
full = os.path.join(mingwdir, "libmingwex.a")
284+
if os.path.exists(full):
285+
opt.append(mingwdir)
286+
return opt
287287

288288
def get_libraries(self):
289289
opt = GnuFCompiler.get_libraries(self)
290290
if sys.platform == 'darwin':
291291
opt.remove('cc_dynamic')
292-
if sys.platform == 'win32':
293-
c_compiler = self.c_compiler
294-
if c_compiler and c_compiler.compiler_type == "msvc":
295-
if "gcc" in opt:
296-
i = opt.index("gcc")
297-
opt.insert(i+1, "mingwex")
298-
opt.insert(i+1, "mingw32")
292+
if sys.platform == 'win32':
293+
c_compiler = self.c_compiler
294+
if c_compiler and c_compiler.compiler_type == "msvc":
295+
if "gcc" in opt:
296+
i = opt.index("gcc")
297+
opt.insert(i+1, "mingwex")
298+
opt.insert(i+1, "mingw32")
299299
return opt
300300

301301
def get_target(self):
302302
status, output = exec_command(self.compiler_f77 +
303303
['-v'],
304304
use_tee=0)
305305
if not status:
306-
m = TARGET_R.search(output)
307-
if m:
308-
return m.group(1)
306+
m = TARGET_R.search(output)
307+
if m:
308+
return m.group(1)
309309
return ""
310310

311311
if __name__ == '__main__':

numpy/distutils/mingw32ccompiler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,15 @@ def check_embedded_msvcr_match_linked(msver):
327327
def configtest_name(config):
328328
base = os.path.basename(config._gen_temp_sourcefile("yo", [], "c"))
329329
return os.path.splitext(base)[0]
330-
330+
331331
def manifest_name(config):
332-
# Get configest name (including suffix)
332+
# Get configest name (including suffix)
333333
root = configtest_name(config)
334334
exext = config.compiler.exe_extension
335335
return root + exext + ".manifest"
336336

337337
def rc_name(config):
338-
# Get configest name (including suffix)
338+
# Get configest name (including suffix)
339339
root = configtest_name(config)
340340
return root + ".rc"
341341

numpy/f2py/f2py2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ def run_compile():
543543
setup(ext_modules = [ext])
544544

545545
if remove_build_dir and os.path.exists(build_dir):
546-
import shutil
546+
import shutil
547547
outmess('Removing build directory %s\n'%(build_dir))
548548
shutil.rmtree(build_dir)
549549

numpy/lib/function_base.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, new=None):
228228
* None : the new behaviour is used, no warning is printed.
229229
* True : the new behaviour is used and a warning is raised about
230230
the future removal of the `new` keyword.
231-
* False : the old behaviour is used and a DeprecationWarning
231+
* False : the old behaviour is used and a DeprecationWarning
232232
is raised.
233-
As of NumPy 1.3, this keyword should not be used explicitly since it
234-
will disappear in NumPy 1.4.
233+
As of NumPy 1.3, this keyword should not be used explicitly since it
234+
will disappear in NumPy 1.4.
235235
236236
Returns
237237
-------
@@ -267,9 +267,9 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, new=None):
267267
# Old behavior
268268
if new == False:
269269
warnings.warn("""
270-
The histogram semantics being used is now deprecated and
271-
will disappear in NumPy 1.4. Please update your code to
272-
use the default semantics.
270+
The histogram semantics being used is now deprecated and
271+
will disappear in NumPy 1.4. Please update your code to
272+
use the default semantics.
273273
""", DeprecationWarning)
274274

275275
a = asarray(a).ravel()
@@ -320,8 +320,8 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, new=None):
320320
elif new in [True, None]:
321321
if new is True:
322322
warnings.warn("""
323-
The new semantics of histogram is now the default and the `new`
324-
keyword will be removed in NumPy 1.4.
323+
The new semantics of histogram is now the default and the `new`
324+
keyword will be removed in NumPy 1.4.
325325
""", Warning)
326326
a = asarray(a)
327327
if weights is not None:

numpy/lib/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,11 +699,11 @@ def _lookfor_generate_cache(module, import_modules, regenerate):
699699

700700
# import sub-packages
701701
if import_modules and hasattr(item, '__path__'):
702-
for pth in item.__path__:
703-
for mod_path in os.listdir(pth):
704-
init_py = os.path.join(pth, mod_path, '__init__.py')
702+
for pth in item.__path__:
703+
for mod_path in os.listdir(pth):
704+
init_py = os.path.join(pth, mod_path, '__init__.py')
705705
if not os.path.isfile(init_py):
706-
continue
706+
continue
707707
if _all is not None and mod_path not in _all:
708708
continue
709709
try:

numpy/linalg/linalg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
zgetrf, dpotrf, zpotrf, dgeqrf, zgeqrf, zungqr, dorgqr.
1010
"""
1111

12-
__all__ = ['matrix_power', 'solve', 'tensorsolve', 'tensorinv', 'inv',
12+
__all__ = ['matrix_power', 'solve', 'tensorsolve', 'tensorinv', 'inv',
1313
'cholesky', 'eigvals', 'eigvalsh', 'pinv', 'det', 'svd',
1414
'eig', 'eigh','lstsq', 'norm', 'qr', 'cond', 'LinAlgError']
1515

numpy/ma/core.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
'rank', 'ravel', 'remainder', 'repeat', 'reshape', 'resize',
5555
'right_shift', 'round_', 'round',
5656
'set_fill_value', 'shape', 'sin', 'sinh', 'size', 'sometrue',
57-
'sort', 'soften_mask', 'sqrt', 'squeeze', 'std', 'subtract', 'sum',
57+
'sort', 'soften_mask', 'sqrt', 'squeeze', 'std', 'subtract', 'sum',
5858
'swapaxes',
5959
'take', 'tan', 'tanh', 'trace', 'transpose', 'true_divide',
6060
'var', 'where',
@@ -335,7 +335,7 @@ def common_fill_value(a, b):
335335
def filled(a, fill_value = None):
336336
"""
337337
Return `a` as an array where masked data have been replaced by `value`.
338-
338+
339339
If `a` is not a MaskedArray, `a` itself is returned.
340340
If `a` is a MaskedArray and `fill_value` is None, `fill_value` is set to
341341
`a.fill_value`.
@@ -627,7 +627,7 @@ def __call__ (self, a, b, *args, **kwargs):
627627
elif m:
628628
return masked
629629
return result
630-
#
630+
#
631631
# result = self.f(d1, d2, *args, **kwargs).view(get_masked_subclass(a, b))
632632
# if len(result.shape):
633633
# if m is not nomask:
@@ -1016,7 +1016,7 @@ def _recursive_mask_or(m1, m2, newmask):
10161016
if current1.dtype.names:
10171017
_recursive_mask_or(current1, m2[name], newmask[name])
10181018
else:
1019-
umath.logical_or(current1, m2[name], newmask[name])
1019+
umath.logical_or(current1, m2[name], newmask[name])
10201020
return
10211021
#
10221022
if (m1 is nomask) or (m1 is False):
@@ -1041,7 +1041,7 @@ def flatten_mask(mask):
10411041
"""
10421042
Returns a completely flattened version of the mask, where nested fields
10431043
are collapsed.
1044-
1044+
10451045
Parameters
10461046
----------
10471047
mask : array_like
@@ -1064,7 +1064,7 @@ def flatten_mask(mask):
10641064
>>> mask = np.array([(0, (0, 0)), (0, (0, 1))], dtype=mdtype)
10651065
>>> flatten_mask(mask)
10661066
array([False, False, False, False, False, True], dtype=bool)
1067-
1067+
10681068
"""
10691069
#
10701070
def _flatmask(mask):
@@ -1711,7 +1711,7 @@ def view(self, dtype=None, type=None):
17111711
if dtype is None:
17121712
dtype = output.dtype
17131713
mdtype = make_mask_descr(dtype)
1714-
1714+
17151715
output._mask = self._mask.view(mdtype, ndarray)
17161716
output._mask.shape = output.shape
17171717
# Make sure to reset the _fill_value if needed
@@ -3144,7 +3144,7 @@ def argsort(self, axis=None, fill_value=None, kind='quicksort',
31443144
index_array : ndarray, int
31453145
Array of indices that sort `a` along the specified axis.
31463146
In other words, ``a[index_array]`` yields a sorted `a`.
3147-
3147+
31483148
See Also
31493149
--------
31503150
sort : Describes sorting algorithms used.
@@ -3471,7 +3471,7 @@ def max(self, axis=None, out=None, fill_value=None):
34713471
outmask = out._mask = make_mask_none(out.shape)
34723472
outmask.flat = newmask
34733473
else:
3474-
3474+
34753475
if out.dtype.kind in 'biu':
34763476
errmsg = "Masked data information would be lost in one or more"\
34773477
" location."
@@ -4016,12 +4016,12 @@ def sort(a, axis=-1, kind='quicksort', order=None, endwith=True, fill_value=None
40164016
def compressed(x):
40174017
"""
40184018
Return a 1-D array of all the non-masked data.
4019-
4019+
40204020
See Also
40214021
--------
40224022
MaskedArray.compressed
40234023
equivalent method
4024-
4024+
40254025
"""
40264026
if getmask(x) is nomask:
40274027
return np.asanyarray(x)
@@ -4389,8 +4389,8 @@ def inner(a, b):
43894389
Returns the inner product of a and b for arrays of floating point types.
43904390
43914391
Like the generic NumPy equivalent the product sum is over the last dimension
4392-
of a and b.
4393-
4392+
of a and b.
4393+
43944394
Notes
43954395
-----
43964396
The first argument is not conjugated.
@@ -4460,7 +4460,7 @@ def allclose (a, b, masked_equal=True, rtol=1.e-5, atol=1.e-8, fill_value=None):
44604460
fill_value : boolean, optional
44614461
Whether masked values in a or b are considered equal (True) or not
44624462
(False).
4463-
4463+
44644464
rtol : Relative tolerance
44654465
The relative difference is equal to `rtol` * `b`.
44664466
atol : Absolute tolerance
@@ -4483,7 +4483,7 @@ def allclose (a, b, masked_equal=True, rtol=1.e-5, atol=1.e-8, fill_value=None):
44834483
True.
44844484
44854485
absolute(`a` - `b`) <= (`atol` + `rtol` * absolute(`b`))
4486-
4486+
44874487
Return True if all elements of a and b are equal subject to
44884488
given tolerances.
44894489
@@ -4519,7 +4519,7 @@ def allclose (a, b, masked_equal=True, rtol=1.e-5, atol=1.e-8, fill_value=None):
45194519
def asarray(a, dtype=None):
45204520
"""
45214521
Convert the input to a masked array.
4522-
4522+
45234523
Parameters
45244524
----------
45254525
a : array_like
@@ -4531,7 +4531,7 @@ def asarray(a, dtype=None):
45314531
order : {'C', 'F'}, optional
45324532
Whether to use row-major ('C') or column-major ('FORTRAN') memory
45334533
representation. Defaults to 'C'.
4534-
4534+
45354535
Returns
45364536
-------
45374537
out : ndarray

0 commit comments

Comments
 (0)