Fix test in python 3.

This is related to the unpickle problem of ndarray.