Repository: PlasmaPy/PlasmaPy

Issue:
Posible bug in  function mass_density
Hello, while adding some examples into the documentation I faced something weird:
- Im trying to run this code but its gives me an error
`>>>from astropy import units as u`
`>>>from plasmapy.formulary import mass_density; `
`>>>mass_density(density=1 * u.m ** -3, particle='p')`
`<Quantity 1.67353284e-27 kg / m3> `
`>>>mass_density(density=1 * u.m ** -3)`
` File "D:\python\PlasmaPy\plasmapy\formulary\parameters.py", line 102, in mass_density    `                                 `raise ValueError(f"You must pass a particle (not {particle}) to calculate the "      `                               `ValueError: You must pass a particle (not None) to calculate the mass density! `


and if we read the documentation it says its optional

> particle (str, optional) – Representation of the particle species (e.g., 'p' for protons, 'D+' for deuterium, or 'He-4 +1' for singly ionized helium-4), which defaults to electrons. If no charge state information is provided, then the particles are assumed to be singly charged.


Discussion:
I just checked, this is actually fine-ish, because you can't turn a concentration, or number of particles per volume, into a mass density, or number of kilograms per volume, without either:

* knowing what the mass of each particle is (thus the particle argument), or
* supplying the mass density itself (which may seem nonsensical until you look at the function's docstring: `Utility function to merge two possible inputs for particle charge.`)

So I would say the ValueError's content should be changed to something like "ValueError: __If passing a number density,__ you must pass a particle (not None) to calculate the mass density!"

Wanna implement that real quick? :)
I dont think I have time now its 01:00 where Im from, but I will verify this with the version that is used on the plasmapy-benchmarks project I dont remember having any error with it.

Hmm, it could very well be that we broke something untested recently. All right, in the meantime, sleep well! :zzz: 
My mistake, using a previous version of plasmapy I run into the same error, I will change the ValueError part on the same pull along with the new examples for the documentation and I dont know if I may add my name to the credits.rst file or wait  for someone to do it.

> I dont know if I may add my name to the credits.rst file or wait for someone to do it.

Sure, go right ahead and add yourself! This is something I keep forgetting to do, my apologies.

Resolving patch:
diff --git a/plasmapy/formulary/parameters.py b/plasmapy/formulary/parameters.py
--- a/plasmapy/formulary/parameters.py
+++ b/plasmapy/formulary/parameters.py
@@ -92,6 +92,14 @@ def mass_density(density, particle: Optional[str] = None, z_mean: Optional[numbe
     ~astropy.units.Quantity
         The mass density calculated from all the provided sources of information.
 
+    Examples
+    -------
+    >>> from astropy import units as u
+    >>> mass_density(1 * u.m ** -3,'p')
+    <Quantity 1.67353284e-27 kg / m3>
+    >>> mass_density(4 * u.m ** -3,'D+')
+    <Quantity 1.33779786e-26 kg / m3>
+
     """
     if density.unit.is_equivalent(u.kg / u.m ** 3):
         rho = density
@@ -101,8 +109,8 @@ def mass_density(density, particle: Optional[str] = None, z_mean: Optional[numbe
             Z = _grab_charge(particle, z_mean)
             rho = density * m_i + Z * density * m_e
         else:
-            raise ValueError(f"You must pass a particle (not {particle}) to calculate the "
-                             f"mass density!")
+            raise ValueError(f"If passing a number density, you must pass a"
+                             f"particle (not {particle}) to calculate the mass density!")
     else:
         raise ValueError(f"mass_density accepts either particle (m**-3)"
                          " or mass (kg * m**-3) density, not {density.unit}!")
@@ -694,6 +702,15 @@ def Hall_parameter(n,
     Returns
     -------
     astropy.units.quantity.Quantity
+
+    Examples
+    --------
+    >>> from astropy import units as u
+    >>> Hall_parameter(1e10 * u.m**-3, 2.8e3 * u.eV, 2.3 * u.T, 'He-4 +1')
+    <Quantity 7.26446755e+16>
+    >>> Hall_parameter(1e10 * u.m**-3, 5.8e3 * u.eV, 2.3 * u.T, 'He-4 +1')
+    <Quantity 2.11158408e+17>
+
     """
     from plasmapy.formulary.collisions import (fundamental_ion_collision_freq,
                                                fundamental_electron_collision_freq)


Test patch: