summaryrefslogtreecommitdiff
path: root/numpy/core
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/core
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/core')
-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
6 files changed, 7 insertions, 7 deletions
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: