check for sign=0 case
This commit is contained in:
		
							parent
							
								
									e54735d9c6
								
							
						
					
					
						commit
						c543868c0b
					
				| @ -435,6 +435,7 @@ def _normalized_fields( | ||||
|     sign = numpy.sign(E_weighted[:, | ||||
|                                  :max(shape[0] // 2, 1), | ||||
|                                  :max(shape[1] // 2, 1)].real.sum()) | ||||
|     assert sign != 0 | ||||
| 
 | ||||
|     norm_factor = sign * norm_amplitude * numpy.exp(1j * norm_angle) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user