/* Generated by Cython 0.16 on Thu Jul 12 20:13:38 2012 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif

#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif

#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif

#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif

#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif

#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif

#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCFunction_Call PyObject_Call
#else
  #define __Pyx_PyCFunction_Call PyCFunction_Call
#endif

#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
#endif

#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)

  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;

  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)

  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif

#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif

#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif

#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif

#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif


#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_GET_LENGTH)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif

#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)

#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif

#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif

#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif

#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__CoolProp__State
#define __PYX_HAVE_API__CoolProp__State
#include "CoolProp.h"
#include "math.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


/* inline attribute */
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif

typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))

#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "State.pyx",
  "State.pxd",
};

/*--- Type declarations ---*/
struct __pyx_obj_8CoolProp_5State_State;
struct __pyx_opt_args_8CoolProp_5State_5State_update;

/* "CoolProp\State.pxd":15
 * 
 *     cpdef speed_test(self, int N)
 *     cpdef update(self,dict params, double xL=?)             # <<<<<<<<<<<<<<
 *     cpdef copy(self)
 * 
 */
struct __pyx_opt_args_8CoolProp_5State_5State_update {
  int __pyx_n;
  double xL;
};

/* "CoolProp\State.pxd":9
 * cpdef cmath_speed_test(float x, long N)
 * 
 * cdef class State:             # <<<<<<<<<<<<<<
 *     cdef readonly bint hasLiquid
 *     cdef readonly bytes Liquid, Fluid
 */
struct __pyx_obj_8CoolProp_5State_State {
  PyObject_HEAD
  struct __pyx_vtabstruct_8CoolProp_5State_State *__pyx_vtab;
  int hasLiquid;
  PyObject *Liquid;
  PyObject *Fluid;
  double T_;
  double rho_;
  double p_;
  double xL;
};



/* "CoolProp\State.pyx":80
 * 
 * #from CoolProp import Props,UseSinglePhaseLUT,DerivTerms
 * cdef class State:             # <<<<<<<<<<<<<<
 *     """
 *     A class that contains all the code that represents a thermodynamic state
 */

struct __pyx_vtabstruct_8CoolProp_5State_State {
  PyObject *(*speed_test)(struct __pyx_obj_8CoolProp_5State_State *, int, int __pyx_skip_dispatch);
  PyObject *(*update)(struct __pyx_obj_8CoolProp_5State_State *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8CoolProp_5State_5State_update *__pyx_optional_args);
  PyObject *(*copy)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_T)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_p)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_h)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_rho)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_s)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_u)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_visc)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_cond)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_cp)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_cp0)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_cv)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_MM)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
  double (*get_dpdT)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_8CoolProp_5State_State *__pyx_vtabptr_8CoolProp_5State_State;
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name); /*proto*/

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*proto*/

static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) {
    if (check_bounds) {
        if (unlikely(index >= PyBytes_GET_SIZE(bytes)) |
            ((index < 0) & unlikely(index < -PyBytes_GET_SIZE(bytes)))) {
            PyErr_Format(PyExc_IndexError, "string index out of range");
            return -1;
        }
    }
    if (index < 0)
        index += PyBytes_GET_SIZE(bytes);
    return PyBytes_AS_STRING(bytes)[index];
}

static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) {
    return unlikely(b < 0) ? b : !b;
}
static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
    return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))

static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void);

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(d == Py_None)) {
        __Pyx_RaiseNoneIndexingError();
        return NULL;
    }
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred())
            PyErr_SetObject(PyExc_KeyError, key);
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);

static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/
#if PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename); /*proto*/

static int __Pyx_check_binary_version(void);

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/


/* Module declarations from 'libc.math' */

