-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I can't seem to run 4.2 Visualize the stages of mapper in the haxby example. This works in the trefoil knot example as it did before.
I think there are also other things that do not work, all of the cells after that don't work as well. The outputs of kmapper seem to be very different from when the notebook was last updated. One of the lines says "Created 0 edges and 0 nodes" for example. Been trying to figure this out but haven't been able to get it to work.
This is the error I get after trying to visualize the stages of mapper:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/opt/miniconda-latest/envs/neuro/lib/python3.7/site-packages/dyneusr/tools/networkx_utils.py in get_cover_cubes(lens, graph, cover, scale, **kwargs)
235 cover_cubes = {}
--> 236 for i, center in enumerate(cover.centers_):
237 lower = center - cover.radius_
TypeError: 'NoneType' object is not iterable
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-14-23a7a1134df5> in <module>
5 _ = ds.tools.networkx_utils.visualize_mapper_stages(
6 data=subject, lens=lens, cover=cover, graph=graph,dG=dG,
----> 7 node_size=10,
8 )
/opt/miniconda-latest/envs/neuro/lib/python3.7/site-packages/dyneusr/tools/networkx_utils.py in visualize_mapper_stages(data, y, lens, cover, graph, dG, **kwargs)
431
432 # 2. draw cover (axes: 2)
--> 433 draw_cover(ax=axes[1], graph=graph, lens=lens2D, cover=cover)
434
435 # 3. draw clusters (axes: 3)
/opt/miniconda-latest/envs/neuro/lib/python3.7/site-packages/dyneusr/tools/networkx_utils.py in draw_cover(ax, cover_cubes, draw_all, max_draw, **kwargs)
286
287 if cover_cubes is None:
--> 288 cover_cubes = get_cover_cubes(**kwargs)
289
290 # extract bins (TODO: probably a better way to do this)
/opt/miniconda-latest/envs/neuro/lib/python3.7/site-packages/dyneusr/tools/networkx_utils.py in get_cover_cubes(lens, graph, cover, scale, **kwargs)
242
243 # support deprecated Cover API from kmapper==1.1.6
--> 244 bins = [tuple(_) for _ in cover.define_bins(ilens)]
245 chunk_dist = cover.chunk_dist
246 overlap_dist = cover.overlap_dist
AttributeError: 'Cover' object has no attribute 'define_bins'
Metadata
Metadata
Assignees
Labels
No labels