/* Generated by Cython 0.17.1 on Thu Nov 01 21:49:58 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 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 CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define PyIndex_Check(o)     (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_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"
  #define CYTHON_FORMAT_SSIZE_T "z"
#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_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (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]))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[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 "string.h"
#include <string>
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#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*);

#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#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",
  "stringsource",
};

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

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

/* "CoolProp\State.pxd":6
 * 
 * 
 * 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;
  long iFluid;
  long iParam1;
  long iParam2;
  long iOutput;
  double T_;
  double rho_;
  double p_;
  double xL;
  int is_CPFluid;
};



/* "CoolProp\State.pyx":111
 * 
 * #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 (*Props)(struct __pyx_obj_8CoolProp_5State_State *, long, 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) {
        Py_ssize_t size = PyBytes_GET_SIZE(bytes);
        if (unlikely(index >= size) | ((index < 0) & unlikely(index < -size))) {
            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_PyDict_Contains(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

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 */
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_AsDouble(obj) \
(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \
 likely(PyInt_CheckExact(obj)) ? \
 PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj))
#else
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
#endif

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    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 CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {  /* inlined PySequence_GetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return NULL;
                i += l;
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

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 CYTHON_COMPILING_IN_PYPY || 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 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_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.string' */

/* Module declarations from 'libcpp.string' */

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

/* Module declarations from 'CoolProp.State' */
static PyTypeObject *__pyx_ptype_8CoolProp_5State_State = 0;
static long __pyx_v_8CoolProp_5State_iMM;
static long __pyx_v_8CoolProp_5State_iT;
static long __pyx_v_8CoolProp_5State_iD;
static long __pyx_v_8CoolProp_5State_iH;
static long __pyx_v_8CoolProp_5State_iP;
static long __pyx_v_8CoolProp_5State_iC;
static long __pyx_v_8CoolProp_5State_iC0;
static long __pyx_v_8CoolProp_5State_iO;
static long __pyx_v_8CoolProp_5State_iV;
static long __pyx_v_8CoolProp_5State_iL;
static long __pyx_v_8CoolProp_5State_iS;
static long __pyx_v_8CoolProp_5State_iU;
static long __pyx_v_8CoolProp_5State_iDpdT;
static PyObject *__pyx_v_8CoolProp_5State_paras = 0;
static int __pyx_f_8CoolProp_5State_set_1phase_LUT_params(PyObject *, int, int, double, double, double, double, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8CoolProp_5State_debug(int, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_8CoolProp_5State_LUT(int, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_8CoolProp_5State_Props(PyObject *, PyObject *, float, PyObject *, float, PyObject *, int __pyx_skip_dispatch); /*proto*/
static std::string __pyx_convert_string_from_py_(PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "CoolProp.State"
int __pyx_module_is_main_CoolProp__State = 0;

/* Implementation of 'CoolProp.State' */
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_pf_8CoolProp_5State_set_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_2debug(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_level); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_4LUT(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_LUTval); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_6Props(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_6Props(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, long __pyx_v_iOutput); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_8get_MM(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_10get_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_12get_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_14get_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_16get_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_18get_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_20get_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_22get_cp0(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_24get_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_26get_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_28get_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_30get_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_32get_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_34speed_test(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, int __pyx_v_N); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_36__str__(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8CoolProp_5State_5State_38copy(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_8rebuildState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_d); /* proto */
static char __pyx_k_1[] = "set_1phase_LUT_params";
static char __pyx_k_2[] = "Turning on singlephase LUT";
static char __pyx_k_3[] = "";
static char __pyx_k_5[] = "T must be provided in params dict in State.update";
static char __pyx_k_8[] = "Dictionary must contain the key 'T' and one of 'P' or 'D'";
static char __pyx_k_10[] = "xL is out of range - value for xL is [0,1]";
static char __pyx_k_12[] = "xL must be between 0 and 1";
static char __pyx_k_14[] = "Your output is invalid";
static char __pyx_k_16[] = "Direct c++ call to CoolProp without the Python call layer";
static char __pyx_k_17[] = "'M' involves basically no computational effort and is a good measure of the function call overhead";
static char __pyx_k_18[] = "Elapsed time for {0:d} calls for \"{1:s}\" at {2:g} us/call";
static char __pyx_k_19[] = "Call to the c++ layer using integers";
static char __pyx_k_20[] = "Call to the Python call layer";
static char __pyx_k_21[] = "kg/m^3";
static char __pyx_k_22[] = "kJ/kg";
static char __pyx_k_23[] = "kJ/kg/K";
static char __pyx_k_24[] = "Pa-s";
static char __pyx_k_25[] = "kW/m/K";
static char __pyx_k_26[] = "kPa/K";
static char __pyx_k_27[] = " = ";
static char __pyx_k_28[] = " ";
static char __pyx_k_29[] = "\n";
static char __pyx_k_30[] = " NO UNITS";
static char __pyx_k_31[] = "hasLiquid: 'int'";
static char __pyx_k_32[] = "Liquid: bytes";
static char __pyx_k_33[] = "Fluid: bytes";
static char __pyx_k_36[] = "C:\\Users\\Belli\\Documents\\Code\\PythonModules\\CoolPropSource\\CoolProp\\State.pyx";
static char __pyx_k_37[] = "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__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__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__Ref[] = "Ref";
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__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__Props[] = "Props";
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__molemass[] = "molemass";
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_n_s_1;
static PyObject *__pyx_kp_s_10;
static PyObject *__pyx_kp_s_12;
static PyObject *__pyx_kp_s_14;
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_27;
static PyObject *__pyx_kp_s_28;
static PyObject *__pyx_kp_s_29;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_kp_s_30;
static PyObject *__pyx_kp_s_36;
static PyObject *__pyx_n_s_37;
static PyObject *__pyx_kp_s_5;
static PyObject *__pyx_kp_s_8;
static PyObject *__pyx_n_s__AttributeError;
static PyObject *__pyx_n_b__C;
static PyObject *__pyx_n_s__C;
static PyObject *__pyx_n_b__C0;
static PyObject *__pyx_n_s__C0;
static PyObject *__pyx_n_s__CP;
static PyObject *__pyx_n_s__CoolProp;
static PyObject *__pyx_n_b__D;
static PyObject *__pyx_n_s__D;
static PyObject *__pyx_n_s__Fluid;
static PyObject *__pyx_n_b__H;
static PyObject *__pyx_n_s__H;
static PyObject *__pyx_n_s__K;
static PyObject *__pyx_n_s__KeyError;
static PyObject *__pyx_n_b__L;
static PyObject *__pyx_n_s__L;
static PyObject *__pyx_n_s__Liquid;
static PyObject *__pyx_n_b__M;
static PyObject *__pyx_n_s__M;
static PyObject *__pyx_n_b__O;
static PyObject *__pyx_n_s__O;
static PyObject *__pyx_n_b__P;
static PyObject *__pyx_n_s__P;
static PyObject *__pyx_n_s__Parameter;
static PyObject *__pyx_n_s__Prandtl;
static PyObject *__pyx_n_s__Props;
static PyObject *__pyx_n_s__Ref;
static PyObject *__pyx_n_b__S;
static PyObject *__pyx_n_s__S;
static PyObject *__pyx_n_s__StateDict;
static PyObject *__pyx_n_b__T;
static PyObject *__pyx_n_s__T;
static PyObject *__pyx_n_s__Tmax;
static PyObject *__pyx_n_s__Tmin;
static PyObject *__pyx_n_b__U;
static PyObject *__pyx_n_s__U;
static PyObject *__pyx_n_b__V;
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__cp;
static PyObject *__pyx_n_s__cv;
static PyObject *__pyx_n_s__d;
static PyObject *__pyx_n_b__dpdT;
static PyObject *__pyx_n_s__dpdT;
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__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__xL;
static double __pyx_k_4;
static PyObject *__pyx_k_tuple_6;
static PyObject *__pyx_k_tuple_7;
static PyObject *__pyx_k_tuple_9;
static PyObject *__pyx_k_tuple_11;
static PyObject *__pyx_k_tuple_13;
static PyObject *__pyx_k_tuple_15;
static PyObject *__pyx_k_tuple_34;
static PyObject *__pyx_k_codeobj_35;

/* "CoolProp\State.pyx":59
 *                    iDpdT : 'dpdT'}
 * 
 * cpdef int set_1phase_LUT_params(bytes Ref, int nT, int np, double Tmin, double Tmax, double pmin, double pmax):             # <<<<<<<<<<<<<<
 *     """
 *     Set the
 */

static PyObject *__pyx_pw_8CoolProp_5State_1set_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":64
 *     """
 *     #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 = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __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 = 64; __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 = 64; __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 = 64; __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 = 64; __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 = 64; __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 = 64; __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 = 64; __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 = 64; __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":67
 * 
 *     #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 = 67; __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":69
 *     _set_1phase_LUT_params(Ref, nT, np, Tmin, Tmax, pmin, pmax)
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * cpdef int 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_1set_1phase_LUT_params(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8CoolProp_5State_set_1phase_LUT_params[] = "set_1phase_LUT_params(bytes Ref, int nT, int np, double Tmin, double Tmax, double pmin, double pmax) -> int\n\n    Set the \n    ";
static PyObject *__pyx_pw_8CoolProp_5State_1set_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;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_1phase_LUT_params (wrapper)", 0);
  {
    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* 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:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Ref)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nT)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__np)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Tmin)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Tmax)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pmin)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pmax)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_1phase_LUT_params", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __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 = 59; __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 = 59; __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 = 59; __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 = 59; __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 = 59; __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 = 59; __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 = 59; __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 = 59; __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 = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_8CoolProp_5State_set_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":59
 *                    iDpdT : 'dpdT'}
 * 
 * cpdef int set_1phase_LUT_params(bytes Ref, int nT, int np, double Tmin, double Tmax, double pmin, double pmax):             # <<<<<<<<<<<<<<
 *     """
 *     Set the
 */

static PyObject *__pyx_pf_8CoolProp_5State_set_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 = 59; __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":71
 *     return 0
 * 
 * cpdef int debug(int level):             # <<<<<<<<<<<<<<
 *     """
 *     Sets the debug level
 */

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

  /* "CoolProp\State.pyx":84
 *             10 : very annoying debugging output - every function call debugged
 *     """
 *     _debug(level)             # <<<<<<<<<<<<<<
 * 
 * cpdef int LUT(bint LUTval):
 */
  debug(__pyx_v_level);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_3debug(PyObject *__pyx_self, PyObject *__pyx_arg_level); /*proto*/
static char __pyx_doc_8CoolProp_5State_2debug[] = "debug(int level) -> int\n\n    Sets the debug level\n    \n    Parameters\n    ----------\n    level : int\n        Flag indicating how verbose the debugging should be.\n            0 : no debugging output\n            ...\n            ...\n            10 : very annoying debugging output - every function call debugged\n    ";
static PyObject *__pyx_pw_8CoolProp_5State_3debug(PyObject *__pyx_self, PyObject *__pyx_arg_level) {
  int __pyx_v_level;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("debug (wrapper)", 0);
  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 = 71; __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_2debug(__pyx_self, ((int)__pyx_v_level));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":71
 *     return 0
 * 
 * cpdef int debug(int level):             # <<<<<<<<<<<<<<
 *     """
 *     Sets the debug level
 */

static PyObject *__pyx_pf_8CoolProp_5State_2debug(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 = PyInt_FromLong(__pyx_f_8CoolProp_5State_debug(__pyx_v_level, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __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":86
 *     _debug(level)
 * 
 * cpdef int LUT(bint LUTval):             # <<<<<<<<<<<<<<
 *     """
 * 
 */

static PyObject *__pyx_pw_8CoolProp_5State_5LUT(PyObject *__pyx_self, PyObject *__pyx_arg_LUTval); /*proto*/
static int __pyx_f_8CoolProp_5State_LUT(int __pyx_v_LUTval, CYTHON_UNUSED int __pyx_skip_dispatch) {
  CYTHON_UNUSED int __pyx_v__LUT_Enabled;
  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("LUT", 0);

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

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

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

    /* "CoolProp\State.pyx":97
 *         _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 = 97; __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":99
 *         UseSinglePhaseLUT(True)
 *     else:
 *         _LUT_Enabled = False             # <<<<<<<<<<<<<<
 *         UseSinglePhaseLUT(False)
 * 
 */
    __pyx_v__LUT_Enabled = 0;

    /* "CoolProp\State.pyx":100
 *     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 = 100; __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 = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("CoolProp.State.LUT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_8CoolProp_5State_5LUT(PyObject *__pyx_self, PyObject *__pyx_arg_LUTval); /*proto*/
static char __pyx_doc_8CoolProp_5State_4LUT[] = "LUT(int LUTval) -> int\n\n    \n    LUTval : boolean\n        If ``True``, turn on the use of lookup table.  Parameters must have \n        already been set through the use of set_1phase_LUT_params\n\n    ";
static PyObject *__pyx_pw_8CoolProp_5State_5LUT(PyObject *__pyx_self, PyObject *__pyx_arg_LUTval) {
  int __pyx_v_LUTval;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LUT (wrapper)", 0);
  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 = 86; __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_4LUT(__pyx_self, ((int)__pyx_v_LUTval));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_8CoolProp_5State_4LUT(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 = PyInt_FromLong(__pyx_f_8CoolProp_5State_LUT(__pyx_v_LUTval, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __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":102
 *         UseSinglePhaseLUT(False)
 * 
 * cpdef double Props(bytes Parameter, bytes param1, float value1, bytes param2, float value2, bytes Fluid):             # <<<<<<<<<<<<<<
 *     """
 *     Expose the Props() function.  Uses the same call signature as the Props() function in CoolProp.CoolProp
 */

static PyObject *__pyx_pw_8CoolProp_5State_7Props(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":106
 *     Expose the Props() function.  Uses the same call signature as the Props() function in CoolProp.CoolProp
 *     """
 *     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 = 106; __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 = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v__param1 = __pyx_t_1;

  /* "CoolProp\State.pyx":107
 *     """
 *     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 = 107; __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 = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v__param2 = __pyx_t_1;

  /* "CoolProp\State.pyx":108
 *     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 = 108; __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 = 108; __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_7Props(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8CoolProp_5State_6Props[] = "Props(bytes Parameter, bytes param1, float value1, bytes param2, float value2, bytes Fluid) -> double\n\n    Expose the Props() function.  Uses the same call signature as the Props() function in CoolProp.CoolProp\n    ";
static PyObject *__pyx_pw_8CoolProp_5State_7Props(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;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Props (wrapper)", 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* 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:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Parameter)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__param2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Fluid)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("Props", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __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 = 102; __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 = 102; __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 = 102; __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 = 102; __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 = 102; __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 = 102; __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 = 102; __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 = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_8CoolProp_5State_6Props(__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":102
 *         UseSinglePhaseLUT(False)
 * 
 * cpdef double Props(bytes Parameter, bytes param1, float value1, bytes param2, float value2, bytes Fluid):             # <<<<<<<<<<<<<<
 *     """
 *     Expose the Props() function.  Uses the same call signature as the Props() function in CoolProp.CoolProp
 */

static PyObject *__pyx_pf_8CoolProp_5State_6Props(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 = 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.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;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__Fluid,&__pyx_n_s__StateDict,&__pyx_n_s__xL,&__pyx_n_s__Liquid,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)__pyx_kp_s_3);
    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:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__Fluid)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__StateDict)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __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 = 116; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } 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 = 116; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "CoolProp\State.pyx":116
 *     """
 * 
 *     def __init__(self,bytes Fluid, dict StateDict, double xL=-1.0, Liquid=''):             # <<<<<<<<<<<<<<
 *         self.Fluid = Fluid
 *         self.iFluid = _get_Fluid_index(Fluid)
 */
      __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 = 116; __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 = 116; __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 = 116; __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
  std::string __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "CoolProp\State.pyx":117
 * 
 *     def __init__(self,bytes Fluid, dict StateDict, double xL=-1.0, Liquid=''):
 *         self.Fluid = Fluid             # <<<<<<<<<<<<<<
 *         self.iFluid = _get_Fluid_index(Fluid)
 *         #Try to get the fluid from CoolProp
 */
  __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":118
 *     def __init__(self,bytes Fluid, dict StateDict, double xL=-1.0, Liquid=''):
 *         self.Fluid = Fluid
 *         self.iFluid = _get_Fluid_index(Fluid)             # <<<<<<<<<<<<<<
 *         #Try to get the fluid from CoolProp
 *         if self.iFluid >= 0:
 */
  __pyx_t_1 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_Fluid)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->iFluid = get_Fluid_index(__pyx_t_1);

  /* "CoolProp\State.pyx":120
 *         self.iFluid = _get_Fluid_index(Fluid)
 *         #Try to get the fluid from CoolProp
 *         if self.iFluid >= 0:             # <<<<<<<<<<<<<<
 *             #It is a CoolProp Fluid so we can use the faster integer passing function
 *             self.is_CPFluid = True
 */
  __pyx_t_2 = (__pyx_v_self->iFluid >= 0);
  if (__pyx_t_2) {

    /* "CoolProp\State.pyx":122
 *         if self.iFluid >= 0:
 *             #It is a CoolProp Fluid so we can use the faster integer passing function
 *             self.is_CPFluid = True             # <<<<<<<<<<<<<<
 *         else:
 *             self.is_CPFluid = False
 */
    __pyx_v_self->is_CPFluid = 1;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "CoolProp\State.pyx":124
 *             self.is_CPFluid = True
 *         else:
 *             self.is_CPFluid = False             # <<<<<<<<<<<<<<
 *         self.xL = xL
 *         self.Liquid = Liquid
 */
    __pyx_v_self->is_CPFluid = 0;
  }
  __pyx_L3:;

  /* "CoolProp\State.pyx":125
 *         else:
 *             self.is_CPFluid = False
 *         self.xL = xL             # <<<<<<<<<<<<<<
 *         self.Liquid = Liquid
 *         #Parse the inputs provided
 */
  __pyx_v_self->xL = __pyx_v_xL;

  /* "CoolProp\State.pyx":126
 *             self.is_CPFluid = False
 *         self.xL = xL
 *         self.Liquid = Liquid             # <<<<<<<<<<<<<<
 *         #Parse the inputs provided
 *         self.update(StateDict)
 */
  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 = 126; __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":128
 *         self.Liquid = Liquid
 *         #Parse the inputs provided
 *         self.update(StateDict)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_StateDict, 0, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __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 char __pyx_doc_8CoolProp_5State_5State_2__reduce__[] = "State.__reduce__(self)";
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":130
 *         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":131
 * 
 *     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 = 131; __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":132
 *     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 = 132; __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 = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":133
 *         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 = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":134
 *         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 = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":135
 *         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 = 135; __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 = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":136
 *         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 = 136; __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 = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":137
 *         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 = 137; __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 = 137; __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 = 137; __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":139
 *         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_4;
  double __pyx_v_p;
  PyObject *__pyx_v_errstr = 0;
  double __pyx_v_rho;
  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 = 139; __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 = 139; __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 = 139; __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 = 139; __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":151
 *         # 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":153
 *         if xL > 0:
 *             #There is liquid
 *             self.xL=xL             # <<<<<<<<<<<<<<
 *             self.hasLiquid=True
 *         else:
 */
    __pyx_v_self->xL = __pyx_v_xL;

    /* "CoolProp\State.pyx":154
 *             #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":157
 *         else:
 *             #There's no liquid
 *             self.xL=0.0             # <<<<<<<<<<<<<<
 *             self.hasLiquid=False
 * 
 */
    __pyx_v_self->xL = 0.0;

    /* "CoolProp\State.pyx":158
 *             #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":161
 * 
 *         #You passed in a dictionary, use the values to update the state
 *         if 'T' not in params:             # <<<<<<<<<<<<<<
 *             raise AttributeError('T must be provided in params dict in State.update')
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_params) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__T), ((PyObject *)__pyx_v_params), Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "CoolProp\State.pyx":162
 *         #You passed in a dictionary, use the values to update the state
 *         if 'T' not in params:
 *             raise AttributeError('T must be provided in params dict in State.update')             # <<<<<<<<<<<<<<
 * 
 *         #Consume the 'T' key since it is required (TODO?)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_k_tuple_6), NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "CoolProp\State.pyx":165
 * 
 *         #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 = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __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 = 165; __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":169
 *         #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":171
 *         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']
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_params) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s__P), ((PyObject *)__pyx_v_params), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "CoolProp\State.pyx":172
 *             #Get the density if T,P provided, or pressure if T,rho provided
 *             if 'P' in params:
 *                 self.p_=params['P']             # <<<<<<<<<<<<<<
 * 
 *                 if self.is_CPFluid:
 */
      if (unlikely(((PyObject *)__pyx_v_params) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __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 = 172; __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 = 172; __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":174
 *                 self.p_=params['P']
 * 
 *                 if self.is_CPFluid:             # <<<<<<<<<<<<<<
 *                     rho = _IProps(iD,iT,self.T_,iP,self.p_,self.iFluid)
 *                 else:
 */
      if (__pyx_v_self->is_CPFluid) {

        /* "CoolProp\State.pyx":175
 * 
 *                 if self.is_CPFluid:
 *                     rho = _IProps(iD,iT,self.T_,iP,self.p_,self.iFluid)             # <<<<<<<<<<<<<<
 *                 else:
 *                     rho = _Props('D','T',self.T_,'P',self.p_,self.Fluid)
 */
        __pyx_v_rho = IProps(__pyx_v_8CoolProp_5State_iD, __pyx_v_8CoolProp_5State_iT, __pyx_v_self->T_, __pyx_v_8CoolProp_5State_iP, __pyx_v_self->p_, __pyx_v_self->iFluid);
        goto __pyx_L7;
      }
      /*else*/ {

        /* "CoolProp\State.pyx":177
 *                     rho = _IProps(iD,iT,self.T_,iP,self.p_,self.iFluid)
 *                 else:
 *                     rho = _Props('D','T',self.T_,'P',self.p_,self.Fluid)             # <<<<<<<<<<<<<<
 * 
 *                 if abs(rho)<1e90:
 */
        __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_v_rho = Props(__pyx_k__D, 'T', __pyx_v_self->T_, 'P', __pyx_v_self->p_, __pyx_t_6);
      }
      __pyx_L7:;

      /* "CoolProp\State.pyx":179
 *                     rho = _Props('D','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":180
 * 
 *                 if abs(rho)<1e90:
 *                     self.rho_=rho             # <<<<<<<<<<<<<<
 *                 else:
 *                     errstr = get_errstringc()
 */
        __pyx_v_self->rho_ = __pyx_v_rho;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "CoolProp\State.pyx":182
 *                     self.rho_=rho
 *                 else:
 *                     errstr = get_errstringc()             # <<<<<<<<<<<<<<
 *                     raise ValueError(errstr)
 *             elif 'D' in params:
 */
        __pyx_t_2 = PyBytes_FromString(get_errstringc()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __pyx_v_errstr = __pyx_t_2;
        __pyx_t_2 = 0;

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

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

      /* "CoolProp\State.pyx":186
 *             elif 'D' in params:
 * 
 *                 self.rho_=params['D']             # <<<<<<<<<<<<<<
 * 
 *                 if self.is_CPFluid:
 */
      if (unlikely(((PyObject *)__pyx_v_params) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_params), ((PyObject *)__pyx_n_s__D)); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_self->rho_ = __pyx_t_5;

      /* "CoolProp\State.pyx":188
 *                 self.rho_=params['D']
 * 
 *                 if self.is_CPFluid:             # <<<<<<<<<<<<<<
 *                     p = _IProps(iP,iT,self.T_,iD,self.rho_,self.iFluid)
 *                 else:
 */
      if (__pyx_v_self->is_CPFluid) {

        /* "CoolProp\State.pyx":189
 * 
 *                 if self.is_CPFluid:
 *                     p = _IProps(iP,iT,self.T_,iD,self.rho_,self.iFluid)             # <<<<<<<<<<<<<<
 *                 else:
 *                     p = _Props('P','T',self.T_,'D',self.rho_,self.Fluid)
 */
        __pyx_v_p = IProps(__pyx_v_8CoolProp_5State_iP, __pyx_v_8CoolProp_5State_iT, __pyx_v_self->T_, __pyx_v_8CoolProp_5State_iD, __pyx_v_self->rho_, __pyx_v_self->iFluid);
        goto __pyx_L9;
      }
      /*else*/ {

        /* "CoolProp\State.pyx":191
 *                     p = _IProps(iP,iT,self.T_,iD,self.rho_,self.iFluid)
 *                 else:
 *                     p = _Props('P','T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 * 
 *                 if abs(p)<1e90:
 */
        __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_v_p = Props(__pyx_k__P, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_6);
      }
      __pyx_L9:;

      /* "CoolProp\State.pyx":193
 *                     p = _Props('P','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":194
 * 
 *                 if abs(p)<1e90:
 *                     self.p_=p             # <<<<<<<<<<<<<<
 *                 else:
 *                     errstr = get_errstringc()
 */
        __pyx_v_self->p_ = __pyx_v_p;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "CoolProp\State.pyx":196
 *                     self.p_=p
 *                 else:
 *                     errstr = get_errstringc()             # <<<<<<<<<<<<<<
 *                     raise ValueError(errstr+str(params))
 *             else:
 */
        __pyx_t_1 = PyBytes_FromString(get_errstringc()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
        __pyx_v_errstr = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "CoolProp\State.pyx":197
 *                 else:
 *                     errstr = get_errstringc()
 *                     raise ValueError(errstr+str(params))             # <<<<<<<<<<<<<<
 *             else:
 *                 raise KeyError("Dictionary must contain the key 'T' and one of 'P' or 'D'")
 */
        __pyx_t_1 = PyTuple_New(1); 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_INCREF(((PyObject *)__pyx_v_params));
        PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_params));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_params));
        __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __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 = PyNumber_Add(((PyObject *)__pyx_v_errstr), __pyx_t_2); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L10:;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "CoolProp\State.pyx":199
 *                     raise ValueError(errstr+str(params))
 *             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_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_k_tuple_9), NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L6:;
    goto __pyx_L5;
  }

  /* "CoolProp\State.pyx":201
 *                 raise KeyError("Dictionary must contain the key 'T' and one of 'P' or 'D'")
 * 
 *         elif self.xL>0 and self.xL<=1:             # <<<<<<<<<<<<<<
 *             raise ValueError('xL is out of range - value for xL is [0,1]')
 *         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":202
 * 
 *         elif self.xL>0 and self.xL<=1:
 *             raise ValueError('xL is out of range - value for xL is [0,1]')             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('xL must be between 0 and 1')
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  /*else*/ {

    /* "CoolProp\State.pyx":204
 *             raise ValueError('xL is out of range - value for xL is [0,1]')
 *         else:
 *             raise ValueError('xL must be between 0 and 1')             # <<<<<<<<<<<<<<
 * 
 *     cpdef double Props(self, long iOutput):
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __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_XDECREF(__pyx_v_errstr);
  __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[] = "State.update(self, dict params, double xL=-1.0)\n\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;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__params,&__pyx_n_s__xL,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:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__params)) != 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 = 139; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } 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 = 139; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_xL = __pyx_k_4;
    }
  }
  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 = 139; __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 = 139; __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":139
 *         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 = 139; __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":206
 *             raise ValueError('xL must be between 0 and 1')
 * 
 *     cpdef double Props(self, long iOutput):             # <<<<<<<<<<<<<<
 *         if iOutput<0:
 *             raise ValueError('Your output is invalid')
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_7Props(PyObject *__pyx_v_self, PyObject *__pyx_arg_iOutput); /*proto*/
static double __pyx_f_8CoolProp_5State_5State_Props(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, long __pyx_v_iOutput, int __pyx_skip_dispatch) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  double __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Props", 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__Props); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __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_7Props)) {
      __pyx_t_2 = PyInt_FromLong(__pyx_v_iOutput); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __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 = 206; __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 = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __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 = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "CoolProp\State.pyx":207
 * 
 *     cpdef double Props(self, long iOutput):
 *         if iOutput<0:             # <<<<<<<<<<<<<<
 *             raise ValueError('Your output is invalid')
 * 
 */
  __pyx_t_5 = (__pyx_v_iOutput < 0);
  if (__pyx_t_5) {

    /* "CoolProp\State.pyx":208
 *     cpdef double Props(self, long iOutput):
 *         if iOutput<0:
 *             raise ValueError('Your output is invalid')             # <<<<<<<<<<<<<<
 * 
 *         if self.is_CPFluid:
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_15), NULL); 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_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "CoolProp\State.pyx":210
 *             raise ValueError('Your output is invalid')
 * 
 *         if self.is_CPFluid:             # <<<<<<<<<<<<<<
 *             return _IProps(iOutput,iT,self.T_,iD,self.rho_,self.iFluid)
 *         else:
 */
  if (__pyx_v_self->is_CPFluid) {

    /* "CoolProp\State.pyx":211
 * 
 *         if self.is_CPFluid:
 *             return _IProps(iOutput,iT,self.T_,iD,self.rho_,self.iFluid)             # <<<<<<<<<<<<<<
 *         else:
 *             return _Props(paras[iOutput],'T',self.T_,'D',self.rho_,self.Fluid)
 */
    __pyx_r = IProps(__pyx_v_iOutput, __pyx_v_8CoolProp_5State_iT, __pyx_v_self->T_, __pyx_v_8CoolProp_5State_iD, __pyx_v_self->rho_, __pyx_v_self->iFluid);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "CoolProp\State.pyx":213
 *             return _IProps(iOutput,iT,self.T_,iD,self.rho_,self.iFluid)
 *         else:
 *             return _Props(paras[iOutput],'T',self.T_,'D',self.rho_,self.Fluid)             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_MM(self):
 */
    if (unlikely(((PyObject *)__pyx_v_8CoolProp_5State_paras) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_8CoolProp_5State_paras), __pyx_v_iOutput, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = Props(__pyx_t_6, 'T', __pyx_v_self->T_, 'D', __pyx_v_self->rho_, __pyx_t_7);
    goto __pyx_L0;
  }
  __pyx_L4:;

  __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_WriteUnraisable("CoolProp.State.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_5State_7Props(PyObject *__pyx_v_self, PyObject *__pyx_arg_iOutput); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_6Props[] = "State.Props(self, long iOutput) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_7Props(PyObject *__pyx_v_self, PyObject *__pyx_arg_iOutput) {
  long __pyx_v_iOutput;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Props (wrapper)", 0);
  assert(__pyx_arg_iOutput); {
    __pyx_v_iOutput = __Pyx_PyInt_AsLong(__pyx_arg_iOutput); if (unlikely((__pyx_v_iOutput == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("CoolProp.State.State.Props", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_6Props(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self), ((long)__pyx_v_iOutput));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":206
 *             raise ValueError('xL must be between 0 and 1')
 * 
 *     cpdef double Props(self, long iOutput):             # <<<<<<<<<<<<<<
 *         if iOutput<0:
 *             raise ValueError('Your output is invalid')
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_6Props(struct __pyx_obj_8CoolProp_5State_State *__pyx_v_self, long __pyx_v_iOutput) {
  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(((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_iOutput, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __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.Props", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":215
 *             return _Props(paras[iOutput],'T',self.T_,'D',self.rho_,self.Fluid)
 * 
 *     cpdef double get_MM(self):             # <<<<<<<<<<<<<<
 *         return _Props1(self.Fluid,'molemass')
 * 
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_9get_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 = 215; __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_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 = 215; __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 = 215; __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":216
 * 
 *     cpdef double get_MM(self):
 *         return _Props1(self.Fluid,'molemass')             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_rho(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 = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = Props(__pyx_t_4, __pyx_k__molemass);
  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_9get_MM(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_8get_MM[] = "State.get_MM(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_9get_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_8get_MM(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":215
 *             return _Props(paras[iOutput],'T',self.T_,'D',self.rho_,self.Fluid)
 * 
 *     cpdef double get_MM(self):             # <<<<<<<<<<<<<<
 *         return _Props1(self.Fluid,'molemass')
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_8get_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 = 215; __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;
}

/* "CoolProp\State.pyx":218
 *         return _Props1(self.Fluid,'molemass')
 * 
 *     cpdef double get_rho(self):             # <<<<<<<<<<<<<<
 *         return self.rho_
 *     property rho:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_11get_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 = 218; __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_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 = 218; __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 = 218; __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":219
 * 
 *     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_11get_rho(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_10get_rho[] = "State.get_rho(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_11get_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_10get_rho(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":218
 *         return _Props1(self.Fluid,'molemass')
 * 
 *     cpdef double get_rho(self):             # <<<<<<<<<<<<<<
 *         return self.rho_
 *     property rho:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_10get_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 = 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.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":221
 *         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":222
 *     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 = 222; __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":224
 *             return self.rho_
 * 
 *     cpdef double get_p(self):             # <<<<<<<<<<<<<<
 *         return self.p_
 *     property p:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_13get_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 = 224; __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_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 = 224; __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 = 224; __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":225
 * 
 *     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_13get_p(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_12get_p[] = "State.get_p(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_13get_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_12get_p(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_8CoolProp_5State_5State_12get_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 = 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.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":227
 *         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":228
 *     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 = 228; __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":230
 *             return self.p_
 * 
 *     cpdef double get_T(self):             # <<<<<<<<<<<<<<
 *         return self.T_
 *     property T:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_15get_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 = 230; __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_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 = 230; __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 = 230; __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":231
 * 
 *     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_15get_T(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_14get_T[] = "State.get_T(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_15get_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_14get_T(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_8CoolProp_5State_5State_14get_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 = 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.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":233
 *         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":234
 *     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 = 234; __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":236
 *             return self.T_
 * 
 *     cpdef double get_h(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iH)
 *     property h:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_17get_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;
  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 = 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_17get_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 = 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_h(self):
 *         return self.Props(iH)             # <<<<<<<<<<<<<<
 *     property h:
 *         def __get__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iH, 0);
  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_17get_h(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_16get_h[] = "State.get_h(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_17get_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_16get_h(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":236
 *             return self.T_
 * 
 *     cpdef double get_h(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iH)
 *     property h:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_16get_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 = 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_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":239
 *         return self.Props(iH)
 *     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":240
 *     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 = 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.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":242
 *             return self.get_h()
 * 
 *     cpdef double get_u(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iU)
 *     property u:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_19get_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;
  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 = 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_19get_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 = 242; __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 = 242; __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":243
 * 
 *     cpdef double get_u(self):
 *         return self.Props(iU)             # <<<<<<<<<<<<<<
 *     property u:
 *         def __get__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iU, 0);
  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_19get_u(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_18get_u[] = "State.get_u(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_19get_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_18get_u(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":242
 *             return self.get_h()
 * 
 *     cpdef double get_u(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iU)
 *     property u:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_18get_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 = 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.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":245
 *         return self.Props(iU)
 *     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":246
 *     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 = 246; __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":248
 *             return self.get_u()
 * 
 *     cpdef double get_s(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iS)
 *     property s:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_21get_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;
  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 = 248; __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_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 = 248; __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 = 248; __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":249
 * 
 *     cpdef double get_s(self):
 *         return self.Props(iS)             # <<<<<<<<<<<<<<
 *     property s:
 *         def __get__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iS, 0);
  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_21get_s(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_20get_s[] = "State.get_s(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_21get_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_20get_s(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":248
 *             return self.get_u()
 * 
 *     cpdef double get_s(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iS)
 *     property s:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_20get_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 = 248; __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":251
 *         return self.Props(iS)
 *     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":252
 *     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 = 252; __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":254
 *             return self.get_s()
 * 
 *     cpdef double get_cp0(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iC0)
 * 
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_23get_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;
  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 = 254; __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_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 = 254; __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 = 254; __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":255
 * 
 *     cpdef double get_cp0(self):
 *         return self.Props(iC0)             # <<<<<<<<<<<<<<
 * 
 *     cpdef double get_cp(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iC0, 0);
  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_23get_cp0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_22get_cp0[] = "State.get_cp0(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_23get_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_22get_cp0(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":254
 *             return self.get_s()
 * 
 *     cpdef double get_cp0(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iC0)
 * 
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_22get_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 = 254; __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":257
 *         return self.Props(iC0)
 * 
 *     cpdef double get_cp(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iC)
 *     property cp:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_25get_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;
  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 = 257; __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_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 = 257; __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 = 257; __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":258
 * 
 *     cpdef double get_cp(self):
 *         return self.Props(iC)             # <<<<<<<<<<<<<<
 *     property cp:
 *         def __get__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iC, 0);
  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_25get_cp(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_24get_cp[] = "State.get_cp(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_25get_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_24get_cp(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":257
 *         return self.Props(iC0)
 * 
 *     cpdef double get_cp(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iC)
 *     property cp:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_24get_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 = 257; __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":260
 *         return self.Props(iC)
 *     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":261
 *     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 = 261; __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":263
 *             return self.get_cp()
 * 
 *     cpdef double get_cv(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iO)
 *     property cv:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_27get_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;
  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 = 263; __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_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 = 263; __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 = 263; __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":264
 * 
 *     cpdef double get_cv(self):
 *         return self.Props(iO)             # <<<<<<<<<<<<<<
 *     property cv:
 *         def __get__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iO, 0);
  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_27get_cv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_26get_cv[] = "State.get_cv(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_27get_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_26get_cv(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":263
 *             return self.get_cp()
 * 
 *     cpdef double get_cv(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iO)
 *     property cv:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_26get_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 = 263; __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":266
 *         return self.Props(iO)
 *     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":267
 *     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 = 267; __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":269
 *             return self.get_cv()
 * 
 *     cpdef double get_visc(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iV)
 *     property visc:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_29get_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;
  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 = 269; __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_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 = 269; __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 = 269; __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":270
 * 
 *     cpdef double get_visc(self):
 *         return self.Props(iV)             # <<<<<<<<<<<<<<
 *     property visc:
 *         def __get__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iV, 0);
  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_29get_visc(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_28get_visc[] = "State.get_visc(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_29get_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_28get_visc(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":269
 *             return self.get_cv()
 * 
 *     cpdef double get_visc(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iV)
 *     property visc:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_28get_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 = 269; __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":272
 *         return self.Props(iV)
 *     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":273
 *     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 = 273; __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":275
 *             return self.get_visc()
 * 
 *     cpdef double get_cond(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iL)
 *     property k:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_31get_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;
  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 = 275; __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_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 = 275; __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 = 275; __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":276
 * 
 *     cpdef double get_cond(self):
 *         return self.Props(iL)             # <<<<<<<<<<<<<<
 *     property k:
 *         def __get__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iL, 0);
  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_31get_cond(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_30get_cond[] = "State.get_cond(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_31get_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_30get_cond(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":275
 *             return self.get_visc()
 * 
 *     cpdef double get_cond(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iL)
 *     property k:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_30get_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 = 275; __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":278
 *         return self.Props(iL)
 *     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":279
 *     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 = 279; __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":282
 * 
 *     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":283
 *     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 = 283; __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 = 283; __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 = 283; __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 = 283; __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 = 283; __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":285
 *             return self.cp * self.visc / self.k
 * 
 *     cpdef double get_dpdT(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iDpdT)
 *     property dpdT:
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_33get_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;
  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 = 285; __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_33get_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 = 285; __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 = 285; __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":286
 * 
 *     cpdef double get_dpdT(self):
 *         return self.Props(iDpdT)             # <<<<<<<<<<<<<<
 *     property dpdT:
 *         def __get__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_8CoolProp_5State_State *)__pyx_v_self->__pyx_vtab)->Props(__pyx_v_self, __pyx_v_8CoolProp_5State_iDpdT, 0);
  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_33get_dpdT(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_32get_dpdT[] = "State.get_dpdT(self) -> double";
static PyObject *__pyx_pw_8CoolProp_5State_5State_33get_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_32get_dpdT(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":285
 *             return self.cp * self.visc / self.k
 * 
 *     cpdef double get_dpdT(self):             # <<<<<<<<<<<<<<
 *         return self.Props(iDpdT)
 *     property dpdT:
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_32get_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 = 285; __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":288
 *         return self.Props(iDpdT)
 *     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":289
 *     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 = 289; __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":291
 *             return self.get_dpdT()
 * 
 *     cpdef speed_test(self, int N):             # <<<<<<<<<<<<<<
 *         from time import clock
 *         cdef int i
 */

static PyObject *__pyx_pw_8CoolProp_5State_5State_35speed_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;
  CYTHON_UNUSED long __pyx_v_IT;
  CYTHON_UNUSED long __pyx_v_ID;
  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;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  long __pyx_t_16;
  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 = 291; __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_35speed_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 = 291; __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 = 291; __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 = 291; __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":292
 * 
 *     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 = 292; __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 = 292; __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 = 292; __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":295
 *         cdef int i
 *         cdef char * k
 *         cdef char * Fluid = self.Fluid             # <<<<<<<<<<<<<<
 *         cdef long IT = 'T'
 *         cdef long ID = 'D'
 */
  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_self->Fluid)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_Fluid = __pyx_t_4;

  /* "CoolProp\State.pyx":296
 *         cdef char * k
 *         cdef char * Fluid = self.Fluid
 *         cdef long IT = 'T'             # <<<<<<<<<<<<<<
 *         cdef long ID = 'D'
 * 
 */
  __pyx_v_IT = 'T';

  /* "CoolProp\State.pyx":297
 *         cdef char * Fluid = self.Fluid
 *         cdef long IT = 'T'
 *         cdef long ID = 'D'             # <<<<<<<<<<<<<<
 * 
 *         print 'Direct c++ call to CoolProp without the Python call layer'
 */
  __pyx_v_ID = 'D';

  /* "CoolProp\State.pyx":299
 *         cdef long ID = 'D'
 * 
 *         print 'Direct c++ call to CoolProp without the Python call layer'             # <<<<<<<<<<<<<<
 *         print "'M' involves basically no computational effort and is a good measure of the function call overhead"
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 */
  if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_16)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":300
 * 
 *         print 'Direct c++ call to CoolProp without the Python call layer'
 *         print "'M' involves basically no computational effort and is a good measure of the function call overhead"             # <<<<<<<<<<<<<<
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 *         for key in keys:
 */
  if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_17)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":301
 *         print 'Direct c++ call to CoolProp without the Python call layer'
 *         print "'M' involves basically no computational effort and is a good measure of the function call overhead"
 *         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 = 301; __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":302
 *         print "'M' involves basically no computational effort and is a good measure of the function call overhead"
 *         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;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "CoolProp\State.pyx":303
 *         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 = 303; __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":304
 *         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":305
 *             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 = 305; __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":306
 *             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 = 306; __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":307
 *                 _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)             # <<<<<<<<<<<<<<
 * 
 *         print 'Call to the c++ layer using integers'
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_18), __pyx_n_s__format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __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 = 307; __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 = 307; __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 = 307; __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 = 307; __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 = 307; __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 = 307; __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 = 307; __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 = 307; __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 = 307; __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;

  /* "CoolProp\State.pyx":309
 *             print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,key,(t2-t1)/N*1e6)
 * 
 *         print 'Call to the c++ layer using integers'             # <<<<<<<<<<<<<<
 *         keys = [iH,iP,iS,iU,iC,iO,iV,iL,iMM,iC0]
 *         for key in keys:
 */
  if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_19)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":310
 * 
 *         print 'Call to the c++ layer using integers'
 *         keys = [iH,iP,iS,iU,iC,iO,iV,iL,iMM,iC0]             # <<<<<<<<<<<<<<
 *         for key in keys:
 *             t1=clock()
 */
  __pyx_t_2 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iH); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iP); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iS); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iU); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iC); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iO); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iV); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iMM); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iC0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_15 = PyList_New(10); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_15);
  PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_15, 1, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  PyList_SET_ITEM(__pyx_t_15, 2, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyList_SET_ITEM(__pyx_t_15, 3, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_15, 4, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyList_SET_ITEM(__pyx_t_15, 5, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  PyList_SET_ITEM(__pyx_t_15, 6, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  PyList_SET_ITEM(__pyx_t_15, 7, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyList_SET_ITEM(__pyx_t_15, 8, __pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_13);
  PyList_SET_ITEM(__pyx_t_15, 9, __pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_14);
  __pyx_t_2 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_13 = 0;
  __pyx_t_14 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_keys));
  __pyx_v_keys = __pyx_t_15;
  __pyx_t_15 = 0;

  /* "CoolProp\State.pyx":311
 *         print 'Call to the c++ layer using integers'
 *         keys = [iH,iP,iS,iU,iC,iO,iV,iL,iMM,iC0]
 *         for key in keys:             # <<<<<<<<<<<<<<
 *             t1=clock()
 *             for i in range(N):
 */
  __pyx_t_15 = ((PyObject *)__pyx_v_keys); __Pyx_INCREF(__pyx_t_15); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_15)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_14 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_5); __Pyx_INCREF(__pyx_t_14); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_14 = PySequence_ITEM(__pyx_t_15, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_14;
    __pyx_t_14 = 0;

    /* "CoolProp\State.pyx":312
 *         keys = [iH,iP,iS,iU,iC,iO,iV,iL,iMM,iC0]
 *         for key in keys:
 *             t1=clock()             # <<<<<<<<<<<<<<
 *             for i in range(N):
 *                 _IProps(key,iT,self.T_,iD,self.rho_,self.iFluid)
 */
    __pyx_t_14 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_XDECREF(__pyx_v_t1);
    __pyx_v_t1 = __pyx_t_14;
    __pyx_t_14 = 0;

    /* "CoolProp\State.pyx":313
 *         for key in keys:
 *             t1=clock()
 *             for i in range(N):             # <<<<<<<<<<<<<<
 *                 _IProps(key,iT,self.T_,iD,self.rho_,self.iFluid)
 *             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":314
 *             t1=clock()
 *             for i in range(N):
 *                 _IProps(key,iT,self.T_,iD,self.rho_,self.iFluid)             # <<<<<<<<<<<<<<
 *             t2=clock()
 *             print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,paras[key],(t2-t1)/N*1e6)
 */
      __pyx_t_16 = __Pyx_PyInt_AsLong(__pyx_v_key); if (unlikely((__pyx_t_16 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      IProps(__pyx_t_16, __pyx_v_8CoolProp_5State_iT, __pyx_v_self->T_, __pyx_v_8CoolProp_5State_iD, __pyx_v_self->rho_, __pyx_v_self->iFluid);
    }

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

    /* "CoolProp\State.pyx":316
 *                 _IProps(key,iT,self.T_,iD,self.rho_,self.iFluid)
 *             t2=clock()
 *             print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,paras[key],(t2-t1)/N*1e6)             # <<<<<<<<<<<<<<
 * 
 *         print 'Call to the Python call layer'
 */
    __pyx_t_14 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_18), __pyx_n_s__format); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_13 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    if (unlikely(((PyObject *)__pyx_v_8CoolProp_5State_paras) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_8CoolProp_5State_paras), __pyx_v_key); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_11 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyNumber_Multiply(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_13);
    PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_12);
    __Pyx_GIVEREF(__pyx_t_12);
    PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_11);
    __pyx_t_13 = 0;
    __pyx_t_12 = 0;
    __pyx_t_11 = 0;
    __pyx_t_11 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    if (__Pyx_PrintOne(0, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "CoolProp\State.pyx":318
 *             print 'Elapsed time for {0:d} calls for "{1:s}" at {2:g} us/call'.format(N,paras[key],(t2-t1)/N*1e6)
 * 
 *         print 'Call to the Python call layer'             # <<<<<<<<<<<<<<
 *         print "'M' involves basically no computational effort and is a good measure of the function call overhead"
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 */
  if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_20)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":319
 * 
 *         print 'Call to the Python call layer'
 *         print "'M' involves basically no computational effort and is a good measure of the function call overhead"             # <<<<<<<<<<<<<<
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 *         for key in keys:
 */
  if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_17)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "CoolProp\State.pyx":320
 *         print 'Call to the Python call layer'
 *         print "'M' involves basically no computational effort and is a good measure of the function call overhead"
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']             # <<<<<<<<<<<<<<
 *         for key in keys:
 *             t1=clock()
 */
  __pyx_t_15 = PyList_New(10); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__H));
  PyList_SET_ITEM(__pyx_t_15, 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_15, 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_15, 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_15, 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_15, 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_15, 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_15, 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_15, 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_15, 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_15, 9, ((PyObject *)__pyx_n_s__C0));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C0));
  __Pyx_DECREF(((PyObject *)__pyx_v_keys));
  __pyx_v_keys = __pyx_t_15;
  __pyx_t_15 = 0;

  /* "CoolProp\State.pyx":321
 *         print "'M' involves basically no computational effort and is a good measure of the function call overhead"
 *         keys = ['H','P','S','U','C','O','V','L','M','C0']
 *         for key in keys:             # <<<<<<<<<<<<<<
 *             t1=clock()
 *             for i in range(N):
 */
  __pyx_t_15 = ((PyObject *)__pyx_v_keys); __Pyx_INCREF(__pyx_t_15); __pyx_t_5 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_15)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_11 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_11 = PySequence_ITEM(__pyx_t_15, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_11;
    __pyx_t_11 = 0;

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

    /* "CoolProp\State.pyx":323
 *         for key in keys:
 *             t1=clock()
 *             for i in range(N):             # <<<<<<<<<<<<<<
 *                 CP.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":324
 *             t1=clock()
 *             for i in range(N):
 *                 CP.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_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__CP); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__Props); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyFloat_FromDouble(__pyx_v_self->T_); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_14 = PyFloat_FromDouble(__pyx_v_self->rho_); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_12 = PyBytes_FromString(__pyx_v_Fluid); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
      __pyx_t_13 = PyTuple_New(6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__T));
      PyTuple_SET_ITEM(__pyx_t_13, 1, ((PyObject *)__pyx_n_s__T));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__T));
      PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_11);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
      PyTuple_SET_ITEM(__pyx_t_13, 3, ((PyObject *)__pyx_n_s__D));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__D));
      PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_t_14);
      __Pyx_GIVEREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_13, 5, ((PyObject *)__pyx_t_12));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
      __pyx_t_11 = 0;
      __pyx_t_14 = 0;
      __pyx_t_12 = 0;
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }

    /* "CoolProp\State.pyx":325
 *             for i in range(N):
 *                 CP.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_12 = PyObject_Call(__pyx_v_clock, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_XDECREF(__pyx_v_t2);
    __pyx_v_t2 = __pyx_t_12;
    __pyx_t_12 = 0;

    /* "CoolProp\State.pyx":326
 *                 CP.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_12 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_18), __pyx_n_s__format); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_10 = PyNumber_Subtract(__pyx_v_t2, __pyx_v_t1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_14 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_11 = __Pyx_PyNumber_Divide(__pyx_t_10, __pyx_t_14); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = PyFloat_FromDouble(1e6); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_10 = PyNumber_Multiply(__pyx_t_11, __pyx_t_14); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_14);
    PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13);
    __Pyx_GIVEREF(__pyx_t_13);
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    __pyx_t_13 = 0;
    __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
    if (__Pyx_PrintOne(0, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 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_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __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_35speed_test(PyObject *__pyx_v_self, PyObject *__pyx_arg_N); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_34speed_test[] = "State.speed_test(self, int N)";
static PyObject *__pyx_pw_8CoolProp_5State_5State_35speed_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 = 291; __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_34speed_test(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self), ((int)__pyx_v_N));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

static PyObject *__pyx_pf_8CoolProp_5State_5State_34speed_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 = 291; __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_37__str__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_36__str__[] = "\n        Return a string representation of the state\n        ";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_8CoolProp_5State_5State_36__str__;
#endif
static PyObject *__pyx_pw_8CoolProp_5State_5State_37__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_5State_36__str__(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":328
 *             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):             # <<<<<<<<<<<<<<
 *         """
 *         Return a string representation of the state
 */

static PyObject *__pyx_pf_8CoolProp_5State_5State_36__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":332
 *         Return a string representation of the state
 *         """
 *         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 = 332; __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 = 332; __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 = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__rho), ((PyObject *)__pyx_kp_s_21)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__h), ((PyObject *)__pyx_kp_s_22)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__u), ((PyObject *)__pyx_kp_s_22)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__s), ((PyObject *)__pyx_kp_s_23)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__visc), ((PyObject *)__pyx_kp_s_24)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__k), ((PyObject *)__pyx_kp_s_25)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cp), ((PyObject *)__pyx_kp_s_23)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cv), ((PyObject *)__pyx_kp_s_23)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dpdT), ((PyObject *)__pyx_kp_s_26)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_units = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":343
 *                '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_3));
  __pyx_v_s = ((PyObject *)__pyx_kp_s_3);

  /* "CoolProp\State.pyx":344
 *                '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 = 344; __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;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "CoolProp\State.pyx":345
 *         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 = (__Pyx_PyDict_Contains(__pyx_v_k, ((PyObject *)__pyx_v_units), Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "CoolProp\State.pyx":346
 *         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_27)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __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 = 346; __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 = 346; __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 = 346; __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 = 346; __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_28)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __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 = 346; __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 = 346; __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_29)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __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 = 346; __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":348
 *                 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_27)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __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 = 348; __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 = 348; __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 = 348; __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 = 348; __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_30)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __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_29)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __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 = 348; __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":349
 *             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 = 349; __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 = 349; __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":351
 *         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_39copy(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 = 351; __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_39copy)) {
      __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 = 351; __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":352
 * 
 *     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":353
 *     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":354
 *         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 = 354; __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 = 354; __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 = 354; __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 = 354; __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 = 354; __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 = 354; __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 = 354; __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":355
 *         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_39copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_8CoolProp_5State_5State_38copy[] = "State.copy(self)";
static PyObject *__pyx_pw_8CoolProp_5State_5State_39copy(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_38copy(((struct __pyx_obj_8CoolProp_5State_State *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":351
 *         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_38copy(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 = 351; __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":7
 * 
 * cdef class State:
 *     cdef readonly bint hasLiquid             # <<<<<<<<<<<<<<
 *     cdef readonly bytes Liquid, Fluid
 *     cdef long iFluid,iParam1,iParam2,iOutput
 */

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 = 7; __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":8
 * cdef class State:
 *     cdef readonly bint hasLiquid
 *     cdef readonly bytes Liquid, Fluid             # <<<<<<<<<<<<<<
 *     cdef long iFluid,iParam1,iParam2,iOutput
 *     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_9rebuildState(PyObject *__pyx_self, PyObject *__pyx_v_d); /*proto*/
static char __pyx_doc_8CoolProp_5State_8rebuildState[] = "rebuildState(d)";
static PyMethodDef __pyx_mdef_8CoolProp_5State_9rebuildState = {__Pyx_NAMESTR("rebuildState"), (PyCFunction)__pyx_pw_8CoolProp_5State_9rebuildState, METH_O, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_8rebuildState)};
static PyObject *__pyx_pw_8CoolProp_5State_9rebuildState(PyObject *__pyx_self, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rebuildState (wrapper)", 0);
  __pyx_r = __pyx_pf_8CoolProp_5State_8rebuildState(__pyx_self, ((PyObject *)__pyx_v_d));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "CoolProp\State.pyx":357
 *         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_8rebuildState(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":358
 * 
 * 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 = 358; __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 = 358; __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 = 358; __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 = 358; __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 = 358; __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 = 358; __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 = 358; __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 = 358; __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":359
 * 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 = 359; __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 = 359; __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":360
 *     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 = 360; __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 = 360; __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":361
 *     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;
}

/* "string.from_py":11
 * 
 * @cname("__pyx_convert_string_from_py_")
 * cdef string __pyx_convert_string_from_py_(object o) except *:             # <<<<<<<<<<<<<<
 *     return string(<char*>o, len(o))
 * 
 */

static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) {
  std::string __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_", 0);

  /* "string.from_py":12
 * @cname("__pyx_convert_string_from_py_")
 * cdef string __pyx_convert_string_from_py_(object o) except *:
 *     return string(<char*>o, len(o))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyBytes_AsString(__pyx_v_o); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = std::string(((char *)__pyx_t_1), __pyx_t_2);
  goto __pyx_L0;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __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, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED 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_CLEAR(p->Liquid);
  Py_CLEAR(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_rho(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8CoolProp_5State_5State_3rho_1__get__(o);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

static PyObject *__pyx_getprop_8CoolProp_5State_5State_Fluid(PyObject *o, CYTHON_UNUSED 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(__pyx_doc_8CoolProp_5State_5State_2__reduce__)},
  {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_5update, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_4update)},
  {__Pyx_NAMESTR("Props"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_7Props, METH_O, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_6Props)},
  {__Pyx_NAMESTR("get_MM"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_9get_MM, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_8get_MM)},
  {__Pyx_NAMESTR("get_rho"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_11get_rho, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_10get_rho)},
  {__Pyx_NAMESTR("get_p"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_13get_p, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_12get_p)},
  {__Pyx_NAMESTR("get_T"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_15get_T, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_14get_T)},
  {__Pyx_NAMESTR("get_h"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_17get_h, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_16get_h)},
  {__Pyx_NAMESTR("get_u"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_19get_u, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_18get_u)},
  {__Pyx_NAMESTR("get_s"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_21get_s, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_20get_s)},
  {__Pyx_NAMESTR("get_cp0"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_23get_cp0, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_22get_cp0)},
  {__Pyx_NAMESTR("get_cp"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_25get_cp, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_24get_cp)},
  {__Pyx_NAMESTR("get_cv"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_27get_cv, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_26get_cv)},
  {__Pyx_NAMESTR("get_visc"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_29get_visc, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_28get_visc)},
  {__Pyx_NAMESTR("get_cond"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_31get_cond, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_30get_cond)},
  {__Pyx_NAMESTR("get_dpdT"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_33get_dpdT, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_32get_dpdT)},
  {__Pyx_NAMESTR("speed_test"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_35speed_test, METH_O, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_34speed_test)},
  {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_8CoolProp_5State_5State_39copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_5State_38copy)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8CoolProp_5State_State[] = {
  {(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, __Pyx_DOCSTR(__pyx_k_31), 0},
  {(char *)"Liquid", __pyx_getprop_8CoolProp_5State_5State_Liquid, 0, __Pyx_DOCSTR(__pyx_k_32), 0},
  {(char *)"Fluid", __pyx_getprop_8CoolProp_5State_5State_Fluid, 0, __Pyx_DOCSTR(__pyx_k_33), 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_37__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("State(bytes Fluid, dict StateDict, double xL=-1.0, Liquid='')\n\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("set_1phase_LUT_params"), (PyCFunction)__pyx_pw_8CoolProp_5State_1set_1phase_LUT_params, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_set_1phase_LUT_params)},
  {__Pyx_NAMESTR("debug"), (PyCFunction)__pyx_pw_8CoolProp_5State_3debug, METH_O, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_2debug)},
  {__Pyx_NAMESTR("LUT"), (PyCFunction)__pyx_pw_8CoolProp_5State_5LUT, METH_O, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_4LUT)},
  {__Pyx_NAMESTR("Props"), (PyCFunction)__pyx_pw_8CoolProp_5State_7Props, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_8CoolProp_5State_6Props)},
  {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_n_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 1},
  {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
  {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
  {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 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_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0},
  {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 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_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
  {&__pyx_n_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 1},
  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
  {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
  {&__pyx_n_b__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 0, 1},
  {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1},
  {&__pyx_n_b__C0, __pyx_k__C0, sizeof(__pyx_k__C0), 0, 0, 0, 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_b__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 0, 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_b__H, __pyx_k__H, sizeof(__pyx_k__H), 0, 0, 0, 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_b__L, __pyx_k__L, sizeof(__pyx_k__L), 0, 0, 0, 1},
  {&__pyx_n_s__L, __pyx_k__L, sizeof(__pyx_k__L), 0, 0, 1, 1},
  {&__pyx_n_s__Liquid, __pyx_k__Liquid, sizeof(__pyx_k__Liquid), 0, 0, 1, 1},
  {&__pyx_n_b__M, __pyx_k__M, sizeof(__pyx_k__M), 0, 0, 0, 1},
  {&__pyx_n_s__M, __pyx_k__M, sizeof(__pyx_k__M), 0, 0, 1, 1},
  {&__pyx_n_b__O, __pyx_k__O, sizeof(__pyx_k__O), 0, 0, 0, 1},
  {&__pyx_n_s__O, __pyx_k__O, sizeof(__pyx_k__O), 0, 0, 1, 1},
  {&__pyx_n_b__P, __pyx_k__P, sizeof(__pyx_k__P), 0, 0, 0, 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__Props, __pyx_k__Props, sizeof(__pyx_k__Props), 0, 0, 1, 1},
  {&__pyx_n_s__Ref, __pyx_k__Ref, sizeof(__pyx_k__Ref), 0, 0, 1, 1},
  {&__pyx_n_b__S, __pyx_k__S, sizeof(__pyx_k__S), 0, 0, 0, 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_b__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 0, 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_b__U, __pyx_k__U, sizeof(__pyx_k__U), 0, 0, 0, 1},
  {&__pyx_n_s__U, __pyx_k__U, sizeof(__pyx_k__U), 0, 0, 1, 1},
  {&__pyx_n_b__V, __pyx_k__V, sizeof(__pyx_k__V), 0, 0, 0, 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__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_b__dpdT, __pyx_k__dpdT, sizeof(__pyx_k__dpdT), 0, 0, 0, 1},
  {&__pyx_n_s__dpdT, __pyx_k__dpdT, sizeof(__pyx_k__dpdT), 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__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__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_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __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 = 183; __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 = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __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":162
 *         #You passed in a dictionary, use the values to update the state
 *         if 'T' not in params:
 *             raise AttributeError('T must be provided in params dict in State.update')             # <<<<<<<<<<<<<<
 * 
 *         #Consume the 'T' key since it is required (TODO?)
 */
  __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_6);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
  PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));

  /* "CoolProp\State.pyx":165
 * 
 *         #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_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_7);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__T));
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_n_s__T));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__T));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));

  /* "CoolProp\State.pyx":199
 *                     raise ValueError(errstr+str(params))
 *             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_9 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_9);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
  PyTuple_SET_ITEM(__pyx_k_tuple_9, 0, ((PyObject *)__pyx_kp_s_8));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9));

  /* "CoolProp\State.pyx":202
 * 
 *         elif self.xL>0 and self.xL<=1:
 *             raise ValueError('xL is out of range - value for xL is [0,1]')             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('xL must be between 0 and 1')
 */
  __pyx_k_tuple_11 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_11);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_10));
  PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, ((PyObject *)__pyx_kp_s_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));

  /* "CoolProp\State.pyx":204
 *             raise ValueError('xL is out of range - value for xL is [0,1]')
 *         else:
 *             raise ValueError('xL must be between 0 and 1')             # <<<<<<<<<<<<<<
 * 
 *     cpdef double Props(self, long iOutput):
 */
  __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_13);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_12));
  PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_kp_s_12));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_12));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));

  /* "CoolProp\State.pyx":208
 *     cpdef double Props(self, long iOutput):
 *         if iOutput<0:
 *             raise ValueError('Your output is invalid')             # <<<<<<<<<<<<<<
 * 
 *         if self.is_CPFluid:
 */
  __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_15);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_14));
  PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_kp_s_14));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_14));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));

  /* "CoolProp\State.pyx":357
 *         return ST
 * 
 * def rebuildState(d):             # <<<<<<<<<<<<<<
 *     S=State(d['Fluid'],{'T':d['T'],'D':d['rho']})
 *     S.xL = d['xL']
 */
  __pyx_k_tuple_34 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_34);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__d));
  PyTuple_SET_ITEM(__pyx_k_tuple_34, 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_34, 1, ((PyObject *)__pyx_n_s__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__S));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));
  __pyx_k_codeobj_35 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_36, __pyx_n_s__rebuildState, 357, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __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;
  std::string __pyx_t_3;
  __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); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  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 ---*/
  __pyx_v_8CoolProp_5State_paras = ((PyObject*)Py_None); Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- 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.Props = (double (*)(struct __pyx_obj_8CoolProp_5State_State *, long, int __pyx_skip_dispatch))__pyx_f_8CoolProp_5State_5State_Props;
  __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 = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_8CoolProp_5State_State, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_8CoolProp_5State_5State_36__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_8CoolProp_5State_5State_36__str__.doc = __pyx_doc_8CoolProp_5State_5State_36__str__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8CoolProp_5State_5State_36__str__;
    }
  }
  #endif
  if (__Pyx_SetVtable(__pyx_type_8CoolProp_5State_State.tp_dict, __pyx_vtabptr_8CoolProp_5State_State) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __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 = 111; __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":26
 * 
 * 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 = 26; __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 = 26; __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 = 26; __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 = 26; __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":28
 * from math import pow as pow_
 * cdef bint _LUT_Enabled
 * import CoolProp as CP             # <<<<<<<<<<<<<<
 * 
 * ## Variables for each of the possible variables
 */
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__CoolProp), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __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 = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":31
 * 
 * ## Variables for each of the possible variables
 * cdef long iMM = _get_param_index('M')             # <<<<<<<<<<<<<<
 * cdef long iT = _get_param_index('T')
 * cdef long iD = _get_param_index('D')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__M)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iMM = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":32
 * ## Variables for each of the possible variables
 * cdef long iMM = _get_param_index('M')
 * cdef long iT = _get_param_index('T')             # <<<<<<<<<<<<<<
 * cdef long iD = _get_param_index('D')
 * cdef long iH = _get_param_index('H')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__T)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iT = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":33
 * cdef long iMM = _get_param_index('M')
 * cdef long iT = _get_param_index('T')
 * cdef long iD = _get_param_index('D')             # <<<<<<<<<<<<<<
 * cdef long iH = _get_param_index('H')
 * cdef long iP = _get_param_index('P')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__D)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iD = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":34
 * cdef long iT = _get_param_index('T')
 * cdef long iD = _get_param_index('D')
 * cdef long iH = _get_param_index('H')             # <<<<<<<<<<<<<<
 * cdef long iP = _get_param_index('P')
 * cdef long iC = _get_param_index('C')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__H)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iH = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":35
 * cdef long iD = _get_param_index('D')
 * cdef long iH = _get_param_index('H')
 * cdef long iP = _get_param_index('P')             # <<<<<<<<<<<<<<
 * cdef long iC = _get_param_index('C')
 * cdef long iC0 = _get_param_index('C0')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__P)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iP = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":36
 * cdef long iH = _get_param_index('H')
 * cdef long iP = _get_param_index('P')
 * cdef long iC = _get_param_index('C')             # <<<<<<<<<<<<<<
 * cdef long iC0 = _get_param_index('C0')
 * cdef long iO = _get_param_index('O')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__C)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iC = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":37
 * cdef long iP = _get_param_index('P')
 * cdef long iC = _get_param_index('C')
 * cdef long iC0 = _get_param_index('C0')             # <<<<<<<<<<<<<<
 * cdef long iO = _get_param_index('O')
 * cdef long iV = _get_param_index('V')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__C0)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iC0 = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":38
 * cdef long iC = _get_param_index('C')
 * cdef long iC0 = _get_param_index('C0')
 * cdef long iO = _get_param_index('O')             # <<<<<<<<<<<<<<
 * cdef long iV = _get_param_index('V')
 * cdef long iL = _get_param_index('L')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__O)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iO = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":39
 * cdef long iC0 = _get_param_index('C0')
 * cdef long iO = _get_param_index('O')
 * cdef long iV = _get_param_index('V')             # <<<<<<<<<<<<<<
 * cdef long iL = _get_param_index('L')
 * cdef long iS = _get_param_index('S')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__V)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iV = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":40
 * cdef long iO = _get_param_index('O')
 * cdef long iV = _get_param_index('V')
 * cdef long iL = _get_param_index('L')             # <<<<<<<<<<<<<<
 * cdef long iS = _get_param_index('S')
 * cdef long iU = _get_param_index('U')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__L)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iL = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":41
 * cdef long iV = _get_param_index('V')
 * cdef long iL = _get_param_index('L')
 * cdef long iS = _get_param_index('S')             # <<<<<<<<<<<<<<
 * cdef long iU = _get_param_index('U')
 * cdef long iDpdT = _get_param_index('dpdT')
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__S)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iS = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":42
 * cdef long iL = _get_param_index('L')
 * cdef long iS = _get_param_index('S')
 * cdef long iU = _get_param_index('U')             # <<<<<<<<<<<<<<
 * cdef long iDpdT = _get_param_index('dpdT')
 * 
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__U)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iU = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":43
 * cdef long iS = _get_param_index('S')
 * cdef long iU = _get_param_index('U')
 * cdef long iDpdT = _get_param_index('dpdT')             # <<<<<<<<<<<<<<
 * 
 * #A dictionary mapping parameter index to string for use with non-CoolProp fluids
 */
  __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_n_b__dpdT)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_8CoolProp_5State_iDpdT = get_param_index(__pyx_t_3);

  /* "CoolProp\State.pyx":46
 * 
 * #A dictionary mapping parameter index to string for use with non-CoolProp fluids
 * cdef dict paras = {iMM : 'M',             # <<<<<<<<<<<<<<
 *                    iT : 'T',
 *                    iH : 'H',
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iMM); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__M)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":47
 * #A dictionary mapping parameter index to string for use with non-CoolProp fluids
 * cdef dict paras = {iMM : 'M',
 *                    iT : 'T',             # <<<<<<<<<<<<<<
 *                    iH : 'H',
 *                    iP : 'P',
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__T)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":48
 * cdef dict paras = {iMM : 'M',
 *                    iT : 'T',
 *                    iH : 'H',             # <<<<<<<<<<<<<<
 *                    iP : 'P',
 *                    iC : 'C',
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iH); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__H)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":49
 *                    iT : 'T',
 *                    iH : 'H',
 *                    iP : 'P',             # <<<<<<<<<<<<<<
 *                    iC : 'C',
 *                    iC0 : 'C0',
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__P)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":50
 *                    iH : 'H',
 *                    iP : 'P',
 *                    iC : 'C',             # <<<<<<<<<<<<<<
 *                    iC0 : 'C0',
 *                    iO : 'O',
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iC); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__C)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":51
 *                    iP : 'P',
 *                    iC : 'C',
 *                    iC0 : 'C0',             # <<<<<<<<<<<<<<
 *                    iO : 'O',
 *                    iV : 'V',
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iC0); 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);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__C0)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":52
 *                    iC : 'C',
 *                    iC0 : 'C0',
 *                    iO : 'O',             # <<<<<<<<<<<<<<
 *                    iV : 'V',
 *                    iL : 'L',
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iO); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":53
 *                    iC0 : 'C0',
 *                    iO : 'O',
 *                    iV : 'V',             # <<<<<<<<<<<<<<
 *                    iL : 'L',
 *                    iS : 'S',
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iV); 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);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__V)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":54
 *                    iO : 'O',
 *                    iV : 'V',
 *                    iL : 'L',             # <<<<<<<<<<<<<<
 *                    iS : 'S',
 *                    iU : 'U',
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__L)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":55
 *                    iV : 'V',
 *                    iL : 'L',
 *                    iS : 'S',             # <<<<<<<<<<<<<<
 *                    iU : 'U',
 *                    iDpdT : 'dpdT'}
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iS); 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);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__S)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":56
 *                    iL : 'L',
 *                    iS : 'S',
 *                    iU : 'U',             # <<<<<<<<<<<<<<
 *                    iDpdT : 'dpdT'}
 * 
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iU); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__U)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "CoolProp\State.pyx":57
 *                    iS : 'S',
 *                    iU : 'U',
 *                    iDpdT : 'dpdT'}             # <<<<<<<<<<<<<<
 * 
 * cpdef int set_1phase_LUT_params(bytes Ref, int nT, int np, double Tmin, double Tmax, double pmin, double pmax):
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_8CoolProp_5State_iDpdT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_n_s__dpdT)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_XGOTREF(((PyObject *)__pyx_v_8CoolProp_5State_paras));
  __Pyx_DECREF(((PyObject *)__pyx_v_8CoolProp_5State_paras));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_v_8CoolProp_5State_paras = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":139
 *         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_4 = (-1.0);

  /* "CoolProp\State.pyx":357
 *         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_9rebuildState, NULL, __pyx_n_s_37); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __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 = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "CoolProp\State.pyx":1
 * #cython: embedsignature = True             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "CoolProp.h":
 */
  __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;

  /* "string.from_py":11
 * 
 * @cname("__pyx_convert_string_from_py_")
 * cdef string __pyx_convert_string_from_py_(object o) except *:             # <<<<<<<<<<<<<<
 *     return string(<char*>o, len(o))
 * 
 */
  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 %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_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_AsString(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;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    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);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    #if PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        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) {
    PyObject* owned_instance = NULL;
    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)) {
        PyObject *args;
        if (!value)
            args = PyTuple_New(0);
        else if (PyTuple_Check(value)) {
            Py_INCREF(value);
            args = value;
        }
        else
            args = PyTuple_Pack(1, value);
        if (!args)
            goto bad;
        owned_instance = PyEval_CallObject(type, args);
        Py_DECREF(args);
        if (!owned_instance)
            goto bad;
        value = owned_instance;
        if (!PyExceptionInstance_Check(value)) {
            PyErr_Format(PyExc_TypeError,
                         "calling %R should have returned an instance of "
                         "BaseException, not %R",
                         type, Py_TYPE(value));
            goto bad;
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause && cause != Py_None) {
        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;
        }
        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:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
#if CYTHON_COMPILING_IN_PYPY
    float_value = PyNumber_Float(obj);
#else
    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);
    }
#endif
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

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 !CYTHON_COMPILING_IN_PYPY && 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) {
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        PyObject* v;
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                goto error;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            goto error;
        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)
            goto error;
        PyFile_SoftSpace(f, 0);
    }
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
}
#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 !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            goto error;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        goto error;
    if (PyFile_WriteString("\n", f) < 0)
        goto error;
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
    /* the line below is just to avoid C 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_Pack(1, o);
    if (unlikely(!arg_tuple))
        return -1;
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}
#endif

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, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED 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_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 */
