[cig-commits] [commit] add_thermodynamic_potentials: Abbreviate kd (ca277f4)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Dec 9 09:53:06 PST 2014


Repository : https://github.com/geodynamics/burnman

On branch  : add_thermodynamic_potentials
Link       : https://github.com/geodynamics/burnman/compare/2e5646d93cedbbf8eae54cc37cffc14e0aa85180...d5ddad03ff9f30f5a4efaddb4e3ec585ea1a7c51

>---------------------------------------------------------------

commit ca277f4ad39f6010b624d0812708f6f17d0d6a1e
Author: ian-r-rose <ian.r.rose at gmail.com>
Date:   Tue Jul 29 00:32:56 2014 -0700

    Abbreviate kd


>---------------------------------------------------------------

ca277f4ad39f6010b624d0812708f6f17d0d6a1e
 burnman/solidsolution.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/burnman/solidsolution.py b/burnman/solidsolution.py
index ed8bf33..1fbf462 100644
--- a/burnman/solidsolution.py
+++ b/burnman/solidsolution.py
@@ -6,12 +6,7 @@ import warnings
 
 import numpy as np
 
-# Kronecker delta
-def kd(x, y):
-    if x == y:
-        return 1
-    else:
-        return 0
+kd = lambda x,y : 1 if x==y else 0
 
 import burnman.symmetric_model as sym
 import burnman.asymmetric_model as asym



More information about the CIG-COMMITS mailing list