bmtk icon indicating copy to clipboard operation
bmtk copied to clipboard

PR for resolving some inefficiencies

Open shixnya opened this issue 3 years ago • 0 comments

Changes in edge_adaptor.py caches the loaded dynamics files, and avoid reading them multiple times. This is helpful if you run networks with many edge types.

Changes in spike_train_readers.py is to avoid looping over HDF5 array. For the sorted case, I also implemented a vectorized way of setting the slices. For the non-sorted case, just copied the HDF array into np array first.

This may cause an issue for a very large spike file that's larger than memory size. In that becomes the problem, I suggest reading chunk by chunk from the HDF5 file (~1GB or so) instead of looping over it.

shixnya avatar Aug 05 '22 00:08 shixnya