-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] signif function crashes with 0 #201
Labels
bug
Something isn't working
Comments
Looks like it's more of a problem for python3.8 In [1]: from datar.all import signif
In [2]: from datar import get_versions
In [3]: signif(0)
/path/to/lib/python3.9/site-packages/datar_numpy/api/arithm.py:156: RuntimeWarning: divide by zero encountered in log10
digits = digits - np.ceil(np.log10(np.abs(x)))
/path/to/lib/python3.9/site-packages/datar_numpy/api/arithm.py:157: RuntimeWarning: invalid value encountered in cast
digits = np.broadcast_arrays(0, digits.astype(int))
Out[3]: array(0)
In [4]: get_versions()
python : 3.9.16 | packaged by conda-forge | (main, Feb 1 2023, 21:39:03)
[GCC 11.3.0]
datar : 0.15.4
simplug : 0.3.2
executing : 2.0.1
pipda : 0.13.1
datar-numpy : 0.3.2
numpy : 1.24.4
datar-pandas: 0.5.4
pandas : 2.1.1 Still need to eliminate the warnings though. |
pwwang
added a commit
to pwwang/datar-numpy
that referenced
this issue
Feb 5, 2024
Fixed by datar-numpy v0.3.3 Try |
this. this update solves that issue with signif |
Now I have a different problem:
|
Fixed by datar-numpy v0.3.4 Try |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
datar version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of datar and its backends.
Issue Description
returns:
Expected Behavior
return 0
Installed Versions
datar.get_versions()
python : 3.8.18 (default, Sep 11 2023, 08:17:16)
[Clang 14.0.6 ]
datar : 0.15.4
simplug : 0.3.2
executing : 2.0.1
pipda : 0.13.1
datar-numpy : 0.3.2
numpy : 1.24.3
datar-pandas: 0.5.4
pandas : 2.0.3
The text was updated successfully, but these errors were encountered: