@@ -147,7 +147,7 @@ def test_boolean_indexing_onedim(self):
147147
148148 def test_boolean_assignment_value_mismatch (self ):
149149 # A boolean assignment should fail when the shape of the values
150- # cannot be broadcasted to the subscription. (see also gh-3458)
150+ # cannot be broadcast to the subscription. (see also gh-3458)
151151 a = np .arange (4 )
152152 def f (a , v ):
153153 a [a > - 1 ] = v
@@ -188,12 +188,12 @@ def test_reverse_strides_and_subspace_bufferinit(self):
188188 # If the strides are not reversed, the 0 in the arange comes last.
189189 assert_equal (a [0 ], 0 )
190190
191- # This also tests that the subspace buffer is initiliazed :
191+ # This also tests that the subspace buffer is initialized :
192192 a = np .ones ((5 , 2 ))
193193 c = np .arange (10 ).reshape (5 , 2 )[::- 1 ]
194194 a [b , :] = c
195195 assert_equal (a [0 ], [0 , 1 ])
196-
196+
197197 def test_reversed_strides_result_allocation (self ):
198198 # Test a bug when calculating the output strides for a result array
199199 # when the subspace size was 1 (and test other cases as well)
@@ -346,7 +346,7 @@ def test_small_regressions(self):
346346 # Reference count of intp for index checks
347347 a = np .array ([0 ])
348348 refcount = sys .getrefcount (np .dtype (np .intp ))
349- # item setting always checks indices in seperate function:
349+ # item setting always checks indices in separate function:
350350 a [np .array ([0 ], dtype = np .intp )] = 1
351351 a [np .array ([0 ], dtype = np .uint8 )] = 1
352352 assert_raises (IndexError , a .__setitem__ ,
@@ -537,11 +537,11 @@ class TestMultiIndexingAutomated(TestCase):
537537 These test use code to mimic the C-Code indexing for selection.
538538
539539 NOTE: * This still lacks tests for complex item setting.
540- * If you change behavoir of indexing, you might want to modify
540+ * If you change behavior of indexing, you might want to modify
541541 these tests to try more combinations.
542542 * Behavior was written to match numpy version 1.8. (though a
543543 first version matched 1.7.)
544- * Only tuple indicies are supported by the mimicing code.
544+ * Only tuple indices are supported by the mimicking code.
545545 (and tested as of writing this)
546546 * Error types should match most of the time as long as there
547547 is only one error. For multiple errors, what gets raised
@@ -564,7 +564,7 @@ def setUp(self):
564564 slice (4 , - 1 , - 2 ),
565565 slice (None , None , - 3 ),
566566 # Some Fancy indexes:
567- np .empty ((0 , 1 , 1 ), dtype = np .intp ), # empty broadcastable
567+ np .empty ((0 , 1 , 1 ), dtype = np .intp ), # empty and can be broadcast
568568 np .array ([0 , 1 , - 2 ]),
569569 np .array ([[2 ], [0 ], [1 ]]),
570570 np .array ([[0 , - 1 ], [0 , 1 ]], dtype = np .dtype ('intp' ).newbyteorder ()),
@@ -611,7 +611,7 @@ def _get_multi_index(self, arr, indices):
611611 fancy_dim = 0
612612 # NOTE: This is a funny twist (and probably OK to change).
613613 # The boolean array has illegal indexes, but this is
614- # allowed if the broadcasted fancy-indices are 0-sized.
614+ # allowed if the broadcast fancy-indices are 0-sized.
615615 # This variable is to catch that case.
616616 error_unless_broadcast_to_empty = False
617617
@@ -656,7 +656,7 @@ def _get_multi_index(self, arr, indices):
656656 if arr .ndim - ndim < 0 :
657657 # we can't take more dimensions then we have, not even for 0-d arrays.
658658 # since a[()] makes sense, but not a[(),]. We will raise an error
659- # lateron , unless a broadcasting error occurs first.
659+ # later on , unless a broadcasting error occurs first.
660660 raise IndexError
661661
662662 if ndim == 0 and not None in in_indices :
@@ -668,7 +668,7 @@ def _get_multi_index(self, arr, indices):
668668
669669 for ax , indx in enumerate (in_indices ):
670670 if isinstance (indx , slice ):
671- # convert to an index array anways:
671+ # convert to an index array
672672 indx = np .arange (* indx .indices (arr .shape [ax ]))
673673 indices .append (['s' , indx ])
674674 continue
@@ -701,7 +701,7 @@ def _get_multi_index(self, arr, indices):
701701 indx = flat_indx
702702 else :
703703 # This could be changed, a 0-d boolean index can
704- # make sense (even outide the 0-d indexed array case)
704+ # make sense (even outside the 0-d indexed array case)
705705 # Note that originally this is could be interpreted as
706706 # integer in the full integer special case.
707707 raise IndexError
@@ -753,7 +753,7 @@ def _get_multi_index(self, arr, indices):
753753 arr = arr .transpose (* (fancy_axes + axes ))
754754
755755 # We only have one 'f' index now and arr is transposed accordingly.
756- # Now handle newaxes by reshaping...
756+ # Now handle newaxis by reshaping...
757757 ax = 0
758758 for indx in indices :
759759 if indx [0 ] == 'f' :
@@ -771,7 +771,7 @@ def _get_multi_index(self, arr, indices):
771771 res = np .broadcast (* indx [1 :]) # raises ValueError...
772772 else :
773773 res = indx [1 ]
774- # unfortunatly the indices might be out of bounds. So check
774+ # unfortunately the indices might be out of bounds. So check
775775 # that first, and use mode='wrap' then. However only if
776776 # there are any indices...
777777 if res .size != 0 :
@@ -909,7 +909,7 @@ def test_multidim(self):
909909 # spot and the simple ones in one other spot.
910910 with warnings .catch_warnings ():
911911 # This is so that np.array(True) is not accepted in a full integer
912- # index, when running the file seperatly .
912+ # index, when running the file separately .
913913 warnings .filterwarnings ('error' , '' , DeprecationWarning )
914914 for simple_pos in [0 , 2 , 3 ]:
915915 tocheck = [self .fill_indices , self .complex_indices ,
0 commit comments