move eq, shape and cat to nmoperator.py