-
Notifications
You must be signed in to change notification settings - Fork 14
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
Strange datatype issues after PR #358 #385
Labels
bug
Something isn't working
Comments
Seems like np.int64 is long long on windows and long on linux. |
However, why do you have/want coefficients or eci that are integers? |
array.astype(np.int_) works. np.int_ is int32 on windows, as required by container. Simply enforcing dtype(int) also seems to work. I'll use np.int_. |
qchempku2017
added a commit
to qchempku2017/smol
that referenced
this issue
Jul 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Weird datatype issues associated with smol.util.container classes appear after PR #358 .
Current Behavior
(1) When trying to test test_cofe/test_cluster_utils.py, the following issues pops up on my local computer (but not on CI):
The tests were performed on a 64bit Windows 11 platform, with numpy=1.24.4.
The datatype generated by my random number generator was "long long" (int64, maybe?) rather than "long"(probably int32?). This could require an explicit specification in either the container class or the test to make the containers always store one of the types.
(2) When trying to initialize ClusterExpansion with a coef array that contains int, the following error pops up:
This can be temporarily solved by force transforming coefs array to float type, or do as suggested here:
Discussion on stackoverflow
The text was updated successfully, but these errors were encountered: