Commit 41961dc0 authored by Reimar H Leike's avatar Reimar H Leike

added class-docstring for domainObject, moved space class-docstring from init

parent c245be32
Pipeline #12280 passed with stage
in 7 minutes and 33 seconds
......@@ -24,6 +24,19 @@ from keepers import Loggable,\
class DomainObject(Versionable, Loggable, object):
"""The abstract class that can be used as a domain for a field.
This holds all the information and functionality a field needs to know about
its domain and how the data of the field are stored.
Attributes
----------
dim : int
number of pixel-dimensions of the underlying data object.
shape : tuple
shape of the array that stores the degrees of freedom for any field with
this domain.
"""
__metaclass__ = NiftyMeta
def __init__(self):
......
......@@ -22,42 +22,43 @@ from nifty.domain_object import DomainObject
class Space(DomainObject):
def __init__(self):
""" The abstract base class for all NIFTy spaces.
An instance of a space contains information about the manifolds
geometry and enhances the functionality of DomainObject by methods that
are needed for powerspectrum analysis and smoothing.
Parameters
----------
None
Attributes
----------
dim : np.int
Total number of dimensionality, i.e. the number of pixels.
harmonic : bool
Specifies whether the space is a signal or harmonic space.
total_volume : np.float
The total volume of the space.
shape : tuple of np.ints
The shape of the space's data array.
Raises
------
TypeError
Raised if instantiated directly.
Notes
-----
`Space` is an abstract base class. In order to allow for instantiation
the methods `get_distance_array`, `total_volume` and `copy` must be
implemented as well as the abstract methods inherited from
`DomainObject`.
"""
""" The abstract base class for all NIFTy spaces.
An instance of a space contains information about the manifolds
geometry and enhances the functionality of DomainObject by methods that
are needed for powerspectrum analysis and smoothing.
Parameters
----------
None
Attributes
----------
dim : np.int
Total number of dimensionality, i.e. the number of pixels.
harmonic : bool
Specifies whether the space is a signal or harmonic space.
total_volume : np.float
The total volume of the space.
shape : tuple of np.ints
The shape of the space's data array.
Raises
------
TypeError
Raised if instantiated directly.
Notes
-----
`Space` is an abstract base class. In order to allow for instantiation
the methods `get_distance_array`, `total_volume` and `copy` must be
implemented as well as the abstract methods inherited from
`DomainObject`.
"""
def __init__(self):
super(Space, self).__init__()
@abc.abstractproperty
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment