@@ -1988,12 +1988,14 @@ def test_ufunc_at_basic(self, a):
1988
1988
np .add .at (a , [2 , 5 , 3 ], [[1 , 2 ], 1 ])
1989
1989
1990
1990
# ufuncs with indexed loops for perfomance in ufunc.at
1991
- indexed_ufuncs = [np .add , np .subtract , np .multiply , np .floor_divide , np .divide ]
1991
+ indexed_ufuncs = [np .add , np .subtract , np .multiply ,
1992
+ np .floor_divide , np .divide ]
1993
+
1992
1994
@pytest .mark .parametrize (
1993
1995
"typecode" , np .typecodes ['AllInteger' ] + np .typecodes ['Float' ])
1994
1996
@pytest .mark .parametrize ("ufunc" , indexed_ufuncs )
1995
1997
def test_ufunc_at_inner_loops (self , typecode , ufunc ):
1996
- if ufunc is np .divide and typecode in np .typecodes ['AllInteger' ]:
1998
+ if ufunc is np .divide and typecode in np .typecodes ['AllInteger' ]:
1997
1999
# Avoid divide-by-zero and inf for integer divide
1998
2000
a = np .ones (100 , dtype = typecode )
1999
2001
indx = np .random .randint (100 , size = 30 , dtype = np .intp )
@@ -2009,7 +2011,7 @@ def test_ufunc_at_inner_loops(self, typecode, ufunc):
2009
2011
ufunc .at (a , indx , vals )
2010
2012
with warnings .catch_warnings (record = True ) as w_loop :
2011
2013
warnings .simplefilter ('always' )
2012
- for i ,v in zip (indx , vals ):
2014
+ for i , v in zip (indx , vals ):
2013
2015
# Make sure all the work happens inside the ufunc
2014
2016
# in order to duplicate error/warning handling
2015
2017
ufunc (atag [i ], v , out = atag [i :i + 1 ], casting = "unsafe" )
0 commit comments