[C++ Symbolic] MXNet design question


Why is the entire operator API not available for NDArrays? The Symbolic API is used for constructing the computational graph and then executing said graph on NDArrays. Thus, everything is operated on NDArrays anyways. So why aren’t these methods available to NDArrays? This is a question about the MXNet program design.

Edit: These methods are in fact available but it is not clear how to access. A simple example is below for the sum() function, which performs a sum reduction over an axis. I put this in a local utility file. I suggest someone add this to documentation so that it is more clear to C++ users.

inline mxnet::cpp::NDArray sum(mxnet::cpp::NDArray x, size_t axis = 0) {
  mxnet::cpp::NDArray ret;
  return ret;


hi, please feel free to submit a pr on the mxnet repo with the documentation changes :slight_smile:


This functionality doesn’t work for all symbolic operations, so I won’t put it in documentation. If I figure out how it works I’ll put it in documentation.