changed return type back to structured array after figuring out how to serialize dtype