Add a new nd.as_numpy function which more robustly converts ndobjects to numpy