Skip to content

Commit

Permalink
[python] Use new shape in one more spot
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Nov 12, 2024
1 parent afe5b69 commit efc15c5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions apis/python/src/tiledbsoma/io/outgest.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,14 @@ def _extract_obsm_or_varm(
num_cols = width_configs.get(element_name, None)

if num_cols is None:
try:
used_shape = soma_nd_array.used_shape()
num_cols = used_shape[1][1] + 1
except SOMAError:
pass # We tried; moving on to next option
if soma_nd_array.tiledbsoma_has_upgraded_shape:
num_cols = soma_nd_array.shape[1]
else:
try:
used_shape = soma_nd_array.used_shape()
num_cols = used_shape[1][1] + 1
except SOMAError:
pass # We tried; moving on to next option

if num_cols is None:
num_rows_times_width, coo_column_count = matrix_tbl.shape
Expand Down

0 comments on commit efc15c5

Please sign in to comment.