Implement Sparse Matrix Using Arrays With Numpy Linspace