code: def solve_discrete_lv(self, mat1, mat2=None, is_full_matrix=True):
      p = (
          []
      )  # need to store as list for autograd won't let you append indices in same matrix
      p.append(self.p0)
      for n in range(
          self.num_time_steps - 1
      ):  # element-wise vector division and multiplication
          # Compute Ap to generate synthetic data for the full rank matrix A
          if is_full_matrix:
              mat_vec_prod = nd.dot(mat1, p[n])
          else:
              mat_vec_prod = compute_mat_vec_prod(mat1, mat2, p[n])
          p.append((1 + self.r * (1 - mat_vec_prod / self.k)) * p[n])
          # concat puts in nd array of size num_ts*N
          # need to take size (N, num_ts) and transpose otherwise default is doing row major
          # and we need column major storing of the linear list p
      return (
          nd.concat(*p, dim=0)
          .reshape(self.num_time_steps, self.num_time_series)
          .T
      )
  
file_path: gluonts/src/gluonts/nursery/auto_ode/auto_ode.py
imports: import numpy
  import matplotlib.pyplot
  import mxnet
  import mxnet.gluon.nn
  import mxnet.gluon.rnn
  from mxnet import gluon, nd, autograd
  from tqdm import tqdm_notebook
label_desc: Use image node_id 2 for calling the NeuralLV obj's underlying member method code with example usage: obj.solve_discrete_lv(mat1, mat2, is_full_matrix) and returns: nd