In sparse tensor initialization, fix shape inference from the index arrays

This pull request should fix the tensor shape inference when creating a sparse tensor.
When inferring the shape of the tensor from the maximum values of the subs arrays, the shape values must be incremented by 1 in order to fit a 0-based index array.