numpy - Python - overflow encountered in exp -


i using formula in model i'm developing, which, when runs produces runttimewarning: overflow encountered in exp. understanding i've read due excessively large numbers being used in calculation data type.

my formula stores numpy array, there method changing datatype these values can computed?

thanks

this sounds xy problem.

while higher precision datatypes possibly solve issue, comes @ performance , usability cost. not possible numpy directly, can done mpmath. more details can found in question.

before resorting such measures:

  1. verify these large numbers correct behavior , not result bug further up.

  2. see if possible log-transform formulas large numbers avoided.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -