class_docstr: This class can create a struct of Theano types (like TensorType, GpuArrayType, etc.)
  to be used as a convenience op parameter wrapping many data.
  
  ParamsType constructor takes key-value args.
  Key will be the name of the attribute in the struct.
  Value is the Theano type of this attribute, ie. an instance of (a subclass of) :class:`Type`
  (eg. ``TensorType('int64', (False,))``).
  
  In a Python code any attribute named ``key`` will be available via::
  
      structObject.key
  
  In a C code, any attribute named ``key`` will be available via:
  
  .. code-block:: c
  
      structObject->key;
  
  .. note::
  
      This Type is not complete and should never be used for regular graph operations.
class_docstr_tok: ["This","class","can","create","a","struct","of","Theano","types","(","like","TensorType",",","GpuArrayType",",","etc",".",")","to","be","used","as","a","convenience","op","parameter","wrapping","many","data",".","ParamsType","constructor","takes","key-value","args",".","Key","will","be","the","name","of","the","attribute","in","the","struct",".","Value","is","the","Theano","type","of","this","attribute",",","ie",".","an","instance","of","(","a","subclass","of",")",":","class",":","`","Type","`","(","eg",".","``","TensorType","(","'int64","'",",","(","False",",",")",")","``",")",".","In","a","Python","code","any","attribute","named","``","key","``","will","be","available","via",":",":","structObject.key","In","a","C","code",",","any","attribute","named","``","key","``","will","be","available","via",":","..","code-block",":",":","c","structObject-",">","key",";","..","note",":",":","This","Type","is","not","complete","and","should","never","be","used","for","regular","graph","operations","."]
docstr: Look for a constant that has alias ``alias`` in the Theano enumeration types
  wrapped into current ParamsType. Return value of the constant found,
  or raise an exception if either
  
  1. there is no constant with this alias,
  2. there is no constant which name is this alias, or
  3. current wrapper does not contain any Theano enumeration type.
  
  **Example**::
  
      from theano.gof import ParamsType, EnumType, EnumList
      from theano.scalar import Scalar
  
      wrapper = ParamsType(scalar=Scalar('int32'),
                           letters=EnumType(A=(1, 'alpha'), B=(2, 'beta'), C=3),
                           digits=EnumList(('ZERO', 'nothing'), ('ONE', 'unit'), ('TWO', 'couple')))
      print(wrapper.get_enum('C'))  # 3
      print(wrapper.get_enum('TWO'))  # 2
      print(wrapper.enum_from_alias('alpha')) # 1
      print(wrapper.enum_from_alias('nothing')) # 0
  
      # For the following, alias 'C' is not defined, so the method looks for
      # a constant named 'C', and finds it.
      print(wrapper.enum_from_alias('C')) # 3
  
  .. note::
  
      Unlike with constant names, you can **NOT** access constants values directly with aliases through
      ParamsType (ie. you can't write ``wrapper.alpha``). You **must** use ``wrapper.enum_from_alias()``
      method to do that.
docstr_tok: ["Look","for","a","constant","that","has","alias","``","alias","``","in","the","Theano","enumeration","types","wrapped","into","current","ParamsType",".","Return","value","of","the","constant","found",",","or","raise","an","exception","if","either","1.","there","is","no","constant","with","this","alias",",","2.","there","is","no","constant","which","name","is","this","alias",",","or","3.","current","wrapper","does","not","contain","any","Theano","enumeration","type",".","*","*","Example","*","*",":",":","from","theano.gof","import","ParamsType",",","EnumType",",","EnumList","from","theano.scalar","import","Scalar","wrapper","=","ParamsType","(","scalar=Scalar","(","'int32","'",")",",","letters=EnumType","(","A=","(","1",",","'alpha","'",")",",","B=","(","2",",","'beta","'",")",",","C=3",")",",","digits=EnumList","(","(","'ZERO","'",",","'nothing","'",")",",","(","'ONE","'",",","'unit","'",")",",","(","'TWO","'",",","'couple","'",")",")",")","print","(","wrapper.get_enum","(","'","C","'",")",")","#","3","print","(","wrapper.get_enum","(","'TWO","'",")",")","#","2","print","(","wrapper.enum_from_alias","(","'alpha","'",")",")","#","1","print","(","wrapper.enum_from_alias","(","'nothing","'",")",")","#","0","#","For","the","following",",","alias","'","C","'","is","not","defined",",","so","the","method","looks","for","#","a","constant","named","'","C","'",",","and","finds","it",".","print","(","wrapper.enum_from_alias","(","'","C","'",")",")","#","3","..","note",":",":","Unlike","with","constant","names",",","you","can","*","*","NOT","*","*","access","constants","values","directly","with","aliases","through","ParamsType","(","ie",".","you","ca","n't","write","``","wrapper.alpha","``",")",".","You","*","*","must","*","*","use","``","wrapper.enum_from_alias","(",")","``","method","to","do","that","."]
code: def enum_from_alias(self, alias):
      """
      Look for a constant that has alias ``alias`` in the Theano enumeration types
      wrapped into current ParamsType. Return value of the constant found,
      or raise an exception if either
  
      1. there is no constant with this alias,
      2. there is no constant which name is this alias, or
      3. current wrapper does not contain any Theano enumeration type.
  
      **Example**::
  
          from theano.gof import ParamsType, EnumType, EnumList
          from theano.scalar import Scalar
  
          wrapper = ParamsType(scalar=Scalar('int32'),
                               letters=EnumType(A=(1, 'alpha'), B=(2, 'beta'), C=3),
                               digits=EnumList(('ZERO', 'nothing'), ('ONE', 'unit'), ('TWO', 'couple')))
          print(wrapper.get_enum('C'))  # 3
          print(wrapper.get_enum('TWO'))  # 2
          print(wrapper.enum_from_alias('alpha')) # 1
          print(wrapper.enum_from_alias('nothing')) # 0
  
          # For the following, alias 'C' is not defined, so the method looks for
          # a constant named 'C', and finds it.
          print(wrapper.enum_from_alias('C')) # 3
  
      .. note::
  
          Unlike with constant names, you can **NOT** access constants values directly with aliases through
          ParamsType (ie. you can't write ``wrapper.alpha``). You **must** use ``wrapper.enum_from_alias()``
          method to do that.
  
      """
      return (
          self.__alias_to_enum[alias].fromalias(alias)
          if alias in self.__alias_to_enum
          else self.__const_to_enum[alias][alias]
      )
  
imports: from __future__ import absolute_import, print_function, division
  import re
  import hashlib
  from theano.gof.utils import MethodNotDefined, c_cpp_keywords
  from theano.gof import Type, EnumType
label_desc: Use image node_id 12 for calling the ParamsType obj's underlying member method code with example usage: obj.enum_from_alias(alias) and returns: unknown