Skip to content

Commit dbbb9a2

Browse files
committed
Fix case of dims = [None, None, ...]
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.
1 parent 165a35f commit dbbb9a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def Data(
462462
xshape = x.shape
463463
# Register new dimension lengths
464464
for d, dname in enumerate(new_dims):
465-
if dname not in model.dim_lengths:
465+
if dname not in model.dim_lengths and dname is not None:
466466
model.add_coord(
467467
name=dname,
468468
# Note: Coordinate values can't be taken from

0 commit comments

Comments
 (0)