Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezzi committed Nov 29, 2023
1 parent 2c89128 commit f9ca66c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python-spec/src/somacore/query/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,11 @@ def _axisp_inner_ndarray(

joinids = getattr(self._joinids, axis.value)

n_row = n_col = len(self._joinids.obs)
n_row = n_col = len(self._joinids.obs) if is_obs else len(self._joinids.var)

T = axisp[layer].read((joinids, joinids)).tables().concat()
idx = (self.indexer.by_obs if is_obs else self.indexer.by_var)(T["soma_dim_0"])
Z = np.empty(n_row * n_col)
Z = np.zeros(n_row * n_col, dtype=np.float32)
np.put(Z, idx * n_col + T["soma_dim_1"], T["soma_data"])
return Z.reshape(n_row, n_col)

Expand All @@ -560,11 +560,11 @@ def _axism_inner_ndarray(

joinids = getattr(self._joinids, axis.value)

n_row = len(self._joinids.obs)
n_row = len(self._joinids.obs) if is_obs else len(self._joinids.var)

T = axism[layer].read((joinids, col_idx)).tables().concat()
idx = (self.indexer.by_obs if is_obs else self.indexer.by_var)(T["soma_dim_0"])
Z = np.empty(n_row * n_col)
Z = np.zeros(n_row * n_col, dtype=np.float32)
np.put(Z, idx * n_col + T["soma_dim_1"], T["soma_data"])
return Z.reshape(n_row, n_col)

Expand Down

0 comments on commit f9ca66c

Please sign in to comment.