fix minor errors and add a few more methods to complex ndarray