nanmin/nanmax cannot specify multiple dimensions. An implementation for nanamin/nanamax that can resolve this issue is required.