Skip to content

Conversation

giacomo-ciro
Copy link

This commit fixes a bug in ingestion.py where sparse matrices with null entries at the end were being read with incorrect dimensions.

Previously, the read_input_vectors function would convert a sparse matrix to a dense matrix without accounting for trailing null columns. This could lead to a mismatch in dimensions later in the code.

For example, a sparse array whose schema specified a shape of10x100 might be read as a 10x90 dense matrix if its last 10 columns were empty.

The fix adds a check to ensure the matrix is padded with zeros to the expected dimensions, preventing the dimension mismatch.

This commit fixes a bug in `ingestion.py` where sparse matrices with null entries at the end were being read with incorrect dimensions.

Previously, the `read_input_vectors` function would convert a sparse matrix to a dense matrix without accounting for trailing null columns. This could lead to a mismatch in dimensions later in the code, as a `10x100` sparse matrix might be read as a `10x90` dense matrix if its last 10 columns were empty.

The fix adds a check to ensure the matrix is padded with zeros to the expected dimensions, preventing the dimension mismatch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant