Skip to content

Commit 9501ac3

Browse files
Respond to feedback
1 parent 095794d commit 9501ac3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pymc/data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def _dataframe_agnostic_coords(
265265

266266
index_dim = dims[0]
267267
if index_dim is not None and index_dim in value.columns:
268-
coords[index_dim] = tuple(value.select(nw.col(index_dim)).to_numpy())
268+
coords[index_dim] = tuple(value.select(nw.col(index_dim)).to_numpy().flatten())
269269
elif index_dim in model.coords:
270270
coords[index_dim] = model.coords[index_dim] # type: ignore[assignment]
271271
else:
@@ -321,6 +321,7 @@ def determine_dataframe_coords(
321321
return _dataframe_agnostic_coords(value, model=model, dims=dims, coords=coords)
322322

323323
except ImportError:
324+
# Dataframe backends are optional
324325
pass
325326

326327

@@ -364,7 +365,7 @@ def Data(
364365
A value to associate with this variable.
365366
dims : str, tuple of str or tuple of None, optional
366367
Dimension names of the random variables (as opposed to the shapes of these
367-
random variables). Use this when ``value`` is a pandas Series or DataFrame. The
368+
random variables). Use this when ``value`` is a Series or DataFrame. The
368369
``dims`` will then be the name of the Series / DataFrame's columns. See ArviZ
369370
documentation for more information about dimensions and coordinates:
370371
:ref:`arviz:quickstart`.

0 commit comments

Comments
 (0)