TypeError: 'float' object is not subscriptable
See original GitHub issueGreetings.
Here are the codes:
prot1 = u.atoms.select_atoms("resid 11")
prot2 = u.atoms.select_atoms("protein")
fp = plf.Fingerprint(['HBDonor', 'HBAcceptor', 'PiStacking', 'Anionic', 'Cationic', 'CationPi', 'PiCation'])
fp.run(u.trajectory[:2], prot1, prot2)
print(fp.ifp)
df = fp.to_dataframe(dtype=np.uint8)
print(df)
+ The outputs look good:
However, if I just change fp.run(u.trajectory[:2], prot1, prot2)
to fp.run(u.trajectory[:3], prot1, prot2)
,
- the programm will raise an error::
Thanks for your attention.
pineapple
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Python typeerror: 'float' object is not subscriptable Solution
The “typeerror: 'float' object is not subscriptable” error occurs when you try to access items from a floating point number as if the...
Read more >TypeError: 'float' object is not subscriptable - Stack Overflow
I get the same error : TypeError: 'float' object is not subscriptable in this line: print("%s: %.2f%%" % (model.metrics_names[0], scores[0]*100)) ...
Read more >(Solved) Python TypeError: 'float' object is not subscriptable
The error message “ TypeError: 'float' object is not subscriptable ” happens if you access a float f like a list such as...
Read more >TypeError: 'float' object is not subscriptable in Python
The Python "TypeError: 'float' object is not subscriptable" occurs when we try to use square brackets to access a float at a specific...
Read more >TypeError: 'float' object is not subscriptable - openrouteservice
The output of the routes shows that distance is basically a float number and not a list. ... Hey,. this is a problem...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
😃 Thanks, it works but with a little error.
or it will give you an error:
Best wishes,
pineapple 🍍
Mmh it’s strange I just reinstalled it without any problem on my side.
Are you installing in a clean conda environment ? What version of python and pip are you using ? Also, can you try this:
And then uninstall prolif and reinstall ?
Thanks, Cedric