Skip to content

np.log runtime warnings #166

@JaimieMurdock

Description

@JaimieMurdock

There are warnings in the np.log calculations in ldacgsmulti:

/home/jammurdo/anaconda3/lib/python3.6/site-packages/vsm/mode/lldacgsmulti.py:435: RuntimeWarning: divide by zero encountered in log
  log_kc = np.log(top_doc / top_doc.sum(0)[np.newaxis, :])
/home/jammurdo/anaconda3/lib/python3.6/site-packages/vsm/model/ldacgsmulti.py:461: RuntimeWarning: divide by zero encountered in log
  mtrand_state[4])
/home/jammurdo/anaconda3/lib/python3.6/site-packages/vsm/model/ldacgsmulti.py:434: RuntimeWarning: divide by zero encountered in log
  log_wk = np.log(gbl_word_top * inv_top_sums[np.newaxis, :])

Perhaps a consequence of using single-precision vectors, perhaps a consequence of an integer<->float miscast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions