Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #293

Merged
merged 274 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
274 commits
Select commit Hold shift + click to select a range
10b90c0
cdms_4 doctest
dnadeau4 Oct 18, 2017
889d714
add other chapters
dnadeau4 Oct 18, 2017
e9f207a
finish chapter 4
dnadeau4 Oct 18, 2017
09da492
add chapter 5
dnadeau4 Oct 24, 2017
dcbdfdc
add chapter 6
dnadeau4 Oct 25, 2017
85c05da
cdms chapter 6
dnadeau4 Oct 25, 2017
0783e17
fix TOC
dnadeau4 Oct 31, 2017
55e419c
add chapter 7 and appendix
dnadeau4 Nov 1, 2017
49c79e1
merge docs
dnadeau4 Nov 15, 2017
b92460f
add requirements.txt
dnadeau4 Nov 15, 2017
96a2581
remove cdat_info
dnadeau4 Nov 15, 2017
d629683
remote cdat_info
dnadeau4 Dec 7, 2017
c533331
fix latex_logo png
dnadeau4 Dec 7, 2017
9d724ae
Merge branch 'master' into cdmsdocsmerge
dnadeau4 Dec 7, 2017
0ca4050
pin pyopenssl to 17.2.0 due to myproxyclient failure in py3
dnadeau4 Dec 7, 2017
263d814
update TOC
dnadeau4 Dec 8, 2017
bbafa04
work on tables and setup
dnadeau4 Dec 20, 2017
3ec8781
try to force jquery 3.1
dnadeau4 Dec 20, 2017
7eca248
just copy js script in _static
dnadeau4 Dec 20, 2017
95b3029
add highlight python
dnadeau4 Dec 20, 2017
a1f80cb
add sample dataset page
dnadeau4 Jan 9, 2018
f6335ee
add sample dataset page
dnadeau4 Jan 9, 2018
58915de
work on tables for cdms_2.rst
dnadeau4 Jan 11, 2018
89c45b9
continue cdms2 documentations
dnadeau4 Jan 17, 2018
d4269cf
update cdms2 tables
Jan 29, 2018
8402530
update sections
Jan 29, 2018
1ec5ef9
update table
Jan 30, 2018
7bc7d13
finish chapter 2
dnadeau4 Feb 7, 2018
dbdbbc9
merge master
dnadeau4 Feb 7, 2018
322803c
fix litteral error
dnadeau4 Feb 7, 2018
e9c0809
merge master
dnadeau4 Feb 7, 2018
ee5c35a
fix conclits
dnadeau4 Feb 7, 2018
9b9c9f8
Merge branch 'master' into cdmsdocsmerge
dnadeau4 Feb 7, 2018
c4563ee
unlink .dodsrc for cdscan
dnadeau4 Feb 7, 2018
9ae560a
First changes from Tanya
reshel3 Feb 27, 2018
f93e64f
some change in chapter 1 and 2
reshel3 Mar 1, 2018
42d56ee
some changes in Chapter 2
reshel3 Mar 1, 2018
af15c81
fix tables
reshel3 Mar 1, 2018
69478bd
Some changes to Chapter 2
reshel3 Mar 5, 2018
f542e15
Some Changes to Chapter 2
reshel3 Mar 6, 2018
10b3523
Some changes made to Chapters 1, 2 and 4
reshel3 Mar 7, 2018
33c90fd
Some changes to Chapter 2
reshel3 Mar 8, 2018
368d88d
Some Changes made to Chapter 2
reshel3 Mar 8, 2018
27603b7
Some changes to Chapters 2, 3 and 4
reshel3 Mar 9, 2018
62832f7
Some changes made to 1 through Appendix
reshel3 Mar 12, 2018
5e30a18
Some Changes made to Chapter 2
reshel3 Mar 13, 2018
1d7d259
Some Changes to Chapters 1, 2, 3, 6 and Appendix
reshel3 Mar 14, 2018
a40269d
Some changes made to Chapters 1 thru 7 and appendix
reshel3 Mar 15, 2018
074fcfb
Some changes to Chpaters 1, 2 and 3
reshel3 Mar 19, 2018
f2e7fef
Changes made to Chapters 1, 4, 5 and Appendix
reshel3 Mar 20, 2018
65943ff
Some changes to Chapter 2 and 4
reshel3 Mar 23, 2018
08ca15c
Some Changes to Images, Chapter 3 and Appendix
reshel3 Mar 26, 2018
e15c025
update logo
dnadeau4 Mar 28, 2018
a62a8fa
add my logo
dnadeau4 Mar 28, 2018
ab6f16d
Merge branch 'master' into cdmsdocsmerge
dnadeau4 Mar 28, 2018
680397b
fix chapter 1 test
dnadeau4 Mar 28, 2018
56c41b6
Some changes made to Chapters 2, 3 and 5
reshel3 Mar 28, 2018
35c1437
Some Changes to Chapters 1 and 2
reshel3 Mar 29, 2018
12737a4
Some changes to Appendix
reshel3 Apr 3, 2018
31931d4
update banner/footer and version
dnadeau4 Apr 3, 2018
a3f6282
Some Changes to Chapters 1, 2, 3 and appendix
reshel3 Apr 4, 2018
9b2a4e0
change u to uold in example
dnadeau4 Apr 9, 2018
a145945
Some changes to Chapters 2, 4, 5 and 6
reshel3 Apr 9, 2018
3583767
Some changes to Regrid 2, Lib, esmf, gsRegrid and horizontal
reshel3 Apr 16, 2018
89bd18b
Changes made to Chapters 1-7 and sample data
reshel3 Apr 16, 2018
66d4289
fix API documentation
reshel3 Apr 17, 2018
2e9414a
rename regrid2 directory and delete print message
reshel3 Apr 17, 2018
02b9195
add module API files
reshel3 Apr 17, 2018
d12d82f
add future and mock requirements
reshel3 Apr 17, 2018
adf2dcb
get cwd for readthedocs
reshel3 Apr 17, 2018
3724fb7
Changes made to API
reshel3 Apr 18, 2018
e252f48
Changes made to API
reshel3 Apr 20, 2018
ffce80d
Changes made to API
reshel3 Apr 20, 2018
1760785
Changes to API
reshel3 Apr 23, 2018
1b4d412
test rtd with mock
dnadeau4 Apr 24, 2018
34973dd
add future for readthedocs
dnadeau4 Apr 24, 2018
79f5c12
create git.py in ../..
dnadeau4 Apr 24, 2018
6c2f9b9
fix conflicts
dnadeau4 Apr 24, 2018
bdb5db6
add esmf
dnadeau4 Apr 24, 2018
62c24f7
add print statements for regrid2
dnadeau4 Apr 24, 2018
2846cfc
add print for libregrid2
dnadeau4 Apr 24, 2018
43e42eb
restore regrid2.Lib for readthedocs
dnadeau4 Apr 24, 2018
463c721
add mock modules
dnadeau4 Apr 24, 2018
62e160f
add git.py
dnadeau4 Apr 24, 2018
1b12f72
try with new mock list
dnadeau4 Apr 24, 2018
932d66f
force git.py
dnadeau4 Apr 24, 2018
9275ecd
force git.py
dnadeau4 Apr 24, 2018
c2baa86
try readthedocs.yml file
dnadeau4 Apr 24, 2018
970bb4e
fix readthedocs maping file
dnadeau4 Apr 24, 2018
92b39e6
change type pdb to pdf
dnadeau4 Apr 24, 2018
b0df74f
typo requirements.yml
dnadeau4 Apr 24, 2018
26661a8
add dependencies
dnadeau4 Apr 24, 2018
721da2d
add dependencies and change conf.yml
dnadeau4 Apr 24, 2018
2dc4acc
change API.rst and other rst files
dnadeau4 Apr 24, 2018
9d1487a
Changes to API
reshel3 Apr 24, 2018
3cf5491
UVCDAT_ANONYMOUS_LOG set to false
dnadeau4 Apr 24, 2018
443d7f5
check if git.py is there
dnadeau4 Apr 25, 2018
92fa468
add gcc to environment.yml
dnadeau4 Apr 25, 2018
eeb7777
try docker environment.yml
dnadeau4 Apr 25, 2018
3cac37b
remove git.py
dnadeau4 Apr 25, 2018
7c7b5c9
fix conflicts
dnadeau4 Apr 25, 2018
8952fb1
chage Libregrid to regrid2
dnadeau4 Apr 25, 2018
8ae28f7
revert
dnadeau4 Apr 25, 2018
0c6e809
revert
dnadeau4 Apr 25, 2018
2d12952
add cdms2 class
Apr 25, 2018
ad98288
delet cdms2 class
Apr 25, 2018
7c311f2
delet cdms2 class
Apr 25, 2018
0b340e5
change conf.py os.path
Apr 25, 2018
67cf584
Changes to API
reshel3 Apr 26, 2018
401b6cb
Changes made to API
reshel3 Apr 30, 2018
49c6890
Changes to API
reshel3 Apr 30, 2018
297d386
Changes made to API
reshel3 May 1, 2018
72414f2
Changes to API
reshel3 May 2, 2018
735a306
Changes made to API
reshel3 May 3, 2018
8ad34b5
Changes made to API
reshel3 May 9, 2018
10ddc5b
Changes to API
reshel3 May 16, 2018
12c2f0e
Changes to API
reshel3 May 16, 2018
3074964
Changes made to API
reshel3 May 17, 2018
b9e04a6
Changes made to API
reshel3 May 18, 2018
651ae1c
Changes made to API
reshel3 May 21, 2018
222ab4d
Merge branch 'docstanya' into readthedocstest
dnadeau4 May 22, 2018
1c91ea5
push latest rst files
reshel3 May 22, 2018
e13b988
Merge branch 'readthedocstest' of github.com:UV-CDAT/cdms into readth…
dnadeau4 May 22, 2018
8cd77b9
Merge branch 'docstanya' into readthedocstest
dnadeau4 May 22, 2018
6155ef0
Changes made to API
reshel3 May 23, 2018
521fb97
Made some changes to API
reshel3 May 24, 2018
7302fd9
update documentations
dnadeau4 May 29, 2018
ca61e5d
Changes made to API
reshel3 May 29, 2018
e737c89
Changes made to API
reshel3 May 30, 2018
a7063e2
Changes made to API
reshel3 May 31, 2018
3cb0aad
Changes made to Section 2 and API
reshel3 Jun 1, 2018
7878e53
Changes made to Section 2
reshel3 Jun 4, 2018
e8077bb
Changes made to Chapter 2
reshel3 Jun 5, 2018
a27487c
Changes made to Section 2
reshel3 Jun 6, 2018
7d0bd02
Changes made to Chapters 2, 3, 4,5 and 6
reshel3 Jun 7, 2018
4523dc2
Changes made to Sections 2, 4, 7 and Appendix
reshel3 Jun 11, 2018
e550c14
Changes made to Chapter 6 and Appendix
reshel3 Jun 12, 2018
554bd4c
Changes made to Section 2
reshel3 Jun 13, 2018
506ccb8
update summary table for API
dnadeau4 Jun 14, 2018
16f6fdd
add generated files
dnadeau4 Jun 14, 2018
5a7ebdc
Merge branch 'master' into docstanya
reshel3 Jun 14, 2018
6ae47a2
Changes made to al sections
reshel3 Jun 14, 2018
ba79685
Changes made to Section 2 and API
reshel3 Jun 15, 2018
765dd6f
Changes made to 2 and API
reshel3 Jun 18, 2018
a016201
Made changes to sections 1 and 2
reshel3 Jun 19, 2018
1b51879
Issue#231 (#232)
dnadeau4 Mar 7, 2018
3d614dd
failing test from vcs added here (#234)
doutriaux1 Mar 13, 2018
e2a12a8
Cdmsdocsmerge (#223)
dnadeau4 Mar 29, 2018
f32c86b
Fix python3 slice issue(setitem) and flake8 (#243)
dnadeau4 May 1, 2018
7ced34c
fix python 3 aggregation issue and flake8 (#244)
dnadeau4 May 2, 2018
9d5b7d2
Netcdf46 (#249)
dnadeau4 Jun 6, 2018
f18e8aa
Revert "Netcdf46 (#249)" (#250)
dnadeau4 Jun 6, 2018
074b412
Netcdf46 (#251)
dnadeau4 Jun 12, 2018
c9dd25e
Netcdf46 (#252)
dnadeau4 Jun 12, 2018
a378f31
Changes made to API
reshel3 May 23, 2018
5ffe9de
Made some changes to API
reshel3 May 24, 2018
6442448
Changes made to API
reshel3 May 29, 2018
93b206e
Changes made to API
reshel3 May 30, 2018
c390ee6
Changes made to API
reshel3 May 31, 2018
1b5ad8a
Changes made to Section 2 and API
reshel3 Jun 1, 2018
e9792fb
Changes made to Section 2
reshel3 Jun 4, 2018
01ba90a
Changes made to Chapter 2
reshel3 Jun 5, 2018
691b110
Changes made to Section 2
reshel3 Jun 6, 2018
519add2
Changes made to Chapters 2, 3, 4,5 and 6
reshel3 Jun 7, 2018
b4f6628
Changes made to Sections 2, 4, 7 and Appendix
reshel3 Jun 11, 2018
a294133
Changes made to Chapter 6 and Appendix
reshel3 Jun 12, 2018
08f62a5
Changes made to Section 2
reshel3 Jun 13, 2018
5158373
Changes made to al sections
reshel3 Jun 14, 2018
46e564f
Changes made to Section 2 and API
reshel3 Jun 15, 2018
134054c
Changes made to 2 and API
reshel3 Jun 18, 2018
a473fe3
Made changes to sections 1 and 2
reshel3 Jun 19, 2018
c2d8bd3
Issue#231 (#232)
dnadeau4 Mar 7, 2018
44add33
Fix python3 slice issue(setitem) and flake8 (#243)
dnadeau4 May 1, 2018
405fe24
fix python 3 aggregation issue and flake8 (#244)
dnadeau4 May 2, 2018
e1b587f
Netcdf46 (#249)
dnadeau4 Jun 6, 2018
97279be
Revert "Netcdf46 (#249)" (#250)
dnadeau4 Jun 6, 2018
f6ca669
Netcdf46 (#251)
dnadeau4 Jun 12, 2018
180f9e1
Netcdf46 (#252)
dnadeau4 Jun 12, 2018
7bf205a
fix conflict with master
dnadeau4 Jun 20, 2018
09d70ec
Fix table titles
reshel3 Jun 20, 2018
f6d99e3
Change made to Section 4
reshel3 Jun 21, 2018
ced9db6
fix bindex issue in hgrid
dnadeau4 Jun 25, 2018
8d2c194
Changes to all
reshel3 Jun 25, 2018
9dca0db
Corrections made to API Lib
reshel3 Jun 25, 2018
89b22f9
Changes to API
reshel3 Jun 25, 2018
0827d3b
fix ascii art
dnadeau4 Jun 26, 2018
f2b2e65
Changes to Sections 2, 4 and 5
reshel3 Jun 26, 2018
cdff139
Changes made to all
reshel3 Jun 27, 2018
529535e
Fix Conflict
reshel3 Jun 27, 2018
7dfb910
Changes made to Sections 2, 6 and Appendix
reshel3 Jun 28, 2018
3e67e57
Changes made to Section 2
reshel3 Jul 2, 2018
01fb416
Changes made to Section 2
reshel3 Jul 9, 2018
bac2fa4
Changes made to Section 2 and 5
reshel3 Jul 11, 2018
66eaa55
Changes to Sections 2, 6 and 7
reshel3 Jul 12, 2018
46ea27d
Changes to API
reshel3 Jul 25, 2018
28dbb4f
Changes made to API
reshel3 Jul 25, 2018
5819332
Made Changes to API
reshel3 Jul 25, 2018
99dd8f5
Changes made to API
reshel3 Jul 30, 2018
2d71dd9
Changes made to Section 4 and 7
reshel3 Jul 31, 2018
bdd5968
Changes made to API
reshel3 Aug 7, 2018
7c10798
Changes made to API
reshel3 Aug 8, 2018
556d92f
Revisit run tests (#262)
muryanto1 Aug 8, 2018
82142bd
merge master
dnadeau4 Aug 20, 2018
d474e9c
fix Axis.py
dnadeau4 Aug 20, 2018
6e40d4c
update documentation
reshel3 Aug 20, 2018
cbb943e
fix environment dependencies
reshel3 Aug 21, 2018
794a5e5
add/remote generated files
reshel3 Aug 21, 2018
4bddf04
try to fix API.rst
reshel3 Aug 21, 2018
ff931a7
add regrid2 to docs
reshel3 Aug 21, 2018
b049359
Changes made to API
reshel3 Aug 21, 2018
f300870
fix space with parameters
reshel3 Aug 21, 2018
3ca9877
fix readthedocs using numpydoc
reshel3 Aug 21, 2018
493d2c1
update environment
reshel3 Aug 21, 2018
304b3f1
fix some autodocs
reshel3 Aug 22, 2018
ffc6f2e
add hgrid
reshel3 Aug 22, 2018
58cadd7
Changes made to API
reshel3 Aug 22, 2018
86caf86
Changes made to API
reshel3 Aug 23, 2018
21d5e47
Merge branch 'master' into docstanya
dnadeau4 Aug 28, 2018
4def393
fix avariable bad location methods
dnadeau4 Aug 28, 2018
f3c72ff
Changes to Appendix and API
reshel3 Aug 29, 2018
7ee9c2e
Changes to Chapter 1 and 2
reshel3 Aug 30, 2018
eb38903
Changes made to Section 2
reshel3 Sep 4, 2018
75c3f41
Changes made to Section 2
reshel3 Sep 5, 2018
16c2397
Changes made to Section 2
reshel3 Sep 6, 2018
8753cc2
Changes to sections 1, 2, 3 and 4
reshel3 Sep 10, 2018
eb9ee84
Changes to section 2
reshel3 Sep 11, 2018
b39bb62
Changes made to entire docuemnt
reshel3 Sep 17, 2018
96cd85d
Changes to Section 1 and 2
reshel3 Sep 18, 2018
6de4bf7
Changes made to Section 2
reshel3 Sep 20, 2018
241ff9f
Changes made to Sections 2 thru 6
reshel3 Sep 27, 2018
085b28c
Changes made to Chapters 3 and 6
reshel3 Oct 4, 2018
451a012
add jupyter notebook
reshel3 Oct 18, 2018
0fbeaba
Changes to all
reshel3 Oct 24, 2018
dd65dfd
Changes to Jupyter Notebooks
reshel3 Nov 6, 2018
06f672c
Changes to all
reshel3 Nov 7, 2018
0e1e668
fix conflict merge master
dnadeau4 Nov 8, 2018
193e42a
update documentation for version 3.1.0
dnadeau4 Nov 9, 2018
5216d3b
Merge branch 'master' into docstanya
dnadeau4 Nov 9, 2018
b7a23ec
merge documentations
dnadeau4 Nov 9, 2018
e1a9e29
Merge branch 'master' into docstanya
dnadeau4 Nov 13, 2018
46a8b5f
change banner and sidebar colors
dnadeau4 Nov 13, 2018
866a225
Changes to API
reshel3 Nov 13, 2018
c1f98a9
fix style sheet
dnadeau4 Nov 14, 2018
f444406
Changes to API
reshel3 Nov 14, 2018
aea7a3e
Changes to API
reshel3 Nov 15, 2018
69de7c1
Changes to API and Sections
reshel3 Nov 19, 2018
64cc035
Changes to all
reshel3 Nov 28, 2018
8006c3c
will this fix master? (#292)
doutriaux1 Nov 14, 2018
6e15aa0
Merge branch 'docstanya' into documentation
dnadeau4 Nov 29, 2018
1a2340f
remoe trailing white space for flake8
dnadeau4 Nov 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
123 changes: 94 additions & 29 deletions Lib/MV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ def _extractMetadata(a, axes=None, attributes=None,

class var_unary_operation:
def __init__(self, mafunc):
""" var_unary_operation(mafunc)
mafunc is an numpy.ma masked_unary_function.
"""
Parameters
----------

var_unary_operation(mafunc)

mafunc is an numpy.ma masked_unary_function.
"""
self.mafunc = mafunc
self.__doc__ = mafunc.__doc__
Expand All @@ -91,8 +96,13 @@ def __call__(self, a, **kwargs):

class var_unary_operation_with_axis:
def __init__(self, mafunc):
""" var_unary_operation(mafunc)
mafunc is an numpy.ma masked_unary_function.
"""
Parameters
----------

var_unary_operation(mafunc)

mafunc is an numpy.ma masked_unary_function.
"""
self.mafunc = mafunc
self.__doc__ = mafunc.__doc__
Expand All @@ -108,14 +118,24 @@ def __call__(self, a, axis=0, **kwargs):


def commonDomain(a, b, omit=None):
"""commonDomain(a,b) tests that the domains of variables/arrays a and b are equal,
and returns the common domain if equal, or None if not equal.
"""
Parameters
----------

commonDomain(a,b)
tests that the domains of variables/arrays a and b are equal,
and

The domains may differ in that one domain may have leading axes not common
to the other; the result domain will contain those axes.
Returns
-------

If <omit> is specified, as an integer i, skip comparison of the ith dimension
and return None for the ith (common) dimension.
the common domain if equal, or None if not equal.

The domains may differ in that one domain may have leading
axes not common to the other; the result domain will contain those axes.

If <omit> is specified, as an integer i, skip comparison of the ith dimension
and return None for the ith (common) dimension.
"""

if isinstance(b, AbstractVariable):
Expand All @@ -126,8 +146,14 @@ def commonDomain(a, b, omit=None):


def commonAxes(a, bdom, omit=None):
"""Helper function for commonDomain. 'a' is a variable or array,
'b' is an axislist or None.
"""Helper function for commonDomain.

Parameters
----------

'a' is a variable or array,

'b' is an axislist or None.
"""
if isinstance(a, AbstractVariable) and bdom is not None:
adom = a.getAxisList()
Expand Down Expand Up @@ -181,9 +207,18 @@ def commonAxes(a, bdom, omit=None):


def commonGrid(a, b, axes):
"""commonGrid(a,b,axes) tests if the grids associated with variables a, b are equal,
and consistent with the list of axes. If so, the common grid is returned, else None
is returned. a and b can be numpy arrays, in which case the result is None.
"""
Parameters
----------

commonGrid(a,b,axes)

tests if the grids associated with variables a, b are equal
and consistent with the list of axes.

If so, the common grid is returned, else None is returned.

a and b can be numpy arrays, in which case the result is None.

The common grid is 'consistent' with axes if the grid axes (e.g., the axes of
latitude and longitude coordinate variables) are members of the list 'axes'.
Expand Down Expand Up @@ -232,8 +267,13 @@ def commonGrid1(a, gb, axes):

class var_binary_operation:
def __init__(self, mafunc):
""" var_binary_operation(mafunc)
mafunc is an numpy.ma masked_binary_function.
"""
Parameters
----------

var_binary_operation(mafunc)

mafunc is an numpy.ma masked_binary_function.
"""
self.mafunc = mafunc
self.__doc__ = mafunc.__doc__
Expand Down Expand Up @@ -1015,7 +1055,12 @@ def reshape(a, newshape, axes=None, attributes=None, id=None, grid=None):


def resize(a, new_shape, axes=None, attributes=None, id=None, grid=None):
"""resize(a, new_shape) returns a new array with the specified shape.
"""resize(a, new_shape)

Returns
-------
a new array with the specified shape.

The original array's total size can be any size."""
ignore, attributes, id, ignore = _extractMetadata(a, axes, attributes, id)
if axes is not None:
Expand All @@ -1031,9 +1076,13 @@ def resize(a, new_shape, axes=None, attributes=None, id=None, grid=None):

def masked_array(a, mask=None, fill_value=None,
axes=None, attributes=None, id=None):
"""masked_array(a, mask=None) =
array(a, mask=mask, copy=0, fill_value=fill_value)
Use fill_value(a) if None.
"""
Parameters
----------
masked_array(a, mask=None) =
array(a, mask=mask, copy=0, fill_value=fill_value)

Use fill_value(a) if None.
"""
maresult = numpy.ma.masked_array(
_makeMaskedArg(a),
Expand All @@ -1048,10 +1097,14 @@ def masked_array(a, mask=None, fill_value=None,
def masked_values(data, value, rtol=1.e-5, atol=1.e-8, copy=1,
savespace=0, axes=None, attributes=None, id=None):
"""
masked_values(data, value, rtol=1.e-5, atol=1.e-8)
Create a masked array; mask is None if possible.
May share data values with original array, but not recommended.
Masked where abs(data-value)<= atol + rtol * abs(value)
Parameters
----------

masked_values(data, value, rtol=1.e-5, atol=1.e-8)

Create a masked array; mask is None if possible.
May share data values with original array, but not recommended.
Masked where abs(data-value)<= atol + rtol * abs(value)
"""
maresult = numpy.ma.masked_values(_makeMaskedArg(
data), value, rtol=rtol, atol=atol, copy=copy)
Expand All @@ -1078,8 +1131,13 @@ def isMaskedVariable(x):

def set_default_fill_value(value_type, value):
"""Set the default fill value for value_type to value.
value_type is a string: 'real','complex','character','integer',or 'object'.
value should be a scalar or single-element array.

Parameters
----------
value_type is a string:
'real','complex','character','integer',or 'object'.

value should be a scalar or single-element array.
"""
if value_type == 'real':
numpy.ma.default_real_fill_value = value
Expand All @@ -1099,8 +1157,15 @@ def fromfunction(f, dimensions):


def diagonal(a, offset=0, axis1=0, axis2=1):
"""diagonal(a, offset=0, axis1=0, axis2 = 1) returns the given
diagonals defined by the two dimensions of the array.
"""
Parameters
----------
diagonal(a, offset=0, axis1=0, axis2 = 1)

Returns
-------

the given diagonals defined by the two dimensions of the array.
"""
F = getattr(a, "fill_value", 1.e20)
return TransientVariable(numpy.ma.diagonal(_makeMaskedArg(a),
Expand Down
60 changes: 34 additions & 26 deletions Lib/avariable.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def __call__(self, *args, **kwargs):
"""
Selection of a subregion using selectors.

**Parameters:**

Parameters
----------
raw:
if set to 1, return numpy.ma only
squeeze:
Expand All @@ -188,8 +188,8 @@ def __call__(self, *args, **kwargs):
order:
if given, result is permuted into this order

**Returns:**

Returns
-------
Subregion selected
"""
# separate options from selector specs
Expand Down Expand Up @@ -429,12 +429,16 @@ def getConvention(self):
# A child class may want to override this
def getAxis(self, n):
"""Get the n-th axis.

Parameters
----------

n:
Axis number

Returns
-------

if n < 0: n = n + self.rank()
self.getDomain()[n][0]"""
if n < 0:
Expand Down Expand Up @@ -472,25 +476,24 @@ def hasCellData(self):
return False

def getAxisListIndex(self, axes=None, omit=None, order=None):
"""Return a list of indices of axis objects;

Note
----
If axes is **not** `None`, include only certain axes.
less the ones specified in omit.
"""
Returns
-------
a list of indices of axis objects

If axes is `None`, use all axes of this variable.
Note
----
If axes is **not** `None`, include only certain axes.
less the ones specified in omit.

Other specificiations are as for axisMatchIndex.
If axes is `None`, use all axes of this variable.

Returns
-------
a list of indices of axis objects;
Other specificiations are as for axisMatchIndex.
"""
return axisMatchIndex(self.getAxisList(), axes, omit, order)

def getAxisList(self, axes=None, omit=None, order=None):
"""Get the list of axis objects;
"""Get the list of axis objects

Note
----
Expand Down Expand Up @@ -524,9 +527,10 @@ def getMissing(self, asarray=0):
asarray :
'0' : scalar
'1' : numpy array
Return
------
the missing value as a scalar, or as a numpy array if asarray==1"""

Returns
-------
the missing value as a scalar, or as a numpy array if asarray==1"""

if hasattr(self, 'missing_value'):
try:
Expand Down Expand Up @@ -695,16 +699,19 @@ def getLongitude(self):
# Get an order string, such as "tzyx"
def getOrder(self, ids=0):
"""
parameters
Parameters
----------
id:
0 or 1
returns

id:
0 or 1

Returns
-------
the order string, such as t, z, y, x (time, level, lat, lon).

the order string, such as t, z, y, x (time, level, lat, lon).

Note
----

* if ids == 0 (the default) for an axis that is not t,z,x,y
the order string will contain a (-) character in that location.
The result string will be of the same length as the number
Expand Down Expand Up @@ -1176,9 +1183,10 @@ def subRegion(self, *specs, **keys):

def getValue(self, squeeze=1):
"""Get the entire set of values.

Returns
-------
All values and elimite the 1-D dimension.
All values and elimite the 1-D dimension.
"""
return self.getSlice(Ellipsis, squeeze=squeeze)

Expand Down