Commit 322909d8 authored by jay's avatar jay
Browse files

Updates for @Kelvinrr comments

parent 7b39d5e3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -46,14 +46,12 @@ def save(network, projectname):
    js = json_graph.node_link_data(network)
    with ZipFile(projectname, 'w') as pzip:
        js_str = json.dumps(js, cls=NumpyEncoder, sort_keys=True, indent=4)
        print(js_str)
        pzip.writestr('graph.json', js_str)

        # Write the array node_attributes to hdf
        for n, data in network.nodes_iter(data=True):
            ndarrays_to_write = {}
            for k, v in data.__dict__.items():
                print(k, v)
                if isinstance(v, np.ndarray):
                    ndarrays_to_write[k] = v
                elif isinstance(v, pd.DataFrame):