class_docstr: Parameters
  ----------
  axis
      Can not be None. If you want the array flattened, do it before.
class_docstr_tok: ["Parameters","--","--","--","--","--","axis","Can","not","be","None",".","If","you","want","the","array","flattened",",","do","it","before","."]
code: def c_code(self, node, nodename, inp, out, sub):
      if node.inputs[0].type.context.kind != b"cuda":
          raise NotImplementedError("cuda only")
      return """
              const size_t* shape = PyGpuArray_DIMS(%(x)s);
              bool needAllocation = !%(z)s || PyGpuArray_NDIM(%(x)s) != PyGpuArray_NDIM(%(z)s);
  
              int axis = %(params)s->axis;
              if (axis < 0) {
                  // Convert negative axis to positive axis.
                  axis += PyGpuArray_NDIM(%(x)s);
              }
  
              if (theano_prep_output(&%(z)s, PyGpuArray_NDIM(%(x)s), PyGpuArray_DIMS(%(x)s),
                                     %(x)s->ga.typecode, GA_C_ORDER, %(params)s->context) != 0) {
                  %(fail)s;
              }
  
              { // Namespace for kernel calls //
                  size_t max_threads_dim0;
                  size_t max_grid_size1;
                  size_t max_grid_size2;
                  int err;
                  err = gpucontext_property(%(params)s->context->ctx, GA_CTX_PROP_MAXLSIZE0, &max_threads_dim0);
                  if (err != GA_NO_ERROR){
                      PyErr_SetString(PyExc_RuntimeError, "Could not fetch max_threads_dims0");
                      %(fail)s;
                  }
                  err = gpucontext_property(%(params)s->context->ctx, GA_CTX_PROP_MAXGSIZE1, &max_grid_size1);
                  if (err != GA_NO_ERROR){
                      PyErr_SetString(PyExc_RuntimeError, "Could not fetch max_grid_size1");
                      %(fail)s;
                  }
                  err = gpucontext_property(%(params)s->context->ctx, GA_CTX_PROP_MAXGSIZE2, &max_grid_size2);
                  if (err != GA_NO_ERROR){
                      PyErr_SetString(PyExc_RuntimeError, "Could not fetch max_grid_size2");
                      %(fail)s;
                  }
                  if (cumOp_%(nodename)s(%(x)s, %(z)s, axis, max_threads_dim0, max_grid_size1, max_grid_size2) == -1){
                      %(fail)s;
                  }
              }
          """ % dict(
          x=inp[0],
          z=out[0],
          nodename=nodename,
          fail=sub["fail"],
          params=sub["params"],
      )
  
imports: from __future__ import absolute_import, print_function, division
  from theano import Apply, Op
  from theano.tensor.extra_ops import CumOp
  from .basic_ops import as_gpuarray_variable, GpuKernelBase, Kernel, GpuReshape, infer_context_name, gpuarray_helper_inc_dir
  from .opt import register_opt, op_lifter, register_opt2
  from .type import gpu_context_type
  from theano.gof import ParamsType
  import theano.scalar
label_desc: Use image node_id 10 for calling the GpuCumOp obj's underlying member method code with example usage: obj.c_code(node, nodename, inp, out, sub) and returns: unknown