summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/usertypes.c4
-rw-r--r--numpy/dtypes.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/multiarray/usertypes.c b/numpy/core/src/multiarray/usertypes.c
index 4f5b05eb6..16ca74ef8 100644
--- a/numpy/core/src/multiarray/usertypes.c
+++ b/numpy/core/src/multiarray/usertypes.c
@@ -263,7 +263,7 @@ PyArray_RegisterDataType(PyArray_Descr *descr)
/*
* Legacy user DTypes classes cannot have a name, since the user never
- * defined on. So we create a name for them here, these DTypes are
+ * defined one. So we create a name for them here. These DTypes are
* effectively static types.
*
* Note: we have no intention of freeing the memory again since this
@@ -297,7 +297,7 @@ PyArray_RegisterDataType(PyArray_Descr *descr)
if (dtypemeta_wrap_legacy_descriptor(descr, name, NULL) < 0) {
descr->type_num = -1;
NPY_NUMUSERTYPES--;
- PyMem_Free(name); /* free the name on failure, but only then */
+ PyMem_Free(name); /* free the name only on failure */
return -1;
}
if (use_void_clearimpl) {
diff --git a/numpy/dtypes.py b/numpy/dtypes.py
index cde18933c..fd35caf97 100644
--- a/numpy/dtypes.py
+++ b/numpy/dtypes.py
@@ -11,7 +11,7 @@ that are not widely used directly.
.. versionadded:: NumPy 1.25
- The types module is new in NumPy 1.25. Previously DType classes were
+ The dtypes module is new in NumPy 1.25. Previously DType classes were
only accessible indirectly.
@@ -19,7 +19,7 @@ DType classes
-------------
The following are the classes of the corresponding NumPy dtype instances and
-NumPy scalar types. The classe can be used for ``isinstance`` checks and can
+NumPy scalar types. The classes can be used in ``isinstance`` checks and can
also be instantiated or used directly. Direct use of these classes is not
typical, since their scalar counterparts (e.g. ``np.float64``) or strings
like ``"float64"` can be used.