Skip to content

Commit 428f8a7

Browse files
author
EITOKU Hiroaki
committed
Fix comparing operator 'is' to '=='
1 parent 55f2489 commit 428f8a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commpy/channels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def awgn(input_signal, snr_dB, rate=1.0):
9494
snr_linear = 10**(snr_dB/10.0)
9595
noise_variance = avg_energy/(2*rate*snr_linear)
9696

97-
if input_signal.dtype is complex:
97+
if input_signal.dtype == complex:
9898
noise = (sqrt(noise_variance) * randn(len(input_signal))) + (sqrt(noise_variance) * randn(len(input_signal))*1j)
9999
else:
100100
noise = sqrt(2*noise_variance) * randn(len(input_signal))

0 commit comments

Comments
 (0)