diff options
author | Christian Veenhuis <veenhuis@gmail.com> | 2023-03-21 22:06:02 +0000 |
---|---|---|
committer | Christian Veenhuis <veenhuis@gmail.com> | 2023-03-21 22:06:02 +0000 |
commit | 4c2f6f6c3c012b2158cc468a95bce91906f75f0e (patch) | |
tree | cd53426bce23444ef37c83646c669d44d47c3c45 | |
parent | 094416f7433a0bc077e472e801fe36613318c01f (diff) | |
download | numpy-4c2f6f6c3c012b2158cc468a95bce91906f75f0e.tar.gz |
MAINT: Fix 'paramteric' typo
-rw-r--r-- | numpy/core/tests/test_array_coercion.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/core/tests/test_array_coercion.py b/numpy/core/tests/test_array_coercion.py index 0ba736c05..838c61bc2 100644 --- a/numpy/core/tests/test_array_coercion.py +++ b/numpy/core/tests/test_array_coercion.py @@ -1,6 +1,6 @@ """ Tests for array coercion, mainly through testing `np.array` results directly. -Note that other such tests exist e.g. in `test_api.py` and many corner-cases +Note that other such tests exist, e.g., in `test_api.py` and many corner-cases are tested (sometimes indirectly) elsewhere. """ @@ -20,8 +20,8 @@ from numpy.testing import ( def arraylikes(): """ Generator for functions converting an array into various array-likes. - If full is True (default) includes array-likes not capable of handling - all dtypes + If full is True (default) it includes array-likes not capable of handling + all dtypes. """ # base array: def ndarray(a): @@ -40,8 +40,8 @@ def arraylikes(): class _SequenceLike(): # We are giving a warning that array-like's were also expected to be - # sequence-like in `np.array([array_like])`, this can be removed - # when the deprecation exired (started NumPy 1.20) + # sequence-like in `np.array([array_like])`. This can be removed + # when the deprecation expired (started NumPy 1.20). def __len__(self): raise TypeError @@ -259,7 +259,7 @@ class TestScalarDiscovery: @pytest.mark.parametrize("scalar", scalar_instances()) def test_scalar_coercion(self, scalar): # This tests various scalar coercion paths, mainly for the numerical - # types. It includes some paths not directly related to `np.array` + # types. It includes some paths not directly related to `np.array`. if isinstance(scalar, np.inexact): # Ensure we have a full-precision number if available scalar = type(scalar)((scalar * 2)**0.5) @@ -294,7 +294,7 @@ class TestScalarDiscovery: * `np.array(scalar, dtype=dtype)` * `np.empty((), dtype=dtype)[()] = scalar` * `np.array(scalar).astype(dtype)` - should behave the same. The only exceptions are paramteric dtypes + should behave the same. The only exceptions are parametric dtypes (mainly datetime/timedelta without unit) and void without fields. """ dtype = cast_to.dtype # use to parametrize only the target dtype @@ -386,7 +386,7 @@ class TestScalarDiscovery: """ dtype = np.dtype(dtype) - # This is a special case using casting logic. It warns for the NaN + # This is a special case using casting logic. It warns for the NaN # but allows the cast (giving undefined behaviour). with np.errstate(invalid="ignore"): coerced = np.array(scalar, dtype=dtype) |