summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2022-01-12 20:12:35 -0700
committerGitHub <noreply@github.com>2022-01-12 20:12:35 -0700
commit813a0c11186ded0b5caeb853fd2b22fb9addd511 (patch)
tree48544dd4971593a63098a105ae26e59c8482129f /numpy
parentf98c60a035b007680fe811eeed3b6326961ccff5 (diff)
parent76b1ba156e792187f133db8e8bdd968a3fdbe5be (diff)
downloadnumpy-813a0c11186ded0b5caeb853fd2b22fb9addd511.tar.gz
Merge pull request #20784 from DimitriPapadopoulos/codespell
MAINT, DOC: fix new typos detected by codespell
Diffstat (limited to 'numpy')
-rw-r--r--numpy/_globals.py2
-rw-r--r--numpy/core/_add_newdocs.py4
-rw-r--r--numpy/core/include/numpy/experimental_dtype_api.h2
-rw-r--r--numpy/core/src/common/simd/vsx/vsx.h2
-rw-r--r--numpy/core/src/umath/reduction.c2
-rw-r--r--numpy/core/src/umath/ufunc_object.c2
-rw-r--r--numpy/core/tests/test_api.py2
-rw-r--r--numpy/distutils/checks/cpu_vxe.c2
-rwxr-xr-xnumpy/f2py/crackfortran.py2
-rw-r--r--numpy/lib/npyio.py2
-rw-r--r--numpy/testing/_private/extbuild.py2
11 files changed, 12 insertions, 12 deletions
diff --git a/numpy/_globals.py b/numpy/_globals.py
index c88874725..593d90e42 100644
--- a/numpy/_globals.py
+++ b/numpy/_globals.py
@@ -116,7 +116,7 @@ class _CopyMode(enum.Enum):
NEVER = 2
def __bool__(self):
- # For backwards compatiblity
+ # For backwards compatibility
if self == _CopyMode.ALWAYS:
return True
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index 219383e1e..a800143a8 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -833,7 +833,7 @@ add_newdoc('numpy.core.multiarray', 'array',
the returned array will be forced to be a base-class array (default).
ndmin : int, optional
Specifies the minimum number of dimensions that the resulting
- array should have. Ones will be pre-pended to the shape as
+ array should have. Ones will be prepended to the shape as
needed to meet this requirement.
${ARRAY_FUNCTION_LIKE}
@@ -4097,7 +4097,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('partition',
See Also
--------
- numpy.partition : Return a parititioned copy of an array.
+ numpy.partition : Return a partitioned copy of an array.
argpartition : Indirect partition.
sort : Full sort.
diff --git a/numpy/core/include/numpy/experimental_dtype_api.h b/numpy/core/include/numpy/experimental_dtype_api.h
index 83639f186..88565cd52 100644
--- a/numpy/core/include/numpy/experimental_dtype_api.h
+++ b/numpy/core/include/numpy/experimental_dtype_api.h
@@ -141,7 +141,7 @@ typedef struct {
* NOTE: Expected changes:
* * invert logic of floating point error flag
* * probably split runtime and general flags into two
- * * should possibly not use an enum for typdef for more stable ABI?
+ * * should possibly not use an enum for typedef for more stable ABI?
*/
typedef enum {
/* Flag for whether the GIL is required */
diff --git a/numpy/core/src/common/simd/vsx/vsx.h b/numpy/core/src/common/simd/vsx/vsx.h
index 66b76208f..b4d8172a2 100644
--- a/numpy/core/src/common/simd/vsx/vsx.h
+++ b/numpy/core/src/common/simd/vsx/vsx.h
@@ -61,7 +61,7 @@ typedef struct { npyv_f64 val[3]; } npyv_f64x3;
#define npyv_nlanes_f32 4
#define npyv_nlanes_f64 2
-// using __bool with typdef cause ambiguous errors
+// using __bool with typedef cause ambiguous errors
#define npyv_b8 __vector __bool char
#define npyv_b16 __vector __bool short
#define npyv_b32 __vector __bool int
diff --git a/numpy/core/src/umath/reduction.c b/numpy/core/src/umath/reduction.c
index 8cb44d433..8c4df6e02 100644
--- a/numpy/core/src/umath/reduction.c
+++ b/numpy/core/src/umath/reduction.c
@@ -337,7 +337,7 @@ PyUFunc_ReduceWrapper(PyArrayMethod_Context *context,
/*
* Note that we need to ensure that the iterator is reset before getting
- * the fixed strides. (The buffer information is unitialized before.)
+ * the fixed strides. (The buffer information is uninitialized before.)
*/
npy_intp fixed_strides[3];
NpyIter_GetInnerFixedStrideArray(iter, fixed_strides);
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index 2674c85d9..7b0db9e04 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -2704,7 +2704,7 @@ PyUFunc_GenericFunction(PyUFuncObject *NPY_UNUSED(ufunc),
* @param out_descrs New references to the resolved descriptors (on success).
* @param method The ufunc method, "reduce", "reduceat", or "accumulate".
- * @returns ufuncimpl The `ArrayMethod` implemention to use. Or NULL if an
+ * @returns ufuncimpl The `ArrayMethod` implementation to use. Or NULL if an
* error occurred.
*/
static PyArrayMethodObject *
diff --git a/numpy/core/tests/test_api.py b/numpy/core/tests/test_api.py
index d3c7211cd..22a06619c 100644
--- a/numpy/core/tests/test_api.py
+++ b/numpy/core/tests/test_api.py
@@ -144,7 +144,7 @@ def test_array_array():
@pytest.mark.parametrize("array", [True, False])
def test_array_impossible_casts(array):
- # All builtin types can forst cast as least theoretically
+ # All builtin types can be forcibly cast, at least theoretically,
# but user dtypes cannot necessarily.
rt = rational(1, 2)
if array:
diff --git a/numpy/distutils/checks/cpu_vxe.c b/numpy/distutils/checks/cpu_vxe.c
index ca41f8434..e6933adce 100644
--- a/numpy/distutils/checks/cpu_vxe.c
+++ b/numpy/distutils/checks/cpu_vxe.c
@@ -12,7 +12,7 @@ int main(int argc, char **argv)
__vector bool int m = vec_cmpge(x, y);
x = vec_sel(x, y, m);
- // need to test the existance of intrin "vflls" since vec_doublee
+ // need to test the existence of intrin "vflls" since vec_doublee
// is vec_doublee maps to wrong intrin "vfll".
// see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100871
#if defined(__GNUC__) && !defined(__clang__)
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
index 10b210d14..aacd2c676 100755
--- a/numpy/f2py/crackfortran.py
+++ b/numpy/f2py/crackfortran.py
@@ -2686,7 +2686,7 @@ def analyzevars(block):
# Skip a variable that
# - n depends on
# - has user-defined initialization expression
- # - has user-defined dependecies
+ # - has user-defined dependencies
continue
if solver is not None:
# v can be solved from d, hence, we
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index a6c2d4c2d..bbf896bda 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -818,7 +818,7 @@ def _loadtxt_pack_items(packing, items):
def _ensure_ndmin_ndarray_check_param(ndmin):
"""Just checks if the param ndmin is supported on
- _ensure_ndmin_ndarray. Is intented to be used as
+ _ensure_ndmin_ndarray. It is intended to be used as
verification before running anything expensive.
e.g. loadtxt, genfromtxt
"""
diff --git a/numpy/testing/_private/extbuild.py b/numpy/testing/_private/extbuild.py
index 20bf3dcea..940e2f7d7 100644
--- a/numpy/testing/_private/extbuild.py
+++ b/numpy/testing/_private/extbuild.py
@@ -27,7 +27,7 @@ def build_and_import_extension(
functions : list of fragments
Each fragment is a sequence of func_name, calling convention, snippet.
prologue : string
- Code to preceed the rest, usually extra ``#include`` or ``#define``
+ Code to precede the rest, usually extra ``#include`` or ``#define``
macros.
build_dir : pathlib.Path
Where to build the module, usually a temporary directory