Skip to content

Commit 3d58e0b

Browse files
committed
formatting
1 parent c3a1fe5 commit 3d58e0b

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

pymc/step_methods/cannot_sample.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
1+
# Copyright 2025 - present The PyMC Developers
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
from pymc.step_methods.arraystep import ArrayStep
215

16+
317
class CannotSampleRV(ArrayStep):
418
"""
519
A step method that raises an error when sampling a latent Multinomial variable.
620
"""
21+
722
name = "cannot_sample_rv"
23+
824
def __init__(self, vars, **kwargs):
925
# Remove keys that ArrayStep.__init__ does not accept.
1026
kwargs.pop("model", None)
1127
kwargs.pop("initial_point", None)
1228
kwargs.pop("compile_kwargs", None)
1329
self.vars = vars
14-
super().__init__(vars=vars,fs=[], **kwargs)
30+
super().__init__(vars=vars, fs=[], **kwargs)
1531

1632
def astep(self, q0):
1733
# This method is required by the abstract base class.
18-
raise ValueError(
19-
"Latent Multinomial variables are not supported"
20-
)
21-
34+
raise ValueError("Latent Multinomial variables are not supported")

0 commit comments

Comments
 (0)