Commit 0a1b5e4b authored by Mihai Baltac's avatar Mihai Baltac
Browse files

inherited Space from Plottable as well


and added plot method in all spaces, to be implemented
Signed-off-by: Mihai Baltac's avatarMihai Baltac <mbaltac@mpa-garching.mpg.de>
parent 57feff83
from abc import ABCMeta, abstractmethod
class Plottable:
__metaclass__ = ABCMeta
@abstractmethod
def plot(self):
pass
......@@ -227,3 +227,6 @@ class GLSpace(Space):
)
return result
def plot(self):
pass
\ No newline at end of file
......@@ -218,3 +218,6 @@ class HPSpace(Space):
dtype=np.dtype(hdf5_group['dtype'][()])
)
return result
def plot(self):
pass
\ No newline at end of file
......@@ -195,3 +195,7 @@ class LMSpace(Space):
dtype=np.dtype(hdf5_group['dtype'][()])
)
return result
def plot(self):
pass
\ No newline at end of file
......@@ -195,6 +195,9 @@ class PowerSpace(Space):
return new_ps
def plot(self):
pass
class EmptyPowerSpace(PowerSpace):
def __init__(self):
pass
......@@ -40,6 +40,8 @@ from d2o import distributed_data_object,\
from nifty.spaces.space import Space
import nifty.plotting as plt
class RGSpace(Space):
"""
......@@ -341,3 +343,8 @@ class RGSpace(Space):
dtype=np.dtype(hdf5_group.attrs['dtype'])
)
return result
def plot(self):
n_dimensions = len(self._shape)
# if n_dimensions == 1:
# fig = plt.figures.Figure(data=self.distances)
......@@ -149,8 +149,9 @@ import numpy as np
from keepers import Loggable,\
Versionable
from nifty.plotting import Plottable
class Space(Versionable, Loggable, object):
class Space(Versionable, Loggable, Plottable, object):
"""
.. __ __
.. /__/ / /_
......
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