summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/code_generators/generate_ufunc_api.py2
-rw-r--r--numpy/core/defmatrix.py16
-rw-r--r--numpy/core/numeric.py8
-rw-r--r--numpy/core/records.py18
-rw-r--r--numpy/core/scons_support.py8
-rw-r--r--numpy/core/setup.py8
-rw-r--r--numpy/core/setupscons.py8
7 files changed, 34 insertions, 34 deletions
diff --git a/numpy/core/code_generators/generate_ufunc_api.py b/numpy/core/code_generators/generate_ufunc_api.py
index fa858b207..a7afc5aaa 100644
--- a/numpy/core/code_generators/generate_ufunc_api.py
+++ b/numpy/core/code_generators/generate_ufunc_api.py
@@ -71,7 +71,7 @@ void *PyUFunc_API[] = {
def generate_api(output_dir, force=False):
basename = 'ufunc_api'
-
+
h_file = os.path.join(output_dir, '__%s.h' % basename)
c_file = os.path.join(output_dir, '__%s.c' % basename)
d_file = os.path.join(output_dir, '%s.txt' % basename)
diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py
index 7e1cacfce..c3f57efdf 100644
--- a/numpy/core/defmatrix.py
+++ b/numpy/core/defmatrix.py
@@ -51,16 +51,16 @@ def asmatrix(data, dtype=None):
class matrix(N.ndarray):
"""mat = matrix(data, dtype=None, copy=True)
- Returns a matrix from an array-like object, or a string of
+ Returns a matrix from an array-like object, or a string of
data. A matrix is a specialized 2-d array that retains
it's 2-d nature through operations and where '*' means matrix
- multiplication and '**' means matrix power.
+ multiplication and '**' means matrix power.
Parameters
----------
data : array-like or string
- If data is a string, then interpret the string as a matrix
- with commas or spaces separating columns and semicolons
+ If data is a string, then interpret the string as a matrix
+ with commas or spaces separating columns and semicolons
separating rows.
If data is array-like than convert the array to a matrix.
dtype : data-type
@@ -273,7 +273,7 @@ class matrix(N.ndarray):
the flattened array by default, otherwise over the specified axis.
Parameters
- ----------
+ ----------
axis : integer
Axis along which the means are computed. The default is
to compute the standard deviation of the flattened array.
@@ -289,7 +289,7 @@ class matrix(N.ndarray):
cast if necessary.
Returns
- -------
+ -------
mean : The return type varies, see above.
A new array holding the result is returned unless out is
specified, in which case a reference to out is returned.
@@ -342,7 +342,7 @@ class matrix(N.ndarray):
mean : average
Notes
- -----
+ -----
The standard deviation is the square root of the
average of the squared deviations from the mean, i.e. var =
sqrt(mean((x - x.mean())**2)). The computed standard
@@ -362,7 +362,7 @@ class matrix(N.ndarray):
----------
axis : integer
Axis along which the variance is computed. The default is to
- compute the variance of the flattened array.
+ compute the variance of the flattened array.
dtype : data-type
Type to use in computing the variance. For arrays of integer
type the default is float32, for arrays of float types it is
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 312db3510..00c70256f 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -149,7 +149,7 @@ def asfortranarray(a, dtype=None):
def require(a, dtype=None, requirements=None):
"""Return an ndarray of the provided type that satisfies requirements.
-
+
This function is useful to be sure that an array with the correct flags
is returned for passing to compiled code (perhaps through ctypes).
@@ -160,7 +160,7 @@ def require(a, dtype=None, requirements=None):
dtype : data-type
The required data-type (None is the default data-type -- float64)
requirements : list of strings
- The requirements list can be any of the
+ The requirements list can be any of the
'ENSUREARRAY' ('E') - ensure that a base-class ndarray
'F_CONTIGUOUS' ('F') - ensure a Fortran-contiguous array
'C_CONTIGUOUS' ('C') - ensure a C-contiguous array
@@ -169,7 +169,7 @@ def require(a, dtype=None, requirements=None):
'OWNDATA' ('O') - ensure an array that owns its own data
The returned array will be guaranteed to have the listed requirements
- by making a copy if needed.
+ by making a copy if needed.
"""
if requirements is None:
requirements = []
@@ -276,7 +276,7 @@ def vdot(a, b):
try:
# importing this changes the dot function for basic 4 types
# to blas-optimized versions.
- from _dotblas import dot, vdot, inner, alterdot, restoredot
+ from _dotblas import dot, vdot, inner, alterdot, restoredot
except ImportError:
def alterdot():
"Does Nothing"
diff --git a/numpy/core/records.py b/numpy/core/records.py
index 2067ed059..f9826376e 100644
--- a/numpy/core/records.py
+++ b/numpy/core/records.py
@@ -45,9 +45,9 @@ def find_duplicate(list):
class format_parser:
"""Class to convert formats, names, titles description to a dtype
- After constructing the format_parser object, the dtype attribute is
+ After constructing the format_parser object, the dtype attribute is
the converted data-type.
-
+
dtype = format_parser(formats, names, titles).dtype
Parameters
@@ -59,18 +59,18 @@ class format_parser:
comma-separated field names --- 'col1, col2, col3'
list or tuple of field names
titles : sequence
- sequence of title strings or unicode
+ sequence of title strings or unicode
aligned : bool
align the fields by padding as the C-compiler would
- byteorder :
- If specified, all the fields will be changed to the
+ byteorder :
+ If specified, all the fields will be changed to the
provided byteorder. Otherwise, the default byteorder is
used.
Returns
-------
object
- A Python object whose dtype attribute is a data-type.
+ A Python object whose dtype attribute is a data-type.
"""
def __init__(self, formats, names, titles, aligned=False, byteorder=None):
self._parseFormats(formats, aligned)
@@ -227,9 +227,9 @@ class recarray(ndarray):
by the *formats*, *names*, *titles*, *aligned*, and *byteorder* keywords.
buf : [buffer] or None
If this is None, then a new array is created of the given shape and data-type
- If this is an object exposing the buffer interface, then the array will
- use the memory from an existing buffer. In this case, the *offset* and
- *strides* keywords can also be used.
+ If this is an object exposing the buffer interface, then the array will
+ use the memory from an existing buffer. In this case, the *offset* and
+ *strides* keywords can also be used.
See Also
--------
diff --git a/numpy/core/scons_support.py b/numpy/core/scons_support.py
index 2c08d648f..bb4721744 100644
--- a/numpy/core/scons_support.py
+++ b/numpy/core/scons_support.py
@@ -30,12 +30,12 @@ def split_ext(string):
# Ufunc and multiarray API generators
#------------------------------------
def do_generate_array_api(target, source, env):
- nowrap_do_generate_array_api([str(i) for i in target],
+ nowrap_do_generate_array_api([str(i) for i in target],
[str(i) for i in source])
return 0
def do_generate_ufunc_api(target, source, env):
- nowrap_do_generate_ufunc_api([str(i) for i in target],
+ nowrap_do_generate_ufunc_api([str(i) for i in target],
[str(i) for i in source])
return 0
@@ -74,7 +74,7 @@ def generate_from_template_emitter(target, source, env):
base, ext = split_ext(pbasename(str(source[0])))
t = pjoin(pdirname(str(target[0])), base)
return ([t], source)
-
+
#----------------
# umath generator
#----------------
@@ -92,7 +92,7 @@ def generate_umath(target, source, env):
def generate_umath_emitter(target, source, env):
t = str(target[0]) + '.c'
return ([t], source)
-
+
#-----------------------------------------
# Other functions related to configuration
#-----------------------------------------
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 869b6926f..f06762445 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -175,7 +175,7 @@ def configuration(parent_package='',top_path=None):
" python-dev|python-devel." % (python_h)
config.numpy_include_dirs
- result = config_cmd.try_run(testcode,
+ result = config_cmd.try_run(testcode,
include_dirs = [python_include] + \
config.numpy_include_dirs,
library_dirs = default_lib_dirs)
@@ -190,7 +190,7 @@ def configuration(parent_package='',top_path=None):
target_f.close()
print 'EOF'
return target
-
+
def generate_api_func(module_name):
def generate_api(ext, build_dir):
script = join(codegen_dir, module_name + '.py')
@@ -405,9 +405,9 @@ def generate_numpyconfig_code(target):
#include "config.h"
int main()
-{
+{
FILE* f;
-
+
f = fopen("%s", "w");
if (f == NULL) {
return -1;
diff --git a/numpy/core/setupscons.py b/numpy/core/setupscons.py
index 7118b1dab..857491b88 100644
--- a/numpy/core/setupscons.py
+++ b/numpy/core/setupscons.py
@@ -25,10 +25,10 @@ def configuration(parent_package='',top_path=None):
join('code_generators', 'multiarray_api_order.txt'),
join('code_generators', 'ufunc_api_order.txt')]
core_src = [join('src', basename(i)) for i in glob.glob(join(local_dir,
- 'src',
+ 'src',
'*.c'))]
core_src += [join('src', basename(i)) for i in glob.glob(join(local_dir,
- 'src',
+ 'src',
'*.src'))]
source_files = dot_blas_src + api_definition + core_src + \
@@ -54,7 +54,7 @@ def configuration(parent_package='',top_path=None):
incl_dir = os.path.dirname(target)
if incl_dir not in config.numpy_include_dirs:
config.numpy_include_dirs.append(incl_dir)
- config.add_data_files((header_dir, target))
+ config.add_data_files((header_dir, target))
def add_array_api():
scons_build_dir = get_scons_build_dir()
@@ -83,7 +83,7 @@ def configuration(parent_package='',top_path=None):
add_ufunc_api()
config.add_configres()
- config.add_sconscript('SConstruct',
+ config.add_sconscript('SConstruct',
post_hook = add_generated_files,
source_files = source_files)