summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorluz.paz <luzpaz@users.noreply.github.com>2018-01-04 20:48:10 -0500
committerluz.paz <luzpaz@users.noreply.github.com>2018-01-04 20:48:10 -0500
commit7cb22f954ed50217f7eb483f4fbdb67953f6482d (patch)
tree17a28979c0abae1b41b5760df4621bc964c8f948 /numpy
parent9a902b775c12be99708a0a33a244ace3521855de (diff)
downloadnumpy-7cb22f954ed50217f7eb483f4fbdb67953f6482d.tar.gz
More misc. typos
Found via `codespell`
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/arrayprint.py2
-rw-r--r--numpy/core/code_generators/ufunc_docstrings.py2
-rw-r--r--numpy/core/setup_common.py2
-rw-r--r--numpy/core/src/multiarray/ctors.c2
-rw-r--r--numpy/core/src/multiarray/dragon4.c4
-rw-r--r--numpy/core/src/multiarray/einsum.c.src2
-rw-r--r--numpy/core/src/npymath/halffloat.c4
-rw-r--r--numpy/core/src/npysort/quicksort.c.src2
-rw-r--r--numpy/core/src/umath/ufunc_object.c2
-rw-r--r--numpy/distutils/command/config.py2
-rw-r--r--numpy/doc/subclassing.py2
-rw-r--r--numpy/lib/arraypad.py2
-rw-r--r--numpy/lib/function_base.py2
-rw-r--r--numpy/lib/tests/test_index_tricks.py2
-rw-r--r--numpy/lib/tests/test_io.py8
-rw-r--r--numpy/lib/type_check.py2
-rw-r--r--numpy/lib/utils.py2
-rw-r--r--numpy/ma/core.py2
-rw-r--r--numpy/polynomial/polynomial.py2
-rw-r--r--numpy/random/tests/test_random.py2
20 files changed, 25 insertions, 25 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
index 238e1782f..18ba23624 100644
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -707,7 +707,7 @@ def _formatArray(a, format_function, line_width, next_line_prefix,
line += separator
if legacy == '1.13':
- # width of the seperator is not considered on 1.13
+ # width of the separator is not considered on 1.13
elem_width = curr_width
word = recurser(index + (-1,), next_hanging_indent, next_width)
s, line = _extendLine(
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py
index 604168162..75dee7084 100644
--- a/numpy/core/code_generators/ufunc_docstrings.py
+++ b/numpy/core/code_generators/ufunc_docstrings.py
@@ -297,7 +297,7 @@ add_newdoc('numpy.core.umath', 'arcsinh',
Returns
-------
out : ndarray
- Array of of the same shape as `x`.
+ Array of the same shape as `x`.
Notes
-----
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index bd093c5c8..1fe953910 100644
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -166,7 +166,7 @@ OPTIONAL_FUNCTION_ATTRIBUTES = [('__attribute__((optimize("unroll-loops")))',
# variable attributes tested via "int %s a" % attribute
OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread", "__declspec(thread)"]
-# Subset of OPTIONAL_STDFUNCS which may alreay have HAVE_* defined by Python.h
+# Subset of OPTIONAL_STDFUNCS which may already have HAVE_* defined by Python.h
OPTIONAL_STDFUNCS_MAYBE = [
"expm1", "log1p", "acosh", "atanh", "asinh", "hypot", "copysign",
"ftello", "fseeko"
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index f4236f36d..493cebcfc 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -1843,7 +1843,7 @@ PyArray_FromAny(PyObject *op, PyArray_Descr *newtype, int min_depth,
* NPY_ARRAY_WRITEBACKIFCOPY flag sets this flag in the returned
* array if a copy is made and the base argument points to the (possibly)
* misbehaved array. Before returning to python, PyArray_ResolveWritebackIfCopy
- * must be called to update the contents of the orignal array from the copy.
+ * must be called to update the contents of the original array from the copy.
*
* NPY_ARRAY_FORCECAST will cause a cast to occur regardless of whether or not
* it is safe.
diff --git a/numpy/core/src/multiarray/dragon4.c b/numpy/core/src/multiarray/dragon4.c
index 8606adf99..5f4e38e9f 100644
--- a/numpy/core/src/multiarray/dragon4.c
+++ b/numpy/core/src/multiarray/dragon4.c
@@ -1002,7 +1002,7 @@ BigInt_ShiftLeft(BigInt *result, npy_uint32 shift)
* * exponent - value exponent in base 2
* * mantissaBit - index of the highest set mantissa bit
* * hasUnequalMargins - is the high margin twice as large as the low margin
- * * cutoffMode - how to intepret cutoffNumber: fractional or total digits?
+ * * cutoffMode - how to interpret cutoffNumber: fractional or total digits?
* * cutoffNumber - cut off printing after this many digits. -1 for no cutoff
* * pOutBuffer - buffer to output into
* * bufferSize - maximum characters that can be printed to pOutBuffer
@@ -1381,7 +1381,7 @@ Dragon4(const npy_uint64 mantissa, const npy_int32 exponent,
/*
* if we are directly in the middle, round towards the even digit (i.e.
- * IEEE rouding rules)
+ * IEEE rounding rules)
*/
if (compare == 0) {
roundDown = (outputDigit & 1) == 0;
diff --git a/numpy/core/src/multiarray/einsum.c.src b/numpy/core/src/multiarray/einsum.c.src
index 943b8aecf..7db606194 100644
--- a/numpy/core/src/multiarray/einsum.c.src
+++ b/numpy/core/src/multiarray/einsum.c.src
@@ -1905,7 +1905,7 @@ parse_operand_subscripts(char *subscripts, int length,
/*
* Find any labels duplicated for this operand, and turn them
- * into negative offets to the axis to merge with.
+ * into negative offsets to the axis to merge with.
*
* In C, the char type may be signed or unsigned, but with
* twos complement arithmetic the char is ok either way here, and
diff --git a/numpy/core/src/npymath/halffloat.c b/numpy/core/src/npymath/halffloat.c
index 951768256..9fef2cef7 100644
--- a/numpy/core/src/npymath/halffloat.c
+++ b/numpy/core/src/npymath/halffloat.c
@@ -281,7 +281,7 @@ npy_uint16 npy_floatbits_to_halfbits(npy_uint32 f)
if (f_exp <= 0x38000000u) {
/*
* Signed zeros, subnormal floats, and floats with small
- * exponents all convert to signed zero halfs.
+ * exponents all convert to signed zero halves.
*/
if (f_exp < 0x33000000u) {
#if NPY_HALF_GENERATE_UNDERFLOW
@@ -396,7 +396,7 @@ npy_uint16 npy_doublebits_to_halfbits(npy_uint64 d)
if (d_exp <= 0x3f00000000000000ULL) {
/*
* Signed zeros, subnormal floats, and floats with small
- * exponents all convert to signed zero halfs.
+ * exponents all convert to signed zero halves.
*/
if (d_exp < 0x3e60000000000000ULL) {
#if NPY_HALF_GENERATE_UNDERFLOW
diff --git a/numpy/core/src/npysort/quicksort.c.src b/numpy/core/src/npysort/quicksort.c.src
index ff0e8a149..49a2c4906 100644
--- a/numpy/core/src/npysort/quicksort.c.src
+++ b/numpy/core/src/npysort/quicksort.c.src
@@ -482,7 +482,7 @@ npy_quicksort(void *start, npy_intp num, void *varr)
pj = pr - elsize;
GENERIC_SWAP(pm, pj, elsize);
/*
- * Generic comparisons may be buggy, so don't rely on the sentinals
+ * Generic comparisons may be buggy, so don't rely on the sentinels
* to keep the pointers from going out of bounds.
*/
for (;;) {
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index 304b4fc27..1cd16d122 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -1256,7 +1256,7 @@ iterator_loop(PyUFuncObject *ufunc,
arr_prep[i], arr_prep_args, i) < 0) {
for(iop = 0; iop < nin+i; ++iop) {
if (op_it[iop] != op[iop]) {
- /* ignore errrors */
+ /* ignore errors */
PyArray_ResolveWritebackIfCopy(op_it[iop]);
}
}
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index a7368a7ae..66d4ed58d 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -359,7 +359,7 @@ int main (void)
decl : dict
for every (key, value), the declaration in the value will be
used for function in key. If a function is not in the
- dictionay, no declaration will be used.
+ dictionary, no declaration will be used.
call : dict
for every item (f, value), if the value is True, a call will be
done to the function f.
diff --git a/numpy/doc/subclassing.py b/numpy/doc/subclassing.py
index c34278868..467e31cea 100644
--- a/numpy/doc/subclassing.py
+++ b/numpy/doc/subclassing.py
@@ -441,7 +441,7 @@ The signature of ``__array_ufunc__`` is::
function. This includes any ``out`` arguments, which are always
contained in a tuple.
-A typical implementation would convert any inputs or ouputs that are
+A typical implementation would convert any inputs or outputs that are
instances of one's own class, pass everything on to a superclass using
``super()``, and finally return the results after possible
back-conversion. An example, taken from the test case
diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py
index 153b4af65..cdc354a02 100644
--- a/numpy/lib/arraypad.py
+++ b/numpy/lib/arraypad.py
@@ -1186,7 +1186,7 @@ def pad(array, pad_width, mode, **kwargs):
reflect_type : {'even', 'odd'}, optional
Used in 'reflect', and 'symmetric'. The 'even' style is the
default with an unaltered reflection around the edge value. For
- the 'odd' style, the extented part of the array is created by
+ the 'odd' style, the extended part of the array is created by
subtracting the reflected values from two times the edge value.
Returns
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 979bc13d0..7571c4f3b 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -3528,7 +3528,7 @@ def _quantile_ureduce_func(a, q, axis=None, out=None, overwrite_input=False,
else:
zerod = False
- # prepare a for partioning
+ # prepare a for partitioning
if overwrite_input:
if axis is None:
ap = a.ravel()
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index b5e06dad0..0520ce580 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -245,7 +245,7 @@ class TestIndexExpression(object):
class TestIx_(object):
def test_regression_1(self):
- # Test empty inputs create ouputs of indexing type, gh-5804
+ # Test empty inputs create outputs of indexing type, gh-5804
# Test both lists and arrays
for func in (range, np.arange):
a, = np.ix_(func(0))
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
index 75a8e4968..a274636da 100644
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -376,7 +376,7 @@ class TestSaveTxt(object):
lines = c.readlines()
assert_equal(lines, [b'01 : 2.0\n', b'03 : 4.0\n'])
- # Specify delimiter, should be overiden
+ # Specify delimiter, should be overridden
c = BytesIO()
np.savetxt(c, a, fmt='%02d : %3.1f', delimiter=',')
c.seek(0)
@@ -1096,7 +1096,7 @@ class TestFromTxt(LoadTxtBase):
assert_equal(test, control)
def test_array(self):
- # Test outputing a standard ndarray
+ # Test outputting a standard ndarray
data = TextIO('1 2\n3 4')
control = np.array([[1, 2], [3, 4]], dtype=int)
test = np.ndfromtxt(data, dtype=int)
@@ -2226,7 +2226,7 @@ class TestPathUsage(object):
@dec.skipif(Path is None, "No pathlib.Path")
def test_ndfromtxt(self):
- # Test outputing a standard ndarray
+ # Test outputting a standard ndarray
with temppath(suffix='.txt') as path:
path = Path(path)
with path.open('w') as f:
@@ -2292,7 +2292,7 @@ def test_gzip_load():
def test_gzip_loadtxt():
- # Thanks to another windows brokeness, we can't use
+ # Thanks to another windows brokenness, we can't use
# NamedTemporaryFile: a file created from this function cannot be
# reopened by another open call. So we first put the gzipped string
# of the test reference array, write it to a securely opened file,
diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py
index 5c7528d4f..bfb5963f2 100644
--- a/numpy/lib/type_check.py
+++ b/numpy/lib/type_check.py
@@ -215,7 +215,7 @@ def iscomplex(x):
if issubclass(ax.dtype.type, _nx.complexfloating):
return ax.imag != 0
res = zeros(ax.shape, bool)
- return +res # convet to array-scalar if needed
+ return +res # convert to array-scalar if needed
def isreal(x):
"""
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index e18eda0fb..1ecd334af 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -707,7 +707,7 @@ def lookfor(what, module=None, import_modules=True, regenerate=False,
"""
Do a keyword search on docstrings.
- A list of of objects that matched the search is displayed,
+ A list of objects that matched the search is displayed,
sorted by relevance. All given keywords need to be found in the
docstring for it to be returned as a result, but the order does
not matter.
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 69f01b819..719961d1b 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -4285,7 +4285,7 @@ class MaskedArray(ndarray):
Convert to long.
"""
if self.size > 1:
- raise TypeError("Only length-1 arrays can be conveted "
+ raise TypeError("Only length-1 arrays can be converted "
"to Python scalars")
elif self._mask:
raise MaskError('Cannot convert masked element to a Python long.')
diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py
index a71e5b549..adbf30234 100644
--- a/numpy/polynomial/polynomial.py
+++ b/numpy/polynomial/polynomial.py
@@ -36,7 +36,7 @@ Misc Functions
--------------
- `polyfromroots` -- create a polynomial with specified roots.
- `polyroots` -- find the roots of a polynomial.
-- `polyvalfromroots` -- evalute a polynomial at given points from roots.
+- `polyvalfromroots` -- evaluate a polynomial at given points from roots.
- `polyvander` -- Vandermonde-like matrix for powers.
- `polyvander2d` -- Vandermonde-like matrix for 2D power series.
- `polyvander3d` -- Vandermonde-like matrix for 3D power series.
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 6ada4d997..4546a0184 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -231,7 +231,7 @@ class TestRandint(object):
res = hashlib.md5(val.view(np.int8)).hexdigest()
assert_(tgt[np.dtype(dt).name] == res)
- # bools do not depend on endianess
+ # bools do not depend on endianness
np.random.seed(1234)
val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
res = hashlib.md5(val).hexdigest()