Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: typeerror, building histogram from data
Post: RE: typeerror, building histogram from data

gotcha!So i made the below 2 changes by adding int at 2 places. Now both the arguments are integers when using // : binwidth = int(diff/numbins) histo[int(d)//binwidth]+=1 I also removed the part whe...
newatpython11 Homework 7 3,809 Jul-17-2019, 03:57 AM
    Thread: typeerror, building histogram from data
Post: RE: typeerror, building histogram from data

So i tried that and also moved diff out, but now it goes back to the original error i got. Now i have already converted the list to integer, since the original list is made of 50000 datapoints which h...
newatpython11 Homework 7 3,809 Jul-17-2019, 02:05 AM
    Thread: typeerror, building histogram from data
Post: RE: typeerror, building histogram from data

Sorry about the miss, here is the error! Error:NameError Traceback (most recent call last) <ipython-input-33-322737c63f20> in <module>() 24 return...
newatpython11 Homework 7 3,809 Jul-17-2019, 12:31 AM
    Thread: typeerror, building histogram from data
Post: typeerror, building histogram from data

I am trying to run a code to build histogram from a list of data and keep getting the below error : Error:TypeError: list indices must be integers or slices, not floatBelow is my code, can you help m...
newatpython11 Homework 7 3,809 Jul-16-2019, 03:05 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020