Class to track metadata of
SLIMpy objects.
More...
List of all members.
Detailed Description
Class to track metadata of
SLIMpy objects.
parameter is a simple tracking method to pass Metadata without being bound to each specific datatype methods are similar to a python dict
Definition at line 37 of file PSpace.py.
Member Function Documentation
def __init__ |
( |
|
self, |
|
|
|
plugin, |
|
|
|
E, |
|
|
|
D | |
|
) |
| | |
Constructor, create a space from another space or like a dict object.
- Parameters:
-
| plugin | a string name or a subclass of DataContainer |
create a space from another space
Definition at line 53 of file PSpace.py.
def makeContaner |
( |
|
self, |
|
|
|
command = None , |
|
|
|
tmp = None | |
|
) |
| | |
Make a new container from the current parameters.
- Parameters:
-
makeContaner( self, command=None ,tmp=None) -> Container Make a new container from the current parameters
Definition at line 89 of file PSpace.py.
def newParameter |
( |
|
self, |
|
|
|
E, |
|
|
|
F | |
|
) |
| | |
create a new PSpace updated with new keys
Make a new parameter updated with the new keys, 'keys'
Definition at line 97 of file PSpace.py.
def update |
( |
|
self, |
|
|
|
E, |
|
|
|
F | |
|
) |
| | |
update this PSpace with another
update this PSpace with another same as a python dict
Definition at line 107 of file PSpace.py.
number of elements the space represents
Definition at line 123 of file PSpace.py.
shallow copy
returns a shallow copy of self
Definition at line 131 of file PSpace.py.
returns tr
- Returns:
- bool
Definition at line 137 of file PSpace.py.
returns size of field of scalars
Definition at line 187 of file PSpace.py.
def pop |
( |
|
self, |
|
|
|
k, |
|
|
|
default | |
|
) |
| | |
pop a key from the dict
- Exceptions:
-
| raises | a KeyError if k is not a key in self and no default is given |
Definition at line 217 of file PSpace.py.
- See also:
- dict
iterates over key value pairs in self
Definition at line 236 of file PSpace.py.
def intersection |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
intersection of this space and another
space.intersection( other ) -> Space
returns a Space object that is the Intersection of self and other contains the restrictions of each space the shared restrictions in each must be equal: i.e. if self contains restriction n1=5 and other -> n1=6 intersection method will raise error.
Definition at line 281 of file PSpace.py.
def union |
( |
|
self, |
|
|
|
other, |
|
|
|
others | |
|
) |
| | |
union of this space with another
space.union( other, *others ) -> Space
returns the union of this space with another that is only the restrictions that are the same in both spaces
Definition at line 308 of file PSpace.py.
def __eq__ |
( |
|
self, |
|
|
|
other | |
|
) |
| | |
def equal_keys |
( |
|
self, |
|
|
|
other, |
|
|
|
k, |
|
|
|
accept_unknown = True | |
|
) |
| | |
True if self and other both have key k.
- Parameters:
-
space.equal_keys( space2, key, accept_unknown=True ) -> bool returns true if key is present and equal in both spaces. If one value is
UnknownValue then will return accept_unknown.
Definition at line 341 of file PSpace.py.
def setdefault |
( |
|
self, |
|
|
|
k, |
|
|
|
D = None | |
|
) |
| | |
def is_subspace |
( |
|
self, |
|
|
|
other, |
|
|
|
accept_unknown = True | |
|
) |
| | |
true if self is a subspace of other.
space.is_subspace(other) <--> space in other returns true if self is a subspace of other.
Definition at line 371 of file PSpace.py.
def is_superspace |
( |
|
self, |
|
|
|
other, |
|
|
|
accept_unknown = True | |
|
) |
| | |
true if self is a superspace of other.
Definition at line 393 of file PSpace.py.
def __contains__ |
( |
|
self, |
|
|
|
k | |
|
) |
| | |
true if self is a contains k
- Parameters:
-
| k | a PSpace a key in self or a vector |
S.__contains__( k ) <-> k in S
Definition at line 402 of file PSpace.py.
def __getitem__ |
( |
|
self, |
|
|
|
item | |
|
) |
| | |
def __delitem__ |
( |
|
self, |
|
|
|
item | |
|
) |
| | |
def get |
( |
|
self, |
|
|
|
k, |
|
|
|
default = None | |
|
) |
| | |
def __setitem__ |
( |
|
self, |
|
|
|
item, |
|
|
|
val | |
|
) |
| | |
Member Data Documentation
slimpy global variables
Definition at line 45 of file PSpace.py.
tuple plugin = property( _get_plugin ,_set_plugin) [static] |
get and set property for self._plugin
Definition at line 78 of file PSpace.py.
tuple size = property( get_size ) [static] |
tuple shape = property( _get_shape, _set_shape ) [static] |
tuple ndim = property( _get_ndim ) [static] |
tuple params = property( _get_params ) [static] |
The documentation for this class was generated from the following file:
- /Users/sean/workspace/SLIMpy3/slimpy_base/Core/Interface/PSpace.py