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