diff --git a/src/entropy.rs b/src/entropy.rs
index 8daac6d8..3841cb02 100644
--- a/src/entropy.rs
+++ b/src/entropy.rs
@@ -1,5 +1,5 @@
//! Information theory (e.g. entropy, KL divergence, etc.).
-use crate::errors::ShapeMismatch;
+use crate::errors::{EmptyInput, MultiInputError, ShapeMismatch};
use ndarray::{Array, ArrayBase, Data, Dimension, Zip};
use num_traits::Float;
@@ -19,7 +19,7 @@ where
/// i=1
/// ```
///
- /// If the array is empty, `None` is returned.
+ /// If the array is empty, `Err(EmptyInput)` is returned.
///
/// **Panics** if `ln` of any element in the array panics (which can occur for negative values for some `A`).
///
@@ -38,7 +38,7 @@ where
///
/// [entropy]: https://en.wikipedia.org/wiki/Entropy_(information_theory)
/// [Information Theory]: https://en.wikipedia.org/wiki/Information_theory
- fn entropy(&self) -> Option
+ fn entropy(&self) -> Result
where
A: Float;
@@ -53,8 +53,9 @@ where
/// i=1
/// ```
///
- /// If the arrays are empty, Ok(`None`) is returned.
- /// If the array shapes are not identical, `Err(ShapeMismatch)` is returned.
+ /// If the arrays are empty, `Err(MultiInputError::EmptyInput)` is returned.
+ /// If the array shapes are not identical,
+ /// `Err(MultiInputError::ShapeMismatch)` is returned.
///
/// **Panics** if, for a pair of elements *(pᵢ, qᵢ)* from *p* and *q*, computing
/// *ln(qᵢ/pᵢ)* is a panic cause for `A`.
@@ -73,7 +74,7 @@ where
///
/// [Kullback-Leibler divergence]: https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence
/// [Information Theory]: https://en.wikipedia.org/wiki/Information_theory
- fn kl_divergence(&self, q: &ArrayBase) -> Result