docstr: Choose values from `a` with or without replacement.
  
  `a` can be a 1-D array or a positive scalar.
  If `a` is a scalar, the samples are drawn from the range 0,...,a-1.
  
  If the size argument is ambiguous on the number of dimensions,
  ndim may be a plain integer to supplement the missing information.
docstr_tok: ["Choose","values","from","`","a","`","with","or","without","replacement",".","`","a","`","can","be","a","1-D","array","or","a","positive","scalar",".","If","`","a","`","is","a","scalar",",","the","samples","are","drawn","from","the","range","0",",","...",",","a-1",".","If","the","size","argument","is","ambiguous","on","the","number","of","dimensions",",","ndim","may","be","a","plain","integer","to","supplement","the","missing","information","."]
code: def choice(
      self,
      size=None,
      a=2,
      replace=True,
      p=None,
      ndim=None,
      dtype="int64",
  ):
      """
      Choose values from `a` with or without replacement.
  
      `a` can be a 1-D array or a positive scalar.
      If `a` is a scalar, the samples are drawn from the range 0,...,a-1.
  
      If the size argument is ambiguous on the number of dimensions,
      ndim may be a plain integer to supplement the missing information.
  
      """
      return self.gen(
          choice, size, a, replace, p, 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 5 for calling the RandomStreamsBase obj's underlying member method code with example usage: obj.choice(size, a, replace, p, ndim, dtype) and returns: self