Skip to content

Commit

Permalink
Remove deprecated np.product
Browse files Browse the repository at this point in the history
  • Loading branch information
AntObi committed Dec 7, 2023
1 parent 407025d commit be4cb2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions smact/properties.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List, Optional, Union

from numpy import product, sqrt
import numpy as np

import smact

Expand Down Expand Up @@ -70,10 +70,10 @@ def band_gap_Harrison(
V1_bar = (V1_An + V1_Cat) / 2
V2 = 2.16 * hbarsq_over_m / (d**2)
V3 = (Cat.eig - An.eig) / 2
alpha_m = (1.11 * V1_bar) / sqrt(V2**2 + V3**2)
alpha_m = (1.11 * V1_bar) / np.sqrt(V2**2 + V3**2)

# Calculate Band gap [(3-43) Harrison 1980 ]
Band_gap = (3.60 / 3.0) * (sqrt(V2**2 + V3**2)) * (1 - alpha_m)
Band_gap = (3.60 / 3.0) * (np.sqrt(V2**2 + V3**2)) * (1 - alpha_m)
if verbose:
print("V1_bar = ", V1_bar)
print("V2 = ", V2)
Expand Down Expand Up @@ -150,7 +150,7 @@ def compound_electroneg(
elementlist[i] = [elementlist[i] ** stoichslist[i]]

# Calculate geometric mean (n-th root of product)
prod = product(elementlist)
prod = np.prod(elementlist)
compelectroneg = (prod) ** (1.0 / (sum(stoichslist)))

if verbose:
Expand Down

0 comments on commit be4cb2b

Please sign in to comment.