Submission is "errored" for GOT assignment

I have been trying to submit the assignment on snap filters. The shape of my csv results file is the same as the sample submission provided(182845,3), and i have also named the columns as “Channel 1,2,3”. Still on submitting, i get “errored” message. This is how i converted my image to csv file: (before is my final image)

value=np.asarray(before).reshape(-1,3)
np.savetxt(“results.csv”,value,delimiter=’,’,header=“Channel 1,Channel 2,Channel 3”,comments="")

What am I doing wrong?

Share link of your csv file after saving it on google drive.

https://drive.google.com/file/d/1VQSJNaeNViHz_vfC48t_6HbXyI1UUPJB/view?usp=sharing

https://drive.google.com/open?id=1VQSJNaeNViHz_vfC48t_6HbXyI1UUPJB

Your numpy array is of type float64, change it to int32 and than make the submission.

Hope this cleared your doubt.

still facing the issue. converted the array using array.astype(‘int32’)

This should not be the case, share the new csv file as well, i need to debug for the error.

https://drive.google.com/open?id=1zWS3_vuAoRgjFHvhlvInibHv29DKdyvF is the latest link

value=np.asarray(before,dtype=np.int32).reshape(-1,3) value=value.astype(‘int32’) np.savetxt(“results.csv”,value,delimiter=’,’,header=“Channel 1,Channel 2,Channel 3”,comments="")

Add the following line before your code.

np.set_printoptions(suppress=True)
value=np.asarray(before,dtype=np.int32).reshape(-1,3) value=value.astype(‘int32’) np.savetxt(“results.csv”,value,delimiter=’,’,header=“Channel 1,Channel 2,Channel 3”,comments="")

The error occurs because, you csv file contains data in "1.8000000000E+2’) form and on backend script tries to convert it into int, and unable to do so, so this time make sure that your csv file contains integer values and not in exponential form. which means it should contain “180” like numbers.

Hope this time your csv will run fine. :blush:

Thanks. I used the following: np.savetxt(“results.csv”,value,fmt="%d",delimiter=’,’,header=“Channel 1,Channel 2,Channel 3”,comments="")