This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MODULES=( | |
ipython/.5.3.0-foss-2017a-python-2.7.13 \ | |
ipywidgets/7.2.1-foss-2017a-python-2.7.13 \ | |
matplotlib/2.2.2-foss-2017a-python-2.7.13 \ | |
pillow/5.1.0-foss-2017a-python-2.7.13 \ | |
av/6.0.0-foss-2017a-python-2.7.13 \ | |
scipy/1.0.1-foss-2017a-python-2.7.13 \ | |
scikit-learn/0.19.1-foss-2017a-python-2.7.13 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def prepare_sparse_cost(shape, cc, ii, jj, cost_limit): | |
''' | |
Transform the given sparse matrix extending it to a square sparse matrix. | |
Parameters | |
========== | |
shape: tuple | |
- cost matrix shape | |
(cc, ii, jj): tuple of floats, ints, ints) | |
- cost matrix in COO format, see [1]. |