w2e function

Create edge list from weight matrix.