#NEWLINE# def __init__( self , enum , dflt , base , shape = ( ) ) : #NEWLINE# #INDENT# if ( not isinstance ( enum , Enum ) ) : #NEWLINE# #INDENT# enum = Enum ( enum ) #NEWLINE# #UNINDENT# self . enum = enum #NEWLINE# if isinstance ( base , str ) : #NEWLINE# #INDENT# base = Atom . from_type ( base ) #NEWLINE# #UNINDENT# self . _checkbase ( base ) #NEWLINE# self . base = base #NEWLINE# default = enum [ dflt ] #NEWLINE# self . _defname = dflt #NEWLINE# ( names , values ) = ( [ ] , [ ] ) #NEWLINE# for ( name , value ) in enum : #NEWLINE# #INDENT# names . append ( name ) #NEWLINE# values . append ( value ) #NEWLINE# #UNINDENT# basedtype = self . base . dtype #NEWLINE# self . _names = names #NEWLINE# self . _values = numpy . array ( values , dtype = basedtype . base ) #NEWLINE# Atom . __init__ ( self , basedtype , shape , default )