Another attempt to improve indexing for sparse arrays