/* Module declarations from 'CoolProp.State' */
static PyTypeObject *__pyx_ptype_8CoolProp_5State_State = 0;
static double __pyx_f_8CoolProp_5State_Props(PyObject *, PyObject *, float, PyObject *, float, PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_LUT(int, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8CoolProp_5State_set_1phase_LUT_params(PyObject *, int, int, double, double, double, double, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_debug(int, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_cmath_speed_test(float, long, int __pyx_skip_dispatch); /*proto*/
#define __Pyx_MODULE_NAME "CoolProp.State"
int __pyx_module_is_main_CoolProp__State = 0;

/* Implementation of 'CoolProp.State' */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_pf_8CoolProp_5State_cmath_speed_test(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_x, long __pyx_v_N); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_2set_1phase_LUT_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Ref, int __pyx_v_nT, int __pyx_v_np, double __pyx_v_Tmin, double __pyx_v_Tmax, double __pyx_v_pmin, double __pyx_v_pmax); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_4debug(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_level); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_6LUT(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_LUTval); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_8Props(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Parameter, PyObject *__pyx_v_param1, float __pyx_v_value1, PyObject *__pyx_v_param2, float __pyx_v_value2, PyObject *__pyx_v_Fluid); /* proto */
static int __pyx_pf_8CoolProp_5State_5State___init__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, PyObject *__pyx_v_Fluid, PyObject *__pyx_v_StateDict, double __pyx_v_xL, PyObject *__pyx_v_Liquid); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_2__reduce__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_4update(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, PyObject *__pyx_v_params, double __pyx_v_xL); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_6get_MM(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_3LUT___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_8get_rho(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_3rho___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_10get_p(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_1p___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_12get_T(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_1T___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_14get_h(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_1h___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_16get_u(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_1u___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_18get_s(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_1s___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_20get_cp0(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_22get_cp(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_2cp___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_24get_cv(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_2cv___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_26get_visc(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_4visc___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_28get_cond(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_1k___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_7Prandtl___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_30get_dpdT(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_4dpdT___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_32speed_test(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_v_N); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_34__str__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_36copy(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_9hasLiquid___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_6Liquid___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_5Fluid___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_10rebuildState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d); /* proto */
static char __pyx_k_1[] = "Elapsed time for {0:d} calls for \"{1:s}\" at {2:g} us/call";
static char __pyx_k_2[] = "pow(int)";
static char __pyx_k_3[] = "pow(double)";
static char __pyx_k_4[] = "set_1phase_LUT_params";
static char __pyx_k_5[] = "Turning on singlephase LUT";
static char __pyx_k_6[] = "";
static char __pyx_k_9[] = "Dictionary must contain the key 'T' and one of 'P' or 'D'";
static char __pyx_k_11[] = "Need more code here";
static char __pyx_k_13[] = "xL must be between 0 and 1";
static char __pyx_k_15[] = "Direct c++ call to CoolProp without the Python call layer";
static char __pyx_k_16[] = "'M' involves basically no computational effort";
static char __pyx_k_17[] = "kg/m^3";
static char __pyx_k_18[] = "kJ/kg";
static char __pyx_k_19[] = "kJ/kg/K";
static char __pyx_k_20[] = "Pa-s";
static char __pyx_k_21[] = "kW/m/K";
static char __pyx_k_22[] = "kPa/K";
static char __pyx_k_23[] = " = ";
static char __pyx_k_24[] = " ";
static char __pyx_k_25[] = "\n";
static char __pyx_k_26[] = " NO UNITS";
static char __pyx_k_29[] = "C:\\Users\\Belli\\Documents\\Code\\PythonModules\\CoolPropSource\\CoolProp\\State.pyx";
static char __pyx_k_30[] = "CoolProp.State";
static char __pyx_k__C[] = "C";
static char __pyx_k__D[] = "D";
static char __pyx_k__H[] = "H";
static char __pyx_k__K[] = "K";
static char __pyx_k__L[] = "L";
static char __pyx_k__M[] = "M";
static char __pyx_k__N[] = "N";
static char __pyx_k__O[] = "O";
static char __pyx_k__P[] = "P";
static char __pyx_k__S[] = "S";
static char __pyx_k__T[] = "T";
static char __pyx_k__U[] = "U";
static char __pyx_k__V[] = "V";
static char __pyx_k__d[] = "d";
static char __pyx_k__h[] = "h";
static char __pyx_k__k[] = "k";
static char __pyx_k__p[] = "p";
static char __pyx_k__s[] = "s";
static char __pyx_k__u[] = "u";
static char __pyx_k__x[] = "x";
static char __pyx_k__C0[] = "C0";
static char __pyx_k__CP[] = "CP";
static char __pyx_k__cp[] = "cp";
static char __pyx_k__cv[] = "cv";
static char __pyx_k__nT[] = "nT";
static char __pyx_k__np[] = "np";
static char __pyx_k__xL[] = "xL";
static char __pyx_k__LUT[] = "LUT";
static char __pyx_k__Ref[] = "Ref";
static char __pyx_k__cos[] = "cos";
static char __pyx_k__exp[] = "exp";
static char __pyx_k__kPa[] = "kPa";
static char __pyx_k__pop[] = "pop";
static char __pyx_k__pow[] = "pow";
static char __pyx_k__rho[] = "rho";
static char __pyx_k__sin[] = "sin";
static char __pyx_k__Tmax[] = "Tmax";
static char __pyx_k__Tmin[] = "Tmin";
static char __pyx_k__copy[] = "copy";
static char __pyx_k__dpdT[] = "dpdT";
static char __pyx_k__math[] = "math";
static char __pyx_k__pmax[] = "pmax";
static char __pyx_k__pmin[] = "pmin";
static char __pyx_k__pow_[] = "pow_";
static char __pyx_k__time[] = "time";
static char __pyx_k__visc[] = "visc";
static char __pyx_k__Fluid[] = "Fluid";
static char __pyx_k__clock[] = "clock";
static char __pyx_k__get_T[] = "get_T";
static char __pyx_k__get_h[] = "get_h";
static char __pyx_k__get_p[] = "get_p";
static char __pyx_k__get_s[] = "get_s";
static char __pyx_k__get_u[] = "get_u";
static char __pyx_k__range[] = "range";
static char __pyx_k__Liquid[] = "Liquid";
static char __pyx_k__format[] = "format";
static char __pyx_k__get_MM[] = "get_MM";
static char __pyx_k__get_cp[] = "get_cp";
static char __pyx_k__get_cv[] = "get_cv";
static char __pyx_k__param1[] = "param1";
static char __pyx_k__param2[] = "param2";
static char __pyx_k__params[] = "params";
static char __pyx_k__rstrip[] = "rstrip";
static char __pyx_k__update[] = "update";
static char __pyx_k__value1[] = "value1";
static char __pyx_k__value2[] = "value2";
static char __pyx_k__Prandtl[] = "Prandtl";
static char __pyx_k__get_cp0[] = "get_cp0";
static char __pyx_k__get_rho[] = "get_rho";
static char __pyx_k__CoolProp[] = "CoolProp";
static char __pyx_k__KeyError[] = "KeyError";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__get_cond[] = "get_cond";
static char __pyx_k__get_dpdT[] = "get_dpdT";
static char __pyx_k__get_visc[] = "get_visc";
static char __pyx_k__Parameter[] = "Parameter";
static char __pyx_k__StateDict[] = "StateDict";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__speed_test[] = "speed_test";
static char __pyx_k__rebuildState[] = "rebuildState";
static char __pyx_k__AttributeError[] = "AttributeError";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_kp_s_16;
static PyObject *__pyx_kp_s_17;
static PyObject *__pyx_kp_s_18;
static PyObject *__pyx_kp_s_19;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_20;
static PyObject *__pyx_kp_s_21;
static PyObject *__pyx_kp_s_22;
static PyObject *__pyx_kp_s_23;
static PyObject *__pyx_kp_s_24;
static PyObject *__pyx_kp_s_25;
static PyObject *__pyx_kp_s_26;
static PyObject *__pyx_kp_s_29;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_n_s_30;
static PyObject *__pyx_n_s_4;
static PyObject *__pyx_kp_s_5;
static PyObject *__pyx_kp_s_6;
static PyObject *__pyx_kp_s_9;
static PyObject *__pyx_n_s__AttributeError;
static PyObject *__pyx_n_s__C;
static PyObject *__pyx_n_s__C0;
static PyObject *__pyx_n_s__CP;
static PyObject *__pyx_n_s__CoolProp;
static PyObject *__pyx_n_s__D;
static PyObject *__pyx_n_s__Fluid;
static PyObject *__pyx_n_s__H;
static PyObject *__pyx_n_s__K;
static PyObject *__pyx_n_s__KeyError;
static PyObject *__pyx_n_s__L;
static PyObject *__pyx_n_s__LUT;
static PyObject *__pyx_n_s__Liquid;
static PyObject *__pyx_n_s__M;
static PyObject *__pyx_n_s__N;
static PyObject *__pyx_n_s__O;
static PyObject *__pyx_n_s__P;
static PyObject *__pyx_n_s__Parameter;
static PyObject *__pyx_n_s__Prandtl;
static PyObject *__pyx_n_s__Ref;
static PyObject *__pyx_n_s__S;
static PyObject *__pyx_n_s__StateDict;
static PyObject *__pyx_n_s__T;
static PyObject *__pyx_n_s__Tmax;
static PyObject *__pyx_n_s__Tmin;
static PyObject *__pyx_n_s__U;
static PyObject *__pyx_n_s__V;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s__clock;
static PyObject *__pyx_n_s__copy;
static PyObject *__pyx_n_s__cos;
static PyObject *__pyx_n_s__cp;
static PyObject *__pyx_n_s__cv;
static PyObject *__pyx_n_s__d;
static PyObject *__pyx_n_s__dpdT;
static PyObject *__pyx_n_s__exp;
static PyObject *__pyx_n_s__format;
static PyObject *__pyx_n_s__get_MM;
static PyObject *__pyx_n_s__get_T;
static PyObject *__pyx_n_s__get_cond;
static PyObject *__pyx_n_s__get_cp;
static PyObject *__pyx_n_s__get_cp0;
static PyObject *__pyx_n_s__get_cv;
static PyObject *__pyx_n_s__get_dpdT;
static PyObject *__pyx_n_s__get_h;
static PyObject *__pyx_n_s__get_p;
static PyObject *__pyx_n_s__get_rho;
static PyObject *__pyx_n_s__get_s;
static PyObject *__pyx_n_s__get_u;
static PyObject *__pyx_n_s__get_visc;
static PyObject *__pyx_n_s__h;
static PyObject *__pyx_n_s__k;
static PyObject *__pyx_n_s__kPa;
static PyObject *__pyx_n_s__math;
static PyObject *__pyx_n_s__nT;
static PyObject *__pyx_n_s__np;
static PyObject *__pyx_n_s__p;
static PyObject *__pyx_n_s__param1;
static PyObject *__pyx_n_s__param2;
static PyObject *__pyx_n_s__params;
static PyObject *__pyx_n_s__pmax;
static PyObject *__pyx_n_s__pmin;
static PyObject *__pyx_n_s__pop;
static PyObject *__pyx_n_s__pow;
static PyObject *__pyx_n_s__pow_;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__rebuildState;
static PyObject *__pyx_n_s__rho;
static PyObject *__pyx_n_s__rstrip;
static PyObject *__pyx_n_s__s;
static PyObject *__pyx_n_s__sin;
static PyObject *__pyx_n_s__speed_test;
static PyObject *__pyx_n_s__time;
static PyObject *__pyx_n_s__u;
static PyObject *__pyx_n_s__update;
static PyObject *__pyx_n_s__value1;
static PyObject *__pyx_n_s__value2;
static PyObject *__pyx_n_s__visc;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__xL;
static double __pyx_k_7;
static PyObject *__pyx_k_tuple_8;
static PyObject *__pyx_k_tuple_10;
static PyObject *__pyx_k_tuple_12;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_27;
static PyObject *__pyx_k_codeobj_28;

/* "CoolProp\State.pyx":14
 * import CoolProp as CP
 * 
 * cpdef cmath_speed_test(float x, long N):             # <<<<<<<<<<<<<<
 *     from time import clock
 *     cdef int i
 */

static PyObject *__pyx_pw_8CoolProp_5State_1cmath_speed_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_cmath_speed_test(float __pyx_v_x, long __pyx_v_N, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_clock = NULL;
  CYTHON_UNUSED int __pyx_v_i;
  double __pyx_v_y;
  PyObject *__pyx_v_t1 = NULL;
  PyObject *__pyx_v_t2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cmath_speed_test", 0);

  /* "CoolProp\State.pyx":15
 * 
 * cpdef cmath_speed_test(float x, long N):
 *     from time import clock             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef double y
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__clock));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__clock));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__clock));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__time), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__clock);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__clock);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_clock = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":19
 *     cdef double y
 * 
 *     t1=clock()             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         sin(x)
 */
  __pyx_t_2 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_t1 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":20
 * 
 *     t1=clock()
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         sin(x)
 *     t2=clock()
 */
  __pyx_t_3 = __pyx_v_N;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "CoolProp\State.pyx":21
 *     t1=clock()
 *     for i in range(N):
 *         sin(x)             # <<<<<<<<<<<<<<
 *     t2=clock()
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'sin',(t2-t1)/N*1e6)
 */
    sin(__pyx_v_x);
  }

  /* "CoolProp\State.pyx":22
 *     for i in range(N):
 *         sin(x)
 *     t2=clock()             # <<<<<<<<<<<<<<
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'sin',(t2-t1)/N*1e6)
 * 
 */
  __pyx_t_2 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_t2 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":23
 *         sin(x)
 *     t2=clock()
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'sin',(t2-t1)/N*1e6)             # <<<<<<<<<<<<<<
 * 
 *     t1=clock()
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sin));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__sin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sin));
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (__Pyx_PrintOne(0, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "CoolProp\State.pyx":25
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'sin',(t2-t1)/N*1e6)
 * 
 *     t1=clock()             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         cos(x)
 */
  __pyx_t_5 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_v_t1);
  __pyx_v_t1 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "CoolProp\State.pyx":26
 * 
 *     t1=clock()
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         cos(x)
 *     t2=clock()
 */
  __pyx_t_3 = __pyx_v_N;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "CoolProp\State.pyx":27
 *     t1=clock()
 *     for i in range(N):
 *         cos(x)             # <<<<<<<<<<<<<<
 *     t2=clock()
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'cos',(t2-t1)/N*1e6)
 */
    cos(__pyx_v_x);
  }

  /* "CoolProp\State.pyx":28
 *     for i in range(N):
 *         cos(x)
 *     t2=clock()             # <<<<<<<<<<<<<<
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'cos',(t2-t1)/N*1e6)
 * 
 */
  __pyx_t_5 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_v_t2);
  __pyx_v_t2 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "CoolProp\State.pyx":29
 *         cos(x)
 *     t2=clock()
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'cos',(t2-t1)/N*1e6)             # <<<<<<<<<<<<<<
 * 
 *     t1=clock()
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cos));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__cos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cos));
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_6 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":31
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'cos',(t2-t1)/N*1e6)
 * 
 *     t1=clock()             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         exp(x)
 */
  __pyx_t_2 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_v_t1);
  __pyx_v_t1 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":32
 * 
 *     t1=clock()
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         exp(x)
 *     t2=clock()
 */
  __pyx_t_3 = __pyx_v_N;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "CoolProp\State.pyx":33
 *     t1=clock()
 *     for i in range(N):
 *         exp(x)             # <<<<<<<<<<<<<<
 *     t2=clock()
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'exp',(t2-t1)/N*1e6)
 */
    exp(__pyx_v_x);
  }

  /* "CoolProp\State.pyx":34
 *     for i in range(N):
 *         exp(x)
 *     t2=clock()             # <<<<<<<<<<<<<<
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'exp',(t2-t1)/N*1e6)
 * 
 */
  __pyx_t_2 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_v_t2);
  __pyx_v_t2 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":35
 *         exp(x)
 *     t2=clock()
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'exp',(t2-t1)/N*1e6)             # <<<<<<<<<<<<<<
 * 
 *     t1=clock()
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__exp));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_n_s__exp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__exp));
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (__Pyx_PrintOne(0, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "CoolProp\State.pyx":37
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'exp',(t2-t1)/N*1e6)
 * 
 *     t1=clock()             # <<<<<<<<<<<<<<
 *     y=0
 *     for i in range(N):
 */
  __pyx_t_5 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_v_t1);
  __pyx_v_t1 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "CoolProp\State.pyx":38
 * 
 *     t1=clock()
 *     y=0             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         y += pow(<double>x,<int>4)
 */
  __pyx_v_y = 0.0;

  /* "CoolProp\State.pyx":39
 *     t1=clock()
 *     y=0
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         y += pow(<double>x,<int>4)
 *     t2=clock()
 */
  __pyx_t_3 = __pyx_v_N;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "CoolProp\State.pyx":40
 *     y=0
 *     for i in range(N):
 *         y += pow(<double>x,<int>4)             # <<<<<<<<<<<<<<
 *     t2=clock()
 *     print y
 */
    __pyx_v_y = (__pyx_v_y + pow(((double)__pyx_v_x), ((int)4)));
  }

  /* "CoolProp\State.pyx":41
 *     for i in range(N):
 *         y += pow(<double>x,<int>4)
 *     t2=clock()             # <<<<<<<<<<<<<<
 *     print y
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(int)',(t2-t1)/N*1e6)
 */
  __pyx_t_5 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_v_t2);
  __pyx_v_t2 = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "CoolProp\State.pyx":42
 *         y += pow(<double>x,<int>4)
 *     t2=clock()
 *     print y             # <<<<<<<<<<<<<<
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(int)',(t2-t1)/N*1e6)
 * 
 */
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_PrintOne(0, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "CoolProp\State.pyx":43
 *     t2=clock()
 *     print y
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(int)',(t2-t1)/N*1e6)             # <<<<<<<<<<<<<<
 * 
 *     t1=clock()
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_6 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":45
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(int)',(t2-t1)/N*1e6)
 * 
 *     t1=clock()             # <<<<<<<<<<<<<<
 *     y=0
 *     for i in range(N):
 */
  __pyx_t_2 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_v_t1);
  __pyx_v_t1 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":46
 * 
 *     t1=clock()
 *     y=0             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         y += pow(<double>x,<double>4)
 */
  __pyx_v_y = 0.0;

  /* "CoolProp\State.pyx":47
 *     t1=clock()
 *     y=0
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         y += pow(<double>x,<double>4)
 *     t2=clock()
 */
  __pyx_t_3 = __pyx_v_N;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "CoolProp\State.pyx":48
 *     y=0
 *     for i in range(N):
 *         y += pow(<double>x,<double>4)             # <<<<<<<<<<<<<<
 *     t2=clock()
 *     print y
 */
    __pyx_v_y = (__pyx_v_y + pow(((double)__pyx_v_x), ((double)4)));
  }

  /* "CoolProp\State.pyx":49
 *     for i in range(N):
 *         y += pow(<double>x,<double>4)
 *     t2=clock()             # <<<<<<<<<<<<<<
 *     print y
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(double)',(t2-t1)/N*1e6)
 */
  __pyx_t_2 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_v_t2);
  __pyx_v_t2 = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":50
 *         y += pow(<double>x,<double>4)
 *     t2=clock()
 *     print y             # <<<<<<<<<<<<<<
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(double)',(t2-t1)/N*1e6)
 * 
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":51
 *     t2=clock()
 *     print y
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(double)',(t2-t1)/N*1e6)             # <<<<<<<<<<<<<<
 * 
 * cpdef int set_1phase_LUT_params(bytes Ref, int nT, int np, double Tmin, double Tmax, double pmin, double pmax):
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (__Pyx_PrintOne(0, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("CoolProp.State.cmath_speed_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_clock);
  __Pyx_XDECREF(__pyx_v_t1);
  __Pyx_XDECREF(__pyx_v_t2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_1cmath_speed_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_1cmath_speed_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_x;
  long __pyx_v_N;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__N,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cmath_speed_test (wrapper)", 0);
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__N);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cmath_speed_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cmath_speed_test") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_x = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_N = __Pyx_PyInt_AsLong(values[1]); if (unlikely((__pyx_v_N == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cmath_speed_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.cmath_speed_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8CoolProp_5State_cmath_speed_test(__pyx_self, __pyx_v_x, __pyx_v_N);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":14
 * import CoolProp as CP
 * 
 * cpdef cmath_speed_test(float x, long N):             # <<<<<<<<<<<<<<
 *     from time import clock
 *     cdef int i
 */

static PyObject *__pyx_pf_8CoolProp_5State_cmath_speed_test(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_x, long __pyx_v_N) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cmath_speed_test", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8CoolProp_5State_cmath_speed_test(__pyx_v_x, __pyx_v_N, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.cmath_speed_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":53
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(double)',(t2-t1)/N*1e6)
 * 
 * cpdef int set_1phase_LUT_params(bytes Ref, int nT, int np, double Tmin, double Tmax, double pmin, double pmax):             # <<<<<<<<<<<<<<
 *     #Set the LUT parameters in CoolProp copy of the LUT table
 *     CP.set_1phase_LUT_params(Ref, nT, np, Tmin, Tmax, pmin, pmax)
 */

static PyObject *__pyx_pw_8CoolProp_5State_3set_1phase_LUT_params(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_8CoolProp_5State_set_1phase_LUT_params(PyObject *__pyx_v_Ref, int __pyx_v_nT, int __pyx_v_np, double __pyx_v_Tmin, double __pyx_v_Tmax, double __pyx_v_pmin, double __pyx_v_pmax, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_1phase_LUT_params", 0);

  /* "CoolProp\State.pyx":55
 * cpdef int set_1phase_LUT_params(bytes Ref, int nT, int np, double Tmin, double Tmax, double pmin, double pmax):
 *     #Set the LUT parameters in CoolProp copy of the LUT table
 *     CP.set_1phase_LUT_params(Ref, nT, np, Tmin, Tmax, pmin, pmax)             # <<<<<<<<<<<<<<
 * 
 *     #Set the LUT parameters in the local LUT copy build into the State module
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__CP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_nT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyInt_FromLong(__pyx_v_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_Tmin); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_Tmax); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_pmin); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_pmax); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(((PyObject *)__pyx_v_Ref));
  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_Ref));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_Ref));
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "CoolProp\State.pyx":58
 * 
 *     #Set the LUT parameters in the local LUT copy build into the State module
 *     _set_1phase_LUT_params(Ref, nT, np, Tmin, Tmax, pmin, pmax)             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
  __pyx_t_9 = PyBytes_AsString(((PyObject *)__pyx_v_Ref)); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  set_1phase_LUT_params(__pyx_t_9, __pyx_v_nT, __pyx_v_np, __pyx_v_Tmin, __pyx_v_Tmax, __pyx_v_pmin, __pyx_v_pmax);

  /* "CoolProp\State.pyx":60
 *     _set_1phase_LUT_params(Ref, nT, np, Tmin, Tmax, pmin, pmax)
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * cpdef debug(int level):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_WriteUnraisable("CoolProp.State.set_1phase_LUT_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_3set_1phase_LUT_params(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_3set_1phase_LUT_params(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_Ref = 0;
  int __pyx_v_nT;
  int __pyx_v_np;
  double __pyx_v_Tmin;
  double __pyx_v_Tmax;
  double __pyx_v_pmin;
  double __pyx_v_pmax;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__Ref,&__pyx_n_s__nT,&__pyx_n_s__np,&__pyx_n_s__Tmin,&__pyx_n_s__Tmax,&__pyx_n_s__pmin,&__pyx_n_s__pmax,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_1phase_LUT_params (wrapper)", 0);
  __pyx_self = __pyx_self;
  {
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Ref);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nT);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__np);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Tmin);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Tmax);
        if (likely(values[4])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pmin);
        if (likely(values[5])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pmax);
        if (likely(values[6])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_1phase_LUT_params") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_Ref = ((PyObject*)values[0]);
    __pyx_v_nT = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_nT == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_np = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_np == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_Tmin = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_Tmin == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_Tmax = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_Tmax == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_pmin = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_pmin == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_pmax = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_pmax == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.set_1phase_LUT_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Ref), (&PyBytes_Type), 1, "Ref", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_8CoolProp_5State_2set_1phase_LUT_params(__pyx_self, __pyx_v_Ref, __pyx_v_nT, __pyx_v_np, __pyx_v_Tmin, __pyx_v_Tmax, __pyx_v_pmin, __pyx_v_pmax);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":53
 *     print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,'pow(double)',(t2-t1)/N*1e6)
 * 
 * cpdef int set_1phase_LUT_params(bytes Ref, int nT, int np, double Tmin, double Tmax, double pmin, double pmax):             # <<<<<<<<<<<<<<
 *     #Set the LUT parameters in CoolProp copy of the LUT table
 *     CP.set_1phase_LUT_params(Ref, nT, np, Tmin, Tmax, pmin, pmax)
 */

static PyObject *__pyx_pf_8CoolProp_5State_2set_1phase_LUT_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Ref, int __pyx_v_nT, int __pyx_v_np, double __pyx_v_Tmin, double __pyx_v_Tmax, double __pyx_v_pmin, double __pyx_v_pmax) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_1phase_LUT_params", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_f_8CoolProp_5State_set_1phase_LUT_params(__pyx_v_Ref, __pyx_v_nT, __pyx_v_np, __pyx_v_Tmin, __pyx_v_Tmax, __pyx_v_pmin, __pyx_v_pmax, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.set_1phase_LUT_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":62
 *     return 0
 * 
 * cpdef debug(int level):             # <<<<<<<<<<<<<<
 *     _debug(level)
 * 
 */

static PyObject *__pyx_pw_8CoolProp_5State_5debug(PyObject *__pyx_self, PyObject *__pyx_arg_level); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_debug(int __pyx_v_level, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("debug", 0);

  /* "CoolProp\State.pyx":63
 * 
 * cpdef debug(int level):
 *     _debug(level)             # <<<<<<<<<<<<<<
 * 
 * cpdef LUT(bint LUTval):
 */
  debug(__pyx_v_level);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5debug(PyObject *__pyx_self, PyObject *__pyx_arg_level); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5debug(PyObject *__pyx_self, PyObject *__pyx_arg_level) {
  int __pyx_v_level;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("debug (wrapper)", 0);
  __pyx_self = __pyx_self;
  assert(__pyx_arg_level); {
    __pyx_v_level = __Pyx_PyInt_AsInt(__pyx_arg_level); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.debug", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8CoolProp_5State_4debug(__pyx_self, ((int)__pyx_v_level));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":62
 *     return 0
 * 
 * cpdef debug(int level):             # <<<<<<<<<<<<<<
 *     _debug(level)
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_4debug(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_level) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("debug", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8CoolProp_5State_debug(__pyx_v_level, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.debug", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":65
 *     _debug(level)
 * 
 * cpdef LUT(bint LUTval):             # <<<<<<<<<<<<<<
 *     if LUTval:
 *         _LUT_Enabled = True
 */

static PyObject *__pyx_pw_8CoolProp_5State_7LUT(PyObject *__pyx_self, PyObject *__pyx_arg_LUTval); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_LUT(int __pyx_v_LUTval, CYTHON_UNUSED int __pyx_skip_dispatch) {
  CYTHON_UNUSED int __pyx_v__LUT_Enabled;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LUT", 0);

  /* "CoolProp\State.pyx":66
 * 
 * cpdef LUT(bint LUTval):
 *     if LUTval:             # <<<<<<<<<<<<<<
 *         _LUT_Enabled = True
 *         print 'Turning on singlephase LUT'
 */
  if (__pyx_v_LUTval) {

    /* "CoolProp\State.pyx":67
 * cpdef LUT(bint LUTval):
 *     if LUTval:
 *         _LUT_Enabled = True             # <<<<<<<<<<<<<<
 *         print 'Turning on singlephase LUT'
 *         UseSinglePhaseLUT(True)
 */
    __pyx_v__LUT_Enabled = 1;

    /* "CoolProp\State.pyx":68
 *     if LUTval:
 *         _LUT_Enabled = True
 *         print 'Turning on singlephase LUT'             # <<<<<<<<<<<<<<
 *         UseSinglePhaseLUT(True)
 *     else:
 */
    if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "CoolProp\State.pyx":69
 *         _LUT_Enabled = True
 *         print 'Turning on singlephase LUT'
 *         UseSinglePhaseLUT(True)             # <<<<<<<<<<<<<<
 *     else:
 *         _LUT_Enabled = False
 */
    __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    UseSinglePhaseLUT(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "CoolProp\State.pyx":71
 *         UseSinglePhaseLUT(True)
 *     else:
 *         _LUT_Enabled = False             # <<<<<<<<<<<<<<
 *         UseSinglePhaseLUT(False)
 * 
 */
    __pyx_v__LUT_Enabled = 0;

    /* "CoolProp\State.pyx":72
 *     else:
 *         _LUT_Enabled = False
 *         UseSinglePhaseLUT(False)             # <<<<<<<<<<<<<<
 * 
 * cpdef double Props(bytes Parameter, bytes param1, float value1, bytes param2, float value2, bytes Fluid):
 */
    __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    UseSinglePhaseLUT(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.LUT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_7LUT(PyObject *__pyx_self, PyObject *__pyx_arg_LUTval); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_7LUT(PyObject *__pyx_self, PyObject *__pyx_arg_LUTval) {
  int __pyx_v_LUTval;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LUT (wrapper)", 0);
  __pyx_self = __pyx_self;
  assert(__pyx_arg_LUTval); {
    __pyx_v_LUTval = __Pyx_PyObject_IsTrue(__pyx_arg_LUTval); if (unlikely((__pyx_v_LUTval == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.LUT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8CoolProp_5State_6LUT(__pyx_self, ((int)__pyx_v_LUTval));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":65
 *     _debug(level)
 * 
 * cpdef LUT(bint LUTval):             # <<<<<<<<<<<<<<
 *     if LUTval:
 *         _LUT_Enabled = True
 */

static PyObject *__pyx_pf_8CoolProp_5State_6LUT(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_LUTval) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LUT", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8CoolProp_5State_LUT(__pyx_v_LUTval, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.LUT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":74
 *         UseSinglePhaseLUT(False)
 * 
 * cpdef double Props(bytes Parameter, bytes param1, float value1, bytes param2, float value2, bytes Fluid):             # <<<<<<<<<<<<<<
 *     cdef char _param1 = param1[0]
 *     cdef char _param2 = param2[0]
 */

static PyObject *__pyx_pw_8CoolProp_5State_9Props(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_8CoolProp_5State_Props(PyObject *__pyx_v_Parameter, PyObject *__pyx_v_param1, float __pyx_v_value1, PyObject *__pyx_v_param2, float __pyx_v_value2, PyObject *__pyx_v_Fluid, CYTHON_UNUSED int __pyx_skip_dispatch) {
  char __pyx_v__param1;
  char __pyx_v__param2;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  char __pyx_t_1;
  char *__pyx_t_2;
  char *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Props", 0);

  /* "CoolProp\State.pyx":75
 * 
 * cpdef double Props(bytes Parameter, bytes param1, float value1, bytes param2, float value2, bytes Fluid):
 *     cdef char _param1 = param1[0]             # <<<<<<<<<<<<<<
 *     cdef char _param2 = param2[0]
 *     return _Props(Parameter, _param1, value1, _param2, value2, Fluid)
 */
  if (unlikely(((PyObject *)__pyx_v_param1) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = __Pyx_PyBytes_GetItemInt(__pyx_v_param1, 0, 1); if (unlikely(__pyx_t_1 == ((char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v__param1 = __pyx_t_1;

  /* "CoolProp\State.pyx":76
 * cpdef double Props(bytes Parameter, bytes param1, float value1, bytes param2, float value2, bytes Fluid):
 *     cdef char _param1 = param1[0]
 *     cdef char _param2 = param2[0]             # <<<<<<<<<<<<<<
 *     return _Props(Parameter, _param1, value1, _param2, value2, Fluid)
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_param2) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = __Pyx_PyBytes_GetItemInt(__pyx_v_param2, 0, 1); if (unlikely(__pyx_t_1 == ((char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v__param2 = __pyx_t_1;

  /* "CoolProp\State.pyx":77
 *     cdef char _param1 = param1[0]
 *     cdef char _param2 = param2[0]
 *     return _Props(Parameter, _param1, value1, _param2, value2, Fluid)             # <<<<<<<<<<<<<<
 * 
 * #from CoolProp import Props,UseSinglePhaseLUT,DerivTerms
 */
  __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_Parameter)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyBytes_AsString(((PyObject *)__pyx_v_Fluid)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_t_2, __pyx_v__param1, __pyx_v_value1, __pyx_v__param2, __pyx_v_value2, __pyx_t_3);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("CoolProp.State.Props", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_9Props(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_9Props(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_Parameter = 0;
  PyObject *__pyx_v_param1 = 0;
  float __pyx_v_value1;
  PyObject *__pyx_v_param2 = 0;
  float __pyx_v_value2;
  PyObject *__pyx_v_Fluid = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__Parameter,&__pyx_n_s__param1,&__pyx_n_s__value1,&__pyx_n_s__param2,&__pyx_n_s__value2,&__pyx_n_s__Fluid,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Props (wrapper)", 0);
  __pyx_self = __pyx_self;
  {
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Parameter);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param1);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value1);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param2);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value2);
        if (likely(values[4])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Fluid);
        if (likely(values[5])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Props") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_Parameter = ((PyObject*)values[0]);
    __pyx_v_param1 = ((PyObject*)values[1]);
    __pyx_v_value1 = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_value1 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_param2 = ((PyObject*)values[3]);
    __pyx_v_value2 = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_value2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_Fluid = ((PyObject*)values[5]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.Props", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Parameter), (&PyBytes_Type), 1, "Parameter", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_param1), (&PyBytes_Type), 1, "param1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_param2), (&PyBytes_Type), 1, "param2", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Fluid), (&PyBytes_Type), 1, "Fluid", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_8CoolProp_5State_8Props(__pyx_self, __pyx_v_Parameter, __pyx_v_param1, __pyx_v_value1, __pyx_v_param2, __pyx_v_value2, __pyx_v_Fluid);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":74
 *         UseSinglePhaseLUT(False)
 * 
 * cpdef double Props(bytes Parameter, bytes param1, float value1, bytes param2, float value2, bytes Fluid):             # <<<<<<<<<<<<<<
 *     cdef char _param1 = param1[0]
 *     cdef char _param2 = param2[0]
 */

static PyObject *__pyx_pf_8CoolProp_5State_8Props(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_Parameter, PyObject *__pyx_v_param1, float __pyx_v_value1, PyObject *__pyx_v_param2, float __pyx_v_value2, PyObject *__pyx_v_Fluid) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Props", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_8CoolProp_5State_Props(__pyx_v_Parameter, __pyx_v_param1, __pyx_v_value1, __pyx_v_param2, __pyx_v_value2, __pyx_v_Fluid, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.Props", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_8CoolProp_5State_5State_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8CoolProp_5State_5State_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_Fluid = 0;
  PyObject *__pyx_v_StateDict = 0;
  double __pyx_v_xL;
  PyObject *__pyx_v_Liquid = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__Fluid,&__pyx_n_s__StateDict,&__pyx_n_s__xL,&__pyx_n_s__Liquid,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)__pyx_kp_s_6);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Fluid);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__StateDict);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xL);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Liquid);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      if (values[2]) {
      } else {

        /* "CoolProp\State.pyx":85
 *     """
 * 
 *     def __init__(self,bytes Fluid, dict StateDict, double xL=-1.0, Liquid=''):             # <<<<<<<<<<<<<<
 *         self.Fluid=Fluid
 *         self.xL=xL
 */
        __pyx_v_xL = ((double)-1.0);
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_Fluid = ((PyObject*)values[0]);
    __pyx_v_StateDict = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_xL = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_xL == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_xL = ((double)-1.0);
    }
    __pyx_v_Liquid = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.State.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Fluid), (&PyBytes_Type), 1, "Fluid", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_StateDict), (&PyDict_Type), 1, "StateDict", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_8CoolProp_5State_5State___init__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self), __pyx_v_Fluid, __pyx_v_StateDict, __pyx_v_xL, __pyx_v_Liquid);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_8CoolProp_5State_5State___init__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, PyObject *__pyx_v_Fluid, PyObject *__pyx_v_StateDict, double __pyx_v_xL, PyObject *__pyx_v_Liquid) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "CoolProp\State.pyx":86
 * 
 *     def __init__(self,bytes Fluid, dict StateDict, double xL=-1.0, Liquid=''):
 *         self.Fluid=Fluid             # <<<<<<<<<<<<<<
 *         self.xL=xL
 *         self.Liquid=Liquid
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_Fluid));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_Fluid));
  __Pyx_GOTREF(__pyx_v_self->Fluid);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->Fluid));
  __pyx_v_self->Fluid = __pyx_v_Fluid;

  /* "CoolProp\State.pyx":87
 *     def __init__(self,bytes Fluid, dict StateDict, double xL=-1.0, Liquid=''):
 *         self.Fluid=Fluid
 *         self.xL=xL             # <<<<<<<<<<<<<<
 *         self.Liquid=Liquid
 * 
 */
  __pyx_v_self->xL = __pyx_v_xL;

  /* "CoolProp\State.pyx":88
 *         self.Fluid=Fluid
 *         self.xL=xL
 *         self.Liquid=Liquid             # <<<<<<<<<<<<<<
 * 
 *         #Parse the inputs provided
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_Liquid))||((__pyx_v_Liquid) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_Liquid)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_Liquid);
  __Pyx_GIVEREF(__pyx_v_Liquid);
  __Pyx_GOTREF(__pyx_v_self->Liquid);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->Liquid));
  __pyx_v_self->Liquid = ((PyObject*)__pyx_v_Liquid);

  /* "CoolProp\State.pyx":91
 * 
 *         #Parse the inputs provided
 *         self.update(StateDict)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_StateDict, 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_2__reduce__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":93
 *         self.update(StateDict)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         d={}
 *         d['xL']=self.xL
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_2__reduce__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "CoolProp\State.pyx":94
 * 
 *     def __reduce__(self):
 *         d={}             # <<<<<<<<<<<<<<
 *         d['xL']=self.xL
 *         d['Liquid']=self.Liquid
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_d = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":95
 *     def __reduce__(self):
 *         d={}
 *         d['xL']=self.xL             # <<<<<<<<<<<<<<
 *         d['Liquid']=self.Liquid
 *         d['Fluid']=self.Fluid
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->xL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(((PyObject *)__pyx_v_d), ((PyObject *)__pyx_n_s__xL), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":96
 *         d={}
 *         d['xL']=self.xL
 *         d['Liquid']=self.Liquid             # <<<<<<<<<<<<<<
 *         d['Fluid']=self.Fluid
 *         d['T']=self.T_
 */
  if (PyDict_SetItem(((PyObject *)__pyx_v_d), ((PyObject *)__pyx_n_s__Liquid), ((PyObject *)__pyx_v_self->Liquid)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":97
 *         d['xL']=self.xL
 *         d['Liquid']=self.Liquid
 *         d['Fluid']=self.Fluid             # <<<<<<<<<<<<<<
 *         d['T']=self.T_
 *         d['rho']=self.rho_
 */
  if (PyDict_SetItem(((PyObject *)__pyx_v_d), ((PyObject *)__pyx_n_s__Fluid), ((PyObject *)__pyx_v_self->Fluid)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":98
 *         d['Liquid']=self.Liquid
 *         d['Fluid']=self.Fluid
 *         d['T']=self.T_             # <<<<<<<<<<<<<<
 *         d['rho']=self.rho_
 *         return rebuildState,(d,)
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->T_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(((PyObject *)__pyx_v_d), ((PyObject *)__pyx_n_s__T), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":99
 *         d['Fluid']=self.Fluid
 *         d['T']=self.T_
 *         d['rho']=self.rho_             # <<<<<<<<<<<<<<
 *         return rebuildState,(d,)
 * 
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->rho_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(((PyObject *)__pyx_v_d), ((PyObject *)__pyx_n_s__rho), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":100
 *         d['T']=self.T_
 *         d['rho']=self.rho_
 *         return rebuildState,(d,)             # <<<<<<<<<<<<<<
 * 
 *     cpdef update(self,dict params, double xL=-1.0):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__rebuildState); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_d));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_d));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_d));
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("CoolProp.State.State.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":102
 *         return rebuildState,(d,)
 * 
 *     cpdef update(self,dict params, double xL=-1.0):             # <<<<<<<<<<<<<<
 *         """
 *         *params* is a list(or tuple) of strings that represent the parameters
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_5update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_5State_update(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, PyObject *__pyx_v_params, int __pyx_skip_dispatch, struct __pyx_opt_args_8CoolProp_5State_5State_update *__pyx_optional_args) {
  double __pyx_v_xL = __pyx_k_7;
  double __pyx_v_p;
  char *__pyx_v_pchar;
  double __pyx_v_rho;
  char *__pyx_v_errstr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  double __pyx_t_5;
  char *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_xL = __pyx_optional_args->xL;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__update); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_5update)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_xL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(((PyObject *)__pyx_v_params));
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_params));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_params));
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":113
 *         # If no value for xL is provided, it will have a value of -1 which is
 *         # impossible, so don't update xL
 *         if xL>0:             # <<<<<<<<<<<<<<
 *             #There is liquid
 *             self.xL=xL
 */
  __pyx_t_4 = (__pyx_v_xL > 0.0);
  if (__pyx_t_4) {

    /* "CoolProp\State.pyx":115
 *         if xL>0:
 *             #There is liquid
 *             self.xL=xL             # <<<<<<<<<<<<<<
 *             self.hasLiquid=True
 *         else:
 */
    __pyx_v_self->xL = __pyx_v_xL;

    /* "CoolProp\State.pyx":116
 *             #There is liquid
 *             self.xL=xL
 *             self.hasLiquid=True             # <<<<<<<<<<<<<<
 *         else:
 *             #There's no liquid
 */
    __pyx_v_self->hasLiquid = 1;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "CoolProp\State.pyx":119
 *         else:
 *             #There's no liquid
 *             self.xL=0.0             # <<<<<<<<<<<<<<
 *             self.hasLiquid=False
 * 
 */
    __pyx_v_self->xL = 0.0;

    /* "CoolProp\State.pyx":120
 *             #There's no liquid
 *             self.xL=0.0
 *             self.hasLiquid=False             # <<<<<<<<<<<<<<
 * 
 *         #You passed in a dictionary, use the values to update the state
 */
    __pyx_v_self->hasLiquid = 0;
  }
  __pyx_L3:;

  /* "CoolProp\State.pyx":123
 * 
 *         #You passed in a dictionary, use the values to update the state
 *         if 'T' not in params:             # <<<<<<<<<<<<<<
 *             raise AttributeError
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_params) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_4 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__T)))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "CoolProp\State.pyx":124
 *         #You passed in a dictionary, use the values to update the state
 *         if 'T' not in params:
 *             raise AttributeError             # <<<<<<<<<<<<<<
 * 
 *         #Consume the 'T' key since it is required (TODO?)
 */
    __Pyx_Raise(__pyx_builtin_AttributeError, 0, 0, 0);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "CoolProp\State.pyx":127
 * 
 *         #Consume the 'T' key since it is required (TODO?)
 *         self.T_=float(params.pop('T'))             # <<<<<<<<<<<<<<
 * 
 *         #Given temperature and pressure, determine density of gas
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_params), __pyx_n_s__pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_5 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->T_ = __pyx_t_5;

  /* "CoolProp\State.pyx":131
 *         #Given temperature and pressure, determine density of gas
 *         # (or gas and oil if xL is provided)
 *         if abs(self.xL)<=1e-15:             # <<<<<<<<<<<<<<
 *             #Get the density if T,P provided, or pressure if T,rho provided
 *             if 'P' in params:
 */
  __pyx_t_4 = (fabs(__pyx_v_self->xL) <= 1e-15);
  if (__pyx_t_4) {

    /* "CoolProp\State.pyx":133
 *         if abs(self.xL)<=1e-15:
 *             #Get the density if T,P provided, or pressure if T,rho provided
 *             if 'P' in params:             # <<<<<<<<<<<<<<
 *                 self.p_=params['P']
 *                 #Explicit type conversion
 */
    if (unlikely(((PyObject *)__pyx_v_params) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_4 = ((PyDict_Contains(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__P)))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "CoolProp\State.pyx":134
 *             #Get the density if T,P provided, or pressure if T,rho provided
 *             if 'P' in params:
 *                 self.p_=params['P']             # <<<<<<<<<<<<<<
 *                 #Explicit type conversion
 *                 pchar='D'
 */
      __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__P)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_self->p_ = __pyx_t_5;

      /* "CoolProp\State.pyx":136
 *                 self.p_=params['P']
 *                 #Explicit type conversion
 *                 pchar='D'             # <<<<<<<<<<<<<<
 *                 rho = _Props(pchar,'T',self.T_,'P',self.p_,self.Fluid)
 *                 if abs(rho)<1e90:
 */
      __pyx_v_pchar = __pyx_k__D;

      /* "CoolProp\State.pyx":137
 *                 #Explicit type conversion
 *                 pchar='D'
 *                 rho = _Props(pchar,'T',self.T_,'P',self.p_,self.Fluid)             # <<<<<<<<<<<<<<
 *                 if abs(rho)<1e90:
 *                     self.rho_=rho
 */
      __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_rho = Props(__pyx_v_pchar, 'T', __pyx_v_self->T_, 'P', __pyx_v_self->p_, __pyx_t_6);

      /* "CoolProp\State.pyx":138
 *                 pchar='D'
 *                 rho = _Props(pchar,'T',self.T_,'P',self.p_,self.Fluid)
 *                 if abs(rho)<1e90:             # <<<<<<<<<<<<<<
 *                     self.rho_=rho
 *                 else:
 */
      __pyx_t_4 = (fabs(__pyx_v_rho) < 1e90);
      if (__pyx_t_4) {

        /* "CoolProp\State.pyx":139
 *                 rho = _Props(pchar,'T',self.T_,'P',self.p_,self.Fluid)
 *                 if abs(rho)<1e90:
 *                     self.rho_=rho             # <<<<<<<<<<<<<<
 *                 else:
 *                     errstr = get_errstringc()
 */
        __pyx_v_self->rho_ = __pyx_v_rho;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "CoolProp\State.pyx":141
 *                     self.rho_=rho
 *                 else:
 *                     errstr = get_errstringc()             # <<<<<<<<<<<<<<
 *                     raise ValueError(errstr)
 *             elif 'D' in params:
 */
        __pyx_v_errstr = get_errstringc();

        /* "CoolProp\State.pyx":142
 *                 else:
 *                     errstr = get_errstringc()
 *                     raise ValueError(errstr)             # <<<<<<<<<<<<<<
 *             elif 'D' in params:
 *                 self.rho_=params['D']
 */
        __pyx_t_2 = PyBytes_FromString(__pyx_v_errstr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
        __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L7:;
      goto __pyx_L6;
    }

    /* "CoolProp\State.pyx":143
 *                     errstr = get_errstringc()
 *                     raise ValueError(errstr)
 *             elif 'D' in params:             # <<<<<<<<<<<<<<
 *                 self.rho_=params['D']
 *                 #Explicit type conversion
 */
    if (unlikely(((PyObject *)__pyx_v_params) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_4 = ((PyDict_Contains(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__D)))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "CoolProp\State.pyx":144
 *                     raise ValueError(errstr)
 *             elif 'D' in params:
 *                 self.rho_=params['D']             # <<<<<<<<<<<<<<
 *                 #Explicit type conversion
 *                 pchar='P'
 */
      __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__D)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_self->rho_ = __pyx_t_5;

      /* "CoolProp\State.pyx":146
 *                 self.rho_=params['D']
 *                 #Explicit type conversion
 *                 pchar='P'             # <<<<<<<<<<<<<<
 *                 p = _Props(pchar,'T',self.T_,'D',self.rho_,self.Fluid)
 *                 if abs(p)<1e90:
 */
      __pyx_v_pchar = __pyx_k__P;

      /* "CoolProp\State.pyx":147
 *                 #Explicit type conversion
 *                 pchar='P'
 *                 p = _Props(pchar,'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *                 if abs(p)<1e90:
 *                     self.p_=p
 */
      __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_p = Props(__pyx_v_pchar, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_6);

      /* "CoolProp\State.pyx":148
 *                 pchar='P'
 *                 p = _Props(pchar,'T',self.T_,'D',self.rho_,self.Fluid)
 *                 if abs(p)<1e90:             # <<<<<<<<<<<<<<
 *                     self.p_=p
 *                 else:
 */
      __pyx_t_4 = (fabs(__pyx_v_p) < 1e90);
      if (__pyx_t_4) {

        /* "CoolProp\State.pyx":149
 *                 p = _Props(pchar,'T',self.T_,'D',self.rho_,self.Fluid)
 *                 if abs(p)<1e90:
 *                     self.p_=p             # <<<<<<<<<<<<<<
 *                 else:
 *                     errstr = get_errstringc()
 */
        __pyx_v_self->p_ = __pyx_v_p;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "CoolProp\State.pyx":151
 *                     self.p_=p
 *                 else:
 *                     errstr = get_errstringc()             # <<<<<<<<<<<<<<
 *                     print errstr
 *                     raise ValueError(errstr)
 */
        __pyx_v_errstr = get_errstringc();

        /* "CoolProp\State.pyx":152
 *                 else:
 *                     errstr = get_errstringc()
 *                     print errstr             # <<<<<<<<<<<<<<
 *                     raise ValueError(errstr)
 *             else:
 */
        __pyx_t_2 = PyBytes_FromString(__pyx_v_errstr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

        /* "CoolProp\State.pyx":153
 *                     errstr = get_errstringc()
 *                     print errstr
 *                     raise ValueError(errstr)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise KeyError('Dictionary must contain the key \'T\' and one of \'P\' or \'D\'')
 */
        __pyx_t_2 = PyBytes_FromString(__pyx_v_errstr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
        __pyx_t_2 = 0;
        __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L8:;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "CoolProp\State.pyx":155
 *                     raise ValueError(errstr)
 *             else:
 *                 raise KeyError('Dictionary must contain the key \'T\' and one of \'P\' or \'D\'')             # <<<<<<<<<<<<<<
 * 
 *         elif self.xL>0 and self.xL<=1:
 */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L6:;
    goto __pyx_L5;
  }

  /* "CoolProp\State.pyx":157
 *                 raise KeyError('Dictionary must contain the key \'T\' and one of \'P\' or \'D\'')
 * 
 *         elif self.xL>0 and self.xL<=1:             # <<<<<<<<<<<<<<
 *             raise ValueError('Need more code here')
 *         else:
 */
  __pyx_t_4 = (__pyx_v_self->xL > 0.0);
  if (__pyx_t_4) {
    __pyx_t_7 = (__pyx_v_self->xL <= 1.0);
    __pyx_t_8 = __pyx_t_7;
  } else {
    __pyx_t_8 = __pyx_t_4;
  }
  if (__pyx_t_8) {

    /* "CoolProp\State.pyx":158
 * 
 *         elif self.xL>0 and self.xL<=1:
 *             raise ValueError('Need more code here')             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('xL must be between 0 and 1')
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  /*else*/ {

    /* "CoolProp\State.pyx":160
 *             raise ValueError('Need more code here')
 *         else:
 *             raise ValueError('xL must be between 0 and 1')             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_MM(self):
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L5:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("CoolProp.State.State.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_5update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_4update[] = "\n        *params* is a list(or tuple) of strings that represent the parameters \n        that have been updated and will be used to fix the rest of the state. \n        ['T','P'] for temperature and pressure for instance\n        ";
static PyObject *__pyx_pw_8CoolProp_5State_5State_5update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_params = 0;
  double __pyx_v_xL;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__params,&__pyx_n_s__xL,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__params);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__xL);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      if (values[1]) {
      } else {
        __pyx_v_xL = __pyx_k_7;
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_params = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_xL = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_xL == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_xL = __pyx_k_7;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.State.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_params), (&PyDict_Type), 1, "params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_4update(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self), __pyx_v_params, __pyx_v_xL);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":102
 *         return rebuildState,(d,)
 * 
 *     cpdef update(self,dict params, double xL=-1.0):             # <<<<<<<<<<<<<<
 *         """
 *         *params* is a list(or tuple) of strings that represent the parameters
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_4update(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, PyObject *__pyx_v_params, double __pyx_v_xL) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_8CoolProp_5State_5State_update __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.xL = __pyx_v_xL;
  __pyx_t_1 = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_params, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":162
 *             raise ValueError('xL must be between 0 and 1')
 * 
 *     cpdef double get_MM(self):             # <<<<<<<<<<<<<<
 *         return _Props('M','T',0,'D',0,self.Fluid)
 * 
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_7get_MM(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_MM(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_MM", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_MM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_7get_MM)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":163
 * 
 *     cpdef double get_MM(self):
 *         return _Props('M','T',0,'D',0,self.Fluid)             # <<<<<<<<<<<<<<
 * 
 *     property LUT:
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__M, 'T', 0.0, 'D', 0.0, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_MM", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_7get_MM(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_7get_MM(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_MM (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_6get_MM(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":162
 *             raise ValueError('xL must be between 0 and 1')
 * 
 *     cpdef double get_MM(self):             # <<<<<<<<<<<<<<
 *         return _Props('M','T',0,'D',0,self.Fluid)
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_6get_MM(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_MM", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_MM(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_MM", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_3LUT_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_3LUT_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_3LUT___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":166
 * 
 *     property LUT:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.LUT
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_3LUT___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":167
 *     property LUT:
 *         def __get__(self):
 *             return self.LUT             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_rho(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__LUT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.LUT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":169
 *             return self.LUT
 * 
 *     cpdef double get_rho(self):             # <<<<<<<<<<<<<<
 *         return self.rho_
 *     property rho:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_9get_rho(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_rho(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_rho", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_rho); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_9get_rho)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":170
 * 
 *     cpdef double get_rho(self):
 *         return self.rho_             # <<<<<<<<<<<<<<
 *     property rho:
 *         def __get__(self):
 */
  __pyx_r = __pyx_v_self->rho_;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_rho", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_9get_rho(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_9get_rho(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_rho (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_8get_rho(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":169
 *             return self.LUT
 * 
 *     cpdef double get_rho(self):             # <<<<<<<<<<<<<<
 *         return self.rho_
 *     property rho:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_8get_rho(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_rho", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_rho(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_rho", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_3rho_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_3rho_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_3rho___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":172
 *         return self.rho_
 *     property rho:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.rho_
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_3rho___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":173
 *     property rho:
 *         def __get__(self):
 *             return self.rho_             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_p(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->rho_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.rho.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":175
 *             return self.rho_
 * 
 *     cpdef double get_p(self):             # <<<<<<<<<<<<<<
 *         return self.p_
 *     property p:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_11get_p(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_p(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_p", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_11get_p)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":176
 * 
 *     cpdef double get_p(self):
 *         return self.p_             # <<<<<<<<<<<<<<
 *     property p:
 *         def __get__(self):
 */
  __pyx_r = __pyx_v_self->p_;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_11get_p(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_11get_p(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_p (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_10get_p(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":175
 *             return self.rho_
 * 
 *     cpdef double get_p(self):             # <<<<<<<<<<<<<<
 *         return self.p_
 *     property p:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_10get_p(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_p", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_p(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_1p_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_1p_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_1p___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":178
 *         return self.p_
 *     property p:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.p_
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_1p___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":179
 *     property p:
 *         def __get__(self):
 *             return self.p_             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_T(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->p_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.p.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":181
 *             return self.p_
 * 
 *     cpdef double get_T(self):             # <<<<<<<<<<<<<<
 *         return self.T_
 *     property T:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_13get_T(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_T(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_T", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_T); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_13get_T)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":182
 * 
 *     cpdef double get_T(self):
 *         return self.T_             # <<<<<<<<<<<<<<
 *     property T:
 *         def __get__(self):
 */
  __pyx_r = __pyx_v_self->T_;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_T", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_13get_T(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_13get_T(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_T (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_12get_T(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":181
 *             return self.p_
 * 
 *     cpdef double get_T(self):             # <<<<<<<<<<<<<<
 *         return self.T_
 *     property T:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_12get_T(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_T", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_T(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_T", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_1T_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_1T___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":184
 *         return self.T_
 *     property T:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.T_
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_1T___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":185
 *     property T:
 *         def __get__(self):
 *             return self.T_             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_h(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->T_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":187
 *             return self.T_
 * 
 *     cpdef double get_h(self):             # <<<<<<<<<<<<<<
 *         return _Props("H",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property h:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_15get_h(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_h(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_h", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_h); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_15get_h)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":188
 * 
 *     cpdef double get_h(self):
 *         return _Props("H",'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *     property h:
 *         def __get__(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__H, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_h", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_15get_h(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_15get_h(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_h (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_14get_h(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":187
 *             return self.T_
 * 
 *     cpdef double get_h(self):             # <<<<<<<<<<<<<<
 *         return _Props("H",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property h:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_14get_h(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_h", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_h(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_h", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_1h_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_1h_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_1h___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":190
 *         return _Props("H",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property h:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.get_h()
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_1h___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":191
 *     property h:
 *         def __get__(self):
 *             return self.get_h()             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_u(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_h(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.h.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":193
 *             return self.get_h()
 * 
 *     cpdef double get_u(self):             # <<<<<<<<<<<<<<
 *         return _Props("U",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property u:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_17get_u(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_u(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_u", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_u); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_17get_u)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":194
 * 
 *     cpdef double get_u(self):
 *         return _Props("U",'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *     property u:
 *         def __get__(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__U, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_u", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_17get_u(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_17get_u(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_u (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_16get_u(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":193
 *             return self.get_h()
 * 
 *     cpdef double get_u(self):             # <<<<<<<<<<<<<<
 *         return _Props("U",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property u:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_16get_u(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_u", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_u(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_u", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_1u_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_1u_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_1u___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":196
 *         return _Props("U",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property u:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.get_u()
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_1u___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":197
 *     property u:
 *         def __get__(self):
 *             return self.get_u()             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_s(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_u(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.u.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":199
 *             return self.get_u()
 * 
 *     cpdef double get_s(self):             # <<<<<<<<<<<<<<
 *         return _Props("S",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property s:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_19get_s(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_s(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_s", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_19get_s)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":200
 * 
 *     cpdef double get_s(self):
 *         return _Props("S",'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *     property s:
 *         def __get__(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__S, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_s", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_19get_s(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_19get_s(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_s (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_18get_s(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":199
 *             return self.get_u()
 * 
 *     cpdef double get_s(self):             # <<<<<<<<<<<<<<
 *         return _Props("S",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property s:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_18get_s(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_s", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_s(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_s", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_1s_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_1s_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_1s___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":202
 *         return _Props("S",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property s:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.get_s()
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_1s___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":203
 *     property s:
 *         def __get__(self):
 *             return self.get_s()             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_cp0(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_s(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.s.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":205
 *             return self.get_s()
 * 
 *     cpdef double get_cp0(self):             # <<<<<<<<<<<<<<
 *         return _Props("C0",'T',self.T_,'D',self.rho_,self.Fluid)
 * 
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_21get_cp0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_cp0(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cp0", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_cp0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_21get_cp0)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":206
 * 
 *     cpdef double get_cp0(self):
 *         return _Props("C0",'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_cp(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__C0, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_cp0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_21get_cp0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_21get_cp0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_cp0 (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_20get_cp0(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":205
 *             return self.get_s()
 * 
 *     cpdef double get_cp0(self):             # <<<<<<<<<<<<<<
 *         return _Props("C0",'T',self.T_,'D',self.rho_,self.Fluid)
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_20get_cp0(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cp0", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_cp0(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_cp0", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":208
 *         return _Props("C0",'T',self.T_,'D',self.rho_,self.Fluid)
 * 
 *     cpdef double get_cp(self):             # <<<<<<<<<<<<<<
 *         return _Props("C",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property cp:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_23get_cp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_cp(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cp", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_cp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_23get_cp)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":209
 * 
 *     cpdef double get_cp(self):
 *         return _Props("C",'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *     property cp:
 *         def __get__(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__C, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_cp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_23get_cp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_23get_cp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_cp (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_22get_cp(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":208
 *         return _Props("C0",'T',self.T_,'D',self.rho_,self.Fluid)
 * 
 *     cpdef double get_cp(self):             # <<<<<<<<<<<<<<
 *         return _Props("C",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property cp:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_22get_cp(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cp", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_cp(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_cp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_2cp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_2cp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_2cp___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":211
 *         return _Props("C",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property cp:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.get_cp()
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_2cp___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":212
 *     property cp:
 *         def __get__(self):
 *             return self.get_cp()             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_cv(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_cp(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.cp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":214
 *             return self.get_cp()
 * 
 *     cpdef double get_cv(self):             # <<<<<<<<<<<<<<
 *         return _Props("O",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property cv:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_25get_cv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_cv(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cv", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_cv); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_25get_cv)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":215
 * 
 *     cpdef double get_cv(self):
 *         return _Props("O",'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *     property cv:
 *         def __get__(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__O, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_cv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_25get_cv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_25get_cv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_cv (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_24get_cv(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":214
 *             return self.get_cp()
 * 
 *     cpdef double get_cv(self):             # <<<<<<<<<<<<<<
 *         return _Props("O",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property cv:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_24get_cv(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cv", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_cv(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_cv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_2cv_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_2cv_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_2cv___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":217
 *         return _Props("O",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property cv:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.get_cv()
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_2cv___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":218
 *     property cv:
 *         def __get__(self):
 *             return self.get_cv()             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_visc(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_cv(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.cv.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":220
 *             return self.get_cv()
 * 
 *     cpdef double get_visc(self):             # <<<<<<<<<<<<<<
 *         return _Props('V','T',self.T_,'D',self.rho_,self.Fluid)
 *     property visc:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_27get_visc(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_visc(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_visc", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_visc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_27get_visc)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":221
 * 
 *     cpdef double get_visc(self):
 *         return _Props('V','T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *     property visc:
 *         def __get__(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__V, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_visc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_27get_visc(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_27get_visc(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_visc (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_26get_visc(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":220
 *             return self.get_cv()
 * 
 *     cpdef double get_visc(self):             # <<<<<<<<<<<<<<
 *         return _Props('V','T',self.T_,'D',self.rho_,self.Fluid)
 *     property visc:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_26get_visc(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_visc", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_visc(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_visc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_4visc_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_4visc_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_4visc___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":223
 *         return _Props('V','T',self.T_,'D',self.rho_,self.Fluid)
 *     property visc:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.get_visc()
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_4visc___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":224
 *     property visc:
 *         def __get__(self):
 *             return self.get_visc()             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_cond(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_visc(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.visc.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":226
 *             return self.get_visc()
 * 
 *     cpdef double get_cond(self):             # <<<<<<<<<<<<<<
 *         return _Props('L','T',self.T_,'D',self.rho_,self.Fluid)
 *     property k:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_29get_cond(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_cond(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cond", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_cond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_29get_cond)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":227
 * 
 *     cpdef double get_cond(self):
 *         return _Props('L','T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *     property k:
 *         def __get__(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__L, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_29get_cond(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_29get_cond(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_cond (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_28get_cond(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":226
 *             return self.get_visc()
 * 
 *     cpdef double get_cond(self):             # <<<<<<<<<<<<<<
 *         return _Props('L','T',self.T_,'D',self.rho_,self.Fluid)
 *     property k:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_28get_cond(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cond", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_cond(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_1k_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_1k_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_1k___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":229
 *         return _Props('L','T',self.T_,'D',self.rho_,self.Fluid)
 *     property k:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.get_cond()
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_1k___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":230
 *     property k:
 *         def __get__(self):
 *             return self.get_cond()             # <<<<<<<<<<<<<<
 * 
 *     property Prandtl:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_cond(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.k.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_7Prandtl_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_7Prandtl_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_7Prandtl___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":233
 * 
 *     property Prandtl:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.cp * self.visc / self.k
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_7Prandtl___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":234
 *     property Prandtl:
 *         def __get__(self):
 *             return self.cp * self.visc / self.k             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_dpdT(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__cp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__visc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("CoolProp.State.State.Prandtl.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":236
 *             return self.cp * self.visc / self.k
 * 
 *     cpdef double get_dpdT(self):             # <<<<<<<<<<<<<<
 *         return _Props("dpdT",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property dpdT:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_31get_dpdT(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_get_dpdT(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dpdT", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_dpdT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_31get_dpdT)) {
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":237
 * 
 *     cpdef double get_dpdT(self):
 *         return _Props("dpdT",'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 *     property dpdT:
 *         def __get__(self):
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_k__dpdT, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_4);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("CoolProp.State.State.get_dpdT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_31get_dpdT(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_31get_dpdT(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_dpdT (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_30get_dpdT(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":236
 *             return self.cp * self.visc / self.k
 * 
 *     cpdef double get_dpdT(self):             # <<<<<<<<<<<<<<
 *         return _Props("dpdT",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property dpdT:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_30get_dpdT(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dpdT", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_dpdT(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.get_dpdT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_4dpdT_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_4dpdT_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_4dpdT___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":239
 *         return _Props("dpdT",'T',self.T_,'D',self.rho_,self.Fluid)
 *     property dpdT:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.get_dpdT()
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_4dpdT___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "CoolProp\State.pyx":240
 *     property dpdT:
 *         def __get__(self):
 *             return self.get_dpdT()             # <<<<<<<<<<<<<<
 * 
 *     cpdef speed_test(self,int N):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->get_dpdT(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.dpdT.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":242
 *             return self.get_dpdT()
 * 
 *     cpdef speed_test(self,int N):             # <<<<<<<<<<<<<<
 *         from time import clock
 *         cdef int i
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_33speed_test(PyObject *__pyx_v_self, PyObject *__pyx_arg_N); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_5State_speed_test(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_v_N, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_clock = NULL;
  CYTHON_UNUSED int __pyx_v_i;
  char *__pyx_v_Fluid;
  PyObject *__pyx_v_keys = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_t1 = NULL;
  PyObject *__pyx_v_t2 = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("speed_test", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__speed_test); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_33speed_test)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":243
 * 
 *     cpdef speed_test(self,int N):
 *         from time import clock             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef char * k
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__clock));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__clock));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__clock));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__time), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__clock);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__clock);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_clock = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":246
 *         cdef int i
 *         cdef char * k
 *         cdef char * Fluid = self.Fluid             # <<<<<<<<<<<<<<
 *         print 'Direct c++ call to CoolProp without the Python call layer'
 *         print "'M' involves basically no computational effort"
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_Fluid = __pyx_t_4;

  /* "CoolProp\State.pyx":247
 *         cdef char * k
 *         cdef char * Fluid = self.Fluid
 *         print 'Direct c++ call to CoolProp without the Python call layer'             # <<<<<<<<<<<<<<
 *         print "'M' involves basically no computational effort"
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 */
  if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_15)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":248
 *         cdef char * Fluid = self.Fluid
 *         print 'Direct c++ call to CoolProp without the Python call layer'
 *         print "'M' involves basically no computational effort"             # <<<<<<<<<<<<<<
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 *         for key in keys:
 */
  if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_16)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":249
 *         print 'Direct c++ call to CoolProp without the Python call layer'
 *         print "'M' involves basically no computational effort"
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']             # <<<<<<<<<<<<<<
 *         for key in keys:
 *             t1=clock()
 */
  __pyx_t_2 = PyList_New(10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__H));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__H));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__H));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__P));
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__P));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__P));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__S));
  PyList_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_s__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__S));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__U));
  PyList_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_s__U));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__U));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyList_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__O));
  PyList_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__V));
  PyList_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_s__V));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__V));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__L));
  PyList_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_s__L));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__L));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__M));
  PyList_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_s__M));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__M));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C0));
  PyList_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_s__C0));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C0));
  __pyx_v_keys = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":250
 *         print "'M' involves basically no computational effort"
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 *         for key in keys:             # <<<<<<<<<<<<<<
 *             t1=clock()
 *             for i in range(N):
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_keys); __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++;
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "CoolProp\State.pyx":251
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 *         for key in keys:
 *             t1=clock()             # <<<<<<<<<<<<<<
 *             for i in range(N):
 *                 _Props(key,'T',self.T_,'D',self.rho_,Fluid)
 */
    __pyx_t_1 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_t1);
    __pyx_v_t1 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "CoolProp\State.pyx":252
 *         for key in keys:
 *             t1=clock()
 *             for i in range(N):             # <<<<<<<<<<<<<<
 *                 _Props(key,'T',self.T_,'D',self.rho_,Fluid)
 *             t2=clock()
 */
    __pyx_t_6 = __pyx_v_N;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "CoolProp\State.pyx":253
 *             t1=clock()
 *             for i in range(N):
 *                 _Props(key,'T',self.T_,'D',self.rho_,Fluid)             # <<<<<<<<<<<<<<
 *             t2=clock()
 *             print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,key,(t2-t1)/N*1e6)
 */
      __pyx_t_4 = PyBytes_AsString(__pyx_v_key); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      Props(__pyx_t_4, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_v_Fluid);
    }

    /* "CoolProp\State.pyx":254
 *             for i in range(N):
 *                 _Props(key,'T',self.T_,'D',self.rho_,Fluid)
 *             t2=clock()             # <<<<<<<<<<<<<<
 *             print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,key,(t2-t1)/N*1e6)
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_t2);
    __pyx_v_t2 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "CoolProp\State.pyx":255
 *                 _Props(key,'T',self.T_,'D',self.rho_,Fluid)
 *             t2=clock()
 *             print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,key,(t2-t1)/N*1e6)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_1), __pyx_n_s__format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = PyNumber_Multiply(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_3 = 0;
    __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    if (__Pyx_PrintOne(0, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("CoolProp.State.State.speed_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_clock);
  __Pyx_XDECREF(__pyx_v_keys);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_t1);
  __Pyx_XDECREF(__pyx_v_t2);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_33speed_test(PyObject *__pyx_v_self, PyObject *__pyx_arg_N); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_33speed_test(PyObject *__pyx_v_self, PyObject *__pyx_arg_N) {
  int __pyx_v_N;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("speed_test (wrapper)", 0);
  assert(__pyx_arg_N); {
    __pyx_v_N = __Pyx_PyInt_AsInt(__pyx_arg_N); if (unlikely((__pyx_v_N == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.State.speed_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_32speed_test(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self), ((int)__pyx_v_N));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":242
 *             return self.get_dpdT()
 * 
 *     cpdef speed_test(self,int N):             # <<<<<<<<<<<<<<
 *         from time import clock
 *         cdef int i
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_32speed_test(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_v_N) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("speed_test", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->speed_test(__pyx_v_self, __pyx_v_N, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.speed_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_35__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_35__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_34__str__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":257
 *             print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,key,(t2-t1)/N*1e6)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         units={'T': 'K',
 *                'p': 'kPa',
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_34__str__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_v_units = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "CoolProp\State.pyx":258
 * 
 *     def __str__(self):
 *         units={'T': 'K',             # <<<<<<<<<<<<<<
 *                'p': 'kPa',
 *                'rho': 'kg/m^3',
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__T), ((PyObject *)__pyx_n_s__K)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__p), ((PyObject *)__pyx_n_s__kPa)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__rho), ((PyObject *)__pyx_kp_s_17)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__h), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__u), ((PyObject *)__pyx_kp_s_18)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_kp_s_19)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__visc), ((PyObject *)__pyx_kp_s_20)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_kp_s_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cp), ((PyObject *)__pyx_kp_s_19)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cv), ((PyObject *)__pyx_kp_s_19)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dpdT), ((PyObject *)__pyx_kp_s_22)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_units = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":269
 *                'cv':'kJ/kg/K',
 *                'dpdT':'kPa/K'}
 *         s=''             # <<<<<<<<<<<<<<
 *         for k in ['T','p','rho','h','u','s','visc','k','cp','cv','dpdT','Prandtl']:
 *             if k in units:
 */
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
  __pyx_v_s = ((PyObject *)__pyx_kp_s_6);

  /* "CoolProp\State.pyx":270
 *                'dpdT':'kPa/K'}
 *         s=''
 *         for k in ['T','p','rho','h','u','s','visc','k','cp','cv','dpdT','Prandtl']:             # <<<<<<<<<<<<<<
 *             if k in units:
 *                 s+=k+' = '+str(getattr(self,k))+' '+units[k]+'\n'
 */
  __pyx_t_1 = PyList_New(12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__T));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__T));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__T));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__p));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__p));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__p));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rho));
  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__rho));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rho));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__h));
  PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_s__h));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__h));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__u));
  PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_s__u));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__u));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__visc));
  PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_s__visc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__visc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cp));
  PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_s__cp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cv));
  PyList_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_n_s__cv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cv));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dpdT));
  PyList_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_n_s__dpdT));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dpdT));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__Prandtl));
  PyList_SET_ITEM(__pyx_t_1, 11, ((PyObject *)__pyx_n_s__Prandtl));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__Prandtl));
  __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "CoolProp\State.pyx":271
 *         s=''
 *         for k in ['T','p','rho','h','u','s','visc','k','cp','cv','dpdT','Prandtl']:
 *             if k in units:             # <<<<<<<<<<<<<<
 *                 s+=k+' = '+str(getattr(self,k))+' '+units[k]+'\n'
 *             else:
 */
    __pyx_t_4 = ((PyDict_Contains(((PyObject *)__pyx_v_units), __pyx_v_k))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "CoolProp\State.pyx":272
 *         for k in ['T','p','rho','h','u','s','visc','k','cp','cv','dpdT','Prandtl']:
 *             if k in units:
 *                 s+=k+' = '+str(getattr(self,k))+' '+units[k]+'\n'             # <<<<<<<<<<<<<<
 *             else:
 *                 s+=k+' = '+str(getattr(self,k))+' NO UNITS'+'\n'
 */
      __pyx_t_1 = PyNumber_Add(__pyx_v_k, ((PyObject *)__pyx_kp_s_23)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_units), __pyx_v_k); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_1, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_v_s);
      __pyx_v_s = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "CoolProp\State.pyx":274
 *                 s+=k+' = '+str(getattr(self,k))+' '+units[k]+'\n'
 *             else:
 *                 s+=k+' = '+str(getattr(self,k))+' NO UNITS'+'\n'             # <<<<<<<<<<<<<<
 *         return s.rstrip()
 * 
 */
      __pyx_t_1 = PyNumber_Add(__pyx_v_k, ((PyObject *)__pyx_kp_s_23)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_26)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyNumber_Add(__pyx_t_6, ((PyObject *)__pyx_kp_s_25)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_s, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_v_s);
      __pyx_v_s = __pyx_t_6;
      __pyx_t_6 = 0;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":275
 *             else:
 *                 s+=k+' = '+str(getattr(self,k))+' NO UNITS'+'\n'
 *         return s.rstrip()             # <<<<<<<<<<<<<<
 * 
 *     cpdef copy(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_s, __pyx_n_s__rstrip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("CoolProp.State.State.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_units);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":277
 *         return s.rstrip()
 * 
 *     cpdef copy(self):             # <<<<<<<<<<<<<<
 *         cdef double T = self.T_*(1.0+1e-20)
 *         cdef double rho = self.rho_*(1.0+1e-20)
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_37copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_8CoolProp_5State_5State_copy(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_skip_dispatch) {
  double __pyx_v_T;
  double __pyx_v_rho;
  struct __pyx_obj_8CoolProp_5State_State *__pyx_v_ST = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8CoolProp_5State_5State_37copy)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":278
 * 
 *     cpdef copy(self):
 *         cdef double T = self.T_*(1.0+1e-20)             # <<<<<<<<<<<<<<
 *         cdef double rho = self.rho_*(1.0+1e-20)
 *         ST=State(self.Fluid,{'T':T,'D':rho})
 */
  __pyx_v_T = (__pyx_v_self->T_ * (1.0 + 1e-20));

  /* "CoolProp\State.pyx":279
 *     cpdef copy(self):
 *         cdef double T = self.T_*(1.0+1e-20)
 *         cdef double rho = self.rho_*(1.0+1e-20)             # <<<<<<<<<<<<<<
 *         ST=State(self.Fluid,{'T':T,'D':rho})
 *         return ST
 */
  __pyx_v_rho = (__pyx_v_self->rho_ * (1.0 + 1e-20));

  /* "CoolProp\State.pyx":280
 *         cdef double T = self.T_*(1.0+1e-20)
 *         cdef double rho = self.rho_*(1.0+1e-20)
 *         ST=State(self.Fluid,{'T':T,'D':rho})             # <<<<<<<<<<<<<<
 *         return ST
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__T), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_rho); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__D), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->Fluid));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->Fluid));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->Fluid));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8CoolProp_5State_State)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_ST = ((struct __pyx_obj_8CoolProp_5State_State *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":281
 *         cdef double rho = self.rho_*(1.0+1e-20)
 *         ST=State(self.Fluid,{'T':T,'D':rho})
 *         return ST             # <<<<<<<<<<<<<<
 * 
 * def rebuildState(d):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ST));
  __pyx_r = ((PyObject *)__pyx_v_ST);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("CoolProp.State.State.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ST);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_37copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_37copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_36copy(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":277
 *         return s.rstrip()
 * 
 *     cpdef copy(self):             # <<<<<<<<<<<<<<
 *         cdef double T = self.T_*(1.0+1e-20)
 *         cdef double rho = self.rho_*(1.0+1e-20)
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_36copy(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_9hasLiquid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_9hasLiquid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_9hasLiquid___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pxd":10
 * 
 * cdef class State:
 *     cdef readonly bint hasLiquid             # <<<<<<<<<<<<<<
 *     cdef readonly bytes Liquid, Fluid
 *     cdef double T_, rho_, p_, xL
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_9hasLiquid___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->hasLiquid); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("CoolProp.State.State.hasLiquid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_6Liquid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_6Liquid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_6Liquid___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pxd":11
 * cdef class State:
 *     cdef readonly bint hasLiquid
 *     cdef readonly bytes Liquid, Fluid             # <<<<<<<<<<<<<<
 *     cdef double T_, rho_, p_, xL
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_6Liquid___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->Liquid));
  __pyx_r = ((PyObject *)__pyx_v_self->Liquid);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5State_5Fluid_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8CoolProp_5State_5State_5Fluid_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_5Fluid___get__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8CoolProp_5State_5State_5Fluid___get__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->Fluid));
  __pyx_r = ((PyObject *)__pyx_v_self->Fluid);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_11rebuildState(PyObject *__pyx_self, PyObject *__pyx_v_d); /*proto*/
static PyMethodDef __pyx_mdef_8CoolProp_5State_11rebuildState = {__Pyx_NAMESTR("rebuildState"), (PyCFunction)__pyx_pw_8CoolProp_5State_11rebuildState, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_8CoolProp_5State_11rebuildState(PyObject *__pyx_self, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rebuildState (wrapper)", 0);
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_8CoolProp_5State_10rebuildState(__pyx_self, ((PyObject *)__pyx_v_d));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":283
 *         return ST
 * 
 * def rebuildState(d):             # <<<<<<<<<<<<<<
 *     S=State(d['Fluid'],{'T':d['T'],'D':d['rho']})
 *     S.xL = d['xL']
 */

static PyObject *__pyx_pf_8CoolProp_5State_10rebuildState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d) {
  struct __pyx_obj_8CoolProp_5State_State *__pyx_v_S = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  double __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rebuildState", 0);

  /* "CoolProp\State.pyx":284
 * 
 * def rebuildState(d):
 *     S=State(d['Fluid'],{'T':d['T'],'D':d['rho']})             # <<<<<<<<<<<<<<
 *     S.xL = d['xL']
 *     S.Liquid=d['Liquid']
 */
  __pyx_t_1 = PyObject_GetItem(__pyx_v_d, ((PyObject *)__pyx_n_s__Fluid)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_3 = PyObject_GetItem(__pyx_v_d, ((PyObject *)__pyx_n_s__T)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__T), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetItem(__pyx_v_d, ((PyObject *)__pyx_n_s__rho)); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__D), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8CoolProp_5State_State)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_v_S = ((struct __pyx_obj_8CoolProp_5State_State *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":285
 * def rebuildState(d):
 *     S=State(d['Fluid'],{'T':d['T'],'D':d['rho']})
 *     S.xL = d['xL']             # <<<<<<<<<<<<<<
 *     S.Liquid=d['Liquid']
 *     return S
 */
  __pyx_t_2 = PyObject_GetItem(__pyx_v_d, ((PyObject *)__pyx_n_s__xL)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_S->xL = __pyx_t_4;

  /* "CoolProp\State.pyx":286
 *     S=State(d['Fluid'],{'T':d['T'],'D':d['rho']})
 *     S.xL = d['xL']
 *     S.Liquid=d['Liquid']             # <<<<<<<<<<<<<<
 *     return S
 * 
 */
  __pyx_t_2 = PyObject_GetItem(__pyx_v_d, ((PyObject *)__pyx_n_s__Liquid)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_S->Liquid);
  __Pyx_DECREF(((PyObject *)__pyx_v_S->Liquid));
  __pyx_v_S->Liquid = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":287
 *     S.xL = d['xL']
 *     S.Liquid=d['Liquid']
 *     return S             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_S));
  __pyx_r = ((PyObject *)__pyx_v_S);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("CoolProp.State.rebuildState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_S);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_8CoolProp_5State_State __pyx_vtable_8CoolProp_5State_State;

static PyObject *__pyx_tp_new_8CoolProp_5State_State(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_8CoolProp_5State_State *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_8CoolProp_5State_State *)o);
  p->__pyx_vtab = __pyx_vtabptr_8CoolProp_5State_State;
  p->Liquid = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->Fluid = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_8CoolProp_5State_State(PyObject *o) {
  struct __pyx_obj_8CoolProp_5State_State *p = (struct __pyx_obj_8CoolProp_5State_State *)o;
  Py_XDECREF(((PyObject *)p->Liquid));
  Py_XDECREF(((PyObject *)p->Fluid));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_8CoolProp_5State_State(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_8CoolProp_5State_State *p = (struct __pyx_obj_8CoolProp_5State_State *)o;
  if (p->Liquid) {
    e = (*v)(p->Liquid, a); if (e) return e;
  }
  if (p->Fluid) {
    e = (*v)(p->Fluid, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_8CoolProp_5State_State(PyObject *o) {
  struct __pyx_obj_8CoolProp_5State_State *p = (struct __pyx_obj_8CoolProp_5State_State *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->Liquid);
  p->Liquid = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->Fluid);
  p->Fluid = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_LUT(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_3LUT_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_rho(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_3rho_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_p(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_1p_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_T(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_1T_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_h(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_1h_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_u(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_1u_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_s(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_1s_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_cp(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_2cp_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_cv(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_2cv_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_visc(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_4visc_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_k(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_1k_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_Prandtl(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_7Prandtl_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_dpdT(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_4dpdT_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_hasLiquid(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_9hasLiquid_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_Liquid(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_6Liquid_1__get__(o);
}

static PyObject *__pyx_getprop_8CoolProp_5State_5State_Fluid(PyObject *o, void *x) {
  return __pyx_pw_8CoolProp_5State_5State_5Fluid_1__get__(o);
}

static PyMethodDef __pyx_methods_8CoolProp_5State_State[] = {
  {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_3__reduce__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_5update, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_4update)},
  {__Pyx_NAMESTR("get_MM"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_7get_MM, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_rho"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_9get_rho, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_p"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_11get_p, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_T"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_13get_T, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_h"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_15get_h, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_u"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_17get_u, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_s"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_19get_s, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_cp0"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_21get_cp0, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_cp"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_23get_cp, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_cv"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_25get_cv, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_visc"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_27get_visc, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_cond"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_29get_cond, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_dpdT"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_31get_dpdT, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("speed_test"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_33speed_test, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_37copy, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8CoolProp_5State_State[] = {
  {(char *)"LUT", __pyx_getprop_8CoolProp_5State_5State_LUT, 0, 0, 0},
  {(char *)"rho", __pyx_getprop_8CoolProp_5State_5State_rho, 0, 0, 0},
  {(char *)"p", __pyx_getprop_8CoolProp_5State_5State_p, 0, 0, 0},
  {(char *)"T", __pyx_getprop_8CoolProp_5State_5State_T, 0, 0, 0},
  {(char *)"h", __pyx_getprop_8CoolProp_5State_5State_h, 0, 0, 0},
  {(char *)"u", __pyx_getprop_8CoolProp_5State_5State_u, 0, 0, 0},
  {(char *)"s", __pyx_getprop_8CoolProp_5State_5State_s, 0, 0, 0},
  {(char *)"cp", __pyx_getprop_8CoolProp_5State_5State_cp, 0, 0, 0},
  {(char *)"cv", __pyx_getprop_8CoolProp_5State_5State_cv, 0, 0, 0},
  {(char *)"visc", __pyx_getprop_8CoolProp_5State_5State_visc, 0, 0, 0},
  {(char *)"k", __pyx_getprop_8CoolProp_5State_5State_k, 0, 0, 0},
  {(char *)"Prandtl", __pyx_getprop_8CoolProp_5State_5State_Prandtl, 0, 0, 0},
  {(char *)"dpdT", __pyx_getprop_8CoolProp_5State_5State_dpdT, 0, 0, 0},
  {(char *)"hasLiquid", __pyx_getprop_8CoolProp_5State_5State_hasLiquid, 0, 0, 0},
  {(char *)"Liquid", __pyx_getprop_8CoolProp_5State_5State_Liquid, 0, 0, 0},
  {(char *)"Fluid", __pyx_getprop_8CoolProp_5State_5State_Fluid, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_State = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_State = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_State = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_State = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_8CoolProp_5State_State = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("CoolProp.State.State"), /*tp_name*/
  sizeof(struct __pyx_obj_8CoolProp_5State_State), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8CoolProp_5State_State, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_State, /*tp_as_number*/
  &__pyx_tp_as_sequence_State, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_State, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_8CoolProp_5State_5State_35__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_State, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n    A class that contains all the code that represents a thermodynamic state\n    "), /*tp_doc*/
  __pyx_tp_traverse_8CoolProp_5State_State, /*tp_traverse*/
  __pyx_tp_clear_8CoolProp_5State_State, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8CoolProp_5State_State, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_8CoolProp_5State_State, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_8CoolProp_5State_5State_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8CoolProp_5State_State, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {__Pyx_NAMESTR("cmath_speed_test"), (PyCFunction)__pyx_pw_8CoolProp_5State_1cmath_speed_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_1phase_LUT_params"), (PyCFunction)__pyx_pw_8CoolProp_5State_3set_1phase_LUT_params, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("debug"), (PyCFunction)__pyx_pw_8CoolProp_5State_5debug, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("LUT"), (PyCFunction)__pyx_pw_8CoolProp_5State_7LUT, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("Props"), (PyCFunction)__pyx_pw_8CoolProp_5State_9Props, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("State"),
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
  {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
  {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
  {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
  {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
  {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
  {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0},
  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
  {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
  {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0},
  {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_n_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 1},
  {&__pyx_n_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 1},
  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
  {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1},
  {&__pyx_n_s__C0, __pyx_k__C0, sizeof(__pyx_k__C0), 0, 0, 1, 1},
  {&__pyx_n_s__CP, __pyx_k__CP, sizeof(__pyx_k__CP), 0, 0, 1, 1},
  {&__pyx_n_s__CoolProp, __pyx_k__CoolProp, sizeof(__pyx_k__CoolProp), 0, 0, 1, 1},
  {&__pyx_n_s__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 1, 1},
  {&__pyx_n_s__Fluid, __pyx_k__Fluid, sizeof(__pyx_k__Fluid), 0, 0, 1, 1},
  {&__pyx_n_s__H, __pyx_k__H, sizeof(__pyx_k__H), 0, 0, 1, 1},
  {&__pyx_n_s__K, __pyx_k__K, sizeof(__pyx_k__K), 0, 0, 1, 1},
  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
  {&__pyx_n_s__L, __pyx_k__L, sizeof(__pyx_k__L), 0, 0, 1, 1},
  {&__pyx_n_s__LUT, __pyx_k__LUT, sizeof(__pyx_k__LUT), 0, 0, 1, 1},
  {&__pyx_n_s__Liquid, __pyx_k__Liquid, sizeof(__pyx_k__Liquid), 0, 0, 1, 1},
  {&__pyx_n_s__M, __pyx_k__M, sizeof(__pyx_k__M), 0, 0, 1, 1},
  {&__pyx_n_s__N, __pyx_k__N, sizeof(__pyx_k__N), 0, 0, 1, 1},
  {&__pyx_n_s__O, __pyx_k__O, sizeof(__pyx_k__O), 0, 0, 1, 1},
  {&__pyx_n_s__P, __pyx_k__P, sizeof(__pyx_k__P), 0, 0, 1, 1},
  {&__pyx_n_s__Parameter, __pyx_k__Parameter, sizeof(__pyx_k__Parameter), 0, 0, 1, 1},
  {&__pyx_n_s__Prandtl, __pyx_k__Prandtl, sizeof(__pyx_k__Prandtl), 0, 0, 1, 1},
  {&__pyx_n_s__Ref, __pyx_k__Ref, sizeof(__pyx_k__Ref), 0, 0, 1, 1},
  {&__pyx_n_s__S, __pyx_k__S, sizeof(__pyx_k__S), 0, 0, 1, 1},
  {&__pyx_n_s__StateDict, __pyx_k__StateDict, sizeof(__pyx_k__StateDict), 0, 0, 1, 1},
  {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1},
  {&__pyx_n_s__Tmax, __pyx_k__Tmax, sizeof(__pyx_k__Tmax), 0, 0, 1, 1},
  {&__pyx_n_s__Tmin, __pyx_k__Tmin, sizeof(__pyx_k__Tmin), 0, 0, 1, 1},
  {&__pyx_n_s__U, __pyx_k__U, sizeof(__pyx_k__U), 0, 0, 1, 1},
  {&__pyx_n_s__V, __pyx_k__V, sizeof(__pyx_k__V), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s__clock, __pyx_k__clock, sizeof(__pyx_k__clock), 0, 0, 1, 1},
  {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
  {&__pyx_n_s__cos, __pyx_k__cos, sizeof(__pyx_k__cos), 0, 0, 1, 1},
  {&__pyx_n_s__cp, __pyx_k__cp, sizeof(__pyx_k__cp), 0, 0, 1, 1},
  {&__pyx_n_s__cv, __pyx_k__cv, sizeof(__pyx_k__cv), 0, 0, 1, 1},
  {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1},
  {&__pyx_n_s__dpdT, __pyx_k__dpdT, sizeof(__pyx_k__dpdT), 0, 0, 1, 1},
  {&__pyx_n_s__exp, __pyx_k__exp, sizeof(__pyx_k__exp), 0, 0, 1, 1},
  {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
  {&__pyx_n_s__get_MM, __pyx_k__get_MM, sizeof(__pyx_k__get_MM), 0, 0, 1, 1},
  {&__pyx_n_s__get_T, __pyx_k__get_T, sizeof(__pyx_k__get_T), 0, 0, 1, 1},
  {&__pyx_n_s__get_cond, __pyx_k__get_cond, sizeof(__pyx_k__get_cond), 0, 0, 1, 1},
  {&__pyx_n_s__get_cp, __pyx_k__get_cp, sizeof(__pyx_k__get_cp), 0, 0, 1, 1},
  {&__pyx_n_s__get_cp0, __pyx_k__get_cp0, sizeof(__pyx_k__get_cp0), 0, 0, 1, 1},
  {&__pyx_n_s__get_cv, __pyx_k__get_cv, sizeof(__pyx_k__get_cv), 0, 0, 1, 1},
  {&__pyx_n_s__get_dpdT, __pyx_k__get_dpdT, sizeof(__pyx_k__get_dpdT), 0, 0, 1, 1},
  {&__pyx_n_s__get_h, __pyx_k__get_h, sizeof(__pyx_k__get_h), 0, 0, 1, 1},
  {&__pyx_n_s__get_p, __pyx_k__get_p, sizeof(__pyx_k__get_p), 0, 0, 1, 1},
  {&__pyx_n_s__get_rho, __pyx_k__get_rho, sizeof(__pyx_k__get_rho), 0, 0, 1, 1},
  {&__pyx_n_s__get_s, __pyx_k__get_s, sizeof(__pyx_k__get_s), 0, 0, 1, 1},
  {&__pyx_n_s__get_u, __pyx_k__get_u, sizeof(__pyx_k__get_u), 0, 0, 1, 1},
  {&__pyx_n_s__get_visc, __pyx_k__get_visc, sizeof(__pyx_k__get_visc), 0, 0, 1, 1},
  {&__pyx_n_s__h, __pyx_k__h, sizeof(__pyx_k__h), 0, 0, 1, 1},
  {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
  {&__pyx_n_s__kPa, __pyx_k__kPa, sizeof(__pyx_k__kPa), 0, 0, 1, 1},
  {&__pyx_n_s__math, __pyx_k__math, sizeof(__pyx_k__math), 0, 0, 1, 1},
  {&__pyx_n_s__nT, __pyx_k__nT, sizeof(__pyx_k__nT), 0, 0, 1, 1},
  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
  {&__pyx_n_s__p, __pyx_k__p, sizeof(__pyx_k__p), 0, 0, 1, 1},
  {&__pyx_n_s__param1, __pyx_k__param1, sizeof(__pyx_k__param1), 0, 0, 1, 1},
  {&__pyx_n_s__param2, __pyx_k__param2, sizeof(__pyx_k__param2), 0, 0, 1, 1},
  {&__pyx_n_s__params, __pyx_k__params, sizeof(__pyx_k__params), 0, 0, 1, 1},
  {&__pyx_n_s__pmax, __pyx_k__pmax, sizeof(__pyx_k__pmax), 0, 0, 1, 1},
  {&__pyx_n_s__pmin, __pyx_k__pmin, sizeof(__pyx_k__pmin), 0, 0, 1, 1},
  {&__pyx_n_s__pop, __pyx_k__pop, sizeof(__pyx_k__pop), 0, 0, 1, 1},
  {&__pyx_n_s__pow, __pyx_k__pow, sizeof(__pyx_k__pow), 0, 0, 1, 1},
  {&__pyx_n_s__pow_, __pyx_k__pow_, sizeof(__pyx_k__pow_), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__rebuildState, __pyx_k__rebuildState, sizeof(__pyx_k__rebuildState), 0, 0, 1, 1},
  {&__pyx_n_s__rho, __pyx_k__rho, sizeof(__pyx_k__rho), 0, 0, 1, 1},
  {&__pyx_n_s__rstrip, __pyx_k__rstrip, sizeof(__pyx_k__rstrip), 0, 0, 1, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__pyx_n_s__sin, __pyx_k__sin, sizeof(__pyx_k__sin), 0, 0, 1, 1},
  {&__pyx_n_s__speed_test, __pyx_k__speed_test, sizeof(__pyx_k__speed_test), 0, 0, 1, 1},
  {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1},
  {&__pyx_n_s__u, __pyx_k__u, sizeof(__pyx_k__u), 0, 0, 1, 1},
  {&__pyx_n_s__update, __pyx_k__update, sizeof(__pyx_k__update), 0, 0, 1, 1},
  {&__pyx_n_s__value1, __pyx_k__value1, sizeof(__pyx_k__value1), 0, 0, 1, 1},
  {&__pyx_n_s__value2, __pyx_k__value2, sizeof(__pyx_k__value2), 0, 0, 1, 1},
  {&__pyx_n_s__visc, __pyx_k__visc, sizeof(__pyx_k__visc), 0, 0, 1, 1},
  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
  {&__pyx_n_s__xL, __pyx_k__xL, sizeof(__pyx_k__xL), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "CoolProp\State.pyx":127
 * 
 *         #Consume the 'T' key since it is required (TODO?)
 *         self.T_=float(params.pop('T'))             # <<<<<<<<<<<<<<
 * 
 *         #Given temperature and pressure, determine density of gas
 */
  __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_8);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__T));
  PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_n_s__T));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__T));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));

  /* "CoolProp\State.pyx":155
 *                     raise ValueError(errstr)
 *             else:
 *                 raise KeyError('Dictionary must contain the key \'T\' and one of \'P\' or \'D\'')             # <<<<<<<<<<<<<<
 * 
 *         elif self.xL>0 and self.xL<=1:
 */
  __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_10);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
  PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));

  /* "CoolProp\State.pyx":158
 * 
 *         elif self.xL>0 and self.xL<=1:
 *             raise ValueError('Need more code here')             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('xL must be between 0 and 1')
 */
  __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_12);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
  PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));

  /* "CoolProp\State.pyx":160
 *             raise ValueError('Need more code here')
 *         else:
 *             raise ValueError('xL must be between 0 and 1')             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_MM(self):
 */
  __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_14);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
  PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));

  /* "CoolProp\State.pyx":283
 *         return ST
 * 
 * def rebuildState(d):             # <<<<<<<<<<<<<<
 *     S=State(d['Fluid'],{'T':d['T'],'D':d['rho']})
 *     S.xL = d['xL']
 */
  __pyx_k_tuple_27 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_27);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__d));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_n_s__d));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__S));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 1, ((PyObject *)__pyx_n_s__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
  __pyx_k_codeobj_28 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_29, __pyx_n_s__rebuildState, 283, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initState(void); /*proto*/
PyMODINIT_FUNC initState(void)
#else
PyMODINIT_FUNC PyInit_State(void); /*proto*/
PyMODINIT_FUNC PyInit_State(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_State(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("State"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_CoolProp__State) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("Props", (void (*)(void))__pyx_f_8CoolProp_5State_Props, "double (PyObject *, PyObject *, float, PyObject *, float, PyObject *, int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("LUT", (void (*)(void))__pyx_f_8CoolProp_5State_LUT, "PyObject *(int, int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("set_1phase_LUT_params", (void (*)(void))__pyx_f_8CoolProp_5State_set_1phase_LUT_params, "int (PyObject *, int, int, double, double, double, double, int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("debug", (void (*)(void))__pyx_f_8CoolProp_5State_debug, "PyObject *(int, int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("cmath_speed_test", (void (*)(void))__pyx_f_8CoolProp_5State_cmath_speed_test, "PyObject *(float, long, int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Type init code ---*/
  __pyx_vtabptr_8CoolProp_5State_State = &__pyx_vtable_8CoolProp_5State_State;
  __pyx_vtable_8CoolProp_5State_State.speed_test = (PyObject *(*)(struct __pyx_obj_8CoolProp_5State_State *, int, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_speed_test;
  __pyx_vtable_8CoolProp_5State_State.update = (PyObject *(*)(struct __pyx_obj_8CoolProp_5State_State *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8CoolProp_5State_5State_update *__pyx_optional_args))__pyx_f_8CoolProp_5State_5State_update;
  __pyx_vtable_8CoolProp_5State_State.copy = (PyObject *(*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_copy;
  __pyx_vtable_8CoolProp_5State_State.get_T = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_T;
  __pyx_vtable_8CoolProp_5State_State.get_p = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_p;
  __pyx_vtable_8CoolProp_5State_State.get_h = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_h;
  __pyx_vtable_8CoolProp_5State_State.get_rho = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_rho;
  __pyx_vtable_8CoolProp_5State_State.get_s = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_s;
  __pyx_vtable_8CoolProp_5State_State.get_u = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_u;
  __pyx_vtable_8CoolProp_5State_State.get_visc = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_visc;
  __pyx_vtable_8CoolProp_5State_State.get_cond = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_cond;
  __pyx_vtable_8CoolProp_5State_State.get_cp = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_cp;
  __pyx_vtable_8CoolProp_5State_State.get_cp0 = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_cp0;
  __pyx_vtable_8CoolProp_5State_State.get_cv = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_cv;
  __pyx_vtable_8CoolProp_5State_State.get_MM = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_MM;
  __pyx_vtable_8CoolProp_5State_State.get_dpdT = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_get_dpdT;
  if (PyType_Ready(&__pyx_type_8CoolProp_5State_State) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_8CoolProp_5State_State.tp_dict, __pyx_vtabptr_8CoolProp_5State_State) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "State", (PyObject *)&__pyx_type_8CoolProp_5State_State) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_8CoolProp_5State_State = &__pyx_type_8CoolProp_5State_State;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "CoolProp\State.pyx":10
 * 
 * from libc.math cimport pow, sin, cos, exp
 * from math import pow as pow_             # <<<<<<<<<<<<<<
 * cdef bint _LUT_Enabled
 * import CoolProp as CP
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pow));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__pow));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pow));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__math), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__pow);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__pow);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pow_, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":12
 * from math import pow as pow_
 * cdef bint _LUT_Enabled
 * import CoolProp as CP             # <<<<<<<<<<<<<<
 * 
 * cpdef cmath_speed_test(float x, long N):
 */
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__CoolProp), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__CP, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":102
 *         return rebuildState,(d,)
 * 
 *     cpdef update(self,dict params, double xL=-1.0):             # <<<<<<<<<<<<<<
 *         """
 *         *params* is a list(or tuple) of strings that represent the parameters
 */
  __pyx_k_7 = (-1.0);

  /* "CoolProp\State.pyx":283
 *         return ST
 * 
 * def rebuildState(d):             # <<<<<<<<<<<<<<
 *     S=State(d['Fluid'],{'T':d['T'],'D':d['rho']})
 *     S.xL = d['xL']
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8CoolProp_5State_11rebuildState, NULL, __pyx_n_s_30); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__rebuildState, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":1
 * cdef extern from "CoolProp.h":             # <<<<<<<<<<<<<<
 *     double _Props "Props" (char*,char,double,char,double,char*)
 *     void UseSinglePhaseLUT(bool)
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    __Pyx_AddTraceback("init CoolProp.State", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init CoolProp.State");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %"PY_FORMAT_SIZE_T"d positional argument%s (%"PY_FORMAT_SIZE_T"d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AS_STRING(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
        } else {
            #if PY_MAJOR_VERSION < 3
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
            #else
            if (unlikely(!PyUnicode_Check(key))) {
            #endif
                goto invalid_keyword_type;
            } else {
                for (name = first_kw_arg; *name; name++) {
                    #if PY_MAJOR_VERSION >= 3
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                        PyUnicode_Compare(**name, key) == 0) break;
                    #else
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                        _PyString_Eq(**name, key)) break;
                    #endif
                }
                if (*name) {
                    values[name-argnames] = value;
                } else {
                    for (name=argnames; name != first_kw_arg; name++) {
                        if (**name == key) goto arg_passed_twice;
                        #if PY_MAJOR_VERSION >= 3
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
                        #else
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
                        #endif
                    }
                    if (kwds2) {
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                    } else {
                        goto invalid_keyword;
                    }
                }
            }
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (Py_TYPE(obj) == type) return 1;
    }
    else {
        if (PyObject_TypeCheck(obj, type)) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (!PyExceptionClass_Check(type)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        }
        else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        }
        else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        if (!value) {
            value = PyObject_CallObject(type, NULL);
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    return;
}
#endif

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
        return PyFloat_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable");
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                /* try package relative import first */
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
#if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
                 PyString_AsString(name));
#else
    PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
#endif
}

#if PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}
static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    PyObject* v;
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                return -1;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            return -1;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0 &&
                isspace(Py_CHARMASK(s[len-1])) &&
                s[len-1] != ' ')
                    PyFile_SoftSpace(f, 0);
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            return -1;
        PyFile_SoftSpace(f, 0);
    }
    return 0;
}
#else /* Python 3 has a print function */
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = __Pyx_GetAttrString(__pyx_b, "print");
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItemString(kwargs, "file", stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItemString(kwargs, "end", end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}
#endif

#if PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            return -1;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        return -1;
    if (PyFile_WriteString("\n", f) < 0)
        return -1;
    return 0;
    /* the line below is just to avoid compiler
     * compiler warnings about unused functions */
    return __Pyx_Print(f, NULL, 0);
}
#else /* Python 3 has a print function */
static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
    int res;
    PyObject* arg_tuple = PyTuple_New(1);
    if (unlikely(!arg_tuple))
        return -1;
    Py_INCREF(o);
    PyTuple_SET_ITEM(arg_tuple, 0, o);
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}
#endif

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = PyObject_GetAttr(o, n);
    if (!r) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}


/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
