[yt-svn] commit/yt: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Apr 2 11:02:59 PDT 2014


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/30744d4bb591/
Changeset:   30744d4bb591
Branch:      yt
User:        MatthewTurk
Date:        2014-03-27 20:17:17
Summary:     Adding another check for NaN values.
Affected #:  1 file

diff -r 49c6f69305bab0d56667884fa5146d984a0ed6a3 -r 30744d4bb591545b90fbdae4c103a5cb8730077d yt/utilities/lib/field_interpolation_tables.pxd
--- a/yt/utilities/lib/field_interpolation_tables.pxd
+++ b/yt/utilities/lib/field_interpolation_tables.pxd
@@ -16,6 +16,7 @@
 cimport cython
 cimport numpy as np
 from fp_utils cimport imax, fmax, imin, fmin, iclip, fclip, fabs
+from libc.math cimport isnormal
 
 DEF Nch = 4
 
@@ -58,6 +59,7 @@
     cdef np.float64_t bv, dy, dd, tf, rv
     cdef int bin_id
     if dvs[fit.field_id] >= fit.bounds[1] or dvs[fit.field_id] <= fit.bounds[0]: return 0.0
+    if not isnormal(dvs[fit.field_id]): return 0.0
     bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
     bin_id = iclip(bin_id, 0, fit.nbins-2)
     dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0


https://bitbucket.org/yt_analysis/yt/commits/b7ef034633ca/
Changeset:   b7ef034633ca
Branch:      yt
User:        MatthewTurk
Date:        2014-04-02 17:09:54
Summary:     Manually specify isnormal.
Affected #:  1 file

diff -r 30744d4bb591545b90fbdae4c103a5cb8730077d -r b7ef034633ca6c344cfbdac146f597fb4e2de8b3 yt/utilities/lib/field_interpolation_tables.pxd
--- a/yt/utilities/lib/field_interpolation_tables.pxd
+++ b/yt/utilities/lib/field_interpolation_tables.pxd
@@ -16,7 +16,6 @@
 cimport cython
 cimport numpy as np
 from fp_utils cimport imax, fmax, imin, fmin, iclip, fclip, fabs
-from libc.math cimport isnormal
 
 DEF Nch = 4
 
@@ -34,6 +33,7 @@
 
 cdef extern from "math.h": 
     double expf(double x) nogil 
+    int isnormal(double x) nogil
 
 @cython.boundscheck(False)
 @cython.wraparound(False)


https://bitbucket.org/yt_analysis/yt/commits/afe7b20c1a5e/
Changeset:   afe7b20c1a5e
Branch:      yt
User:        MatthewTurk
Date:        2014-04-02 20:02:53
Summary:     Merged in MatthewTurk/yt (pull request #776)

Adding another check for NaN values.
Affected #:  1 file

diff -r 2df25eea09954523959a4eecea2858bee6442d62 -r afe7b20c1a5ef1264251e4ec6a0bb1223e3bb3b5 yt/utilities/lib/field_interpolation_tables.pxd
--- a/yt/utilities/lib/field_interpolation_tables.pxd
+++ b/yt/utilities/lib/field_interpolation_tables.pxd
@@ -33,6 +33,7 @@
 
 cdef extern from "math.h": 
     double expf(double x) nogil 
+    int isnormal(double x) nogil
 
 @cython.boundscheck(False)
 @cython.wraparound(False)
@@ -58,6 +59,7 @@
     cdef np.float64_t bv, dy, dd, tf, rv
     cdef int bin_id
     if dvs[fit.field_id] >= fit.bounds[1] or dvs[fit.field_id] <= fit.bounds[0]: return 0.0
+    if not isnormal(dvs[fit.field_id]): return 0.0
     bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
     bin_id = iclip(bin_id, 0, fit.nbins-2)
     dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list