bitwise operation of a complex number only applies to real component and yields a non-complex integer,
take x = Fxp(0b11+0b11*1j, dtype = 'fxp-u2/0-complex') as an example ,
x&0b01 outputs fxp-u2/0((1+0j))
the possible expected behaviors should be :
1 raise an exception for this invalid operation , just like the following
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [51], in <module>
1 data =0b11+0b11*1j
----> 2 data&0b11
TypeError: unsupported operand type(s) for &: 'complex' and 'int'
2 apply the bitwise operation to both real and imag components , this feature should is very useful :)
bitwise operation of a complex number only applies to real component and yields a non-complex integer, take
x = Fxp(0b11+0b11*1j, dtype = 'fxp-u2/0-complex')
as an example ,x&0b01
outputsfxp-u2/0((1+0j))
the possible expected behaviors should be :thanks