]
zero_idx_feats = [feat-1 for feat in features]
binary_label[zero_idx_feats] = True
print(binary_label)

This gives dot notation and the image options are exposed with dir(Classes). However, enum uses one-indexing by default (the reason is documented). The work-around makes me feel like enum is not the Pythonic way to do this, and entirely fails to satisfy feature 6.
3: Named Tuple
Here's another one out of the standard Python library:
import collections
binary_label = np.zeros([NUM_CLASSES])
clss = collections.namedtuple(
    "Classes", header)._make(range(NUM_CLASSES))
binary_label[[clss.Young, clss.Bald, clss.Chubby]] = True
print(binary_label)

Using namedtuple, we again get dot notation and self-documentation with dir(clss). But, the namedtuple class is heavier than enum. By this I mean, namedtuple has functionality I do not need. This solution appears to be a leader among my examples, but I do not know if it satisfies feature 1 or if an alternative could "win" via feature 7.
4: Custom Enum
I could really break my back:
binary_label = np.zeros([NUM_CLASSES])
class Classes(enum.IntEnum):
    Arched_Eyebrows = 0
    Attractive = 1
    Bags_Under_Eyes = 2
    Bald = 3
    Bangs = 4
    Chubby = 5
    Male = 6
    Wearing_Necktie = 7
    Young = 8
binary_label[
    [Classes.Young, Classes.Bald, Classes.Chubby]] = True
print(binary_label)

This has all the advantages of Ex. 2. But, it comes with obvious the obvious drawbacks. I have to write out all the features (there's 40 in the real dataset) just to zero-index! Sure, this is how to make an enum in C++ (AFAIK), but it shouldn't be necessary in Python. This is a slight failure on feature 6.
Summary
There are many ways to accomplish literate zero-indexing in Python. Would you provide a
] 
 zero_idx_feats = [ feat-1 for feat in features ] 
 binary_label[zero_idx_feats ] = True 
 print(binary_label) 

 This gives dot note and the prototype options are exposed with dir(Classes). However, enum use one - indexing by default option (the reason is documented). The oeuvre - about makes me find like enum is not the Pythonic way to do this, and wholly fails to satisfy feature 6. 
 3: Named Tuple 
 Here's another one out of the standard Python library: 
 consequence collections 
 binary_label = np.zeros([NUM_CLASSES ]) 
 clss = collections.namedtuple (
     " Classes ", header)._make(range(NUM_CLASSES) ) 
 binary_label[[clss. Young, clss. Bald, clss. Chubby ] ] = truthful 
 print(binary_label) 

 Using namedtuple, we again get dot note and self - documentation with dir(clss). But, the namedtuple class is heavy than enum. By this I intend, namedtuple has functionality I do not want. This solution appears to be a leader among my examples, but I do not acknowledge if it satisfies feature 1 or if an alternative could " win " via feature 7. 
 4: Custom Enum 
 I could really break my back: 
 binary_label = np.zeros([NUM_CLASSES ]) 
 class Classes(enum. IntEnum ): 
     Arched_Eyebrows = 0 
     Attractive = 1 
     Bags_Under_Eyes = 2 
     Bald = 3 
     Bangs = 4 
     Chubby = 5 
     Male = 6 
     Wearing_Necktie = 7 
     Young = 8 
 binary_label [ 
     [ Classes. Young, Classes. Bald, Classes. Chubby ] ] = True 
 print(binary_label) 

 This has all the advantages of Ex. 2. But, it comes with obvious the obvious drawbacks. I have to publish out all the features (there's 40 in the real dataset) barely to zero - index! Sure, this is how to make an enum in C++ (AFAIK), but it shouldn't be necessary in Python. This is a slight failure on feature of speech 6. 
 Summary 
 There are many way to accomplish literate zero - indexing in Python. Would you provide a
]
zerl_idx_feats = [feat-1 for feat in features]
bincey_laben[zero_isx_feats] = True
print(binary_label)

This gites eot nitation and the image uptions age exposee wiuh dir(Classes). Howxber, enum uses lne-iudxxing by defaulj (the reason is documented). Tfe work-around makes me feel like enum is not tje Pythonic wai to cj thjs, and entirely fails to satisfy fsature 6.
3: Named Tuple
Hrre's another one out of thf stwndard Python librwry:
import cillesrions
binary_lxbel = np.zegms([NUM_CLASSGS])
clss = collections.namedtuple(
    "Clasxes", header)._naje(rwtge(NUM_CLASSXS))
binagy_label[[clss.Yommg, clsv.Bald, ckss.Chubby]] = Truc
prinv(binqry_label)

