diff options
author | gfyoung <gfyoung@mit.edu> | 2015-12-13 18:11:14 -0800 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2015-12-16 12:23:50 -0800 |
commit | 084952500f388caed570b0961194a5b76bd8b6be (patch) | |
tree | 9b129826d2db423649b1d80cefec9adf93ab0519 | |
parent | 402e3d3498b680cd6522b4c1fa55902d2e5ed57f (diff) | |
download | numpy-084952500f388caed570b0961194a5b76bd8b6be.tar.gz |
MAINT: minor spelling and grammar corrections
-rw-r--r-- | doc/release/1.11.0-notes.rst | 2 | ||||
-rw-r--r-- | numpy/core/tests/test_deprecations.py | 20 | ||||
-rw-r--r-- | numpy/random/tests/test_random.py | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/doc/release/1.11.0-notes.rst b/doc/release/1.11.0-notes.rst index fac868ca3..47b11fd57 100644 --- a/doc/release/1.11.0-notes.rst +++ b/doc/release/1.11.0-notes.rst @@ -110,7 +110,7 @@ Views of arrays in Fortran order The f_contiguous flag was used to signal that views as a dtypes that changed the element size would change the first index. This was always a bit problematical for arrays that were both f_contiguous and c_contiguous -because c_contiguous took precendence. Relaxed stride checking results in +because c_contiguous took precedence. Relaxed stride checking results in more such dual contiguous arrays and breaks some existing code as a result. Note that this also affects changing the dtype by assigning to the dtype attribute of an array. The aim of this deprecation is to restrict views to diff --git a/numpy/core/tests/test_deprecations.py b/numpy/core/tests/test_deprecations.py index 372af9c0b..f6dc3d842 100644 --- a/numpy/core/tests/test_deprecations.py +++ b/numpy/core/tests/test_deprecations.py @@ -163,8 +163,8 @@ class TestRankDeprecation(_DeprecationTestCase): class TestComparisonDeprecations(_DeprecationTestCase): - """This tests the deprecation, for non-elementwise comparison logic. - This used to mean that when an error occured during element-wise comparison + """This tests the deprecation, for non-element-wise comparison logic. + This used to mean that when an error occurred during element-wise comparison (i.e. broadcasting) NotImplemented was returned, but also in the comparison itself, False was given instead of the error. @@ -192,13 +192,13 @@ class TestComparisonDeprecations(_DeprecationTestCase): b = np.array(['a', 'b', 'c']) assert_raises(ValueError, lambda x, y: x == y, a, b) - # The empty list is not cast to string, this is only to document + # The empty list is not cast to string, as this is only to document # that fact (it likely should be changed). This means that the # following works (and returns False) due to dtype mismatch: a == [] def test_none_comparison(self): - # Test comparison of None, which should result in elementwise + # Test comparison of None, which should result in element-wise # comparison in the future. [1, 2] == None should be [False, False]. with warnings.catch_warnings(): warnings.filterwarnings('always', '', FutureWarning) @@ -211,7 +211,7 @@ class TestComparisonDeprecations(_DeprecationTestCase): assert_raises(FutureWarning, operator.ne, np.arange(3), None) def test_scalar_none_comparison(self): - # Scalars should still just return false and not give a warnings. + # Scalars should still just return False and not give a warnings. # The comparisons are flagged by pep8, ignore that. with warnings.catch_warnings(record=True) as w: warnings.filterwarnings('always', '', FutureWarning) @@ -226,9 +226,9 @@ class TestComparisonDeprecations(_DeprecationTestCase): assert_(np.datetime64('NaT') != None) assert_(len(w) == 0) - # For documentaiton purpose, this is why the datetime is dubious. + # For documentation purposes, this is why the datetime is dubious. # At the time of deprecation this was no behaviour change, but - # it has to be considered when the deprecations is done. + # it has to be considered when the deprecations are done. assert_(np.equal(np.datetime64('NaT'), None)) def test_void_dtype_equality_failures(self): @@ -338,8 +338,8 @@ class TestIdentityComparisonDeprecations(_DeprecationTestCase): class TestAlterdotRestoredotDeprecations(_DeprecationTestCase): """The alterdot/restoredot functions are deprecated. - These functions no longer do anything in numpy 1.10, so should not be - used. + These functions no longer do anything in numpy 1.10, so + they should not be used. """ @@ -350,7 +350,7 @@ class TestAlterdotRestoredotDeprecations(_DeprecationTestCase): class TestBooleanIndexShapeMismatchDeprecation(): """Tests deprecation for boolean indexing where the boolean array - does not match the input array along the given diemsions. + does not match the input array along the given dimensions. """ message = r"boolean index did not match indexed array" diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py index ab7f90d82..193844030 100644 --- a/numpy/random/tests/test_random.py +++ b/numpy/random/tests/test_random.py @@ -26,12 +26,12 @@ class TestSeed(TestCase): assert_equal(s.randint(1000), 265) def test_invalid_scalar(self): - # seed must be a unsigned 32 bit integers + # seed must be an unsigned 32 bit integer assert_raises(TypeError, np.random.RandomState, -0.5) assert_raises(ValueError, np.random.RandomState, -1) def test_invalid_array(self): - # seed must be a unsigned 32 bit integers + # seed must be an unsigned 32 bit integer assert_raises(TypeError, np.random.RandomState, [-0.5]) assert_raises(ValueError, np.random.RandomState, [-1]) assert_raises(ValueError, np.random.RandomState, [4294967296]) @@ -129,7 +129,7 @@ class TestSetState(TestCase): self.prng.negative_binomial(0.5, 0.5) class TestRandomDist(TestCase): - # Make sure the random distrobution return the correct value for a + # Make sure the random distribution returns the correct value for a # given seed def setUp(self): |