docstr: Sample n times from a multinomial distribution defined by
  probabilities pvals, as many times as required by size. For
  instance, if size=(p,q), p*q samples will be drawn, and the
  output shape will be (p,q,len(pvals)).
  
  Theano tries to infer the number of dimensions from the length
  of the size argument and the shapes of n and pvals, but you may
  always specify it with the `ndim` parameter.
  
  Notes
  -----
  Note that the output will then be of dimension ndim+1.
docstr_tok: ["Sample","n","times","from","a","multinomial","distribution","defined","by","probabilities","pvals",",","as","many","times","as","required","by","size",".","For","instance",",","if","size=","(","p",",","q",")",",","p","*","q","samples","will","be","drawn",",","and","the","output","shape","will","be","(","p",",","q",",","len","(","pvals",")",")",".","Theano","tries","to","infer","the","number","of","dimensions","from","the","length","of","the","size","argument","and","the","shapes","of","n","and","pvals",",","but","you","may","always","specify","it","with","the","`","ndim","`","parameter",".","Notes","--","--","-","Note","that","the","output","will","then","be","of","dimension","ndim+1","."]
code: def multinomial(
      self, size=None, n=1, pvals=[0.5, 0.5], ndim=None, dtype="int64"
  ):
      """
      Sample n times from a multinomial distribution defined by
      probabilities pvals, as many times as required by size. For
      instance, if size=(p,q), p*q samples will be drawn, and the
      output shape will be (p,q,len(pvals)).
  
      Theano tries to infer the number of dimensions from the length
      of the size argument and the shapes of n and pvals, but you may
      always specify it with the `ndim` parameter.
  
      Notes
      -----
      Note that the output will then be of dimension ndim+1.
  
      """
      return self.gen(
          multinomial, size, n, pvals, ndim=ndim, dtype=dtype
      )
  
imports: from __future__ import absolute_import, print_function, division
  import sys
  from copy import copy
  import numpy
  from six import string_types
  from six.moves import reduce, xrange
  import theano
  from theano import tensor
  from theano.tensor import opt
  from theano import gof
  from theano.compile import optdb
label_desc: Use image node_id 8 for calling the RandomStreamsBase obj's underlying member method code with example usage: obj.multinomial(size, n, pvals, ndim, dtype) and returns: self