From 73a2fd11a74eedb97201fc8d54ea193e810ea9d3 Mon Sep 17 00:00:00 2001 From: Dongjoon Hyun Date: Wed, 27 Jan 2016 15:42:42 -0800 Subject: [PATCH] MAINT: Fix some typos in a code string and comments --- numpy/_build_utils/src/apple_sgemv_fix.c | 2 +- numpy/core/include/numpy/ndarraytypes.h | 2 +- numpy/core/info.py | 2 +- numpy/core/src/multiarray/arrayobject.c | 2 +- numpy/core/src/multiarray/ctors.c | 2 +- numpy/core/src/multiarray/datetime_busdaycal.c | 2 +- numpy/core/src/multiarray/datetime_busdaycal.h | 2 +- numpy/core/src/multiarray/dtype_transfer.c | 2 +- numpy/core/src/multiarray/einsum.c.src | 2 +- numpy/core/src/multiarray/item_selection.c | 4 ++-- numpy/core/src/multiarray/lowlevel_strided_loops.c.src | 2 +- numpy/core/src/multiarray/multiarraymodule.c | 2 +- numpy/core/src/multiarray/nditer_api.c | 4 ++-- numpy/core/src/multiarray/nditer_constr.c | 2 +- numpy/core/src/multiarray/nditer_pywrap.c | 2 +- numpy/core/src/multiarray/nditer_templ.c.src | 2 +- numpy/core/src/multiarray/usertypes.c | 2 +- numpy/core/src/umath/ufunc_object.c | 2 +- numpy/core/tests/test_einsum.py | 2 +- numpy/distutils/exec_command.py | 2 +- numpy/distutils/from_template.py | 2 +- numpy/doc/byteswapping.py | 2 +- numpy/doc/internals.py | 2 +- numpy/f2py/capi_maps.py | 2 +- numpy/f2py/crackfortran.py | 2 +- numpy/f2py/rules.py | 8 ++++---- numpy/lib/function_base.py | 4 ++-- numpy/linalg/lapack_lite/dlapack_lite.c | 6 +++--- numpy/linalg/lapack_lite/zlapack_lite.c | 2 +- numpy/ma/core.py | 2 +- 30 files changed, 38 insertions(+), 38 deletions(-) diff --git a/numpy/_build_utils/src/apple_sgemv_fix.c b/numpy/_build_utils/src/apple_sgemv_fix.c index ffdfb81f705e..4c9c82ece6d7 100644 --- a/numpy/_build_utils/src/apple_sgemv_fix.c +++ b/numpy/_build_utils/src/apple_sgemv_fix.c @@ -155,7 +155,7 @@ void sgemv_( const char* trans, const int* m, const int* n, * * Because Fortran uses column major order and X.T and Y.T are row vectors, * the leading dimensions of X.T and Y.T in SGEMM become equal to the - * strides of the the column vectors X and Y in SGEMV. */ + * strides of the column vectors X and Y in SGEMV. */ switch (*trans) { case 'T': diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h index f1fe89f1a158..34f7b4e21efa 100644 --- a/numpy/core/include/numpy/ndarraytypes.h +++ b/numpy/core/include/numpy/ndarraytypes.h @@ -781,7 +781,7 @@ typedef int (PyArray_FinalizeFunc)(PyArrayObject *, PyObject *); /* * An array never has the next four set; they're only used as parameter - * flags to the the various FromAny functions + * flags to the various FromAny functions * * This flag may be requested in constructor functions. */ diff --git a/numpy/core/info.py b/numpy/core/info.py index 241f209b556e..c6f7bbcf2ac0 100644 --- a/numpy/core/info.py +++ b/numpy/core/info.py @@ -4,7 +4,7 @@ - array - NumPy Array construction - zeros - Return an array of all zeros -- empty - Return an unitialized array +- empty - Return an uninitialized array - shape - Return shape of sequence or array - rank - Return number of dimensions - size - Return number of elements in entire array or a diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c index fd5b15a0a133..eb952836c918 100644 --- a/numpy/core/src/multiarray/arrayobject.c +++ b/numpy/core/src/multiarray/arrayobject.c @@ -11,7 +11,7 @@ by Travis Oliphant, oliphant@ee.byu.edu - Brigham Young Univeristy + Brigham Young University maintainer email: oliphant.travis@ieee.org diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index 2b8c35234304..785b3073a38b 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -1049,7 +1049,7 @@ PyArray_NewFromDescr_int(PyTypeObject *subtype, PyArray_Descr *descr, int nd, sd = descr->elsize; } /* - * It is bad to have unitialized OBJECT pointers + * It is bad to have uninitialized OBJECT pointers * which could also be sub-fields of a VOID array */ if (zeroed || PyDataType_FLAGCHK(descr, NPY_NEEDS_INIT)) { diff --git a/numpy/core/src/multiarray/datetime_busdaycal.c b/numpy/core/src/multiarray/datetime_busdaycal.c index 91ba24c97bde..b0c53b362047 100644 --- a/numpy/core/src/multiarray/datetime_busdaycal.c +++ b/numpy/core/src/multiarray/datetime_busdaycal.c @@ -214,7 +214,7 @@ qsort_datetime_compare(const void *elem1, const void *elem2) } /* - * Sorts the the array of dates provided in place and removes + * Sorts the array of dates provided in place and removes * NaT, duplicates and any date which is already excluded on account * of the weekmask. * diff --git a/numpy/core/src/multiarray/datetime_busdaycal.h b/numpy/core/src/multiarray/datetime_busdaycal.h index cd79d0bb5ed4..02903e3d20a0 100644 --- a/numpy/core/src/multiarray/datetime_busdaycal.h +++ b/numpy/core/src/multiarray/datetime_busdaycal.h @@ -37,7 +37,7 @@ NPY_NO_EXPORT int PyArray_WeekMaskConverter(PyObject *weekmask_in, npy_bool *weekmask); /* - * Sorts the the array of dates provided in place and removes + * Sorts the array of dates provided in place and removes * NaT, duplicates and any date which is already excluded on account * of the weekmask. * diff --git a/numpy/core/src/multiarray/dtype_transfer.c b/numpy/core/src/multiarray/dtype_transfer.c index bfb22ac30f0d..fd371a1f69d0 100644 --- a/numpy/core/src/multiarray/dtype_transfer.c +++ b/numpy/core/src/multiarray/dtype_transfer.c @@ -4,7 +4,7 @@ * implemented here. * * Copyright (c) 2010 by Mark Wiebe (mwwiebe@gmail.com) - * The Univerity of British Columbia + * The University of British Columbia * * See LICENSE.txt for the license. diff --git a/numpy/core/src/multiarray/einsum.c.src b/numpy/core/src/multiarray/einsum.c.src index bde543703a34..ee9ee1abde73 100644 --- a/numpy/core/src/multiarray/einsum.c.src +++ b/numpy/core/src/multiarray/einsum.c.src @@ -3,7 +3,7 @@ * which provides an einstein-summation operation. * * Copyright (c) 2011 by Mark Wiebe (mwwiebe@gmail.com) - * The Univerity of British Columbia + * The University of British Columbia * * See LICENSE.txt for the license. */ diff --git a/numpy/core/src/multiarray/item_selection.c b/numpy/core/src/multiarray/item_selection.c index 64fa70b6da07..9789235c2e76 100644 --- a/numpy/core/src/multiarray/item_selection.c +++ b/numpy/core/src/multiarray/item_selection.c @@ -842,7 +842,7 @@ _new_sortlike(PyArrayObject *op, int axis, PyArray_SortFunc *sort, /* * For dtype's with objects, copyswapn Py_XINCREF's src * and Py_XDECREF's dst. This would crash if called on - * an unitialized buffer, or leak a reference to each + * an uninitialized buffer, or leak a reference to each * object if initialized. * * So, first do the copy with no refcounting... @@ -1003,7 +1003,7 @@ _new_argsortlike(PyArrayObject *op, int axis, PyArray_ArgSortFunc *argsort, /* * For dtype's with objects, copyswapn Py_XINCREF's src * and Py_XDECREF's dst. This would crash if called on - * an unitialized valbuffer, or leak a reference to + * an uninitialized valbuffer, or leak a reference to * each object item if initialized. * * So, first do the copy with no refcounting... diff --git a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src index 0fe63c13b367..b8381ab685ec 100644 --- a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src +++ b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src @@ -3,7 +3,7 @@ * strided data. * * Copyright (c) 2010 by Mark Wiebe (mwwiebe@gmail.com) - * The Univerity of British Columbia + * The University of British Columbia * * See LICENSE.txt for the license. */ diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c index 1df3d653da49..bf25130bbffa 100644 --- a/numpy/core/src/multiarray/multiarraymodule.c +++ b/numpy/core/src/multiarray/multiarraymodule.c @@ -3869,7 +3869,7 @@ _PyArray_SigintHandler(int signum) { PyOS_setsig(signum, SIG_IGN); /* - * jump buffer may be unitialized as SIGINT allowing functions are usually + * jump buffer may be uninitialized as SIGINT allowing functions are usually * run in other threads than the master thread that receives the signal */ if (sigint_buf_init > 0) { diff --git a/numpy/core/src/multiarray/nditer_api.c b/numpy/core/src/multiarray/nditer_api.c index c00360bfbf7c..21bbbaad4b9a 100644 --- a/numpy/core/src/multiarray/nditer_api.c +++ b/numpy/core/src/multiarray/nditer_api.c @@ -3,7 +3,7 @@ * This excludes functions specialized using the templating system. * * Copyright (c) 2010-2011 by Mark Wiebe (mwwiebe@gmail.com) - * The Univerity of British Columbia + * The University of British Columbia * * Copyright (c) 2011 Enthought, Inc * @@ -1847,7 +1847,7 @@ npyiter_goto_iterindex(NpyIter *iter, npy_intp iterindex) } /* - * This gets called after the the buffers have been exhausted, and + * This gets called after the buffers have been exhausted, and * their data needs to be written back to the arrays. The multi-index * must be positioned for the beginning of the buffer. */ diff --git a/numpy/core/src/multiarray/nditer_constr.c b/numpy/core/src/multiarray/nditer_constr.c index 9c5afedf6f7a..3cbbb2b27605 100644 --- a/numpy/core/src/multiarray/nditer_constr.c +++ b/numpy/core/src/multiarray/nditer_constr.c @@ -3,7 +3,7 @@ * aspects of NumPy's nditer. * * Copyright (c) 2010-2011 by Mark Wiebe (mwwiebe@gmail.com) - * The Univerity of British Columbia + * The University of British Columbia * * Copyright (c) 2011 Enthought, Inc * diff --git a/numpy/core/src/multiarray/nditer_pywrap.c b/numpy/core/src/multiarray/nditer_pywrap.c index 25e48ba058ce..67f5ab99f4a7 100644 --- a/numpy/core/src/multiarray/nditer_pywrap.c +++ b/numpy/core/src/multiarray/nditer_pywrap.c @@ -2,7 +2,7 @@ * This file implements the CPython wrapper of the new NumPy iterator. * * Copyright (c) 2010 by Mark Wiebe (mwwiebe@gmail.com) - * The Univerity of British Columbia + * The University of British Columbia * * See LICENSE.txt for the license. */ diff --git a/numpy/core/src/multiarray/nditer_templ.c.src b/numpy/core/src/multiarray/nditer_templ.c.src index 8976b132e75d..0f0d59972305 100644 --- a/numpy/core/src/multiarray/nditer_templ.c.src +++ b/numpy/core/src/multiarray/nditer_templ.c.src @@ -3,7 +3,7 @@ * are specialized using the templating system. * * Copyright (c) 2010-2011 by Mark Wiebe (mwwiebe@gmail.com) - * The Univerity of British Columbia + * The University of British Columbia * * See LICENSE.txt for the license. */ diff --git a/numpy/core/src/multiarray/usertypes.c b/numpy/core/src/multiarray/usertypes.c index f69abcc6b0e9..c32a710de5f2 100644 --- a/numpy/core/src/multiarray/usertypes.c +++ b/numpy/core/src/multiarray/usertypes.c @@ -11,7 +11,7 @@ by Travis Oliphant, oliphant@ee.byu.edu - Brigham Young Univeristy + Brigham Young University maintainer email: oliphant.travis@ieee.org diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c index 63ed4f492d2d..9e8c3c9851c6 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -582,7 +582,7 @@ _is_same_name(const char* s1, const char* s2) /* * Sets core_num_dim_ix, core_num_dims, core_dim_ixs, core_offsets, * and core_signature in PyUFuncObject "ufunc". Returns 0 unless an - * error occured. + * error occurred. */ static int _parse_signature(PyUFuncObject *ufunc, const char *signature) diff --git a/numpy/core/tests/test_einsum.py b/numpy/core/tests/test_einsum.py index 1f863a7db925..77fb75f10b54 100644 --- a/numpy/core/tests/test_einsum.py +++ b/numpy/core/tests/test_einsum.py @@ -581,7 +581,7 @@ def test_einsum_fixedstridebug(self): def test_einsum_fixed_collapsingbug(self): # Issue #5147. - # The bug only occured when output argument of einssum was used. + # The bug only occurred when output argument of einssum was used. x = np.random.normal(0, 1, (5, 5, 5, 5)) y1 = np.zeros((5, 5)) np.einsum('aabb->ab', x, out=y1) diff --git a/numpy/distutils/exec_command.py b/numpy/distutils/exec_command.py index 9fa09cd51ce0..50f03feeb427 100644 --- a/numpy/distutils/exec_command.py +++ b/numpy/distutils/exec_command.py @@ -21,7 +21,7 @@ Requires: Python 2.x -Succesfully tested on: +Successfully tested on: ======== ============ ================================================= os.name sys.platform comments diff --git a/numpy/distutils/from_template.py b/numpy/distutils/from_template.py index d10b50218d2a..e38e4d60893e 100644 --- a/numpy/distutils/from_template.py +++ b/numpy/distutils/from_template.py @@ -11,7 +11,7 @@ All function and subroutine blocks in a source file with names that contain '<..>' will be replicated according to the rules in '<..>'. - The number of comma-separeted words in '<..>' will determine the number of + The number of comma-separated words in '<..>' will determine the number of replicates. '<..>' may have two different forms, named and short. For example, diff --git a/numpy/doc/byteswapping.py b/numpy/doc/byteswapping.py index 59c0498789a1..22eb71e6d563 100644 --- a/numpy/doc/byteswapping.py +++ b/numpy/doc/byteswapping.py @@ -108,7 +108,7 @@ >>> fixed_end_dtype_arr[0] 1 -Note the the array has not changed in memory: +Note the array has not changed in memory: >>> fixed_end_dtype_arr.tobytes() == big_end_str True diff --git a/numpy/doc/internals.py b/numpy/doc/internals.py index 6bd6b1ae9474..c25872bc02ea 100644 --- a/numpy/doc/internals.py +++ b/numpy/doc/internals.py @@ -49,7 +49,7 @@ use of the .copy() method if one really wants to make a new and independent copy of the data buffer. -New views into arrays mean the the object reference counts for the data buffer +New views into arrays mean the object reference counts for the data buffer increase. Simply doing away with the original array object will not remove the data buffer if other views of it still exist. diff --git a/numpy/f2py/capi_maps.py b/numpy/f2py/capi_maps.py index 5270cabb5be5..441629faa0c9 100644 --- a/numpy/f2py/capi_maps.py +++ b/numpy/f2py/capi_maps.py @@ -211,7 +211,7 @@ else: errmess("\tIgnoring map {'%s':{'%s':'%s'}}: '%s' must be in %s\n" % ( k, k1, d[k][k1], d[k][k1], list(c2py_map.keys()))) - outmess('Succesfully applied user defined changes from .f2py_f2cmap\n') + outmess('Successfully applied user defined changes from .f2py_f2cmap\n') except Exception as msg: errmess( 'Failed to apply user defined changes from .f2py_f2cmap: %s. Skipping.\n' % (msg)) diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py index 9f8c8962a2f3..a51eb5d38a58 100755 --- a/numpy/f2py/crackfortran.py +++ b/numpy/f2py/crackfortran.py @@ -635,7 +635,7 @@ def crackline(line, reset=0): """ reset=-1 --- initialize reset=0 --- crack the line - reset=1 --- final check if mismatch of blocks occured + reset=1 --- final check if mismatch of blocks occurred Cracked data is saved in grouplist[0]. """ diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py index 2ea8351a236f..37cc76ec2f3c 100644 --- a/numpy/f2py/rules.py +++ b/numpy/f2py/rules.py @@ -15,14 +15,14 @@ get_b_from_python if (successful) { - callfortran - if (succesful) { + call_fortran + if (successful) { put_a_to_python - if (succesful) { + if (successful) { put_b_to_python - if (succesful) { + if (successful) { buildvalue = ... diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 844c069c0bfc..a1048002cbb4 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1022,7 +1022,7 @@ def select(condlist, choicelist, default=0): dtype = np.result_type(*choicelist) # Convert conditions to arrays and broadcast conditions and choices - # as the shape is needed for the result. Doing it seperatly optimizes + # as the shape is needed for the result. Doing it separately optimizes # for example when all choices are scalars. condlist = np.broadcast_arrays(*condlist) choicelist = np.broadcast_arrays(*choicelist) @@ -1244,7 +1244,7 @@ def gradient(f, *varargs, **kwargs): # Convert datetime64 data into ints. Make dummy variable `y` # that is a view of ints if the data is datetime64, otherwise - # just set y equal to the the array `f`. + # just set y equal to the array `f`. if f.dtype.char in ["M", "m"]: y = f.view('int64') else: diff --git a/numpy/linalg/lapack_lite/dlapack_lite.c b/numpy/linalg/lapack_lite/dlapack_lite.c index 6b65397bd089..9f864d7ceccd 100644 --- a/numpy/linalg/lapack_lite/dlapack_lite.c +++ b/numpy/linalg/lapack_lite/dlapack_lite.c @@ -22678,7 +22678,7 @@ doublereal clanhs_(char *norm, integer *n, complex *a, integer *lda, real * =============== The algorithm used in this program is basically backward (forward) - substitution, with scaling to make the the code robust against + substitution, with scaling to make the code robust against possible overflow. Each eigenvector is normalized so that the element of largest @@ -61663,7 +61663,7 @@ doublereal dlapy3_(doublereal *x, doublereal *y, doublereal *z__) =============== The algorithm used in this program is basically backward (forward) - substitution, with scaling to make the the code robust against + substitution, with scaling to make the code robust against possible overflow. Each eigenvector is normalized so that the element of largest @@ -99417,7 +99417,7 @@ doublereal slapy3_(real *x, real *y, real *z__) =============== The algorithm used in this program is basically backward (forward) - substitution, with scaling to make the the code robust against + substitution, with scaling to make the code robust against possible overflow. Each eigenvector is normalized so that the element of largest diff --git a/numpy/linalg/lapack_lite/zlapack_lite.c b/numpy/linalg/lapack_lite/zlapack_lite.c index e6b03429b77a..9ce05ec1fd3c 100644 --- a/numpy/linalg/lapack_lite/zlapack_lite.c +++ b/numpy/linalg/lapack_lite/zlapack_lite.c @@ -22760,7 +22760,7 @@ doublereal zlanhs_(char *norm, integer *n, doublecomplex *a, integer *lda, =============== The algorithm used in this program is basically backward (forward) - substitution, with scaling to make the the code robust against + substitution, with scaling to make the code robust against possible overflow. Each eigenvector is normalized so that the element of largest diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 690655b361b8..2b4ef98e7b9b 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -5583,7 +5583,7 @@ def max(self, axis=None, out=None, fill_value=None): def ptp(self, axis=None, out=None, fill_value=None): """ - Return (maximum - minimum) along the the given dimension + Return (maximum - minimum) along the given dimension (i.e. peak-to-peak value). Parameters