Skip to content

Commit fe605cd

Browse files
authored
Merge pull request Unidata#3026 from dopplershift/fix-2983
DOC: Simplify docstring example
2 parents 64608b0 + 100f604 commit fe605cd

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/metpy/calc/basic.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -527,16 +527,10 @@ def geopotential_to_height(geopotential):
527527
--------
528528
>>> import metpy.calc
529529
>>> from metpy.units import units
530-
>>> height = np.linspace(0, 10000, num=11) * units.m
531-
>>> geopot = metpy.calc.height_to_geopotential(height)
532-
>>> geopot
533-
<Quantity([ 0. 9805.11097983 19607.1448853 29406.10316465
534-
39201.98726524 48994.79863351 58784.53871501 68571.20895435
535-
78354.81079527 88135.34568058 97912.81505219], 'meter ** 2 / second ** 2')>
530+
>>> geopot = units.Quantity([0., 9805., 19607., 29406.], 'm^2/s^2')
536531
>>> height = metpy.calc.geopotential_to_height(geopot)
537532
>>> height
538-
<Quantity([ 0. 1000. 2000. 3000. 4000. 5000. 6000. 7000. 8000.
539-
9000. 10000.], 'meter')>
533+
<Quantity([ 0. 999.98867965 1999.98521653 2999.98947022], 'meter')>
540534
541535
See Also
542536
--------

0 commit comments

Comments
 (0)