~kenneth-arnold/pytables/dev

« back to all changes in this revision

Viewing changes to tables/leaf.py

  • Committer: faltet
  • Date: 2009-06-17 06:48:02 UTC
  • Revision ID: vcs-imports@canonical.com-20090617064802-m3obkecq7jkr69ou
Moved the dtype attribute to the module that knows about atom (*Array, Column) or description (Table).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#       Created: October 14, 2002
5
5
#       Author:  Francesc Alted - faltet@pytables.com
6
6
#
7
 
#       $Id: leaf.py 4168 2009-06-16 06:34:14Z faltet $
 
7
#       $Id: leaf.py 4182 2009-06-17 06:48:02Z faltet $
8
8
#
9
9
########################################################################
10
10
 
45
45
from tables import utilsExtension
46
46
 
47
47
 
48
 
__version__ = "$Revision: 4168 $"
 
48
__version__ = "$Revision: 4182 $"
49
49
 
50
50
 
51
51
def csformula(expectedsizeinMB):
213
213
        """Filter properties for this leaf."""
214
214
        return Filters._from_leaf(self)
215
215
 
216
 
    @lazyattr
217
 
    def dtype(self):
218
 
        """The NumPy ``dtype`` that most closely matches this leaf."""
219
 
        if hasattr(self, "description"):
220
 
            return self.description._v_dtype   # self is a Table
221
 
        return self.atom.dtype    # an *Array object
222
 
 
223
216
    # Other properties
224
217
    # ````````````````
225
218
    def _getmaindim(self):