Skip to content

Commit

Permalink
Fix case of dims = [None, None, ...]
Browse files Browse the repository at this point in the history
The only case where dims=[None, ...] is when the user has passed dims=None. Since the user passed dims=None,
they shouldn't be expecting any coords to match that dimension. Thus we don't need to try to add any
more coords to the model.
  • Loading branch information
thomasaarholt committed Oct 4, 2024
1 parent 306bb30 commit 74665c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymc/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def Data(
xshape = x.shape
# Register new dimension lengths
for d, dname in enumerate(new_dims):
if dname not in model.dim_lengths:
if dname not in model.dim_lengths and dname is not None:
model.add_coord(
name=dname,
# Note: Coordinate values can't be taken from
Expand Down

0 comments on commit 74665c8

Please sign in to comment.