ġ21 # pady keyword argument used to set padding along y-axis. ġ04 id(row=1, column=0, padx=10, pady=10)ġ05 id(row=2, column=0, padx=10, pady=10)ġ06 id(row=3, column=0, padx=10, pady=10)ġ07 id(row=5, column=0, padx=10, pady=10)ġ10 # for filling or typing the information.ġ15 116 # grid method is used for placingġ17 # the widgets at respective positionsġ19 120 # padx keyword argument used to set padding along x-axis. ġ03 # pady keyword argument used to set padding along y-axis. open( ' online-banking.png')Ģ5 if Name = " " or Age = " " or Gender = " " or Password = " ":Ģ6 nfig(fg= " red", text= " All fields are required *")Ģ8 return 29 30 for name_check in all_accounts:ģ2 nfig(fg= " red", text= " Account already exists")ģ3 return 34 else: 35 new_file = open(Name, " w")Ĥ3 44 45 # Function for clearing the 46 # contents of all entry boxes 47 48 49 ' ' ' 50 51 # Function to find compound interestĥ4 principle = int(principle_field.get())Ħ1 CI = principle * (pow((1 + rate / 100), time))ħ2 73 # Set the background colour of GUI windowħ4 nfigure(background='light green ' )ħ5 76 # Set the configuration of GUI windowħ8 79 # set the name of tkinter GUI windowĨ0 root.title("Compound Interest Calculator")Ĩ1 82 # Create a Principle Amount : labelĨ3 label1 = Label(root, text="Principle Amount(Rs) : ",Ĩ7 label2 = Label(root, text="Rate(%) : ",ĩ1 label3 = Label(root, text="Time(years) : ",ĩ3 94 # Create a Compound Interest : labelĩ5 label4 = Label(root, text="Compound Interest : ",ġ01 102 # padx keyword argument used to set padding along x-axis. My goal is now to plot a matrix 28x28 that should show a written number (I'm building a neural networks that learns to understand human written numbers) but, as I run the last coding line, I get that error.Īn advice would be very much appreciated because I'm currently stuck here.4 # from scipy import stats 5 6 from PIL import ImageTk, Imageġ2 13 # Image working- 14 img = Image. So I created a file and a list that reads it and distinguish sequences. Image_array=numpy.asfarray(all_values).reshape((28,28)) This is the program I wrote: import numpyĭata_file=open(r"filepath\filename.csv",'r') Since I need to separate the sequences in order to distinguish the number sequences (that represent the value of pixels of an image) I don't know what to do. My main problem is the error "ValueError: could not convert string to float:" that appears because Python is not able to convert the '\n' into a float, obviously. What I'm trying to do is to open a csv file in order to import number sequences. Anyway, I still don't know how to solve my problem. I'm conscious of the fact that this question has been asked a lot of times.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |