diff --git a/apis/python/src/tiledbsoma/_dense_nd_array.py b/apis/python/src/tiledbsoma/_dense_nd_array.py index d4aefff69f..5b77d581ee 100644 --- a/apis/python/src/tiledbsoma/_dense_nd_array.py +++ b/apis/python/src/tiledbsoma/_dense_nd_array.py @@ -132,8 +132,11 @@ def read( data_shape = tuple(slot[1] + 1 for slot in ned) target_shape = dense_indices_to_shape(coords, data_shape, result_order) - config = handle.config().copy() - config.update(platform_config or {}) + context = handle.context() + if platform_config is not None: + config = context.tiledb_config.copy() + config.update(platform_config or {}) + context = clib.SOMAContext(config) ts = None if handle.timestamp is not None: @@ -142,14 +145,12 @@ def read( sr = clib.SOMADenseNDArray.open( uri=handle.uri, mode=clib.OpenMode.read, - platform_config=config, + context=context, column_names=[], result_order=_util.to_clib_result_order(result_order), timestamp=ts, ) - # sr = self._soma_reader(result_order=result_order) - self._set_reader_coords(sr, coords) arrow_tables = [] diff --git a/apis/python/src/tiledbsoma/_tdb_handles.py b/apis/python/src/tiledbsoma/_tdb_handles.py index 0d2c2ac99f..24c4c2992a 100644 --- a/apis/python/src/tiledbsoma/_tdb_handles.py +++ b/apis/python/src/tiledbsoma/_tdb_handles.py @@ -72,11 +72,13 @@ def open( if open_mode == clib.OpenMode.read and obj_type == "SOMADataFrame": return DataFrameWrapper._from_soma_object(soma_object, context) + elif open_mode == clib.OpenMode.read and obj_type == "SOMADenseNDArray": + return DenseNDArrayWrapper._from_soma_object(soma_object, context) if obj_type in ( "SOMADataFrame", - "SOMASparseNDArray", "SOMADenseNDArray", + "SOMASparseNDArray", "array", ): return ArrayWrapper.open(uri, mode, context, timestamp) diff --git a/apis/python/src/tiledbsoma/soma_dense_ndarray.cc b/apis/python/src/tiledbsoma/soma_dense_ndarray.cc index be9ad8595f..8566418128 100644 --- a/apis/python/src/tiledbsoma/soma_dense_ndarray.cc +++ b/apis/python/src/tiledbsoma/soma_dense_ndarray.cc @@ -60,7 +60,7 @@ void load_soma_dense_ndarray(py::module &m) { std::optional>>(&SOMADenseNDArray::open), "uri"_a, "mode"_a, - "ctx"_a, + "context"_a, py::kw_only(), "column_names"_a = py::none(), "result_order"_a = ResultOrder::automatic,