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 10, 2024
1 parent 165a35f commit dbbb9a2
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 @@ -462,7 +462,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 dbbb9a2

Please sign in to comment.