Skip to content

Commit 27fc93d

Browse files
committed
Add usage with non xarray inputs to readme
1 parent 6f4b35e commit 27fc93d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ gsw-xarray: Wrapper for gsw that adds CF attributes
1111

1212
gsw-xarray is a wrapper for `gsw python <https://github.com/TEOS-10/GSW-python>`_
1313
that will add CF attributes to xarray.DataArray outputs.
14+
It is meant to be a drop in wrapper for the upstram GSW-Python library and will only add these attribtues if the first argument to a fucntion is an xarray.DataArray.
1415

1516
Usage
1617
-----
@@ -40,6 +41,19 @@ Outputs
4041

4142
{'standard_name': 'sea_water_sigma_t', 'units': 'kg/m^3'}
4243

44+
Don't worry about usage with non xarray array objects, just use in all places you would the upstream library:
45+
46+
.. code:: python
47+
48+
sigma0 = gsw.sigma0(id * 10, id * 0.1 + 34)
49+
print(type(sigma0, sigma0)
50+
51+
Outputs
52+
53+
::
54+
55+
<class 'numpy.ndarray'> [-5.08964499 2.1101098 9.28348219]
56+
4357
Installation
4458
------------
4559
Pip

0 commit comments

Comments
 (0)