[cig-commits] [commit] add_gibbs_energy: Abbreviate kd (4646fab)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Dec 11 17:10:22 PST 2014


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

On branch  : add_gibbs_energy
Link       : https://github.com/geodynamics/burnman/compare/0000000000000000000000000000000000000000...2148b324d3e8aa7b527f831eb397590942563008

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

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

    Abbreviate kd


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

4646fab58703f5f602f32fbd19a6668f8faf7d5e
 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