dynd::nd::array pydynd::array_cast(const dynd::nd::array &n,
                                   const ndt::type &dt)
{
  return n.cast(dt);
}
dynd::nd::array pydynd::array_cast(const dynd::nd::array& n, const ndt::type& dt,
                PyObject *assign_error_obj)
{
    return n.cast(dt, pyarg_error_mode(assign_error_obj));
}