Skip to content
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

increase float size to avoid some overflow error #12

Merged
merged 4 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mordred/MolecularDistanceEdge.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from six import string_types, integer_types
import warnings
from numpy import prod
from numpy import prod, longdouble

from ._base import Descriptor
from ._graph_matrix import Valence, DistanceMatrix
Expand Down Expand Up @@ -92,7 +92,7 @@ def calculate(self, D, V):
message="overflow encountered in reduce",
category=RuntimeWarning,
)
dx = prod(Dv) ** (1.0 / (2.0 * n))
dx = prod(Dv, dtype=longdouble) ** (1.0 / (2.0 * n))

return n / (dx**2)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "mordredcommunity"
version = "2.0.4"
version = "2.0.5"
authors = [{ name = "Jackson Burns", email = "[email protected]" }]
license = { text = "BSD-3-Clause" }
description = "Community-Maintained Version of mordred"
Expand Down
Loading