@swathi.ssunder Looking at sample_submission.csv is a good way of seeing what the data should look like (if the values are probabilities or categories), but make sure that you are using sample_submission.csv for the right competition. Dogs-vs-cats and Dogs-vs-cats-redux-kernels-edition have different required submission formats, and part of the homework is figuring out how to process and format the output correctly.
You can also get info on submissions from looking at the Kaggle Evaluation page for that competition:
Dogs vs Cats Redux: https://www.kaggle.com/c/dogs-vs-cats-redux-kernels-edition/details/evaluation
Dogs vs Cats: https://www.kaggle.com/c/dogs-vs-cats/details/evaluation
(again, note that they are different)
As for generating a csv (from a numpy array), can you tell me what you’ve tried searching for so far, or what methods you’ve already tried? I can give you a hint if you are stuck.