Skip to content

Commit

Permalink
Rename SMC files
Browse files Browse the repository at this point in the history
  • Loading branch information
IMvision12 authored and ricardoV94 committed Oct 29, 2022
1 parent 7fb3623 commit bcffce2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/source/api/smc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Sequential Monte Carlo
SMC kernels
-----------

.. currentmodule:: pymc.smc.smc
.. currentmodule:: pymc.smc.kernels
.. autosummary::
:toctree: generated/

Expand Down
5 changes: 4 additions & 1 deletion pymc/smc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from pymc.smc.sample_smc import sample_smc
from pymc.smc.kernels import IMH, MH
from pymc.smc.sampling import sample_smc

__all__ = ("sample_smc",)
File renamed without changes.
2 changes: 1 addition & 1 deletion pymc/smc/sample_smc.py → pymc/smc/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from pymc.backends.base import MultiTrace
from pymc.model import modelcontext
from pymc.parallel_sampling import _cpu_count
from pymc.smc.smc import IMH
from pymc.smc.kernels import IMH


def sample_smc(
Expand Down
2 changes: 1 addition & 1 deletion pymc/tests/distributions/test_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from pymc import floatX
from pymc.aesaraf import compile_pymc
from pymc.initial_point import make_initial_point_fn
from pymc.smc.smc import IMH
from pymc.smc.kernels import IMH
from pymc.tests.helpers import SeededTest


Expand Down
6 changes: 3 additions & 3 deletions pymc/tests/smc/test_smc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from pymc.aesaraf import floatX
from pymc.backends.base import MultiTrace
from pymc.smc.smc import IMH
from pymc.smc.kernels import IMH, systematic_resampling
from pymc.tests.helpers import SeededTest, assert_random_state_equal


Expand Down Expand Up @@ -291,6 +291,6 @@ def test_proposal_dist_shape(self):
def test_systematic():
rng = np.random.default_rng(seed=34)
weights = [0.33, 0.33, 0.33]
np.testing.assert_array_equal(pm.smc.systematic_resampling(weights, rng), [0, 1, 2])
np.testing.assert_array_equal(systematic_resampling(weights, rng), [0, 1, 2])
weights = [0.99, 0.01]
np.testing.assert_array_equal(pm.smc.systematic_resampling(weights, rng), [0, 0])
np.testing.assert_array_equal(systematic_resampling(weights, rng), [0, 0])
4 changes: 2 additions & 2 deletions scripts/run_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
pymc/plots/__init__.py
pymc/sampling.py
pymc/smc/__init__.py
pymc/smc/sample_smc.py
pymc/smc/smc.py
pymc/smc/sampling.py
pymc/smc/kernels.py
pymc/stats/__init__.py
pymc/stats/convergence.py
pymc/step_methods/__init__.py
Expand Down

0 comments on commit bcffce2

Please sign in to comment.