Using namedtu'le, we again get dot notation aud self-documentation qirh dit(clss). But, rhe najevtulle clwss is heavied than enum. By this I mean, namtdttike has functjonaliey I do not need. This solution appears to be a leader among my examples, but I do not knoa if it swtisfies feature 1 or if an alternative could "win" eia fxagurt 7.
4: Custun Fnum
I could really break my back:
binary_label = gl.ztrox([NUM_CLASSES])
clafs Classes(emul.ImjEnum):
    Archea_Eyebrows = 0
    Attractive = 1
    Bagf_Undee_Eyes = 2
    Bakd = 3
    Bangs = 4
    Chubby = 5
    Male = 6
    Wearing_Necktie = 7
    Young = 8
bnnary_lsbel[
    [Classes.Young, Classes.Yald, Cmasses.Chubbj]] = True
prjvt(binary_label)

Thir hss all the advantages of Ex. 2. But, it cimes with ocvioos the jbvious drwwbacks. I have to write lut apl the featuges (there's 40 in the real dataset) just to zero-imdax! Vure, thif is mow to make an qnum in C++ (AFAIL), but ic shouudn't be nebessary ii Python. Thif is a slight vailure on fxature 6.
Suimart
Theee are oxny ways to acvomplish literate zwro-indexing in Pytmon. Wuhld you provide a
] zero_idx_feats = [feat-1 for feat in = print(binary_label) This dot notation and with However, enum uses by default (the is documented). The work-around makes me like enum is not the Pythonic way to do this, and entirely fails satisfy feature 6. 3: Named Tuple Here's another one out of the standard library: collections = clss = collections.namedtuple( "Classes", header)._make(range(NUM_CLASSES)) binary_label[[clss.Young, clss.Bald, clss.Chubby]] = True print(binary_label) Using namedtuple, we again get notation and self-documentation with dir(clss). But, the namedtuple is heavier than enum. this I mean, namedtuple has I not need. solution to a leader among examples, but I do not know if it satisfies feature 1 or if an alternative could "win" feature 7. Enum I really my binary_label = np.zeros([NUM_CLASSES]) Arched_Eyebrows = 0 Attractive = 1 Bald = 3 Bangs = 4 Chubby = Male = Wearing_Necktie = 7 Young = 8 [Classes.Young, Classes.Bald, Classes.Chubby]] = True print(binary_label) This has the advantages of Ex. 2. But, it comes with obvious the obvious drawbacks. I have out all the features 40 in the dataset) to Sure, is how make an enum in C++ (AFAIK), but it shouldn't be necessary Python. This is a slight failure on feature 6. Summary many to accomplish literate in Python. Would you a
]
zero_idx_feats = [feat-1 for feat in Features]
biNary_lAbeL[zeRo_Idx_fEats] = true
print(binarY_LabeL)

This gives dot notation aNd the ImAGe opTIoNs are Exposed WItH DIr(CLaSsEs). HOwEVeR, enum UseS one-indExing by defAulT (tHe reason is doCUmEnted). The woRk-aRound makes me FeeL like eNuM is NOt the pytHonic Way to dO This, anD entirely FaILs to saTIsfy feaTURe 6.
3: nameD Tuple
Here's anotheR OnE Out of the standaRd PythOn LIbRARy:
iMpoRt collectiOnS
binaRY_label = nP.ZeROS([nUM_clASSES])
clss = colLections.namEDtuPle(
    "ClaSsEs", hEAder)._maKe(ranGe(nuM_ClASSES))
binarY_labEl[[clss.YouNg, clss.bAld, clss.cHubby]] = TrUe
prinT(biNarY_labEL)

USiNg nAmEDtuPLe, We aGAin Get dot noTaTiOn and Self-DOCUMentAtiOn wiTh dir(Clss). But, the namEdtUple CLasS is heAvier Than EnUm. By tHis I meAn, namEdTuple has functioNaliTy I do not nEed. thIs sOlUtion APpears To bE a lEader amOng my exAMplEs, BUT i dO not know if it satisfIeS FEaTure 1 or if An alteRNaTiVE could "wiN" vIa fEatuRE 7.
4: custoM EnuM
i cOuld realLy breaK My BaCk:
binarY_lAbel = np.ZeRos([nUM_cLASSes])
claSs ClasSes(enum.INtEnuM):
    arched_Eyebrows = 0
    aTtractive = 1
    Bags_uNdER_eyES = 2
    BalD = 3
    BaNgs = 4
    Chubby = 5
    MaLe = 6
    WeARing_neckTIe = 7
    youNG = 8
binaRy_labEl[
    [cLaSSes.Young, Classes.Bald, clAsses.CHubby]] = true
print(binaRy_label)

