fixed openyml function to return properly shaped array.