Skip to content

Commit

Permalink
API: make data an abstract method of Tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
kohr-h committed Sep 12, 2018
1 parent e094e86 commit 527bf45
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions odl/space/base_tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,14 @@ def __setitem__(self, indices, values):
"""
raise NotImplementedError('abstract method')

@property
def data(self):
"""The data structure holding this element's entries.
This method should be overridden by subclasses.
"""
raise NotImplementedError('abstract method')

@property
def impl(self):
"""Name of the implementation back-end of this tensor."""
Expand Down

0 comments on commit 527bf45

Please sign in to comment.