Skip to content

Commit

Permalink
OMX crop fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Mar 26, 2017
1 parent b590b64 commit d608bea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/omx.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ def crop(self, shape0, shape1=None, *, complevel=1, complib='zlib'):
self.add_lookup(i, self.lookup._v_children[i][:shape0], overwrite=True, complevel=complevel, complib=complib, ignore_shape=True)
elif self.lookup[i].shape[1] == start1:
self.add_lookup(i, self.lookup._v_children[i][:shape1], overwrite=True, complevel=complevel, complib=complib, ignore_shape=True)
self.shape = (shape0, shape1)
shp = numpy.empty(2, dtype=int)
shp[0] = shape0
shp[1] = shape1
self.root._v_attrs.SHAPE = shp


def add_blank_lookup(self, name, atom=None, shape=None, complevel=1, complib='zlib', **kwargs):
Expand Down

0 comments on commit d608bea

Please sign in to comment.