Fixed issue in test where NaN's were causing equality tests to fail.
Fixed bug of scalar numpy complex types being turned into arrays when doing write readback.