From 41d4133c747d72cb7743db63a4ce1f2a768b24cc Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Fri, 21 Aug 2015 11:33:20 -0400 Subject: [PATCH] BUG: Use NAN from numpy. MSVC doesn't define NAN in math.h because they only implement C89. See http://tdistler.com/2011/03/24/how-to-define-nan-not-a-number-on-windows. --- zipline/lib/adjusted_array.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipline/lib/adjusted_array.pyx b/zipline/lib/adjusted_array.pyx index f7c7c0a4..525af772 100644 --- a/zipline/lib/adjusted_array.pyx +++ b/zipline/lib/adjusted_array.pyx @@ -23,8 +23,8 @@ from zipline.errors import ( WindowLengthTooLong, ) -cdef extern from "math.h" nogil: - float NAN + +cdef double NAN = float64('nan') NOMASK = None