Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Misleading error when using ufuncs on large python ints #8357

Closed
@maxnoe

Description

@maxnoe
In [2]: import numpy as np
In [2]: np.log10(2**10)
Out[2]: 3.0102999566398121
In [3]: np.log10(2**64)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-a2d6ba68c7f4> in <module>()
----> 1 np.log10(2**64)

AttributeError: 'int' object has no attribute 'log10

I guess this is because python's unlimited precision int cannot be transformed into a 64 bit unsigned int anymore. But the error message is very misleading on this.

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