Esempio n. 1
0
File: base.py Progetto: gem/h5py
    def __getitem__(self, args):
        if not isinstance(self.id, h5d.DatasetID):
            raise TypeError("Region references can only be made to datasets")
        from . import selections

        selection = selections.select(self.id.shape, args, dsid=self.id)
        return h5r.create(self.id, b".", h5r.DATASET_REGION, selection._id)
Esempio n. 2
0
 def __getitem__(self, args):
     selection = sel.select(self.id.shape, args, dsid=self.id)
     return h5r.create(self.id, b'.', h5r.DATASET_REGION, selection._id)
Esempio n. 3
0
 def __getitem__(self, args):
     """ Takes arbitrary selection terms and produces a RegionReference
     object.  Selection must be compatible with the dataset.
     """
     selection = select(self.id.shape, args)
     return h5r.create(self.id, '.', h5r.DATASET_REGION, selection.id)
Esempio n. 4
0
 def __getitem__(self, args):
     """ Takes arbitrary selection terms and produces a RegionReference
     object.  Selection must be compatible with the dataset.
     """
     selection = select(self.id.shape, args)
     return h5r.create(self.id, '.', h5r.DATASET_REGION, selection.id)
Esempio n. 5
0
File: base.py Progetto: B-Rich/h5py
 def ref(self):
     """ An (opaque) HDF5 reference to this object """
     return h5r.create(self.id, b'.', h5r.OBJECT)
Esempio n. 6
0
 def ref(self):
     """ An (opaque) HDF5 reference to this object """
     return h5r.create(self.id, b'.', h5r.OBJECT)
Esempio n. 7
0
 def __getitem__(self, args):
     if not isinstance(self.id, h5d.DatasetID):
         raise TypeError("Region references can only be made to datasets")
     from . import selections
     selection = selections.select(self.id.shape, args, dsid=self.id)
     return h5r.create(self.id, b'.', h5r.DATASET_REGION, selection._id)