if we have the underlying data, weights, num_nonzero as lists, then maybe a list comprehension would be more appropriate.
In `initialize` we would only need the limits 
`max(weights for (weights, nnz) in zip(self.weights, self.num_nonzero) if nnz < nvar)`