docs: def cast2theano_var(self, array_like, name=None):
          '''Cast `numpy.ndarray` into `theano.tensor` keeping `dtype` and `ndim`
          compatible
          '''
          # extract the information of the input value
          array = np.asarray(array_like)
          args = (name, array.dtype)
          ndim = array.ndim
  
          # cast with the information above
          if ndim == 0:
              return T.scalar(*args)
          elif ndim == 1:
              return T.vector(*args)
          elif ndim == 2:
              return T.matrix(*args)
          elif ndim == 3:
              return T.tensor3(*args)
          elif ndim == 4:
              return T.tensor4(*args)
          else:
              raise ValueError('extheano.jit.Compiler: Unsupported type or shape')