Skip to content

Commit 755fca9

Browse files
docs: Correct spelling of continuous (#1201)
* Fix typo of the word "continuous" in a few docstrings and a comment - continous -> continuous
1 parent aa17119 commit 755fca9

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/pyhf/tensor/jax_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def poisson_logpdf(self, n, lam):
351351

352352
def poisson(self, n, lam):
353353
r"""
354-
The continous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
354+
The continuous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
355355
to the probability mass function of the Poisson distribution evaluated
356356
at :code:`n` given the parameter :code:`lam`.
357357
@@ -373,7 +373,7 @@ def poisson(self, n, lam):
373373
(the expected number of events)
374374
375375
Returns:
376-
JAX ndarray: Value of the continous approximation to Poisson(n|lam)
376+
JAX ndarray: Value of the continuous approximation to Poisson(n|lam)
377377
"""
378378
n = jnp.asarray(n)
379379
lam = jnp.asarray(lam)

src/pyhf/tensor/numpy_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def poisson_logpdf(self, n, lam):
333333

334334
def poisson(self, n, lam):
335335
r"""
336-
The continous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
336+
The continuous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
337337
to the probability mass function of the Poisson distribution evaluated
338338
at :code:`n` given the parameter :code:`lam`.
339339
@@ -355,7 +355,7 @@ def poisson(self, n, lam):
355355
(the expected number of events)
356356
357357
Returns:
358-
NumPy float: Value of the continous approximation to Poisson(n|lam)
358+
NumPy float: Value of the continuous approximation to Poisson(n|lam)
359359
"""
360360
n = np.asarray(n)
361361
lam = np.asarray(lam)

src/pyhf/tensor/pytorch_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def poisson_logpdf(self, n, lam):
319319

320320
def poisson(self, n, lam):
321321
r"""
322-
The continous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
322+
The continuous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
323323
to the probability mass function of the Poisson distribution evaluated
324324
at :code:`n` given the parameter :code:`lam`.
325325
@@ -341,7 +341,7 @@ def poisson(self, n, lam):
341341
(the expected number of events)
342342
343343
Returns:
344-
PyTorch FloatTensor: Value of the continous approximation to Poisson(n|lam)
344+
PyTorch FloatTensor: Value of the continuous approximation to Poisson(n|lam)
345345
"""
346346
return torch.exp(torch.distributions.Poisson(lam).log_prob(n))
347347

src/pyhf/tensor/tensorflow_backend.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def einsum(self, subscripts, *operands):
383383

384384
def poisson_logpdf(self, n, lam):
385385
r"""
386-
The log of the continous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
386+
The log of the continuous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
387387
to the probability mass function of the Poisson distribution evaluated
388388
at :code:`n` given the parameter :code:`lam`.
389389
@@ -406,13 +406,13 @@ def poisson_logpdf(self, n, lam):
406406
(the expected number of events)
407407
408408
Returns:
409-
TensorFlow Tensor: Value of the continous approximation to log(Poisson(n|lam))
409+
TensorFlow Tensor: Value of the continuous approximation to log(Poisson(n|lam))
410410
"""
411411
return tfp.distributions.Poisson(lam).log_prob(n)
412412

413413
def poisson(self, n, lam):
414414
r"""
415-
The continous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
415+
The continuous approximation, using :math:`n! = \Gamma\left(n+1\right)`,
416416
to the probability mass function of the Poisson distribution evaluated
417417
at :code:`n` given the parameter :code:`lam`.
418418
@@ -435,7 +435,7 @@ def poisson(self, n, lam):
435435
(the expected number of events)
436436
437437
Returns:
438-
TensorFlow Tensor: Value of the continous approximation to Poisson(n|lam)
438+
TensorFlow Tensor: Value of the continuous approximation to Poisson(n|lam)
439439
"""
440440
return tf.exp(tfp.distributions.Poisson(lam).log_prob(n))
441441

tests/test_tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def test_pdf_calculations(backend):
278278
nan_ok=True,
279279
)
280280

281-
# Ensure continous approximation is valid
281+
# Ensure continuous approximation is valid
282282
assert tb.tolist(
283283
tb.poisson(tb.astensor([0.5, 1.1, 1.5]), tb.astensor(1.0))
284284
) == pytest.approx([0.4151074974205947, 0.3515379040027489, 0.2767383316137298])

0 commit comments

Comments
 (0)