MAINT: Use a better method to detect complex arrays.

Instead of

    if lhs.dtype.char in np.typecodes['Complex']:

use

    if issubclass(lhs.dtype.type, np.complexfloating):