File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -180,14 +180,15 @@ def n_dims(self) -> int:
180
180
"""The dimensionality of the input, as taken from the
181
181
`active_dims`.
182
182
"""
183
- # Evaluate lazily in- case this changes.
183
+ # Evaluate lazily in case this changes.
184
184
return len (self .active_dims )
185
185
186
186
def _slice (self , X , Xs = None ):
187
187
xdims = X .shape [- 1 ]
188
188
if isinstance (xdims , Variable ):
189
- [xdims ] = constant_fold ([xdims ])
190
- if self .input_dim != xdims :
189
+ [xdims ] = constant_fold ([xdims ], raise_not_constant = False )
190
+ # If xdims can't be fully constant folded, it will be a TensorVariable
191
+ if isinstance (xdims , int ) and self .input_dim != xdims :
191
192
warnings .warn (
192
193
f"Only { self .input_dim } column(s) out of { xdims } are"
193
194
" being used to compute the covariance function. If this"
You can’t perform that action at this time.
0 commit comments