class_docstr: Tests for pm.Bound distribution
class_docstr_tok: ["Tests","for","pm.Bound","distribution"]
code: def test_array_bound(self):
      with pm.Model() as model:
          dist = pm.Normal.dist()
          with pytest.warns(
              FutureWarning, match="Bound has been deprecated"
          ):
              with warnings.catch_warnings():
                  warnings.filterwarnings(
                      "ignore",
                      "invalid value encountered in add",
                      RuntimeWarning,
                  )
                  LowerPoisson = pm.Bound(
                      "lower", dist, lower=[1, None], transform=None
                  )
                  UpperPoisson = pm.Bound(
                      "upper", dist, upper=[np.inf, 10], transform=None
                  )
              BoundedPoisson = pm.Bound(
                  "bounded",
                  dist,
                  lower=[1, 2],
                  upper=[9, 10],
                  transform=None,
              )
  
      first, second = model.compile_fn(
          model.logp(LowerPoisson, sum=False)[0], point_fn=False
      )([0, 0])
      assert first == -np.inf
      assert second != -np.inf
  
      first, second = model.compile_fn(
          model.logp(UpperPoisson, sum=False)[0], point_fn=False
      )([11, 11])
      assert first != -np.inf
      assert second == -np.inf
  
      first, second = model.compile_fn(
          model.logp(BoundedPoisson, sum=False)[0], point_fn=False
      )([1, 1])
      assert first != -np.inf
      assert second == -np.inf
  
      first, second = model.compile_fn(
          model.logp(BoundedPoisson, sum=False)[0], point_fn=False
      )([10, 10])
      assert first == -np.inf
      assert second != -np.inf
  
file_path: pymc/tests/distributions/test_bound.py
imports: import warnings
  import numpy
  import pytest
  import scipy.stats
  from pytensor.tensor.random.op import RandomVariable
  import pymc
label_desc: Use image node_id 8 for calling the TestBound obj's underlying member method code with example usage: obj.test_array_bound() without return types