gtjemwa / augustus

Automatically exported from code.google.com/p/augustus
0 stars 0 forks source link

UniTable.compact fails on an empty table #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This was discovered with an older version of Augustus using numarray and python 
2.5.  It needs 
to be verified that it happens with a version based on numpy, but I expect that 
it is still an issue.

Pasted below is output from a UniTable that encountered this bug with.

>>> a
UniTable summary:
  ------------------------------------------------------------------------
  UniTable format summary: 17 fields, 136 bytes/record
    field  1: Int64     'id'
    field  2: Int64     'evtuid'
    field  3: Int64     'evtcode'
    field  4: Int64     'evttime'
    field  5: Int64     'evttext'
    field  6: Int64     'evtcost'
    field  7: Int64     'evtthreshold'
    field  8: Int64     'evtduration'
    field  9: Int64     'evtadtype'
    field 10: Int64     'evtlistingid'
    field 11: Int64     'evtnumber'
    field 12: Int64     'evtfield1'
    field 13: Int64     'evtfield2'
    field 14: Int64     'evtfield3'
    field 15: Int64     'evtfield4'
    field 16: Int64     'evtfield5'
    field 17: Int64     'evtcoral'
  ------------------------------------------------------------------------
  UniTable data summary: 0 records, 0 bytes total
    id          = []
    evtuid      = []
    evtcode     = []
    evttime     = []
    evttext     = []
    evtcost     = []
    evtthreshold= []
    evtduration = []
    evtadtype   = []
    evtlistingid= []
    evtnumber   = []
    evtfield1   = []
    evtfield2   = []
    evtfield3   = []
    evtfield4   = []
    evtfield5   = []
    evtcoral    = []
  ------------------------------------------------------------------------

>>> a.compact()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/odg-tools/lib/augustus/kernel/unitable/unitable.py", line
668, in compact
    nval = compact(oval,also_floats=True)
  File "/usr/local/odg-tools/lib/augustus/kernel/unitable/asarray.py", line 533,
in compact
    nformat = get_bestfit(arr,also_floats=also_floats)
  File "/usr/local/odg-tools/lib/augustus/kernel/unitable/asarray.py", line 605,
in get_bestfit
    xmin = arr.min()
  File "/usr/local/odg-tools/lib/site-python2.4/numarray/numarraycore.py",
line1381, in min
    return ufunc.minimum.reduce(ufunc.minimum.areduce(self).flat)
  File "/usr/local/odg-tools/lib/site-python2.4/numarray/ufunc.py", line 1217,
in _cum_cache_miss
    mode, win1, wout, cfunc, ufargs = \
  File "/usr/local/odg-tools/lib/site-python2.4/numarray/ufunc.py", line 1300,
in _cum_setup
    tout = self._reduce_out(win1, out, otype)
numarray.libnumarray.error: Type object lookup returned NULL for type -1 

What is the expected output? What do you see instead?

Please use labels and text to provide additional information.

Original issue reported on code.google.com by collinbe...@gmail.com on 1 Oct 2009 at 4:43

GoogleCodeExporter commented 8 years ago
fixed.  will be moved into the trunk for the 0.4.2 release

Original comment by collinbe...@gmail.com on 29 Aug 2010 at 3:33

GoogleCodeExporter commented 8 years ago
fixed in augustus/kernel/unitable/unitable.py revision 261.

Original comment by collinbe...@gmail.com on 30 Aug 2010 at 6:59