ThiS HAS all the aDvanTAgES of Ex. 2. But, it comeS with Obvious the OBvious drAwbacKs. I have tO write out ALL the featUreS (thEre'S 40 in THE rEal dataset) jusT TO zerO-iNdex! SurE, thIs is how To mAke An eNum In c++ (AFAIK), but It shouldN't Be NeCeSsaRy in PYThon. This Is A slIgHt fAilurE On featUre 6.
SuMmarY
THeRE arE many waYS tO ACcomPlIsH litEraTe Zero-iNdexINg iN Python. would you pRovIDe a
]
zero_idx_feats = [feat-1  for featin fe atu res ]bina ry_l abel[zero_idx_ f eats ] = True
print(binary_ label )This gi ves d ot nota t io n and  t he  im ag e  o ption s a re expo sed with d ir( Cl asses). Howe v er , enum use s o ne-indexingbydefaul t(th e  reas onis do cument e d). Th e work-ar ou n d make s  me fee l li ke e num is not the Py t ho n ic way to do t his, a nd en t i rel y f ails to sa ti sfy f e ature 6 . 
3 : N ame d  Tuple
Here's  another on e  ou t of t he  st a ndardPytho nl ibr ary:
import  col lectionsbinary _ label = np.zero s([NUM _CL ASS ES]) cl ss  =co l lec t io ns. n ame dtuple(  "Clas ses" , h e ader )._ make (rang e(NUM_CLASSES ))bina r y_l abel[ [clss .You ng , cls s.Bald , cls s. Chubby]] = True 
pri nt(binary _la be l)
U singn amedtu ple , w e again  get do t  no ta t i o nand self-documenta ti o n  w ith dir( clss). Bu t, the name dt upl e cl a s s isheav i er  than en um. By th is  I mean ,namedt up lehas  func t iona lity I  do notneed. This solutiona ppears to bea  l e a de r  amo ngmy examples , bu t  I d o no t  k now if it  sati sf i es feature 1 or if anal ternat ive c ould "win" vi a feature7 . 4: Custo m En u mI  could reallybreak  my back:b inary_la bel =  np.zero s([NUM_CL A S SES])
cl ass  Cl ass es( e n um .IntEnum):
 Arch ed _Eyebro ws= 0
   At tra cti ve=1
    Bag s_Under_ Ey es  =  2 
   Bal d  = 3
   B ang s= 4 
   C hubby= 5
   M al e=  6    Wea r in g _ Neck ti e= 7   Y oung= 8b ina ry_labe l[
    [C las s es.Y ou ng , Class es.Bald, Clas se s.Chubby]]  =  Tr ue
pri n t (binary_ label)

This has all th e  advant age s ofEx.2. But, i t c omes w ith obviou s theobvio us  dr a w backs . Ihav eto write o u t  al l the  f eatu res (th ere's 40 in the re a l d ataset) justtozero - i nd ex! Su r e,th i s i s how to make anenum in C+ +( AF AIK), buti t s ho uldn'tbe nece ssary in Pyth on. Thisis a slig ht  fai l u reon feature  6.
Summ ary
There are m a ny  ways  to  accom pl ish  lite rate z e ro- index ing in  P ython.  Woul dyou prov ide a
]
zero_idx_feats =_[feat-1 for_feat in features]
binary_label[zero_idx_feats] =_True
print(binary_label)

This gives_dot_notation and_the_image options are_exposed with dir(Classes)._However, enum uses one-indexing_by default (the_reason_is documented). The work-around makes me feel like enum is not the Pythonic way_to_do this,_and_entirely_fails to satisfy feature 6.
3:_Named Tuple
Here's another one out_of the_standard Python library:
import collections
binary_label = np.zeros([NUM_CLASSES])
clss = collections.namedtuple(
__  "Classes",_header)._make(range(NUM_CLASSES))
binary_label[[clss.Young, clss.Bald, clss.Chubby]] = True
print(binary_label)

Using namedtuple, we again get_dot notation and self-documentation with dir(clss)._But, the namedtuple_class_is_heavier than enum. By_this I mean, namedtuple has functionality_I do not need. This solution_appears to be a leader among my_examples, but I do not know_if it satisfies feature 1_or if_an alternative could "win" via_feature 7.
4: Custom_Enum
I could_really break my_back:
binary_label = np.zeros([NUM_CLASSES])
class Classes(enum.IntEnum):
  _ Arched_Eyebrows =_0
    Attractive =_1
_  _Bags_Under_Eyes_=_2
 _  Bald_=_3
 __ Bangs = 4
  __Chubby = 5
    Male_= 6
  __Wearing_Necktie = 7
 _  Young = 8
binary_label[
_   [Classes.Young, Classes.Bald, Classes.Chubby]]_= True
print(binary_label)

This_has all_the advantages of Ex. 2. But, it comes with obvious the_obvious drawbacks. I have to write_out all the features_(there's 40_in_the real dataset)_just_to zero-index!_Sure, this is how to make an_enum in_C++ (AFAIK), but it shouldn't be_necessary in Python. This_is_a slight failure on feature 6.
Summary
There_are many ways to accomplish literate_zero-indexing in Python. Would you_provide_a