From d9c2517ec73bda0e73ec460b470eb06cba09c08b Mon Sep 17 00:00:00 2001 From: John Kerl Date: Fri, 6 Sep 2024 23:57:13 -0400 Subject: [PATCH] [python] New-shape testing for `tiledbsoma.io` [skip ci] --- apis/python/src/tiledbsoma/io/ingest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apis/python/src/tiledbsoma/io/ingest.py b/apis/python/src/tiledbsoma/io/ingest.py index 90f2c6e40f..3264df326a 100644 --- a/apis/python/src/tiledbsoma/io/ingest.py +++ b/apis/python/src/tiledbsoma/io/ingest.py @@ -1205,6 +1205,7 @@ def _write_dataframe_impl( soma_df = DataFrame.create( df_uri, schema=arrow_table.schema, + domain=((0, int(df.shape[0]) - 1),), # XXX TOUCH platform_config=platform_config, context=context, ) @@ -1304,7 +1305,9 @@ def _create_from_matrix( try: # A SparseNDArray must be appendable in soma.io. - shape = [None for _ in matrix.shape] if cls.is_sparse else matrix.shape + # shape = [None for _ in matrix.shape] if cls.is_sparse else matrix.shape + # shape = matrix.shape # XXX TOUCH + shape = tuple(int(e) for e in matrix.shape) # XXX TOUCH soma_ndarray = cls.create( uri, type=pa.from_numpy_dtype(matrix.dtype),