Thanks. I changed
hasAllSkillsForQuestionP = np.ones(len(df_correct.columns))
to
hasAllSkillsForQuestionP = pm.Deterministic(‘hasAllSkillsForQuestionP’,theano.shared(np.ones((22, len(df_correct.columns)))))
and
hasAllSkillsForQuestionP[q] = hasAllSkillsForQuestionP[q]*skills[skill]
to
tt.set_subtensor(hasAllSkillsForQuestionP[:,q], hasAllSkillsForQuestionP[:,q]*skills[:,int(skill)])
where (tt is theano library) and additional dimension is what I added later for my model (not related to my question).
The model compiled successfully. Thanks for your help!