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

Just a fix for the np.infty error #106

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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 .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
- name: Set up Python 3.10.16
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.10.16
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 4 additions & 2 deletions cellconstructor/ForceTensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ def Center(self, nneigh=None, Far=2,tol=1.0e-5):
nq2=self.supercell_size[2]

# by default no maximum distances
dist_range=np.ones((self.nat))*np.infty
#dist_range=np.ones((self.nat))*np.infty
dist_range=np.ones((self.nat))*np.inf
#
if nneigh!=None:
# =======================================================================
Expand Down Expand Up @@ -1520,7 +1521,8 @@ def Center(self, nneigh=None, Far=2,tol=1.0e-5):
nq2=self.supercell_size[2]

# by default no maximum distances
dist_range=np.ones((self.nat))*np.infty
#dist_range=np.ones((self.nat))*np.infty
dist_range=np.ones((self.nat))*np.inf
#
if nneigh!=None:
# =======================================================================
Expand Down
6 changes: 4 additions & 2 deletions cellconstructor/Spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,8 @@ def findne(val,e0,de):
else:
xtriv=findne(wq[ifreq],e0,de)
osval=np.real(z[xtriv-1,ism,ifreq])
diff=np.infty
#diff=np.infty
diff=np.inf
for x in range(ne):
value=np.real(z[x,ism,ifreq])-energies_cm[x]
if( abs(value ) < 2*de) :
Expand Down Expand Up @@ -2661,7 +2662,8 @@ def findne(val,e0,de):
else:
xtriv=findne(wq[ifreq],e0,de)
osval=np.real(z[xtriv-1,ism,ifreq])
diff=np.infty
#diff=np.infty
diff=np.inf
for x in range(ne):
value=np.real(z[x,ism,ifreq])-energies_cm[x]
if( abs(value ) < 2*de) :
Expand Down
Loading