Now handles the cases where ny or nx or nu are zero