Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: float() argument must be a string or a number, not 'map' #13

Open
ZhenhuiTang opened this issue Oct 14, 2019 · 2 comments
Open

Comments

@ZhenhuiTang
Copy link

Traceback (most recent call last):
File "/home/machinelearning/anaconda3/envs/graphsage-simple-master/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/machinelearning/anaconda3/envs/graphsage-simple-master/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/machinelearning/Documents/graphsage-simple-master/graphsage/model.py", line 183, in
run_cora()
File "/home/machinelearning/Documents/graphsage-simple-master/graphsage/model.py", line 69, in run_cora
feat_data, labels, adj_lists = load_cora()
File "/home/machinelearning/Documents/graphsage-simple-master/graphsage/model.py", line 49, in load_cora
feat_data[i, :] = map(float(), info[1:-1])
TypeError: float() argument must be a string or a number, not 'map'

@Andy1314Chen
Copy link

In python3:

feat_data[i, :] = list(map(float(), info[1:-1]))

@yeyingdege
Copy link

In python3:

feat_data[i, :] = list(map(float(), info[1:-1]))

Use feat_data[i, :] = list(map(float, info[1:-1]))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants