Problem in creating stim channel raw data

I have created already raw data with 59 EEG channels and now trying to create an stim channel for event/epoch creation. I have been given position [pos[0]] which contain time array position to divide the data into events.
Since the channels should be of same lengths i created an array (stim) of same dimension and assign 1 to the position(pos[0]) and rest are assigned 0.
Raw data is created but it show this error which later create problems when i try to add it in raw data and try to create events.
Please help if any idea.

Unless there is a reason why you want to create a stim channel, I would try to create events directly from the cues. Events are represented as a NumPy array with three columns. The first column contains the positions (in samples), the second column can be all zeros, and the third column contains the event types (integers).

Do you have any idea about the error message.
Anyway , thanks for the idea it worked.