File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -3467,8 +3467,6 @@ static void
34673467 npy_intp i ;
34683468 @type @ max_val , min_val ;
34693469
3470- min_val = * min ;
3471- max_val = * max ;
34723470 if (max != NULL ) {
34733471 max_val = * max ;
34743472 }
Original file line number Diff line number Diff line change @@ -1176,6 +1176,18 @@ def test_simple_complex(self):
11761176 act = self .clip (a , m , M )
11771177 assert_array_strict_equal (ac , act )
11781178
1179+ def test_clip_complex (self ):
1180+ # Address Issue gh-5354 for clipping complex arrays
1181+ # Test native complex input without explicit min/max
1182+ # ie, either min=None or max=None
1183+ a = np .ones (10 , dtype = np .complex )
1184+ m = a .min ()
1185+ M = a .max ()
1186+ am = self .fastclip (a , m , None )
1187+ aM = self .fastclip (a , None , M )
1188+ assert_array_strict_equal (am , a )
1189+ assert_array_strict_equal (aM , a )
1190+
11791191 def test_clip_non_contig (self ):
11801192 #Test clip for non contiguous native input and native scalar min/max.
11811193 a = self ._generate_data (self .nr * 2 , self .nc * 3 )
You can’t perform that action at this time.
0 commit comments