1 /* Generated by Cython 0.29.24 */
2 
3 /* BEGIN: Cython Metadata
4 {
5     "distutils": {
6         "define_macros": [
7             [
8                 "CYTHON_TRACE_NOGIL",
9                 "0"
10             ],
11             [
12                 "NPY_NO_DEPRECATED_API",
13                 "NPY_1_7_API_VERSION"
14             ]
15         ],
16         "depends": [
17             "C:\\Anaconda\\lib\\site-packages\\numpy\\core\\include\\numpy\\arrayobject.h",
18             "C:\\Anaconda\\lib\\site-packages\\numpy\\core\\include\\numpy\\arrayscalars.h",
19             "C:\\Anaconda\\lib\\site-packages\\numpy\\core\\include\\numpy\\ndarrayobject.h",
20             "C:\\Anaconda\\lib\\site-packages\\numpy\\core\\include\\numpy\\ndarraytypes.h",
21             "C:\\Anaconda\\lib\\site-packages\\numpy\\core\\include\\numpy\\npy_math.h",
22             "C:\\Anaconda\\lib\\site-packages\\numpy\\core\\include\\numpy\\ufuncobject.h"
23         ],
24         "include_dirs": [
25             "C:\\Anaconda\\lib\\site-packages\\numpy\\core\\include",
26             "statsmodels/src",
27             "C:\\\\Anaconda\\\\lib\\\\site-packages\\\\numpy\\\\core\\\\include"
28         ],
29         "libraries": [
30             "npymath"
31         ],
32         "library_dirs": [
33             "C:\\\\Anaconda\\\\lib\\\\site-packages\\\\numpy\\\\core\\\\lib"
34         ],
35         "name": "statsmodels.tsa.statespace._representation",
36         "sources": [
37             "statsmodels/tsa/statespace/_representation.pyx"
38         ]
39     },
40     "module_name": "statsmodels.tsa.statespace._representation"
41 }
42 END: Cython Metadata */
43 
44 #ifndef PY_SSIZE_T_CLEAN
45 #define PY_SSIZE_T_CLEAN
46 #endif /* PY_SSIZE_T_CLEAN */
47 #include "Python.h"
48 #ifndef Py_PYTHON_H
49     #error Python headers needed to compile C extensions, please install development version of Python.
50 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
51     #error Cython requires Python 2.6+ or Python 3.3+.
52 #else
53 #define CYTHON_ABI "0_29_24"
54 #define CYTHON_HEX_VERSION 0x001D18F0
55 #define CYTHON_FUTURE_DIVISION 1
56 #include <stddef.h>
57 #ifndef offsetof
58   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
59 #endif
60 #if !defined(WIN32) && !defined(MS_WINDOWS)
61   #ifndef __stdcall
62     #define __stdcall
63   #endif
64   #ifndef __cdecl
65     #define __cdecl
66   #endif
67   #ifndef __fastcall
68     #define __fastcall
69   #endif
70 #endif
71 #ifndef DL_IMPORT
72   #define DL_IMPORT(t) t
73 #endif
74 #ifndef DL_EXPORT
75   #define DL_EXPORT(t) t
76 #endif
77 #define __PYX_COMMA ,
78 #ifndef HAVE_LONG_LONG
79   #if PY_VERSION_HEX >= 0x02070000
80     #define HAVE_LONG_LONG
81   #endif
82 #endif
83 #ifndef PY_LONG_LONG
84   #define PY_LONG_LONG LONG_LONG
85 #endif
86 #ifndef Py_HUGE_VAL
87   #define Py_HUGE_VAL HUGE_VAL
88 #endif
89 #ifdef PYPY_VERSION
90   #define CYTHON_COMPILING_IN_PYPY 1
91   #define CYTHON_COMPILING_IN_PYSTON 0
92   #define CYTHON_COMPILING_IN_CPYTHON 0
93   #undef CYTHON_USE_TYPE_SLOTS
94   #define CYTHON_USE_TYPE_SLOTS 0
95   #undef CYTHON_USE_PYTYPE_LOOKUP
96   #define CYTHON_USE_PYTYPE_LOOKUP 0
97   #if PY_VERSION_HEX < 0x03050000
98     #undef CYTHON_USE_ASYNC_SLOTS
99     #define CYTHON_USE_ASYNC_SLOTS 0
100   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
101     #define CYTHON_USE_ASYNC_SLOTS 1
102   #endif
103   #undef CYTHON_USE_PYLIST_INTERNALS
104   #define CYTHON_USE_PYLIST_INTERNALS 0
105   #undef CYTHON_USE_UNICODE_INTERNALS
106   #define CYTHON_USE_UNICODE_INTERNALS 0
107   #undef CYTHON_USE_UNICODE_WRITER
108   #define CYTHON_USE_UNICODE_WRITER 0
109   #undef CYTHON_USE_PYLONG_INTERNALS
110   #define CYTHON_USE_PYLONG_INTERNALS 0
111   #undef CYTHON_AVOID_BORROWED_REFS
112   #define CYTHON_AVOID_BORROWED_REFS 1
113   #undef CYTHON_ASSUME_SAFE_MACROS
114   #define CYTHON_ASSUME_SAFE_MACROS 0
115   #undef CYTHON_UNPACK_METHODS
116   #define CYTHON_UNPACK_METHODS 0
117   #undef CYTHON_FAST_THREAD_STATE
118   #define CYTHON_FAST_THREAD_STATE 0
119   #undef CYTHON_FAST_PYCALL
120   #define CYTHON_FAST_PYCALL 0
121   #undef CYTHON_PEP489_MULTI_PHASE_INIT
122   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
123   #undef CYTHON_USE_TP_FINALIZE
124   #define CYTHON_USE_TP_FINALIZE 0
125   #undef CYTHON_USE_DICT_VERSIONS
126   #define CYTHON_USE_DICT_VERSIONS 0
127   #undef CYTHON_USE_EXC_INFO_STACK
128   #define CYTHON_USE_EXC_INFO_STACK 0
129 #elif defined(PYSTON_VERSION)
130   #define CYTHON_COMPILING_IN_PYPY 0
131   #define CYTHON_COMPILING_IN_PYSTON 1
132   #define CYTHON_COMPILING_IN_CPYTHON 0
133   #ifndef CYTHON_USE_TYPE_SLOTS
134     #define CYTHON_USE_TYPE_SLOTS 1
135   #endif
136   #undef CYTHON_USE_PYTYPE_LOOKUP
137   #define CYTHON_USE_PYTYPE_LOOKUP 0
138   #undef CYTHON_USE_ASYNC_SLOTS
139   #define CYTHON_USE_ASYNC_SLOTS 0
140   #undef CYTHON_USE_PYLIST_INTERNALS
141   #define CYTHON_USE_PYLIST_INTERNALS 0
142   #ifndef CYTHON_USE_UNICODE_INTERNALS
143     #define CYTHON_USE_UNICODE_INTERNALS 1
144   #endif
145   #undef CYTHON_USE_UNICODE_WRITER
146   #define CYTHON_USE_UNICODE_WRITER 0
147   #undef CYTHON_USE_PYLONG_INTERNALS
148   #define CYTHON_USE_PYLONG_INTERNALS 0
149   #ifndef CYTHON_AVOID_BORROWED_REFS
150     #define CYTHON_AVOID_BORROWED_REFS 0
151   #endif
152   #ifndef CYTHON_ASSUME_SAFE_MACROS
153     #define CYTHON_ASSUME_SAFE_MACROS 1
154   #endif
155   #ifndef CYTHON_UNPACK_METHODS
156     #define CYTHON_UNPACK_METHODS 1
157   #endif
158   #undef CYTHON_FAST_THREAD_STATE
159   #define CYTHON_FAST_THREAD_STATE 0
160   #undef CYTHON_FAST_PYCALL
161   #define CYTHON_FAST_PYCALL 0
162   #undef CYTHON_PEP489_MULTI_PHASE_INIT
163   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
164   #undef CYTHON_USE_TP_FINALIZE
165   #define CYTHON_USE_TP_FINALIZE 0
166   #undef CYTHON_USE_DICT_VERSIONS
167   #define CYTHON_USE_DICT_VERSIONS 0
168   #undef CYTHON_USE_EXC_INFO_STACK
169   #define CYTHON_USE_EXC_INFO_STACK 0
170 #else
171   #define CYTHON_COMPILING_IN_PYPY 0
172   #define CYTHON_COMPILING_IN_PYSTON 0
173   #define CYTHON_COMPILING_IN_CPYTHON 1
174   #ifndef CYTHON_USE_TYPE_SLOTS
175     #define CYTHON_USE_TYPE_SLOTS 1
176   #endif
177   #if PY_VERSION_HEX < 0x02070000
178     #undef CYTHON_USE_PYTYPE_LOOKUP
179     #define CYTHON_USE_PYTYPE_LOOKUP 0
180   #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
181     #define CYTHON_USE_PYTYPE_LOOKUP 1
182   #endif
183   #if PY_MAJOR_VERSION < 3
184     #undef CYTHON_USE_ASYNC_SLOTS
185     #define CYTHON_USE_ASYNC_SLOTS 0
186   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
187     #define CYTHON_USE_ASYNC_SLOTS 1
188   #endif
189   #if PY_VERSION_HEX < 0x02070000
190     #undef CYTHON_USE_PYLONG_INTERNALS
191     #define CYTHON_USE_PYLONG_INTERNALS 0
192   #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
193     #define CYTHON_USE_PYLONG_INTERNALS 1
194   #endif
195   #ifndef CYTHON_USE_PYLIST_INTERNALS
196     #define CYTHON_USE_PYLIST_INTERNALS 1
197   #endif
198   #ifndef CYTHON_USE_UNICODE_INTERNALS
199     #define CYTHON_USE_UNICODE_INTERNALS 1
200   #endif
201   #if PY_VERSION_HEX < 0x030300F0
202     #undef CYTHON_USE_UNICODE_WRITER
203     #define CYTHON_USE_UNICODE_WRITER 0
204   #elif !defined(CYTHON_USE_UNICODE_WRITER)
205     #define CYTHON_USE_UNICODE_WRITER 1
206   #endif
207   #ifndef CYTHON_AVOID_BORROWED_REFS
208     #define CYTHON_AVOID_BORROWED_REFS 0
209   #endif
210   #ifndef CYTHON_ASSUME_SAFE_MACROS
211     #define CYTHON_ASSUME_SAFE_MACROS 1
212   #endif
213   #ifndef CYTHON_UNPACK_METHODS
214     #define CYTHON_UNPACK_METHODS 1
215   #endif
216   #ifndef CYTHON_FAST_THREAD_STATE
217     #define CYTHON_FAST_THREAD_STATE 1
218   #endif
219   #ifndef CYTHON_FAST_PYCALL
220     #define CYTHON_FAST_PYCALL 1
221   #endif
222   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
223     #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
224   #endif
225   #ifndef CYTHON_USE_TP_FINALIZE
226     #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
227   #endif
228   #ifndef CYTHON_USE_DICT_VERSIONS
229     #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
230   #endif
231   #ifndef CYTHON_USE_EXC_INFO_STACK
232     #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
233   #endif
234 #endif
235 #if !defined(CYTHON_FAST_PYCCALL)
236 #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
237 #endif
238 #if CYTHON_USE_PYLONG_INTERNALS
239   #include "longintrepr.h"
240   #undef SHIFT
241   #undef BASE
242   #undef MASK
243   #ifdef SIZEOF_VOID_P
244     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
245   #endif
246 #endif
247 #ifndef __has_attribute
248   #define __has_attribute(x) 0
249 #endif
250 #ifndef __has_cpp_attribute
251   #define __has_cpp_attribute(x) 0
252 #endif
253 #ifndef CYTHON_RESTRICT
254   #if defined(__GNUC__)
255     #define CYTHON_RESTRICT __restrict__
256   #elif defined(_MSC_VER) && _MSC_VER >= 1400
257     #define CYTHON_RESTRICT __restrict
258   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
259     #define CYTHON_RESTRICT restrict
260   #else
261     #define CYTHON_RESTRICT
262   #endif
263 #endif
264 #ifndef CYTHON_UNUSED
265 # if defined(__GNUC__)
266 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
267 #     define CYTHON_UNUSED __attribute__ ((__unused__))
268 #   else
269 #     define CYTHON_UNUSED
270 #   endif
271 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
272 #   define CYTHON_UNUSED __attribute__ ((__unused__))
273 # else
274 #   define CYTHON_UNUSED
275 # endif
276 #endif
277 #ifndef CYTHON_MAYBE_UNUSED_VAR
278 #  if defined(__cplusplus)
CYTHON_MAYBE_UNUSED_VAR(const T &)279      template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
280 #  else
281 #    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
282 #  endif
283 #endif
284 #ifndef CYTHON_NCP_UNUSED
285 # if CYTHON_COMPILING_IN_CPYTHON
286 #  define CYTHON_NCP_UNUSED
287 # else
288 #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
289 # endif
290 #endif
291 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
292 #ifdef _MSC_VER
293     #ifndef _MSC_STDINT_H_
294         #if _MSC_VER < 1300
295            typedef unsigned char     uint8_t;
296            typedef unsigned int      uint32_t;
297         #else
298            typedef unsigned __int8   uint8_t;
299            typedef unsigned __int32  uint32_t;
300         #endif
301     #endif
302 #else
303    #include <stdint.h>
304 #endif
305 #ifndef CYTHON_FALLTHROUGH
306   #if defined(__cplusplus) && __cplusplus >= 201103L
307     #if __has_cpp_attribute(fallthrough)
308       #define CYTHON_FALLTHROUGH [[fallthrough]]
309     #elif __has_cpp_attribute(clang::fallthrough)
310       #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
311     #elif __has_cpp_attribute(gnu::fallthrough)
312       #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
313     #endif
314   #endif
315   #ifndef CYTHON_FALLTHROUGH
316     #if __has_attribute(fallthrough)
317       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
318     #else
319       #define CYTHON_FALLTHROUGH
320     #endif
321   #endif
322   #if defined(__clang__ ) && defined(__apple_build_version__)
323     #if __apple_build_version__ < 7000000
324       #undef  CYTHON_FALLTHROUGH
325       #define CYTHON_FALLTHROUGH
326     #endif
327   #endif
328 #endif
329 
330 #ifndef CYTHON_INLINE
331   #if defined(__clang__)
332     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
333   #elif defined(__GNUC__)
334     #define CYTHON_INLINE __inline__
335   #elif defined(_MSC_VER)
336     #define CYTHON_INLINE __inline
337   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
338     #define CYTHON_INLINE inline
339   #else
340     #define CYTHON_INLINE
341   #endif
342 #endif
343 
344 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
345   #define Py_OptimizeFlag 0
346 #endif
347 #define __PYX_BUILD_PY_SSIZE_T "n"
348 #define CYTHON_FORMAT_SSIZE_T "z"
349 #if PY_MAJOR_VERSION < 3
350   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
351   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
352           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
353   #define __Pyx_DefaultClassType PyClass_Type
354 #else
355   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
356 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
357   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
358           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
359 #else
360   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
361           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
362 #endif
363   #define __Pyx_DefaultClassType PyType_Type
364 #endif
365 #ifndef Py_TPFLAGS_CHECKTYPES
366   #define Py_TPFLAGS_CHECKTYPES 0
367 #endif
368 #ifndef Py_TPFLAGS_HAVE_INDEX
369   #define Py_TPFLAGS_HAVE_INDEX 0
370 #endif
371 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
372   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
373 #endif
374 #ifndef Py_TPFLAGS_HAVE_FINALIZE
375   #define Py_TPFLAGS_HAVE_FINALIZE 0
376 #endif
377 #ifndef METH_STACKLESS
378   #define METH_STACKLESS 0
379 #endif
380 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
381   #ifndef METH_FASTCALL
382      #define METH_FASTCALL 0x80
383   #endif
384   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
385   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
386                                                           Py_ssize_t nargs, PyObject *kwnames);
387 #else
388   #define __Pyx_PyCFunctionFast _PyCFunctionFast
389   #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
390 #endif
391 #if CYTHON_FAST_PYCCALL
392 #define __Pyx_PyFastCFunction_Check(func)\
393     ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
394 #else
395 #define __Pyx_PyFastCFunction_Check(func) 0
396 #endif
397 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
398   #define PyObject_Malloc(s)   PyMem_Malloc(s)
399   #define PyObject_Free(p)     PyMem_Free(p)
400   #define PyObject_Realloc(p)  PyMem_Realloc(p)
401 #endif
402 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
403   #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
404   #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
405   #define PyMem_RawFree(p)             PyMem_Free(p)
406 #endif
407 #if CYTHON_COMPILING_IN_PYSTON
408   #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
409   #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
410 #else
411   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
412   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
413 #endif
414 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
415   #define __Pyx_PyThreadState_Current PyThreadState_GET()
416 #elif PY_VERSION_HEX >= 0x03060000
417   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
418 #elif PY_VERSION_HEX >= 0x03000000
419   #define __Pyx_PyThreadState_Current PyThreadState_GET()
420 #else
421   #define __Pyx_PyThreadState_Current _PyThreadState_Current
422 #endif
423 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
424 #include "pythread.h"
425 #define Py_tss_NEEDS_INIT 0
426 typedef int Py_tss_t;
PyThread_tss_create(Py_tss_t * key)427 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
428   *key = PyThread_create_key();
429   return 0;
430 }
PyThread_tss_alloc(void)431 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
432   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
433   *key = Py_tss_NEEDS_INIT;
434   return key;
435 }
PyThread_tss_free(Py_tss_t * key)436 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
437   PyObject_Free(key);
438 }
PyThread_tss_is_created(Py_tss_t * key)439 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
440   return *key != Py_tss_NEEDS_INIT;
441 }
PyThread_tss_delete(Py_tss_t * key)442 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
443   PyThread_delete_key(*key);
444   *key = Py_tss_NEEDS_INIT;
445 }
PyThread_tss_set(Py_tss_t * key,void * value)446 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
447   return PyThread_set_key_value(*key, value);
448 }
PyThread_tss_get(Py_tss_t * key)449 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
450   return PyThread_get_key_value(*key);
451 }
452 #endif
453 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
454 #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
455 #else
456 #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
457 #endif
458 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
459   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
460   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
461 #else
462   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
463   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
464 #endif
465 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
466 #define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
467 #else
468 #define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
469 #endif
470 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
471   #define CYTHON_PEP393_ENABLED 1
472   #if defined(PyUnicode_IS_READY)
473   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
474                                               0 : _PyUnicode_Ready((PyObject *)(op)))
475   #else
476   #define __Pyx_PyUnicode_READY(op)       (0)
477   #endif
478   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
479   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
480   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
481   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
482   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
483   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
484   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
485   #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
486   #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
487   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
488   #else
489   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
490   #endif
491   #else
492   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
493   #endif
494 #else
495   #define CYTHON_PEP393_ENABLED 0
496   #define PyUnicode_1BYTE_KIND  1
497   #define PyUnicode_2BYTE_KIND  2
498   #define PyUnicode_4BYTE_KIND  4
499   #define __Pyx_PyUnicode_READY(op)       (0)
500   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
501   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
502   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
503   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
504   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
505   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
506   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
507   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
508 #endif
509 #if CYTHON_COMPILING_IN_PYPY
510   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
511   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
512 #else
513   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
514   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
515       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
516 #endif
517 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
518   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
519 #endif
520 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
521   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
522 #endif
523 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
524   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
525 #endif
526 #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
527 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
528 #if PY_MAJOR_VERSION >= 3
529   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
530 #else
531   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
532 #endif
533 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
534   #define PyObject_ASCII(o)            PyObject_Repr(o)
535 #endif
536 #if PY_MAJOR_VERSION >= 3
537   #define PyBaseString_Type            PyUnicode_Type
538   #define PyStringObject               PyUnicodeObject
539   #define PyString_Type                PyUnicode_Type
540   #define PyString_Check               PyUnicode_Check
541   #define PyString_CheckExact          PyUnicode_CheckExact
542 #ifndef PyObject_Unicode
543   #define PyObject_Unicode             PyObject_Str
544 #endif
545 #endif
546 #if PY_MAJOR_VERSION >= 3
547   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
548   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
549 #else
550   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
551   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
552 #endif
553 #ifndef PySet_CheckExact
554   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
555 #endif
556 #if PY_VERSION_HEX >= 0x030900A4
557   #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
558   #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
559 #else
560   #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
561   #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
562 #endif
563 #if CYTHON_ASSUME_SAFE_MACROS
564   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
565 #else
566   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
567 #endif
568 #if PY_MAJOR_VERSION >= 3
569   #define PyIntObject                  PyLongObject
570   #define PyInt_Type                   PyLong_Type
571   #define PyInt_Check(op)              PyLong_Check(op)
572   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
573   #define PyInt_FromString             PyLong_FromString
574   #define PyInt_FromUnicode            PyLong_FromUnicode
575   #define PyInt_FromLong               PyLong_FromLong
576   #define PyInt_FromSize_t             PyLong_FromSize_t
577   #define PyInt_FromSsize_t            PyLong_FromSsize_t
578   #define PyInt_AsLong                 PyLong_AsLong
579   #define PyInt_AS_LONG                PyLong_AS_LONG
580   #define PyInt_AsSsize_t              PyLong_AsSsize_t
581   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
582   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
583   #define PyNumber_Int                 PyNumber_Long
584 #endif
585 #if PY_MAJOR_VERSION >= 3
586   #define PyBoolObject                 PyLongObject
587 #endif
588 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
589   #ifndef PyUnicode_InternFromString
590     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
591   #endif
592 #endif
593 #if PY_VERSION_HEX < 0x030200A4
594   typedef long Py_hash_t;
595   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
596   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
597 #else
598   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
599   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
600 #endif
601 #if PY_MAJOR_VERSION >= 3
602   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
603 #else
604   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
605 #endif
606 #if CYTHON_USE_ASYNC_SLOTS
607   #if PY_VERSION_HEX >= 0x030500B1
608     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
609     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
610   #else
611     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
612   #endif
613 #else
614   #define __Pyx_PyType_AsAsync(obj) NULL
615 #endif
616 #ifndef __Pyx_PyAsyncMethodsStruct
617     typedef struct {
618         unaryfunc am_await;
619         unaryfunc am_aiter;
620         unaryfunc am_anext;
621     } __Pyx_PyAsyncMethodsStruct;
622 #endif
623 
624 #if defined(WIN32) || defined(MS_WINDOWS)
625   #define _USE_MATH_DEFINES
626 #endif
627 #include <math.h>
628 #ifdef NAN
629 #define __PYX_NAN() ((float) NAN)
630 #else
__PYX_NAN()631 static CYTHON_INLINE float __PYX_NAN() {
632   float value;
633   memset(&value, 0xFF, sizeof(value));
634   return value;
635 }
636 #endif
637 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
638 #define __Pyx_truncl trunc
639 #else
640 #define __Pyx_truncl truncl
641 #endif
642 
643 #define __PYX_MARK_ERR_POS(f_index, lineno) \
644     { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
645 #define __PYX_ERR(f_index, lineno, Ln_error) \
646     { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
647 
648 #ifndef __PYX_EXTERN_C
649   #ifdef __cplusplus
650     #define __PYX_EXTERN_C extern "C"
651   #else
652     #define __PYX_EXTERN_C extern
653   #endif
654 #endif
655 
656 #define __PYX_HAVE__statsmodels__tsa__statespace___representation
657 #define __PYX_HAVE_API__statsmodels__tsa__statespace___representation
658 /* Early includes */
659 #include <string.h>
660 #include <stdio.h>
661 #include "numpy/arrayobject.h"
662 #include "numpy/ndarrayobject.h"
663 #include "numpy/ndarraytypes.h"
664 #include "numpy/arrayscalars.h"
665 #include "numpy/ufuncobject.h"
666 
667     /* NumPy API declarations from "numpy/__init__.pxd" */
668 
669 #include <math.h>
670 #include "numpy/npy_math.h"
671 #include "pythread.h"
672 #include <stdlib.h>
673 #include "pystate.h"
674 #ifdef _OPENMP
675 #include <omp.h>
676 #endif /* _OPENMP */
677 
678 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
679 #define CYTHON_WITHOUT_ASSERTIONS
680 #endif
681 
682 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
683                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
684 
685 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
686 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
687 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
688 #define __PYX_DEFAULT_STRING_ENCODING ""
689 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
690 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
691 #define __Pyx_uchar_cast(c) ((unsigned char)c)
692 #define __Pyx_long_cast(x) ((long)x)
693 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
694     (sizeof(type) < sizeof(Py_ssize_t))  ||\
695     (sizeof(type) > sizeof(Py_ssize_t) &&\
696           likely(v < (type)PY_SSIZE_T_MAX ||\
697                  v == (type)PY_SSIZE_T_MAX)  &&\
698           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
699                                 v == (type)PY_SSIZE_T_MIN)))  ||\
700     (sizeof(type) == sizeof(Py_ssize_t) &&\
701           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
702                                v == (type)PY_SSIZE_T_MAX)))  )
__Pyx_is_valid_index(Py_ssize_t i,Py_ssize_t limit)703 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
704     return (size_t) i < (size_t) limit;
705 }
706 #if defined (__cplusplus) && __cplusplus >= 201103L
707     #include <cstdlib>
708     #define __Pyx_sst_abs(value) std::abs(value)
709 #elif SIZEOF_INT >= SIZEOF_SIZE_T
710     #define __Pyx_sst_abs(value) abs(value)
711 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
712     #define __Pyx_sst_abs(value) labs(value)
713 #elif defined (_MSC_VER)
714     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
715 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
716     #define __Pyx_sst_abs(value) llabs(value)
717 #elif defined (__GNUC__)
718     #define __Pyx_sst_abs(value) __builtin_llabs(value)
719 #else
720     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
721 #endif
722 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
723 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
724 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
725 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
726 #define __Pyx_PyBytes_FromString        PyBytes_FromString
727 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
728 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
729 #if PY_MAJOR_VERSION < 3
730     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
731     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
732 #else
733     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
734     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
735 #endif
736 #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
737 #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
738 #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
739 #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
740 #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
741 #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
742 #define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
743 #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
744 #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
745 #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
746 #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
747 #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
748 #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
749 #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
750 #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
751 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
__Pyx_Py_UNICODE_strlen(const Py_UNICODE * u)752 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
753     const Py_UNICODE *u_end = u;
754     while (*u_end++) ;
755     return (size_t)(u_end - u - 1);
756 }
757 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
758 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
759 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
760 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
761 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
762 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
763 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
764 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
765 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
766 #define __Pyx_PySequence_Tuple(obj)\
767     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
768 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
769 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
770 #if CYTHON_ASSUME_SAFE_MACROS
771 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
772 #else
773 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
774 #endif
775 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
776 #if PY_MAJOR_VERSION >= 3
777 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
778 #else
779 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
780 #endif
781 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
782 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
783 static int __Pyx_sys_getdefaultencoding_not_ascii;
__Pyx_init_sys_getdefaultencoding_params(void)784 static int __Pyx_init_sys_getdefaultencoding_params(void) {
785     PyObject* sys;
786     PyObject* default_encoding = NULL;
787     PyObject* ascii_chars_u = NULL;
788     PyObject* ascii_chars_b = NULL;
789     const char* default_encoding_c;
790     sys = PyImport_ImportModule("sys");
791     if (!sys) goto bad;
792     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
793     Py_DECREF(sys);
794     if (!default_encoding) goto bad;
795     default_encoding_c = PyBytes_AsString(default_encoding);
796     if (!default_encoding_c) goto bad;
797     if (strcmp(default_encoding_c, "ascii") == 0) {
798         __Pyx_sys_getdefaultencoding_not_ascii = 0;
799     } else {
800         char ascii_chars[128];
801         int c;
802         for (c = 0; c < 128; c++) {
803             ascii_chars[c] = c;
804         }
805         __Pyx_sys_getdefaultencoding_not_ascii = 1;
806         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
807         if (!ascii_chars_u) goto bad;
808         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
809         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
810             PyErr_Format(
811                 PyExc_ValueError,
812                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
813                 default_encoding_c);
814             goto bad;
815         }
816         Py_DECREF(ascii_chars_u);
817         Py_DECREF(ascii_chars_b);
818     }
819     Py_DECREF(default_encoding);
820     return 0;
821 bad:
822     Py_XDECREF(default_encoding);
823     Py_XDECREF(ascii_chars_u);
824     Py_XDECREF(ascii_chars_b);
825     return -1;
826 }
827 #endif
828 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
829 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
830 #else
831 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
832 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
833 static char* __PYX_DEFAULT_STRING_ENCODING;
__Pyx_init_sys_getdefaultencoding_params(void)834 static int __Pyx_init_sys_getdefaultencoding_params(void) {
835     PyObject* sys;
836     PyObject* default_encoding = NULL;
837     char* default_encoding_c;
838     sys = PyImport_ImportModule("sys");
839     if (!sys) goto bad;
840     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
841     Py_DECREF(sys);
842     if (!default_encoding) goto bad;
843     default_encoding_c = PyBytes_AsString(default_encoding);
844     if (!default_encoding_c) goto bad;
845     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
846     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
847     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
848     Py_DECREF(default_encoding);
849     return 0;
850 bad:
851     Py_XDECREF(default_encoding);
852     return -1;
853 }
854 #endif
855 #endif
856 
857 
858 /* Test for GCC > 2.95 */
859 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
860   #define likely(x)   __builtin_expect(!!(x), 1)
861   #define unlikely(x) __builtin_expect(!!(x), 0)
862 #else /* !__GNUC__ or GCC < 2.95 */
863   #define likely(x)   (x)
864   #define unlikely(x) (x)
865 #endif /* __GNUC__ */
__Pyx_pretend_to_initialize(void * ptr)866 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
867 
868 static PyObject *__pyx_m = NULL;
869 static PyObject *__pyx_d;
870 static PyObject *__pyx_b;
871 static PyObject *__pyx_cython_runtime = NULL;
872 static PyObject *__pyx_empty_tuple;
873 static PyObject *__pyx_empty_bytes;
874 static PyObject *__pyx_empty_unicode;
875 static int __pyx_lineno;
876 static int __pyx_clineno = 0;
877 static const char * __pyx_cfilenm= __FILE__;
878 static const char *__pyx_filename;
879 
880 /* Header.proto */
881 #if !defined(CYTHON_CCOMPLEX)
882   #if defined(__cplusplus)
883     #define CYTHON_CCOMPLEX 1
884   #elif defined(_Complex_I)
885     #define CYTHON_CCOMPLEX 1
886   #else
887     #define CYTHON_CCOMPLEX 0
888   #endif
889 #endif
890 #if CYTHON_CCOMPLEX
891   #ifdef __cplusplus
892     #include <complex>
893   #else
894     #include <complex.h>
895   #endif
896 #endif
897 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
898   #undef _Complex_I
899   #define _Complex_I 1.0fj
900 #endif
901 
902 
903 static const char *__pyx_f[] = {
904   "statsmodels\\tsa\\statespace\\_representation.pyx",
905   "statsmodels\\tsa\\statespace\\_representation.pxd",
906   "__init__.pxd",
907   "stringsource",
908   "type.pxd",
909   "statsmodels\\tsa\\statespace\\_initialization.pxd",
910 };
911 /* MemviewSliceStruct.proto */
912 struct __pyx_memoryview_obj;
913 typedef struct {
914   struct __pyx_memoryview_obj *memview;
915   char *data;
916   Py_ssize_t shape[8];
917   Py_ssize_t strides[8];
918   Py_ssize_t suboffsets[8];
919 } __Pyx_memviewslice;
920 #define __Pyx_MemoryView_Len(m)  (m.shape[0])
921 
922 /* Atomics.proto */
923 #include <pythread.h>
924 #ifndef CYTHON_ATOMICS
925     #define CYTHON_ATOMICS 1
926 #endif
927 #define __pyx_atomic_int_type int
928 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
929                     (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
930                     !defined(__i386__)
931     #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
932     #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
933     #ifdef __PYX_DEBUG_ATOMICS
934         #warning "Using GNU atomics"
935     #endif
936 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
937     #include <Windows.h>
938     #undef __pyx_atomic_int_type
939     #define __pyx_atomic_int_type LONG
940     #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
941     #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
942     #ifdef __PYX_DEBUG_ATOMICS
943         #pragma message ("Using MSVC atomics")
944     #endif
945 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
946     #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
947     #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
948     #ifdef __PYX_DEBUG_ATOMICS
949         #warning "Using Intel atomics"
950     #endif
951 #else
952     #undef CYTHON_ATOMICS
953     #define CYTHON_ATOMICS 0
954     #ifdef __PYX_DEBUG_ATOMICS
955         #warning "Not using atomics"
956     #endif
957 #endif
958 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
959 #if CYTHON_ATOMICS
960     #define __pyx_add_acquisition_count(memview)\
961              __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
962     #define __pyx_sub_acquisition_count(memview)\
963             __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
964 #else
965     #define __pyx_add_acquisition_count(memview)\
966             __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
967     #define __pyx_sub_acquisition_count(memview)\
968             __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
969 #endif
970 
971 /* ForceInitThreads.proto */
972 #ifndef __PYX_FORCE_INIT_THREADS
973   #define __PYX_FORCE_INIT_THREADS 0
974 #endif
975 
976 /* NoFastGil.proto */
977 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
978 #define __Pyx_PyGILState_Release PyGILState_Release
979 #define __Pyx_FastGIL_Remember()
980 #define __Pyx_FastGIL_Forget()
981 #define __Pyx_FastGilFuncInit()
982 
983 /* BufferFormatStructs.proto */
984 #define IS_UNSIGNED(type) (((type) -1) > 0)
985 struct __Pyx_StructField_;
986 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
987 typedef struct {
988   const char* name;
989   struct __Pyx_StructField_* fields;
990   size_t size;
991   size_t arraysize[8];
992   int ndim;
993   char typegroup;
994   char is_unsigned;
995   int flags;
996 } __Pyx_TypeInfo;
997 typedef struct __Pyx_StructField_ {
998   __Pyx_TypeInfo* type;
999   const char* name;
1000   size_t offset;
1001 } __Pyx_StructField;
1002 typedef struct {
1003   __Pyx_StructField* field;
1004   size_t parent_offset;
1005 } __Pyx_BufFmt_StackElem;
1006 typedef struct {
1007   __Pyx_StructField root;
1008   __Pyx_BufFmt_StackElem* head;
1009   size_t fmt_offset;
1010   size_t new_count, enc_count;
1011   size_t struct_alignment;
1012   int is_complex;
1013   char enc_type;
1014   char new_packmode;
1015   char enc_packmode;
1016   char is_valid_array;
1017 } __Pyx_BufFmt_Context;
1018 
1019 
1020 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":690
1021  * # in Cython to enable them only on the right systems.
1022  *
1023  * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
1024  * ctypedef npy_int16      int16_t
1025  * ctypedef npy_int32      int32_t
1026  */
1027 typedef npy_int8 __pyx_t_5numpy_int8_t;
1028 
1029 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":691
1030  *
1031  * ctypedef npy_int8       int8_t
1032  * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
1033  * ctypedef npy_int32      int32_t
1034  * ctypedef npy_int64      int64_t
1035  */
1036 typedef npy_int16 __pyx_t_5numpy_int16_t;
1037 
1038 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":692
1039  * ctypedef npy_int8       int8_t
1040  * ctypedef npy_int16      int16_t
1041  * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
1042  * ctypedef npy_int64      int64_t
1043  * #ctypedef npy_int96      int96_t
1044  */
1045 typedef npy_int32 __pyx_t_5numpy_int32_t;
1046 
1047 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":693
1048  * ctypedef npy_int16      int16_t
1049  * ctypedef npy_int32      int32_t
1050  * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
1051  * #ctypedef npy_int96      int96_t
1052  * #ctypedef npy_int128     int128_t
1053  */
1054 typedef npy_int64 __pyx_t_5numpy_int64_t;
1055 
1056 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":697
1057  * #ctypedef npy_int128     int128_t
1058  *
1059  * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
1060  * ctypedef npy_uint16     uint16_t
1061  * ctypedef npy_uint32     uint32_t
1062  */
1063 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1064 
1065 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":698
1066  *
1067  * ctypedef npy_uint8      uint8_t
1068  * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
1069  * ctypedef npy_uint32     uint32_t
1070  * ctypedef npy_uint64     uint64_t
1071  */
1072 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1073 
1074 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":699
1075  * ctypedef npy_uint8      uint8_t
1076  * ctypedef npy_uint16     uint16_t
1077  * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
1078  * ctypedef npy_uint64     uint64_t
1079  * #ctypedef npy_uint96     uint96_t
1080  */
1081 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1082 
1083 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":700
1084  * ctypedef npy_uint16     uint16_t
1085  * ctypedef npy_uint32     uint32_t
1086  * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
1087  * #ctypedef npy_uint96     uint96_t
1088  * #ctypedef npy_uint128    uint128_t
1089  */
1090 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1091 
1092 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":704
1093  * #ctypedef npy_uint128    uint128_t
1094  *
1095  * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
1096  * ctypedef npy_float64    float64_t
1097  * #ctypedef npy_float80    float80_t
1098  */
1099 typedef npy_float32 __pyx_t_5numpy_float32_t;
1100 
1101 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":705
1102  *
1103  * ctypedef npy_float32    float32_t
1104  * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
1105  * #ctypedef npy_float80    float80_t
1106  * #ctypedef npy_float128   float128_t
1107  */
1108 typedef npy_float64 __pyx_t_5numpy_float64_t;
1109 
1110 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":714
1111  * # The int types are mapped a bit surprising --
1112  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1113  * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
1114  * ctypedef npy_longlong   long_t
1115  * ctypedef npy_longlong   longlong_t
1116  */
1117 typedef npy_long __pyx_t_5numpy_int_t;
1118 
1119 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":715
1120  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1121  * ctypedef npy_long       int_t
1122  * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
1123  * ctypedef npy_longlong   longlong_t
1124  *
1125  */
1126 typedef npy_longlong __pyx_t_5numpy_long_t;
1127 
1128 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":716
1129  * ctypedef npy_long       int_t
1130  * ctypedef npy_longlong   long_t
1131  * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
1132  *
1133  * ctypedef npy_ulong      uint_t
1134  */
1135 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1136 
1137 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":718
1138  * ctypedef npy_longlong   longlong_t
1139  *
1140  * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
1141  * ctypedef npy_ulonglong  ulong_t
1142  * ctypedef npy_ulonglong  ulonglong_t
1143  */
1144 typedef npy_ulong __pyx_t_5numpy_uint_t;
1145 
1146 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":719
1147  *
1148  * ctypedef npy_ulong      uint_t
1149  * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
1150  * ctypedef npy_ulonglong  ulonglong_t
1151  *
1152  */
1153 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1154 
1155 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":720
1156  * ctypedef npy_ulong      uint_t
1157  * ctypedef npy_ulonglong  ulong_t
1158  * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
1159  *
1160  * ctypedef npy_intp       intp_t
1161  */
1162 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1163 
1164 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":722
1165  * ctypedef npy_ulonglong  ulonglong_t
1166  *
1167  * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
1168  * ctypedef npy_uintp      uintp_t
1169  *
1170  */
1171 typedef npy_intp __pyx_t_5numpy_intp_t;
1172 
1173 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":723
1174  *
1175  * ctypedef npy_intp       intp_t
1176  * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
1177  *
1178  * ctypedef npy_double     float_t
1179  */
1180 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1181 
1182 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":725
1183  * ctypedef npy_uintp      uintp_t
1184  *
1185  * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
1186  * ctypedef npy_double     double_t
1187  * ctypedef npy_longdouble longdouble_t
1188  */
1189 typedef npy_double __pyx_t_5numpy_float_t;
1190 
1191 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":726
1192  *
1193  * ctypedef npy_double     float_t
1194  * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
1195  * ctypedef npy_longdouble longdouble_t
1196  *
1197  */
1198 typedef npy_double __pyx_t_5numpy_double_t;
1199 
1200 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":727
1201  * ctypedef npy_double     float_t
1202  * ctypedef npy_double     double_t
1203  * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
1204  *
1205  * ctypedef npy_cfloat      cfloat_t
1206  */
1207 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1208 
1209 /* "scipy/linalg/cython_blas.pxd":15
1210  * # The original libraries should be linked directly.
1211  *
1212  * ctypedef float s             # <<<<<<<<<<<<<<
1213  * ctypedef double d
1214  * ctypedef float complex c
1215  */
1216 typedef float __pyx_t_5scipy_6linalg_11cython_blas_s;
1217 
1218 /* "scipy/linalg/cython_blas.pxd":16
1219  *
1220  * ctypedef float s
1221  * ctypedef double d             # <<<<<<<<<<<<<<
1222  * ctypedef float complex c
1223  * ctypedef double complex z
1224  */
1225 typedef double __pyx_t_5scipy_6linalg_11cython_blas_d;
1226 
1227 /* "scipy/linalg/cython_lapack.pxd":15
1228  * # The original libraries should be linked directly.
1229  *
1230  * ctypedef float s             # <<<<<<<<<<<<<<
1231  * ctypedef double d
1232  * ctypedef float complex c
1233  */
1234 typedef float __pyx_t_5scipy_6linalg_13cython_lapack_s;
1235 
1236 /* "scipy/linalg/cython_lapack.pxd":16
1237  *
1238  * ctypedef float s
1239  * ctypedef double d             # <<<<<<<<<<<<<<
1240  * ctypedef float complex c
1241  * ctypedef double complex z
1242  */
1243 typedef double __pyx_t_5scipy_6linalg_13cython_lapack_d;
1244 /* Declarations.proto */
1245 #if CYTHON_CCOMPLEX
1246   #ifdef __cplusplus
1247     typedef ::std::complex< float > __pyx_t_float_complex;
1248   #else
1249     typedef float _Complex __pyx_t_float_complex;
1250   #endif
1251 #else
1252     typedef struct { float real, imag; } __pyx_t_float_complex;
1253 #endif
1254 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1255 
1256 /* Declarations.proto */
1257 #if CYTHON_CCOMPLEX
1258   #ifdef __cplusplus
1259     typedef ::std::complex< double > __pyx_t_double_complex;
1260   #else
1261     typedef double _Complex __pyx_t_double_complex;
1262   #endif
1263 #else
1264     typedef struct { double real, imag; } __pyx_t_double_complex;
1265 #endif
1266 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1267 
1268 
1269 /*--- Type declarations ---*/
1270 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization;
1271 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization;
1272 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization;
1273 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization;
1274 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace;
1275 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace;
1276 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace;
1277 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace;
1278 struct __pyx_array_obj;
1279 struct __pyx_MemviewEnum_obj;
1280 struct __pyx_memoryview_obj;
1281 struct __pyx_memoryviewslice_obj;
1282 
1283 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":729
1284  * ctypedef npy_longdouble longdouble_t
1285  *
1286  * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
1287  * ctypedef npy_cdouble     cdouble_t
1288  * ctypedef npy_clongdouble clongdouble_t
1289  */
1290 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1291 
1292 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":730
1293  *
1294  * ctypedef npy_cfloat      cfloat_t
1295  * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
1296  * ctypedef npy_clongdouble clongdouble_t
1297  *
1298  */
1299 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1300 
1301 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":731
1302  * ctypedef npy_cfloat      cfloat_t
1303  * ctypedef npy_cdouble     cdouble_t
1304  * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
1305  *
1306  * ctypedef npy_cdouble     complex_t
1307  */
1308 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1309 
1310 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":733
1311  * ctypedef npy_clongdouble clongdouble_t
1312  *
1313  * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
1314  *
1315  * cdef inline object PyArray_MultiIterNew1(a):
1316  */
1317 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1318 
1319 /* "scipy/linalg/cython_lapack.pxd":22
1320  * # Function pointer type declarations for
1321  * # gees and gges families of functions.
1322  * ctypedef bint cselect1(c*)             # <<<<<<<<<<<<<<
1323  * ctypedef bint cselect2(c*, c*)
1324  * ctypedef bint dselect2(d*, d*)
1325  */
1326 typedef int __pyx_t_5scipy_6linalg_13cython_lapack_cselect1(__pyx_t_float_complex *);
1327 
1328 /* "scipy/linalg/cython_lapack.pxd":23
1329  * # gees and gges families of functions.
1330  * ctypedef bint cselect1(c*)
1331  * ctypedef bint cselect2(c*, c*)             # <<<<<<<<<<<<<<
1332  * ctypedef bint dselect2(d*, d*)
1333  * ctypedef bint dselect3(d*, d*, d*)
1334  */
1335 typedef int __pyx_t_5scipy_6linalg_13cython_lapack_cselect2(__pyx_t_float_complex *, __pyx_t_float_complex *);
1336 
1337 /* "scipy/linalg/cython_lapack.pxd":24
1338  * ctypedef bint cselect1(c*)
1339  * ctypedef bint cselect2(c*, c*)
1340  * ctypedef bint dselect2(d*, d*)             # <<<<<<<<<<<<<<
1341  * ctypedef bint dselect3(d*, d*, d*)
1342  * ctypedef bint sselect2(s*, s*)
1343  */
1344 typedef int __pyx_t_5scipy_6linalg_13cython_lapack_dselect2(__pyx_t_5scipy_6linalg_13cython_lapack_d *, __pyx_t_5scipy_6linalg_13cython_lapack_d *);
1345 
1346 /* "scipy/linalg/cython_lapack.pxd":25
1347  * ctypedef bint cselect2(c*, c*)
1348  * ctypedef bint dselect2(d*, d*)
1349  * ctypedef bint dselect3(d*, d*, d*)             # <<<<<<<<<<<<<<
1350  * ctypedef bint sselect2(s*, s*)
1351  * ctypedef bint sselect3(s*, s*, s*)
1352  */
1353 typedef int __pyx_t_5scipy_6linalg_13cython_lapack_dselect3(__pyx_t_5scipy_6linalg_13cython_lapack_d *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, __pyx_t_5scipy_6linalg_13cython_lapack_d *);
1354 
1355 /* "scipy/linalg/cython_lapack.pxd":26
1356  * ctypedef bint dselect2(d*, d*)
1357  * ctypedef bint dselect3(d*, d*, d*)
1358  * ctypedef bint sselect2(s*, s*)             # <<<<<<<<<<<<<<
1359  * ctypedef bint sselect3(s*, s*, s*)
1360  * ctypedef bint zselect1(z*)
1361  */
1362 typedef int __pyx_t_5scipy_6linalg_13cython_lapack_sselect2(__pyx_t_5scipy_6linalg_13cython_lapack_s *, __pyx_t_5scipy_6linalg_13cython_lapack_s *);
1363 
1364 /* "scipy/linalg/cython_lapack.pxd":27
1365  * ctypedef bint dselect3(d*, d*, d*)
1366  * ctypedef bint sselect2(s*, s*)
1367  * ctypedef bint sselect3(s*, s*, s*)             # <<<<<<<<<<<<<<
1368  * ctypedef bint zselect1(z*)
1369  * ctypedef bint zselect2(z*, z*)
1370  */
1371 typedef int __pyx_t_5scipy_6linalg_13cython_lapack_sselect3(__pyx_t_5scipy_6linalg_13cython_lapack_s *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, __pyx_t_5scipy_6linalg_13cython_lapack_s *);
1372 
1373 /* "scipy/linalg/cython_lapack.pxd":28
1374  * ctypedef bint sselect2(s*, s*)
1375  * ctypedef bint sselect3(s*, s*, s*)
1376  * ctypedef bint zselect1(z*)             # <<<<<<<<<<<<<<
1377  * ctypedef bint zselect2(z*, z*)
1378  *
1379  */
1380 typedef int __pyx_t_5scipy_6linalg_13cython_lapack_zselect1(__pyx_t_double_complex *);
1381 
1382 /* "scipy/linalg/cython_lapack.pxd":29
1383  * ctypedef bint sselect3(s*, s*, s*)
1384  * ctypedef bint zselect1(z*)
1385  * ctypedef bint zselect2(z*, z*)             # <<<<<<<<<<<<<<
1386  *
1387  * cdef void cbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *rwork, int *lrwork, int *info) nogil
1388  */
1389 typedef int __pyx_t_5scipy_6linalg_13cython_lapack_zselect2(__pyx_t_double_complex *, __pyx_t_double_complex *);
1390 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape;
1391 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape;
1392 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__ssolve_discrete_lyapunov;
1393 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__dsolve_discrete_lyapunov;
1394 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__csolve_discrete_lyapunov;
1395 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__zsolve_discrete_lyapunov;
1396 
1397 /* "statsmodels/tsa/statespace/_tools.pxd":13
1398  * cimport numpy as np
1399  *
1400  * cdef validate_matrix_shape(str name, Py_ssize_t *shape, int nrows, int ncols, object nobs=*)             # <<<<<<<<<<<<<<
1401  *
1402  * cdef validate_vector_shape(str name, Py_ssize_t *shape, int nrows, object nobs=*)
1403  */
1404 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape {
1405   int __pyx_n;
1406   PyObject *nobs;
1407 };
1408 
1409 /* "statsmodels/tsa/statespace/_tools.pxd":15
1410  * cdef validate_matrix_shape(str name, Py_ssize_t *shape, int nrows, int ncols, object nobs=*)
1411  *
1412  * cdef validate_vector_shape(str name, Py_ssize_t *shape, int nrows, object nobs=*)             # <<<<<<<<<<<<<<
1413  *
1414  * cdef int _ssolve_discrete_lyapunov(np.float32_t * a, np.float32_t * q, int n, int complex_step=*) except *
1415  */
1416 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape {
1417   int __pyx_n;
1418   PyObject *nobs;
1419 };
1420 
1421 /* "statsmodels/tsa/statespace/_tools.pxd":17
1422  * cdef validate_vector_shape(str name, Py_ssize_t *shape, int nrows, object nobs=*)
1423  *
1424  * cdef int _ssolve_discrete_lyapunov(np.float32_t * a, np.float32_t * q, int n, int complex_step=*) except *             # <<<<<<<<<<<<<<
1425  * cdef int _dsolve_discrete_lyapunov(np.float64_t * a, np.float64_t * q, int n, int complex_step=*) except *
1426  * cdef int _csolve_discrete_lyapunov(np.complex64_t * a, np.complex64_t * q, int n, int complex_step=*) except *
1427  */
1428 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__ssolve_discrete_lyapunov {
1429   int __pyx_n;
1430   int complex_step;
1431 };
1432 
1433 /* "statsmodels/tsa/statespace/_tools.pxd":18
1434  *
1435  * cdef int _ssolve_discrete_lyapunov(np.float32_t * a, np.float32_t * q, int n, int complex_step=*) except *
1436  * cdef int _dsolve_discrete_lyapunov(np.float64_t * a, np.float64_t * q, int n, int complex_step=*) except *             # <<<<<<<<<<<<<<
1437  * cdef int _csolve_discrete_lyapunov(np.complex64_t * a, np.complex64_t * q, int n, int complex_step=*) except *
1438  * cdef int _zsolve_discrete_lyapunov(np.complex128_t * a, np.complex128_t * q, int n, int complex_step=*) except *
1439  */
1440 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__dsolve_discrete_lyapunov {
1441   int __pyx_n;
1442   int complex_step;
1443 };
1444 
1445 /* "statsmodels/tsa/statespace/_tools.pxd":19
1446  * cdef int _ssolve_discrete_lyapunov(np.float32_t * a, np.float32_t * q, int n, int complex_step=*) except *
1447  * cdef int _dsolve_discrete_lyapunov(np.float64_t * a, np.float64_t * q, int n, int complex_step=*) except *
1448  * cdef int _csolve_discrete_lyapunov(np.complex64_t * a, np.complex64_t * q, int n, int complex_step=*) except *             # <<<<<<<<<<<<<<
1449  * cdef int _zsolve_discrete_lyapunov(np.complex128_t * a, np.complex128_t * q, int n, int complex_step=*) except *
1450  *
1451  */
1452 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__csolve_discrete_lyapunov {
1453   int __pyx_n;
1454   int complex_step;
1455 };
1456 
1457 /* "statsmodels/tsa/statespace/_tools.pxd":20
1458  * cdef int _dsolve_discrete_lyapunov(np.float64_t * a, np.float64_t * q, int n, int complex_step=*) except *
1459  * cdef int _csolve_discrete_lyapunov(np.complex64_t * a, np.complex64_t * q, int n, int complex_step=*) except *
1460  * cdef int _zsolve_discrete_lyapunov(np.complex128_t * a, np.complex128_t * q, int n, int complex_step=*) except *             # <<<<<<<<<<<<<<
1461  *
1462  * cdef int _sldl(np.float32_t * A, int n) except *
1463  */
1464 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__zsolve_discrete_lyapunov {
1465   int __pyx_n;
1466   int complex_step;
1467 };
1468 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize;
1469 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize_stationary_constant;
1470 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize_stationary_stationary_cov;
1471 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize;
1472 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize_stationary_constant;
1473 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize_stationary_stationary_cov;
1474 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize;
1475 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize_stationary_constant;
1476 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize_stationary_stationary_cov;
1477 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize;
1478 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize_stationary_constant;
1479 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize_stationary_stationary_cov;
1480 
1481 /* "statsmodels/tsa/statespace/_initialization.pxd":26
1482  *     cdef np.float32_t [::1, :] _tmp_selected_state_cov
1483  *
1484  *     cpdef int initialize(self, inititialization_type, int offset,             # <<<<<<<<<<<<<<
1485  *                          sStatespace model,
1486  *                          np.float32_t [:] initial_state_mean,
1487  */
1488 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize {
1489   int __pyx_n;
1490   int complex_step;
1491 };
1492 
1493 /* "statsmodels/tsa/statespace/_initialization.pxd":38
1494  *     cdef int initialize_diffuse(self, int offset, np.float32_t [::1, :] initial_diffuse_state_cov) except 1
1495  *     cdef int initialize_approximate_diffuse(self, int offset, np.float32_t [::1, :] initial_stationary_state_cov) except 1
1496  *     cdef int initialize_stationary_constant(self, int offset, sStatespace model, np.float32_t [:] initial_state_mean, int complex_step=*) except 1             # <<<<<<<<<<<<<<
1497  *     cdef int initialize_stationary_stationary_cov(self, int offset, sStatespace model, np.float32_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
1498  *
1499  */
1500 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize_stationary_constant {
1501   int __pyx_n;
1502   int complex_step;
1503 };
1504 
1505 /* "statsmodels/tsa/statespace/_initialization.pxd":39
1506  *     cdef int initialize_approximate_diffuse(self, int offset, np.float32_t [::1, :] initial_stationary_state_cov) except 1
1507  *     cdef int initialize_stationary_constant(self, int offset, sStatespace model, np.float32_t [:] initial_state_mean, int complex_step=*) except 1
1508  *     cdef int initialize_stationary_stationary_cov(self, int offset, sStatespace model, np.float32_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1             # <<<<<<<<<<<<<<
1509  *
1510  * cdef class dInitialization(object):
1511  */
1512 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize_stationary_stationary_cov {
1513   int __pyx_n;
1514   int complex_step;
1515 };
1516 
1517 /* "statsmodels/tsa/statespace/_initialization.pxd":50
1518  *     cdef np.float64_t [::1, :] _tmp_selected_state_cov
1519  *
1520  *     cpdef int initialize(self, inititialization_type, int offset,             # <<<<<<<<<<<<<<
1521  *                          dStatespace model,
1522  *                          np.float64_t [:] initial_state_mean,
1523  */
1524 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize {
1525   int __pyx_n;
1526   int complex_step;
1527 };
1528 
1529 /* "statsmodels/tsa/statespace/_initialization.pxd":62
1530  *     cdef int initialize_diffuse(self, int offset, np.float64_t [::1, :] initial_diffuse_state_cov) except 1
1531  *     cdef int initialize_approximate_diffuse(self, int offset, np.float64_t [::1, :] initial_stationary_state_cov) except 1
1532  *     cdef int initialize_stationary_constant(self, int offset, dStatespace model, np.float64_t [:] initial_state_mean, int complex_step=*) except 1             # <<<<<<<<<<<<<<
1533  *     cdef int initialize_stationary_stationary_cov(self, int offset, dStatespace model, np.float64_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
1534  *
1535  */
1536 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize_stationary_constant {
1537   int __pyx_n;
1538   int complex_step;
1539 };
1540 
1541 /* "statsmodels/tsa/statespace/_initialization.pxd":63
1542  *     cdef int initialize_approximate_diffuse(self, int offset, np.float64_t [::1, :] initial_stationary_state_cov) except 1
1543  *     cdef int initialize_stationary_constant(self, int offset, dStatespace model, np.float64_t [:] initial_state_mean, int complex_step=*) except 1
1544  *     cdef int initialize_stationary_stationary_cov(self, int offset, dStatespace model, np.float64_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1             # <<<<<<<<<<<<<<
1545  *
1546  * cdef class cInitialization(object):
1547  */
1548 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize_stationary_stationary_cov {
1549   int __pyx_n;
1550   int complex_step;
1551 };
1552 
1553 /* "statsmodels/tsa/statespace/_initialization.pxd":74
1554  *     cdef np.complex64_t [::1, :] _tmp_selected_state_cov
1555  *
1556  *     cpdef int initialize(self, inititialization_type, int offset,             # <<<<<<<<<<<<<<
1557  *                          cStatespace model,
1558  *                          np.complex64_t [:] initial_state_mean,
1559  */
1560 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize {
1561   int __pyx_n;
1562   int complex_step;
1563 };
1564 
1565 /* "statsmodels/tsa/statespace/_initialization.pxd":86
1566  *     cdef int initialize_diffuse(self, int offset, np.complex64_t [::1, :] initial_diffuse_state_cov) except 1
1567  *     cdef int initialize_approximate_diffuse(self, int offset, np.complex64_t [::1, :] initial_stationary_state_cov) except 1
1568  *     cdef int initialize_stationary_constant(self, int offset, cStatespace model, np.complex64_t [:] initial_state_mean, int complex_step=*) except 1             # <<<<<<<<<<<<<<
1569  *     cdef int initialize_stationary_stationary_cov(self, int offset, cStatespace model, np.complex64_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
1570  *
1571  */
1572 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize_stationary_constant {
1573   int __pyx_n;
1574   int complex_step;
1575 };
1576 
1577 /* "statsmodels/tsa/statespace/_initialization.pxd":87
1578  *     cdef int initialize_approximate_diffuse(self, int offset, np.complex64_t [::1, :] initial_stationary_state_cov) except 1
1579  *     cdef int initialize_stationary_constant(self, int offset, cStatespace model, np.complex64_t [:] initial_state_mean, int complex_step=*) except 1
1580  *     cdef int initialize_stationary_stationary_cov(self, int offset, cStatespace model, np.complex64_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1             # <<<<<<<<<<<<<<
1581  *
1582  * cdef class zInitialization(object):
1583  */
1584 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize_stationary_stationary_cov {
1585   int __pyx_n;
1586   int complex_step;
1587 };
1588 
1589 /* "statsmodels/tsa/statespace/_initialization.pxd":98
1590  *     cdef np.complex128_t [::1, :] _tmp_selected_state_cov
1591  *
1592  *     cpdef int initialize(self, inititialization_type, int offset,             # <<<<<<<<<<<<<<
1593  *                          zStatespace model,
1594  *                          np.complex128_t [:] initial_state_mean,
1595  */
1596 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize {
1597   int __pyx_n;
1598   int complex_step;
1599 };
1600 
1601 /* "statsmodels/tsa/statespace/_initialization.pxd":110
1602  *     cdef int initialize_diffuse(self, int offset, np.complex128_t [::1, :] initial_diffuse_state_cov) except 1
1603  *     cdef int initialize_approximate_diffuse(self, int offset, np.complex128_t [::1, :] initial_stationary_state_cov) except 1
1604  *     cdef int initialize_stationary_constant(self, int offset, zStatespace model, np.complex128_t [:] initial_state_mean, int complex_step=*) except 1             # <<<<<<<<<<<<<<
1605  *     cdef int initialize_stationary_stationary_cov(self, int offset, zStatespace model, np.complex128_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
1606  */
1607 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize_stationary_constant {
1608   int __pyx_n;
1609   int complex_step;
1610 };
1611 
1612 /* "statsmodels/tsa/statespace/_initialization.pxd":111
1613  *     cdef int initialize_approximate_diffuse(self, int offset, np.complex128_t [::1, :] initial_stationary_state_cov) except 1
1614  *     cdef int initialize_stationary_constant(self, int offset, zStatespace model, np.complex128_t [:] initial_state_mean, int complex_step=*) except 1
1615  *     cdef int initialize_stationary_stationary_cov(self, int offset, zStatespace model, np.complex128_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1             # <<<<<<<<<<<<<<
1616  */
1617 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize_stationary_stationary_cov {
1618   int __pyx_n;
1619   int complex_step;
1620 };
1621 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek;
1622 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform;
1623 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize;
1624 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse;
1625 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek;
1626 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform;
1627 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize;
1628 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse;
1629 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek;
1630 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform;
1631 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize;
1632 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse;
1633 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek;
1634 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform;
1635 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize;
1636 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse;
1637 
1638 /* "statsmodels/tsa/statespace/_representation.pxd":79
1639  *
1640  *     # Functions
1641  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*)             # <<<<<<<<<<<<<<
1642  *
1643  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef)
1644  */
1645 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek {
1646   int __pyx_n;
1647   unsigned int reset;
1648 };
1649 
1650 /* "statsmodels/tsa/statespace/_representation.pxd":86
1651  *     cdef void _select_missing_entire_obs(self, unsigned int t)
1652  *     cdef void _select_missing_partial_obs(self, unsigned int t)
1653  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1654  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1655  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1656  */
1657 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform {
1658   int __pyx_n;
1659   unsigned int reset;
1660 };
1661 
1662 /* "statsmodels/tsa/statespace/_representation.pxd":87
1663  *     cdef void _select_missing_partial_obs(self, unsigned int t)
1664  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *
1665  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1666  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1667  *
1668  */
1669 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize {
1670   int __pyx_n;
1671   unsigned int reset;
1672 };
1673 
1674 /* "statsmodels/tsa/statespace/_representation.pxd":88
1675  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *
1676  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1677  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1678  *
1679  * cdef class dStatespace(object):
1680  */
1681 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse {
1682   int __pyx_n;
1683   unsigned int reset;
1684 };
1685 
1686 /* "statsmodels/tsa/statespace/_representation.pxd":156
1687  *
1688  *     # Functions
1689  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*)             # <<<<<<<<<<<<<<
1690  *
1691  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef)
1692  */
1693 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek {
1694   int __pyx_n;
1695   unsigned int reset;
1696 };
1697 
1698 /* "statsmodels/tsa/statespace/_representation.pxd":163
1699  *     cdef void _select_missing_entire_obs(self, unsigned int t)
1700  *     cdef void _select_missing_partial_obs(self, unsigned int t)
1701  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1702  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1703  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1704  */
1705 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform {
1706   int __pyx_n;
1707   unsigned int reset;
1708 };
1709 
1710 /* "statsmodels/tsa/statespace/_representation.pxd":164
1711  *     cdef void _select_missing_partial_obs(self, unsigned int t)
1712  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *
1713  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1714  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1715  *
1716  */
1717 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize {
1718   int __pyx_n;
1719   unsigned int reset;
1720 };
1721 
1722 /* "statsmodels/tsa/statespace/_representation.pxd":165
1723  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *
1724  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1725  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1726  *
1727  * cdef class cStatespace(object):
1728  */
1729 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse {
1730   int __pyx_n;
1731   unsigned int reset;
1732 };
1733 
1734 /* "statsmodels/tsa/statespace/_representation.pxd":233
1735  *
1736  *     # Functions
1737  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*)             # <<<<<<<<<<<<<<
1738  *
1739  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef)
1740  */
1741 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek {
1742   int __pyx_n;
1743   unsigned int reset;
1744 };
1745 
1746 /* "statsmodels/tsa/statespace/_representation.pxd":240
1747  *     cdef void _select_missing_entire_obs(self, unsigned int t)
1748  *     cdef void _select_missing_partial_obs(self, unsigned int t)
1749  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1750  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1751  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1752  */
1753 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform {
1754   int __pyx_n;
1755   unsigned int reset;
1756 };
1757 
1758 /* "statsmodels/tsa/statespace/_representation.pxd":241
1759  *     cdef void _select_missing_partial_obs(self, unsigned int t)
1760  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *
1761  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1762  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1763  *
1764  */
1765 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize {
1766   int __pyx_n;
1767   unsigned int reset;
1768 };
1769 
1770 /* "statsmodels/tsa/statespace/_representation.pxd":242
1771  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *
1772  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1773  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1774  *
1775  * cdef class zStatespace(object):
1776  */
1777 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse {
1778   int __pyx_n;
1779   unsigned int reset;
1780 };
1781 
1782 /* "statsmodels/tsa/statespace/_representation.pxd":310
1783  *
1784  *     # Functions
1785  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*)             # <<<<<<<<<<<<<<
1786  *
1787  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef)
1788  */
1789 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek {
1790   int __pyx_n;
1791   unsigned int reset;
1792 };
1793 
1794 /* "statsmodels/tsa/statespace/_representation.pxd":317
1795  *     cdef void _select_missing_entire_obs(self, unsigned int t)
1796  *     cdef void _select_missing_partial_obs(self, unsigned int t)
1797  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1798  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1799  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1800  */
1801 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform {
1802   int __pyx_n;
1803   unsigned int reset;
1804 };
1805 
1806 /* "statsmodels/tsa/statespace/_representation.pxd":318
1807  *     cdef void _select_missing_partial_obs(self, unsigned int t)
1808  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *
1809  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1810  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1811  *
1812  */
1813 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize {
1814   int __pyx_n;
1815   unsigned int reset;
1816 };
1817 
1818 /* "statsmodels/tsa/statespace/_representation.pxd":319
1819  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=*) except *
1820  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1821  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *             # <<<<<<<<<<<<<<
1822  *
1823  * cdef int sselect_cov(int k, int k_posdef,
1824  */
1825 struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse {
1826   int __pyx_n;
1827   unsigned int reset;
1828 };
1829 
1830 /* "statsmodels/tsa/statespace/_initialization.pxd":17
1831  * )
1832  *
1833  * cdef class sInitialization(object):             # <<<<<<<<<<<<<<
1834  *     cdef readonly int k_states
1835  *     cdef public np.float64_t approximate_diffuse_variance
1836  */
1837 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization {
1838   PyObject_HEAD
1839   struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *__pyx_vtab;
1840   int k_states;
1841   __pyx_t_5numpy_float64_t approximate_diffuse_variance;
1842   __Pyx_memviewslice constant;
1843   __Pyx_memviewslice stationary_cov;
1844   __Pyx_memviewslice _tmp_transition;
1845   __Pyx_memviewslice _tmp_selected_state_cov;
1846 };
1847 
1848 
1849 /* "statsmodels/tsa/statespace/_initialization.pxd":41
1850  *     cdef int initialize_stationary_stationary_cov(self, int offset, sStatespace model, np.float32_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
1851  *
1852  * cdef class dInitialization(object):             # <<<<<<<<<<<<<<
1853  *     cdef readonly int k_states
1854  *     cdef public np.float64_t approximate_diffuse_variance
1855  */
1856 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization {
1857   PyObject_HEAD
1858   struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *__pyx_vtab;
1859   int k_states;
1860   __pyx_t_5numpy_float64_t approximate_diffuse_variance;
1861   __Pyx_memviewslice constant;
1862   __Pyx_memviewslice stationary_cov;
1863   __Pyx_memviewslice _tmp_transition;
1864   __Pyx_memviewslice _tmp_selected_state_cov;
1865 };
1866 
1867 
1868 /* "statsmodels/tsa/statespace/_initialization.pxd":65
1869  *     cdef int initialize_stationary_stationary_cov(self, int offset, dStatespace model, np.float64_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
1870  *
1871  * cdef class cInitialization(object):             # <<<<<<<<<<<<<<
1872  *     cdef readonly int k_states
1873  *     cdef public np.float64_t approximate_diffuse_variance
1874  */
1875 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization {
1876   PyObject_HEAD
1877   struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *__pyx_vtab;
1878   int k_states;
1879   __pyx_t_5numpy_float64_t approximate_diffuse_variance;
1880   __Pyx_memviewslice constant;
1881   __Pyx_memviewslice stationary_cov;
1882   __Pyx_memviewslice _tmp_transition;
1883   __Pyx_memviewslice _tmp_selected_state_cov;
1884 };
1885 
1886 
1887 /* "statsmodels/tsa/statespace/_initialization.pxd":89
1888  *     cdef int initialize_stationary_stationary_cov(self, int offset, cStatespace model, np.complex64_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
1889  *
1890  * cdef class zInitialization(object):             # <<<<<<<<<<<<<<
1891  *     cdef readonly int k_states
1892  *     cdef public np.float64_t approximate_diffuse_variance
1893  */
1894 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization {
1895   PyObject_HEAD
1896   struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *__pyx_vtab;
1897   int k_states;
1898   __pyx_t_5numpy_float64_t approximate_diffuse_variance;
1899   __Pyx_memviewslice constant;
1900   __Pyx_memviewslice stationary_cov;
1901   __Pyx_memviewslice _tmp_transition;
1902   __Pyx_memviewslice _tmp_selected_state_cov;
1903 };
1904 
1905 
1906 /* "statsmodels/tsa/statespace/_representation.pxd":13
1907  * cimport numpy as np
1908  *
1909  * cdef class sStatespace(object):             # <<<<<<<<<<<<<<
1910  *     # Statespace dimensions
1911  *     cdef readonly int nobs, k_endog, k_states, k_posdef
1912  */
1913 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace {
1914   PyObject_HEAD
1915   struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_vtab;
1916   int nobs;
1917   int k_endog;
1918   int k_states;
1919   int k_posdef;
1920   __Pyx_memviewslice obs;
1921   __Pyx_memviewslice obs_intercept;
1922   __Pyx_memviewslice state_intercept;
1923   __Pyx_memviewslice initial_state;
1924   __Pyx_memviewslice initial_state_cov;
1925   __Pyx_memviewslice initial_diffuse_state_cov;
1926   __Pyx_memviewslice design;
1927   __Pyx_memviewslice obs_cov;
1928   __Pyx_memviewslice transition;
1929   __Pyx_memviewslice selection;
1930   __Pyx_memviewslice state_cov;
1931   __Pyx_memviewslice selected_state_cov;
1932   __Pyx_memviewslice missing;
1933   __Pyx_memviewslice nmissing;
1934   int has_missing;
1935   int time_invariant;
1936   int initialized;
1937   int initialized_diffuse;
1938   int initialized_stationary;
1939   int diagonal_obs_cov;
1940   int _diagonal_obs_cov;
1941   int subset_design;
1942   int companion_transition;
1943   __Pyx_memviewslice tmp;
1944   __Pyx_memviewslice selected_obs;
1945   __Pyx_memviewslice selected_obs_intercept;
1946   __Pyx_memviewslice selected_design;
1947   __Pyx_memviewslice selected_obs_cov;
1948   __Pyx_memviewslice transform_cholesky;
1949   __Pyx_memviewslice transform_obs_cov;
1950   __Pyx_memviewslice transform_design;
1951   __Pyx_memviewslice transform_obs_intercept;
1952   __pyx_t_5numpy_float32_t transform_determinant;
1953   __Pyx_memviewslice collapse_obs;
1954   __Pyx_memviewslice collapse_obs_tmp;
1955   __Pyx_memviewslice collapse_design;
1956   __Pyx_memviewslice collapse_obs_cov;
1957   __Pyx_memviewslice collapse_cholesky;
1958   __pyx_t_5numpy_float32_t collapse_loglikelihood;
1959   __pyx_t_5numpy_float32_t *_obs;
1960   __pyx_t_5numpy_float32_t *_design;
1961   __pyx_t_5numpy_float32_t *_obs_intercept;
1962   __pyx_t_5numpy_float32_t *_obs_cov;
1963   __pyx_t_5numpy_float32_t *_transition;
1964   __pyx_t_5numpy_float32_t *_state_intercept;
1965   __pyx_t_5numpy_float32_t *_selection;
1966   __pyx_t_5numpy_float32_t *_state_cov;
1967   __pyx_t_5numpy_float32_t *_selected_state_cov;
1968   __pyx_t_5numpy_float32_t *_initial_state;
1969   __pyx_t_5numpy_float32_t *_initial_state_cov;
1970   __pyx_t_5numpy_float32_t *_initial_diffuse_state_cov;
1971   int t;
1972   int _previous_t;
1973   int _k_endog;
1974   int _k_states;
1975   int _k_posdef;
1976   int _k_endog2;
1977   int _k_states2;
1978   int _k_posdef2;
1979   int _k_endogstates;
1980   int _k_statesposdef;
1981   int _nmissing;
1982 };
1983 
1984 
1985 /* "statsmodels/tsa/statespace/_representation.pxd":90
1986  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
1987  *
1988  * cdef class dStatespace(object):             # <<<<<<<<<<<<<<
1989  *     # Statespace dimensions
1990  *     cdef readonly int nobs, k_endog, k_states, k_posdef
1991  */
1992 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace {
1993   PyObject_HEAD
1994   struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_vtab;
1995   int nobs;
1996   int k_endog;
1997   int k_states;
1998   int k_posdef;
1999   __Pyx_memviewslice obs;
2000   __Pyx_memviewslice obs_intercept;
2001   __Pyx_memviewslice state_intercept;
2002   __Pyx_memviewslice initial_state;
2003   __Pyx_memviewslice initial_state_cov;
2004   __Pyx_memviewslice initial_diffuse_state_cov;
2005   __Pyx_memviewslice design;
2006   __Pyx_memviewslice obs_cov;
2007   __Pyx_memviewslice transition;
2008   __Pyx_memviewslice selection;
2009   __Pyx_memviewslice state_cov;
2010   __Pyx_memviewslice selected_state_cov;
2011   __Pyx_memviewslice missing;
2012   __Pyx_memviewslice nmissing;
2013   int has_missing;
2014   int time_invariant;
2015   int initialized;
2016   int initialized_diffuse;
2017   int initialized_stationary;
2018   int diagonal_obs_cov;
2019   int _diagonal_obs_cov;
2020   int subset_design;
2021   int companion_transition;
2022   __Pyx_memviewslice tmp;
2023   __Pyx_memviewslice selected_obs;
2024   __Pyx_memviewslice selected_obs_intercept;
2025   __Pyx_memviewslice selected_design;
2026   __Pyx_memviewslice selected_obs_cov;
2027   __Pyx_memviewslice transform_cholesky;
2028   __Pyx_memviewslice transform_obs_cov;
2029   __Pyx_memviewslice transform_design;
2030   __Pyx_memviewslice transform_obs_intercept;
2031   __pyx_t_5numpy_float64_t transform_determinant;
2032   __Pyx_memviewslice collapse_obs;
2033   __Pyx_memviewslice collapse_obs_tmp;
2034   __Pyx_memviewslice collapse_design;
2035   __Pyx_memviewslice collapse_obs_cov;
2036   __Pyx_memviewslice collapse_cholesky;
2037   __pyx_t_5numpy_float64_t collapse_loglikelihood;
2038   __pyx_t_5numpy_float64_t *_obs;
2039   __pyx_t_5numpy_float64_t *_design;
2040   __pyx_t_5numpy_float64_t *_obs_intercept;
2041   __pyx_t_5numpy_float64_t *_obs_cov;
2042   __pyx_t_5numpy_float64_t *_transition;
2043   __pyx_t_5numpy_float64_t *_state_intercept;
2044   __pyx_t_5numpy_float64_t *_selection;
2045   __pyx_t_5numpy_float64_t *_state_cov;
2046   __pyx_t_5numpy_float64_t *_selected_state_cov;
2047   __pyx_t_5numpy_float64_t *_initial_state;
2048   __pyx_t_5numpy_float64_t *_initial_state_cov;
2049   __pyx_t_5numpy_float64_t *_initial_diffuse_state_cov;
2050   int t;
2051   int _previous_t;
2052   int _k_endog;
2053   int _k_states;
2054   int _k_posdef;
2055   int _k_endog2;
2056   int _k_states2;
2057   int _k_posdef2;
2058   int _k_endogstates;
2059   int _k_statesposdef;
2060   int _nmissing;
2061 };
2062 
2063 
2064 /* "statsmodels/tsa/statespace/_representation.pxd":167
2065  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
2066  *
2067  * cdef class cStatespace(object):             # <<<<<<<<<<<<<<
2068  *     # Statespace dimensions
2069  *     cdef readonly int nobs, k_endog, k_states, k_posdef
2070  */
2071 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace {
2072   PyObject_HEAD
2073   struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_vtab;
2074   int nobs;
2075   int k_endog;
2076   int k_states;
2077   int k_posdef;
2078   __Pyx_memviewslice obs;
2079   __Pyx_memviewslice obs_intercept;
2080   __Pyx_memviewslice state_intercept;
2081   __Pyx_memviewslice initial_state;
2082   __Pyx_memviewslice initial_state_cov;
2083   __Pyx_memviewslice initial_diffuse_state_cov;
2084   __Pyx_memviewslice design;
2085   __Pyx_memviewslice obs_cov;
2086   __Pyx_memviewslice transition;
2087   __Pyx_memviewslice selection;
2088   __Pyx_memviewslice state_cov;
2089   __Pyx_memviewslice selected_state_cov;
2090   __Pyx_memviewslice missing;
2091   __Pyx_memviewslice nmissing;
2092   int has_missing;
2093   int time_invariant;
2094   int initialized;
2095   int initialized_diffuse;
2096   int initialized_stationary;
2097   int diagonal_obs_cov;
2098   int _diagonal_obs_cov;
2099   int subset_design;
2100   int companion_transition;
2101   __Pyx_memviewslice tmp;
2102   __Pyx_memviewslice selected_obs;
2103   __Pyx_memviewslice selected_obs_intercept;
2104   __Pyx_memviewslice selected_design;
2105   __Pyx_memviewslice selected_obs_cov;
2106   __Pyx_memviewslice transform_cholesky;
2107   __Pyx_memviewslice transform_obs_cov;
2108   __Pyx_memviewslice transform_design;
2109   __Pyx_memviewslice transform_obs_intercept;
2110   __pyx_t_float_complex transform_determinant;
2111   __Pyx_memviewslice collapse_obs;
2112   __Pyx_memviewslice collapse_obs_tmp;
2113   __Pyx_memviewslice collapse_design;
2114   __Pyx_memviewslice collapse_obs_cov;
2115   __Pyx_memviewslice collapse_cholesky;
2116   __pyx_t_float_complex collapse_loglikelihood;
2117   __pyx_t_float_complex *_obs;
2118   __pyx_t_float_complex *_design;
2119   __pyx_t_float_complex *_obs_intercept;
2120   __pyx_t_float_complex *_obs_cov;
2121   __pyx_t_float_complex *_transition;
2122   __pyx_t_float_complex *_state_intercept;
2123   __pyx_t_float_complex *_selection;
2124   __pyx_t_float_complex *_state_cov;
2125   __pyx_t_float_complex *_selected_state_cov;
2126   __pyx_t_float_complex *_initial_state;
2127   __pyx_t_float_complex *_initial_state_cov;
2128   __pyx_t_float_complex *_initial_diffuse_state_cov;
2129   int t;
2130   int _previous_t;
2131   int _k_endog;
2132   int _k_states;
2133   int _k_posdef;
2134   int _k_endog2;
2135   int _k_states2;
2136   int _k_posdef2;
2137   int _k_endogstates;
2138   int _k_statesposdef;
2139   int _nmissing;
2140 };
2141 
2142 
2143 /* "statsmodels/tsa/statespace/_representation.pxd":244
2144  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=*) except *
2145  *
2146  * cdef class zStatespace(object):             # <<<<<<<<<<<<<<
2147  *     # Statespace dimensions
2148  *     cdef readonly int nobs, k_endog, k_states, k_posdef
2149  */
2150 struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace {
2151   PyObject_HEAD
2152   struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_vtab;
2153   int nobs;
2154   int k_endog;
2155   int k_states;
2156   int k_posdef;
2157   __Pyx_memviewslice obs;
2158   __Pyx_memviewslice obs_intercept;
2159   __Pyx_memviewslice state_intercept;
2160   __Pyx_memviewslice initial_state;
2161   __Pyx_memviewslice initial_state_cov;
2162   __Pyx_memviewslice initial_diffuse_state_cov;
2163   __Pyx_memviewslice design;
2164   __Pyx_memviewslice obs_cov;
2165   __Pyx_memviewslice transition;
2166   __Pyx_memviewslice selection;
2167   __Pyx_memviewslice state_cov;
2168   __Pyx_memviewslice selected_state_cov;
2169   __Pyx_memviewslice missing;
2170   __Pyx_memviewslice nmissing;
2171   int has_missing;
2172   int time_invariant;
2173   int initialized;
2174   int initialized_diffuse;
2175   int initialized_stationary;
2176   int diagonal_obs_cov;
2177   int _diagonal_obs_cov;
2178   int subset_design;
2179   int companion_transition;
2180   __Pyx_memviewslice tmp;
2181   __Pyx_memviewslice selected_obs;
2182   __Pyx_memviewslice selected_obs_intercept;
2183   __Pyx_memviewslice selected_design;
2184   __Pyx_memviewslice selected_obs_cov;
2185   __Pyx_memviewslice transform_cholesky;
2186   __Pyx_memviewslice transform_obs_cov;
2187   __Pyx_memviewslice transform_design;
2188   __Pyx_memviewslice transform_obs_intercept;
2189   __pyx_t_double_complex transform_determinant;
2190   __Pyx_memviewslice collapse_obs;
2191   __Pyx_memviewslice collapse_obs_tmp;
2192   __Pyx_memviewslice collapse_design;
2193   __Pyx_memviewslice collapse_obs_cov;
2194   __Pyx_memviewslice collapse_cholesky;
2195   __pyx_t_double_complex collapse_loglikelihood;
2196   __pyx_t_double_complex *_obs;
2197   __pyx_t_double_complex *_design;
2198   __pyx_t_double_complex *_obs_intercept;
2199   __pyx_t_double_complex *_obs_cov;
2200   __pyx_t_double_complex *_transition;
2201   __pyx_t_double_complex *_state_intercept;
2202   __pyx_t_double_complex *_selection;
2203   __pyx_t_double_complex *_state_cov;
2204   __pyx_t_double_complex *_selected_state_cov;
2205   __pyx_t_double_complex *_initial_state;
2206   __pyx_t_double_complex *_initial_state_cov;
2207   __pyx_t_double_complex *_initial_diffuse_state_cov;
2208   int t;
2209   int _previous_t;
2210   int _k_endog;
2211   int _k_states;
2212   int _k_posdef;
2213   int _k_endog2;
2214   int _k_states2;
2215   int _k_posdef2;
2216   int _k_endogstates;
2217   int _k_statesposdef;
2218   int _nmissing;
2219 };
2220 
2221 
2222 /* "View.MemoryView":105
2223  *
2224  * @cname("__pyx_array")
2225  * cdef class array:             # <<<<<<<<<<<<<<
2226  *
2227  *     cdef:
2228  */
2229 struct __pyx_array_obj {
2230   PyObject_HEAD
2231   struct __pyx_vtabstruct_array *__pyx_vtab;
2232   char *data;
2233   Py_ssize_t len;
2234   char *format;
2235   int ndim;
2236   Py_ssize_t *_shape;
2237   Py_ssize_t *_strides;
2238   Py_ssize_t itemsize;
2239   PyObject *mode;
2240   PyObject *_format;
2241   void (*callback_free_data)(void *);
2242   int free_data;
2243   int dtype_is_object;
2244 };
2245 
2246 
2247 /* "View.MemoryView":279
2248  *
2249  * @cname('__pyx_MemviewEnum')
2250  * cdef class Enum(object):             # <<<<<<<<<<<<<<
2251  *     cdef object name
2252  *     def __init__(self, name):
2253  */
2254 struct __pyx_MemviewEnum_obj {
2255   PyObject_HEAD
2256   PyObject *name;
2257 };
2258 
2259 
2260 /* "View.MemoryView":330
2261  *
2262  * @cname('__pyx_memoryview')
2263  * cdef class memoryview(object):             # <<<<<<<<<<<<<<
2264  *
2265  *     cdef object obj
2266  */
2267 struct __pyx_memoryview_obj {
2268   PyObject_HEAD
2269   struct __pyx_vtabstruct_memoryview *__pyx_vtab;
2270   PyObject *obj;
2271   PyObject *_size;
2272   PyObject *_array_interface;
2273   PyThread_type_lock lock;
2274   __pyx_atomic_int acquisition_count[2];
2275   __pyx_atomic_int *acquisition_count_aligned_p;
2276   Py_buffer view;
2277   int flags;
2278   int dtype_is_object;
2279   __Pyx_TypeInfo *typeinfo;
2280 };
2281 
2282 
2283 /* "View.MemoryView":965
2284  *
2285  * @cname('__pyx_memoryviewslice')
2286  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
2287  *     "Internal class for passing memoryview slices to Python"
2288  *
2289  */
2290 struct __pyx_memoryviewslice_obj {
2291   struct __pyx_memoryview_obj __pyx_base;
2292   __Pyx_memviewslice from_slice;
2293   PyObject *from_object;
2294   PyObject *(*to_object_func)(char *);
2295   int (*to_dtype_func)(char *, PyObject *);
2296 };
2297 
2298 
2299 
2300 /* "statsmodels/tsa/statespace/_initialization.pxd":17
2301  * )
2302  *
2303  * cdef class sInitialization(object):             # <<<<<<<<<<<<<<
2304  *     cdef readonly int k_states
2305  *     cdef public np.float64_t approximate_diffuse_variance
2306  */
2307 
2308 struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_sInitialization {
2309   int (*initialize)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, PyObject *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize *__pyx_optional_args);
2310   int (*clear_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, int, __Pyx_memviewslice);
2311   int (*clear_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, int, __Pyx_memviewslice);
2312   int (*initialize_known_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, int, __Pyx_memviewslice);
2313   int (*initialize_known_stationary_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, int, __Pyx_memviewslice);
2314   int (*initialize_diffuse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, int, __Pyx_memviewslice);
2315   int (*initialize_approximate_diffuse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, int, __Pyx_memviewslice);
2316   int (*initialize_stationary_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, __Pyx_memviewslice, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize_stationary_constant *__pyx_optional_args);
2317   int (*initialize_stationary_stationary_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, __Pyx_memviewslice, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize_stationary_stationary_cov *__pyx_optional_args);
2318 };
2319 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_sInitialization;
2320 
2321 
2322 /* "statsmodels/tsa/statespace/_initialization.pxd":41
2323  *     cdef int initialize_stationary_stationary_cov(self, int offset, sStatespace model, np.float32_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
2324  *
2325  * cdef class dInitialization(object):             # <<<<<<<<<<<<<<
2326  *     cdef readonly int k_states
2327  *     cdef public np.float64_t approximate_diffuse_variance
2328  */
2329 
2330 struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_dInitialization {
2331   int (*initialize)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, PyObject *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize *__pyx_optional_args);
2332   int (*clear_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, int, __Pyx_memviewslice);
2333   int (*clear_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, int, __Pyx_memviewslice);
2334   int (*initialize_known_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, int, __Pyx_memviewslice);
2335   int (*initialize_known_stationary_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, int, __Pyx_memviewslice);
2336   int (*initialize_diffuse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, int, __Pyx_memviewslice);
2337   int (*initialize_approximate_diffuse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, int, __Pyx_memviewslice);
2338   int (*initialize_stationary_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, __Pyx_memviewslice, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize_stationary_constant *__pyx_optional_args);
2339   int (*initialize_stationary_stationary_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, __Pyx_memviewslice, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize_stationary_stationary_cov *__pyx_optional_args);
2340 };
2341 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_dInitialization;
2342 
2343 
2344 /* "statsmodels/tsa/statespace/_initialization.pxd":65
2345  *     cdef int initialize_stationary_stationary_cov(self, int offset, dStatespace model, np.float64_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
2346  *
2347  * cdef class cInitialization(object):             # <<<<<<<<<<<<<<
2348  *     cdef readonly int k_states
2349  *     cdef public np.float64_t approximate_diffuse_variance
2350  */
2351 
2352 struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_cInitialization {
2353   int (*initialize)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, PyObject *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize *__pyx_optional_args);
2354   int (*clear_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, int, __Pyx_memviewslice);
2355   int (*clear_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, int, __Pyx_memviewslice);
2356   int (*initialize_known_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, int, __Pyx_memviewslice);
2357   int (*initialize_known_stationary_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, int, __Pyx_memviewslice);
2358   int (*initialize_diffuse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, int, __Pyx_memviewslice);
2359   int (*initialize_approximate_diffuse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, int, __Pyx_memviewslice);
2360   int (*initialize_stationary_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, __Pyx_memviewslice, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize_stationary_constant *__pyx_optional_args);
2361   int (*initialize_stationary_stationary_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, __Pyx_memviewslice, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize_stationary_stationary_cov *__pyx_optional_args);
2362 };
2363 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_cInitialization;
2364 
2365 
2366 /* "statsmodels/tsa/statespace/_initialization.pxd":89
2367  *     cdef int initialize_stationary_stationary_cov(self, int offset, cStatespace model, np.complex64_t [::1, :] initial_stationary_state_cov, int complex_step=*) except 1
2368  *
2369  * cdef class zInitialization(object):             # <<<<<<<<<<<<<<
2370  *     cdef readonly int k_states
2371  *     cdef public np.float64_t approximate_diffuse_variance
2372  */
2373 
2374 struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_zInitialization {
2375   int (*initialize)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, PyObject *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize *__pyx_optional_args);
2376   int (*clear_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, int, __Pyx_memviewslice);
2377   int (*clear_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, int, __Pyx_memviewslice);
2378   int (*initialize_known_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, int, __Pyx_memviewslice);
2379   int (*initialize_known_stationary_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, int, __Pyx_memviewslice);
2380   int (*initialize_diffuse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, int, __Pyx_memviewslice);
2381   int (*initialize_approximate_diffuse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, int, __Pyx_memviewslice);
2382   int (*initialize_stationary_constant)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, __Pyx_memviewslice, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize_stationary_constant *__pyx_optional_args);
2383   int (*initialize_stationary_stationary_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *, int, struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, __Pyx_memviewslice, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize_stationary_stationary_cov *__pyx_optional_args);
2384 };
2385 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_zInitialization;
2386 
2387 
2388 /* "statsmodels/tsa/statespace/_representation.pyx":31
2389  *
2390  * ## State Space Representation
2391  * cdef class sStatespace(object):             # <<<<<<<<<<<<<<
2392  *     """
2393  *     sStatespace(obs, design, obs_intercept, obs_cov, transition, state_intercept, selection, state_cov)
2394  */
2395 
2396 struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace {
2397   PyObject *(*seek)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, unsigned int, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek *__pyx_optional_args);
2398   void (*set_dimensions)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, unsigned int);
2399   void (*select_state_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int);
2400   int (*select_missing)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int);
2401   void (*_select_missing_entire_obs)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int);
2402   void (*_select_missing_partial_obs)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int);
2403   void (*transform)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform *__pyx_optional_args);
2404   void (*transform_diagonalize)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize *__pyx_optional_args);
2405   int (*transform_generalized_collapse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse *__pyx_optional_args);
2406 };
2407 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_sStatespace;
2408 
2409 
2410 /* "statsmodels/tsa/statespace/_representation.pyx":1028
2411  *
2412  * ## State Space Representation
2413  * cdef class dStatespace(object):             # <<<<<<<<<<<<<<
2414  *     """
2415  *     dStatespace(obs, design, obs_intercept, obs_cov, transition, state_intercept, selection, state_cov)
2416  */
2417 
2418 struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace {
2419   PyObject *(*seek)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, unsigned int, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek *__pyx_optional_args);
2420   void (*set_dimensions)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, unsigned int);
2421   void (*select_state_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int);
2422   int (*select_missing)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int);
2423   void (*_select_missing_entire_obs)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int);
2424   void (*_select_missing_partial_obs)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int);
2425   void (*transform)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform *__pyx_optional_args);
2426   void (*transform_diagonalize)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize *__pyx_optional_args);
2427   int (*transform_generalized_collapse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse *__pyx_optional_args);
2428 };
2429 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_dStatespace;
2430 
2431 
2432 /* "statsmodels/tsa/statespace/_representation.pyx":2025
2433  *
2434  * ## State Space Representation
2435  * cdef class cStatespace(object):             # <<<<<<<<<<<<<<
2436  *     """
2437  *     cStatespace(obs, design, obs_intercept, obs_cov, transition, state_intercept, selection, state_cov)
2438  */
2439 
2440 struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace {
2441   PyObject *(*seek)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, unsigned int, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek *__pyx_optional_args);
2442   void (*set_dimensions)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, unsigned int);
2443   void (*select_state_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int);
2444   int (*select_missing)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int);
2445   void (*_select_missing_entire_obs)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int);
2446   void (*_select_missing_partial_obs)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int);
2447   void (*transform)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform *__pyx_optional_args);
2448   void (*transform_diagonalize)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize *__pyx_optional_args);
2449   int (*transform_generalized_collapse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse *__pyx_optional_args);
2450 };
2451 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_cStatespace;
2452 
2453 
2454 /* "statsmodels/tsa/statespace/_representation.pyx":3022
2455  *
2456  * ## State Space Representation
2457  * cdef class zStatespace(object):             # <<<<<<<<<<<<<<
2458  *     """
2459  *     zStatespace(obs, design, obs_intercept, obs_cov, transition, state_intercept, selection, state_cov)
2460  */
2461 
2462 struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace {
2463   PyObject *(*seek)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, unsigned int, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek *__pyx_optional_args);
2464   void (*set_dimensions)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, unsigned int);
2465   void (*select_state_cov)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int);
2466   int (*select_missing)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int);
2467   void (*_select_missing_entire_obs)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int);
2468   void (*_select_missing_partial_obs)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int);
2469   void (*transform)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform *__pyx_optional_args);
2470   void (*transform_diagonalize)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize *__pyx_optional_args);
2471   int (*transform_generalized_collapse)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse *__pyx_optional_args);
2472 };
2473 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_zStatespace;
2474 
2475 
2476 /* "View.MemoryView":105
2477  *
2478  * @cname("__pyx_array")
2479  * cdef class array:             # <<<<<<<<<<<<<<
2480  *
2481  *     cdef:
2482  */
2483 
2484 struct __pyx_vtabstruct_array {
2485   PyObject *(*get_memview)(struct __pyx_array_obj *);
2486 };
2487 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
2488 
2489 
2490 /* "View.MemoryView":330
2491  *
2492  * @cname('__pyx_memoryview')
2493  * cdef class memoryview(object):             # <<<<<<<<<<<<<<
2494  *
2495  *     cdef object obj
2496  */
2497 
2498 struct __pyx_vtabstruct_memoryview {
2499   char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
2500   PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
2501   PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
2502   PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
2503   PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
2504   PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
2505   PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
2506 };
2507 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
2508 
2509 
2510 /* "View.MemoryView":965
2511  *
2512  * @cname('__pyx_memoryviewslice')
2513  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
2514  *     "Internal class for passing memoryview slices to Python"
2515  *
2516  */
2517 
2518 struct __pyx_vtabstruct__memoryviewslice {
2519   struct __pyx_vtabstruct_memoryview __pyx_base;
2520 };
2521 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
2522 
2523 /* --- Runtime support code (head) --- */
2524 /* Refnanny.proto */
2525 #ifndef CYTHON_REFNANNY
2526   #define CYTHON_REFNANNY 0
2527 #endif
2528 #if CYTHON_REFNANNY
2529   typedef struct {
2530     void (*INCREF)(void*, PyObject*, int);
2531     void (*DECREF)(void*, PyObject*, int);
2532     void (*GOTREF)(void*, PyObject*, int);
2533     void (*GIVEREF)(void*, PyObject*, int);
2534     void* (*SetupContext)(const char*, int, const char*);
2535     void (*FinishContext)(void**);
2536   } __Pyx_RefNannyAPIStruct;
2537   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
2538   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
2539   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
2540 #ifdef WITH_THREAD
2541   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2542           if (acquire_gil) {\
2543               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
2544               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
2545               PyGILState_Release(__pyx_gilstate_save);\
2546           } else {\
2547               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
2548           }
2549 #else
2550   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
2551           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
2552 #endif
2553   #define __Pyx_RefNannyFinishContext()\
2554           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
2555   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
2556   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
2557   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
2558   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
2559   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
2560   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
2561   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
2562   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
2563 #else
2564   #define __Pyx_RefNannyDeclarations
2565   #define __Pyx_RefNannySetupContext(name, acquire_gil)
2566   #define __Pyx_RefNannyFinishContext()
2567   #define __Pyx_INCREF(r) Py_INCREF(r)
2568   #define __Pyx_DECREF(r) Py_DECREF(r)
2569   #define __Pyx_GOTREF(r)
2570   #define __Pyx_GIVEREF(r)
2571   #define __Pyx_XINCREF(r) Py_XINCREF(r)
2572   #define __Pyx_XDECREF(r) Py_XDECREF(r)
2573   #define __Pyx_XGOTREF(r)
2574   #define __Pyx_XGIVEREF(r)
2575 #endif
2576 #define __Pyx_XDECREF_SET(r, v) do {\
2577         PyObject *tmp = (PyObject *) r;\
2578         r = v; __Pyx_XDECREF(tmp);\
2579     } while (0)
2580 #define __Pyx_DECREF_SET(r, v) do {\
2581         PyObject *tmp = (PyObject *) r;\
2582         r = v; __Pyx_DECREF(tmp);\
2583     } while (0)
2584 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
2585 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
2586 
2587 /* PyObjectGetAttrStr.proto */
2588 #if CYTHON_USE_TYPE_SLOTS
2589 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
2590 #else
2591 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
2592 #endif
2593 
2594 /* GetBuiltinName.proto */
2595 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
2596 
2597 /* RaiseArgTupleInvalid.proto */
2598 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2599     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2600 
2601 /* RaiseDoubleKeywords.proto */
2602 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2603 
2604 /* ParseKeywords.proto */
2605 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
2606     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
2607     const char* function_name);
2608 
2609 /* MemviewSliceInit.proto */
2610 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2611 #define __Pyx_MEMVIEW_DIRECT   1
2612 #define __Pyx_MEMVIEW_PTR      2
2613 #define __Pyx_MEMVIEW_FULL     4
2614 #define __Pyx_MEMVIEW_CONTIG   8
2615 #define __Pyx_MEMVIEW_STRIDED  16
2616 #define __Pyx_MEMVIEW_FOLLOW   32
2617 #define __Pyx_IS_C_CONTIG 1
2618 #define __Pyx_IS_F_CONTIG 2
2619 static int __Pyx_init_memviewslice(
2620                 struct __pyx_memoryview_obj *memview,
2621                 int ndim,
2622                 __Pyx_memviewslice *memviewslice,
2623                 int memview_is_new_reference);
2624 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
2625     __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2626 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
2627     __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2628 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2629 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2630 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2631 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2632 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
2633 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
2634 
2635 /* PyDictVersioning.proto */
2636 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2637 #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
2638 #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
2639 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2640     (version_var) = __PYX_GET_DICT_VERSION(dict);\
2641     (cache_var) = (value);
2642 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2643     static PY_UINT64_T __pyx_dict_version = 0;\
2644     static PyObject *__pyx_dict_cached_value = NULL;\
2645     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2646         (VAR) = __pyx_dict_cached_value;\
2647     } else {\
2648         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2649         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2650     }\
2651 }
2652 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2653 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2654 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2655 #else
2656 #define __PYX_GET_DICT_VERSION(dict)  (0)
2657 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2658 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
2659 #endif
2660 
2661 /* GetModuleGlobalName.proto */
2662 #if CYTHON_USE_DICT_VERSIONS
2663 #define __Pyx_GetModuleGlobalName(var, name)  {\
2664     static PY_UINT64_T __pyx_dict_version = 0;\
2665     static PyObject *__pyx_dict_cached_value = NULL;\
2666     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
2667         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
2668         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2669 }
2670 #define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
2671     PY_UINT64_T __pyx_dict_version;\
2672     PyObject *__pyx_dict_cached_value;\
2673     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2674 }
2675 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2676 #else
2677 #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
2678 #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
2679 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2680 #endif
2681 
2682 /* PyCFunctionFastCall.proto */
2683 #if CYTHON_FAST_PYCCALL
2684 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
2685 #else
2686 #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
2687 #endif
2688 
2689 /* PyFunctionFastCall.proto */
2690 #if CYTHON_FAST_PYCALL
2691 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
2692     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
2693 #if 1 || PY_VERSION_HEX < 0x030600B1
2694 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
2695 #else
2696 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
2697 #endif
2698 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
2699     (sizeof(char [1 - 2*!(cond)]) - 1)
2700 #ifndef Py_MEMBER_SIZE
2701 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
2702 #endif
2703   static size_t __pyx_pyframe_localsplus_offset = 0;
2704   #include "frameobject.h"
2705   #define __Pxy_PyFrame_Initialize_Offsets()\
2706     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
2707      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
2708   #define __Pyx_PyFrame_GetLocalsplus(frame)\
2709     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
2710 #endif
2711 
2712 /* PyObjectCall.proto */
2713 #if CYTHON_COMPILING_IN_CPYTHON
2714 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2715 #else
2716 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2717 #endif
2718 
2719 /* PyObjectCall2Args.proto */
2720 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
2721 
2722 /* PyObjectCallMethO.proto */
2723 #if CYTHON_COMPILING_IN_CPYTHON
2724 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2725 #endif
2726 
2727 /* PyObjectCallOneArg.proto */
2728 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2729 
2730 /* DictGetItem.proto */
2731 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
2732 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
2733 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
2734     (likely(PyDict_CheckExact(obj)) ?\
2735      __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
2736 #else
2737 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
2738 #define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
2739 #endif
2740 
2741 /* ExtTypeTest.proto */
2742 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2743 
2744 /* IncludeStringH.proto */
2745 #include <string.h>
2746 
2747 /* BytesEquals.proto */
2748 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
2749 
2750 /* UnicodeEquals.proto */
2751 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
2752 
2753 /* IterFinish.proto */
2754 static CYTHON_INLINE int __Pyx_IterFinish(void);
2755 
2756 /* PyObjectCallNoArg.proto */
2757 #if CYTHON_COMPILING_IN_CPYTHON
2758 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2759 #else
2760 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
2761 #endif
2762 
2763 /* PyObjectGetMethod.proto */
2764 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
2765 
2766 /* PyObjectCallMethod0.proto */
2767 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
2768 
2769 /* RaiseNeedMoreValuesToUnpack.proto */
2770 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2771 
2772 /* RaiseTooManyValuesToUnpack.proto */
2773 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2774 
2775 /* UnpackItemEndCheck.proto */
2776 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
2777 
2778 /* RaiseNoneIterError.proto */
2779 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2780 
2781 /* UnpackTupleError.proto */
2782 static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
2783 
2784 /* UnpackTuple2.proto */
2785 #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
2786     (likely(is_tuple || PyTuple_Check(tuple)) ?\
2787         (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
2788             __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
2789             (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
2790         __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
2791 static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
2792     PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
2793 static int __Pyx_unpack_tuple2_generic(
2794     PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);
2795 
2796 /* dict_iter.proto */
2797 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
2798                                                    Py_ssize_t* p_orig_length, int* p_is_dict);
2799 static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
2800                                               PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
2801 
2802 /* GetItemInt.proto */
2803 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2804     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2805     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
2806     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
2807                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
2808 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2809     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2810     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2811     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2812 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2813                                                               int wraparound, int boundscheck);
2814 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2815     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2816     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2817     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2818 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2819                                                               int wraparound, int boundscheck);
2820 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2821 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2822                                                      int is_list, int wraparound, int boundscheck);
2823 
2824 /* PyThreadStateGet.proto */
2825 #if CYTHON_FAST_THREAD_STATE
2826 #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
2827 #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
2828 #define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
2829 #else
2830 #define __Pyx_PyThreadState_declare
2831 #define __Pyx_PyThreadState_assign
2832 #define __Pyx_PyErr_Occurred()  PyErr_Occurred()
2833 #endif
2834 
2835 /* PyErrFetchRestore.proto */
2836 #if CYTHON_FAST_THREAD_STATE
2837 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2838 #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2839 #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2840 #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2841 #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2842 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2843 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2844 #if CYTHON_COMPILING_IN_CPYTHON
2845 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2846 #else
2847 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2848 #endif
2849 #else
2850 #define __Pyx_PyErr_Clear() PyErr_Clear()
2851 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2852 #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
2853 #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
2854 #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
2855 #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
2856 #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
2857 #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
2858 #endif
2859 
2860 /* RaiseException.proto */
2861 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2862 
2863 /* WriteUnraisableException.proto */
2864 static void __Pyx_WriteUnraisable(const char *name, int clineno,
2865                                   int lineno, const char *filename,
2866                                   int full_traceback, int nogil);
2867 
2868 /* PyIntCompare.proto */
2869 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
2870 
2871 /* None.proto */
2872 static CYTHON_INLINE int __Pyx_mod_int(int, int);
2873 
2874 /* None.proto */
2875 static CYTHON_INLINE int __Pyx_div_int(int, int);
2876 
2877 /* UnaryNegOverflows.proto */
2878 #define UNARY_NEG_WOULD_OVERFLOW(x)\
2879         (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2880 
2881 /* GetTopmostException.proto */
2882 #if CYTHON_USE_EXC_INFO_STACK
2883 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2884 #endif
2885 
2886 /* SaveResetException.proto */
2887 #if CYTHON_FAST_THREAD_STATE
2888 #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2889 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2890 #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2891 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2892 #else
2893 #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
2894 #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
2895 #endif
2896 
2897 /* PyErrExceptionMatches.proto */
2898 #if CYTHON_FAST_THREAD_STATE
2899 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2900 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2901 #else
2902 #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
2903 #endif
2904 
2905 /* GetException.proto */
2906 #if CYTHON_FAST_THREAD_STATE
2907 #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
2908 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2909 #else
2910 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2911 #endif
2912 
2913 /* ArgTypeTest.proto */
2914 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
2915     ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
2916         __Pyx__ArgTypeTest(obj, type, name, exact))
2917 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2918 
2919 /* StrEquals.proto */
2920 #if PY_MAJOR_VERSION >= 3
2921 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2922 #else
2923 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2924 #endif
2925 
2926 /* None.proto */
2927 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
2928 
2929 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2930 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2931 /* GetAttr.proto */
2932 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2933 
2934 /* ObjectGetItem.proto */
2935 #if CYTHON_USE_TYPE_SLOTS
2936 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
2937 #else
2938 #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
2939 #endif
2940 
2941 /* decode_c_string_utf16.proto */
__Pyx_PyUnicode_DecodeUTF16(const char * s,Py_ssize_t size,const char * errors)2942 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
2943     int byteorder = 0;
2944     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2945 }
__Pyx_PyUnicode_DecodeUTF16LE(const char * s,Py_ssize_t size,const char * errors)2946 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
2947     int byteorder = -1;
2948     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2949 }
__Pyx_PyUnicode_DecodeUTF16BE(const char * s,Py_ssize_t size,const char * errors)2950 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
2951     int byteorder = 1;
2952     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2953 }
2954 
2955 /* decode_c_string.proto */
2956 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
2957          const char* cstring, Py_ssize_t start, Py_ssize_t stop,
2958          const char* encoding, const char* errors,
2959          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
2960 
2961 /* GetAttr3.proto */
2962 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2963 
2964 /* SwapException.proto */
2965 #if CYTHON_FAST_THREAD_STATE
2966 #define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2967 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2968 #else
2969 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2970 #endif
2971 
2972 /* Import.proto */
2973 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2974 
2975 /* FastTypeChecks.proto */
2976 #if CYTHON_COMPILING_IN_CPYTHON
2977 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2978 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2979 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2980 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2981 #else
2982 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2983 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2984 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2985 #endif
2986 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2987 
2988 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2989 /* ListCompAppend.proto */
2990 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_ListComp_Append(PyObject * list,PyObject * x)2991 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
2992     PyListObject* L = (PyListObject*) list;
2993     Py_ssize_t len = Py_SIZE(list);
2994     if (likely(L->allocated > len)) {
2995         Py_INCREF(x);
2996         PyList_SET_ITEM(list, len, x);
2997         __Pyx_SET_SIZE(list, len + 1);
2998         return 0;
2999     }
3000     return PyList_Append(list, x);
3001 }
3002 #else
3003 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
3004 #endif
3005 
3006 /* PyIntBinop.proto */
3007 #if !CYTHON_COMPILING_IN_PYPY
3008 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
3009 #else
3010 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
3011     (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
3012 #endif
3013 
3014 /* ListExtend.proto */
__Pyx_PyList_Extend(PyObject * L,PyObject * v)3015 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
3016 #if CYTHON_COMPILING_IN_CPYTHON
3017     PyObject* none = _PyList_Extend((PyListObject*)L, v);
3018     if (unlikely(!none))
3019         return -1;
3020     Py_DECREF(none);
3021     return 0;
3022 #else
3023     return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
3024 #endif
3025 }
3026 
3027 /* ListAppend.proto */
3028 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_PyList_Append(PyObject * list,PyObject * x)3029 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
3030     PyListObject* L = (PyListObject*) list;
3031     Py_ssize_t len = Py_SIZE(list);
3032     if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
3033         Py_INCREF(x);
3034         PyList_SET_ITEM(list, len, x);
3035         __Pyx_SET_SIZE(list, len + 1);
3036         return 0;
3037     }
3038     return PyList_Append(list, x);
3039 }
3040 #else
3041 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
3042 #endif
3043 
3044 /* None.proto */
3045 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
3046 
3047 /* None.proto */
3048 static CYTHON_INLINE long __Pyx_div_long(long, long);
3049 
3050 /* ImportFrom.proto */
3051 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
3052 
3053 /* HasAttr.proto */
3054 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
3055 
3056 /* PyObject_GenericGetAttrNoDict.proto */
3057 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
3058 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
3059 #else
3060 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
3061 #endif
3062 
3063 /* PyObject_GenericGetAttr.proto */
3064 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
3065 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
3066 #else
3067 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
3068 #endif
3069 
3070 /* SetVTable.proto */
3071 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
3072 
3073 /* PyObjectGetAttrStrNoError.proto */
3074 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
3075 
3076 /* SetupReduce.proto */
3077 static int __Pyx_setup_reduce(PyObject* type_obj);
3078 
3079 /* TypeImport.proto */
3080 #ifndef __PYX_HAVE_RT_ImportType_proto
3081 #define __PYX_HAVE_RT_ImportType_proto
3082 enum __Pyx_ImportType_CheckSize {
3083    __Pyx_ImportType_CheckSize_Error = 0,
3084    __Pyx_ImportType_CheckSize_Warn = 1,
3085    __Pyx_ImportType_CheckSize_Ignore = 2
3086 };
3087 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
3088 #endif
3089 
3090 /* GetVTable.proto */
3091 static void* __Pyx_GetVtable(PyObject *dict);
3092 
3093 /* CLineInTraceback.proto */
3094 #ifdef CYTHON_CLINE_IN_TRACEBACK
3095 #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
3096 #else
3097 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
3098 #endif
3099 
3100 /* CodeObjectCache.proto */
3101 typedef struct {
3102     PyCodeObject* code_object;
3103     int code_line;
3104 } __Pyx_CodeObjectCacheEntry;
3105 struct __Pyx_CodeObjectCache {
3106     int count;
3107     int max_count;
3108     __Pyx_CodeObjectCacheEntry* entries;
3109 };
3110 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
3111 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
3112 static PyCodeObject *__pyx_find_code_object(int code_line);
3113 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
3114 
3115 /* AddTraceback.proto */
3116 static void __Pyx_AddTraceback(const char *funcname, int c_line,
3117                                int py_line, const char *filename);
3118 
3119 #if PY_MAJOR_VERSION < 3
3120     static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
3121     static void __Pyx_ReleaseBuffer(Py_buffer *view);
3122 #else
3123     #define __Pyx_GetBuffer PyObject_GetBuffer
3124     #define __Pyx_ReleaseBuffer PyBuffer_Release
3125 #endif
3126 
3127 
3128 /* BufferStructDeclare.proto */
3129 typedef struct {
3130   Py_ssize_t shape, strides, suboffsets;
3131 } __Pyx_Buf_DimInfo;
3132 typedef struct {
3133   size_t refcount;
3134   Py_buffer pybuffer;
3135 } __Pyx_Buffer;
3136 typedef struct {
3137   __Pyx_Buffer *rcbuffer;
3138   char *data;
3139   __Pyx_Buf_DimInfo diminfo[8];
3140 } __Pyx_LocalBuf_ND;
3141 
3142 /* MemviewSliceIsContig.proto */
3143 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
3144 
3145 /* OverlappingSlices.proto */
3146 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
3147                                 __Pyx_memviewslice *slice2,
3148                                 int ndim, size_t itemsize);
3149 
3150 /* Capsule.proto */
3151 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
3152 
3153 /* IsLittleEndian.proto */
3154 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
3155 
3156 /* BufferFormatCheck.proto */
3157 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
3158 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
3159                               __Pyx_BufFmt_StackElem* stack,
3160                               __Pyx_TypeInfo* type);
3161 
3162 /* TypeInfoCompare.proto */
3163 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
3164 
3165 /* MemviewSliceValidateAndInit.proto */
3166 static int __Pyx_ValidateAndInit_memviewslice(
3167                 int *axes_specs,
3168                 int c_or_f_flag,
3169                 int buf_flags,
3170                 int ndim,
3171                 __Pyx_TypeInfo *dtype,
3172                 __Pyx_BufFmt_StackElem stack[],
3173                 __Pyx_memviewslice *memviewslice,
3174                 PyObject *original_obj);
3175 
3176 /* ObjectToMemviewSlice.proto */
3177 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(PyObject *, int writable_flag);
3178 
3179 /* ObjectToMemviewSlice.proto */
3180 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(PyObject *, int writable_flag);
3181 
3182 /* ObjectToMemviewSlice.proto */
3183 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(PyObject *, int writable_flag);
3184 
3185 /* GCCDiagnostics.proto */
3186 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
3187 #define __Pyx_HAS_GCC_DIAGNOSTIC
3188 #endif
3189 
3190 /* ObjectToMemviewSlice.proto */
3191 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag);
3192 
3193 /* ObjectToMemviewSlice.proto */
3194 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag);
3195 
3196 /* ObjectToMemviewSlice.proto */
3197 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject *, int writable_flag);
3198 
3199 /* ObjectToMemviewSlice.proto */
3200 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(PyObject *, int writable_flag);
3201 
3202 /* ObjectToMemviewSlice.proto */
3203 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(PyObject *, int writable_flag);
3204 
3205 /* ObjectToMemviewSlice.proto */
3206 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(PyObject *, int writable_flag);
3207 
3208 /* RealImag.proto */
3209 #if CYTHON_CCOMPLEX
3210   #ifdef __cplusplus
3211     #define __Pyx_CREAL(z) ((z).real())
3212     #define __Pyx_CIMAG(z) ((z).imag())
3213   #else
3214     #define __Pyx_CREAL(z) (__real__(z))
3215     #define __Pyx_CIMAG(z) (__imag__(z))
3216   #endif
3217 #else
3218     #define __Pyx_CREAL(z) ((z).real)
3219     #define __Pyx_CIMAG(z) ((z).imag)
3220 #endif
3221 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
3222         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
3223     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
3224     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
3225 #else
3226     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
3227     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
3228 #endif
3229 
3230 /* Arithmetic.proto */
3231 #if CYTHON_CCOMPLEX
3232     #define __Pyx_c_eq_float(a, b)   ((a)==(b))
3233     #define __Pyx_c_sum_float(a, b)  ((a)+(b))
3234     #define __Pyx_c_diff_float(a, b) ((a)-(b))
3235     #define __Pyx_c_prod_float(a, b) ((a)*(b))
3236     #define __Pyx_c_quot_float(a, b) ((a)/(b))
3237     #define __Pyx_c_neg_float(a)     (-(a))
3238   #ifdef __cplusplus
3239     #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
3240     #define __Pyx_c_conj_float(z)    (::std::conj(z))
3241     #if 1
3242         #define __Pyx_c_abs_float(z)     (::std::abs(z))
3243         #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
3244     #endif
3245   #else
3246     #define __Pyx_c_is_zero_float(z) ((z)==0)
3247     #define __Pyx_c_conj_float(z)    (conjf(z))
3248     #if 1
3249         #define __Pyx_c_abs_float(z)     (cabsf(z))
3250         #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
3251     #endif
3252  #endif
3253 #else
3254     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
3255     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
3256     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
3257     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
3258     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
3259     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
3260     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
3261     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
3262     #if 1
3263         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
3264         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
3265     #endif
3266 #endif
3267 
3268 /* FromPy.proto */
3269 static __pyx_t_float_complex __Pyx_PyComplex_As___pyx_t_float_complex(PyObject*);
3270 
3271 /* ObjectToMemviewSlice.proto */
3272 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(PyObject *, int writable_flag);
3273 
3274 /* ObjectToMemviewSlice.proto */
3275 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(PyObject *, int writable_flag);
3276 
3277 /* ObjectToMemviewSlice.proto */
3278 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(PyObject *, int writable_flag);
3279 
3280 /* Arithmetic.proto */
3281 #if CYTHON_CCOMPLEX
3282     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
3283     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
3284     #define __Pyx_c_diff_double(a, b) ((a)-(b))
3285     #define __Pyx_c_prod_double(a, b) ((a)*(b))
3286     #define __Pyx_c_quot_double(a, b) ((a)/(b))
3287     #define __Pyx_c_neg_double(a)     (-(a))
3288   #ifdef __cplusplus
3289     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
3290     #define __Pyx_c_conj_double(z)    (::std::conj(z))
3291     #if 1
3292         #define __Pyx_c_abs_double(z)     (::std::abs(z))
3293         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
3294     #endif
3295   #else
3296     #define __Pyx_c_is_zero_double(z) ((z)==0)
3297     #define __Pyx_c_conj_double(z)    (conj(z))
3298     #if 1
3299         #define __Pyx_c_abs_double(z)     (cabs(z))
3300         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
3301     #endif
3302  #endif
3303 #else
3304     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
3305     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
3306     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
3307     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
3308     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
3309     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
3310     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
3311     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
3312     #if 1
3313         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
3314         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
3315     #endif
3316 #endif
3317 
3318 /* FromPy.proto */
3319 static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject*);
3320 
3321 /* MemviewDtypeToObject.proto */
3322 static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_float32_t(const char *itemp);
3323 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_float32_t(const char *itemp, PyObject *obj);
3324 
3325 /* ObjectToMemviewSlice.proto */
3326 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd__int(PyObject *, int writable_flag);
3327 
3328 /* MemviewDtypeToObject.proto */
3329 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp);
3330 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj);
3331 
3332 /* ObjectToMemviewSlice.proto */
3333 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *, int writable_flag);
3334 
3335 /* None.proto */
3336 static CYTHON_INLINE long __Pyx_pow_long(long, long);
3337 
3338 /* MemviewDtypeToObject.proto */
3339 static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_float64_t(const char *itemp);
3340 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_float64_t(const char *itemp, PyObject *obj);
3341 
3342 /* ToPy.proto */
3343 #define __pyx_PyComplex_FromComplex(z)\
3344         PyComplex_FromDoubles((double)__Pyx_CREAL(z),\
3345                               (double)__Pyx_CIMAG(z))
3346 
3347 /* MemviewDtypeToObject.proto */
3348 static CYTHON_INLINE PyObject *__pyx_memview_get___pyx_t_float_complex(const char *itemp);
3349 static CYTHON_INLINE int __pyx_memview_set___pyx_t_float_complex(const char *itemp, PyObject *obj);
3350 
3351 /* MemviewDtypeToObject.proto */
3352 static CYTHON_INLINE PyObject *__pyx_memview_get___pyx_t_double_complex(const char *itemp);
3353 static CYTHON_INLINE int __pyx_memview_set___pyx_t_double_complex(const char *itemp, PyObject *obj);
3354 
3355 /* MemviewSliceCopyTemplate.proto */
3356 static __Pyx_memviewslice
3357 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
3358                                  const char *mode, int ndim,
3359                                  size_t sizeof_dtype, int contig_flag,
3360                                  int dtype_is_object);
3361 
3362 /* CIntFromPy.proto */
3363 static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);
3364 
3365 /* CIntToPy.proto */
3366 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
3367 
3368 /* CIntFromPy.proto */
3369 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
3370 
3371 /* CIntToPy.proto */
3372 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
3373 
3374 /* CIntToPy.proto */
3375 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);
3376 
3377 /* CIntFromPy.proto */
3378 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
3379 
3380 /* CIntFromPy.proto */
3381 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
3382 
3383 /* CheckBinaryVersion.proto */
3384 static int __Pyx_check_binary_version(void);
3385 
3386 /* FunctionExport.proto */
3387 static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);
3388 
3389 /* FunctionImport.proto */
3390 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
3391 
3392 /* InitStrings.proto */
3393 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
3394 
3395 static PyObject *__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek *__pyx_optional_args); /* proto*/
3396 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_k_endog, unsigned int __pyx_v_k_states, unsigned int __pyx_v_k_posdef); /* proto*/
3397 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3398 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3399 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_t); /* proto*/
3400 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3401 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform *__pyx_optional_args); /* proto*/
3402 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize *__pyx_optional_args); /* proto*/
3403 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse *__pyx_optional_args); /* proto*/
3404 static PyObject *__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek *__pyx_optional_args); /* proto*/
3405 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_k_endog, unsigned int __pyx_v_k_states, unsigned int __pyx_v_k_posdef); /* proto*/
3406 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3407 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3408 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_t); /* proto*/
3409 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3410 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform *__pyx_optional_args); /* proto*/
3411 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize *__pyx_optional_args); /* proto*/
3412 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse *__pyx_optional_args); /* proto*/
3413 static PyObject *__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek *__pyx_optional_args); /* proto*/
3414 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_k_endog, unsigned int __pyx_v_k_states, unsigned int __pyx_v_k_posdef); /* proto*/
3415 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3416 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3417 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_t); /* proto*/
3418 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3419 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform *__pyx_optional_args); /* proto*/
3420 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize *__pyx_optional_args); /* proto*/
3421 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse *__pyx_optional_args); /* proto*/
3422 static PyObject *__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek *__pyx_optional_args); /* proto*/
3423 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_k_endog, unsigned int __pyx_v_k_states, unsigned int __pyx_v_k_posdef); /* proto*/
3424 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3425 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3426 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_t); /* proto*/
3427 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t); /* proto*/
3428 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform *__pyx_optional_args); /* proto*/
3429 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize *__pyx_optional_args); /* proto*/
3430 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse *__pyx_optional_args); /* proto*/
3431 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
3432 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
3433 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
3434 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
3435 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
3436 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
3437 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
3438 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
3439 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
3440 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
3441 
3442 /* Module declarations from 'cpython.buffer' */
3443 
3444 /* Module declarations from 'libc.string' */
3445 
3446 /* Module declarations from 'libc.stdio' */
3447 
3448 /* Module declarations from '__builtin__' */
3449 
3450 /* Module declarations from 'cpython.type' */
3451 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
3452 
3453 /* Module declarations from 'cpython' */
3454 
3455 /* Module declarations from 'cpython.object' */
3456 
3457 /* Module declarations from 'cpython.ref' */
3458 
3459 /* Module declarations from 'cpython.mem' */
3460 
3461 /* Module declarations from 'numpy' */
3462 
3463 /* Module declarations from 'numpy' */
3464 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
3465 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
3466 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
3467 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
3468 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
3469 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
3470 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
3471 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
3472 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
3473 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
3474 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
3475 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
3476 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
3477 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
3478 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
3479 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
3480 
3481 /* Module declarations from 'cython.view' */
3482 
3483 /* Module declarations from 'cython' */
3484 
3485 /* Module declarations from 'libc.math' */
3486 
3487 /* Module declarations from 'statsmodels.src.math' */
3488 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_11statsmodels_3src_4math_zabs(__pyx_t_double_complex); /*proto*/
3489 static CYTHON_INLINE __pyx_t_double_complex __pyx_f_11statsmodels_3src_4math_zlog(__pyx_t_double_complex); /*proto*/
3490 
3491 /* Module declarations from 'scipy.linalg.cython_blas' */
3492 static void (*__pyx_f_5scipy_6linalg_11cython_blas_ccopy)(int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *); /*proto*/
3493 static void (*__pyx_f_5scipy_6linalg_11cython_blas_cgemm)(char *, char *, int *, int *, int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *); /*proto*/
3494 static void (*__pyx_f_5scipy_6linalg_11cython_blas_cgemv)(char *, int *, int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *); /*proto*/
3495 static void (*__pyx_f_5scipy_6linalg_11cython_blas_cscal)(int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *); /*proto*/
3496 static void (*__pyx_f_5scipy_6linalg_11cython_blas_ctrmv)(char *, char *, char *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *); /*proto*/
3497 static __pyx_t_5scipy_6linalg_11cython_blas_d (*__pyx_f_5scipy_6linalg_11cython_blas_dasum)(int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *); /*proto*/
3498 static void (*__pyx_f_5scipy_6linalg_11cython_blas_dcopy)(int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *); /*proto*/
3499 static void (*__pyx_f_5scipy_6linalg_11cython_blas_dgemm)(char *, char *, int *, int *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *); /*proto*/
3500 static void (*__pyx_f_5scipy_6linalg_11cython_blas_dgemv)(char *, int *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *); /*proto*/
3501 static void (*__pyx_f_5scipy_6linalg_11cython_blas_dscal)(int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *); /*proto*/
3502 static void (*__pyx_f_5scipy_6linalg_11cython_blas_dtrmv)(char *, char *, char *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *); /*proto*/
3503 static __pyx_t_5scipy_6linalg_11cython_blas_d (*__pyx_f_5scipy_6linalg_11cython_blas_dzasum)(int *, __pyx_t_double_complex *, int *); /*proto*/
3504 static __pyx_t_5scipy_6linalg_11cython_blas_s (*__pyx_f_5scipy_6linalg_11cython_blas_sasum)(int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *); /*proto*/
3505 static __pyx_t_5scipy_6linalg_11cython_blas_s (*__pyx_f_5scipy_6linalg_11cython_blas_scasum)(int *, __pyx_t_float_complex *, int *); /*proto*/
3506 static void (*__pyx_f_5scipy_6linalg_11cython_blas_scopy)(int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *); /*proto*/
3507 static void (*__pyx_f_5scipy_6linalg_11cython_blas_sgemm)(char *, char *, int *, int *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *); /*proto*/
3508 static void (*__pyx_f_5scipy_6linalg_11cython_blas_sgemv)(char *, int *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *); /*proto*/
3509 static void (*__pyx_f_5scipy_6linalg_11cython_blas_sscal)(int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *); /*proto*/
3510 static void (*__pyx_f_5scipy_6linalg_11cython_blas_strmv)(char *, char *, char *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *); /*proto*/
3511 static void (*__pyx_f_5scipy_6linalg_11cython_blas_zcopy)(int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *); /*proto*/
3512 static void (*__pyx_f_5scipy_6linalg_11cython_blas_zgemm)(char *, char *, int *, int *, int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *); /*proto*/
3513 static void (*__pyx_f_5scipy_6linalg_11cython_blas_zgemv)(char *, int *, int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *); /*proto*/
3514 static void (*__pyx_f_5scipy_6linalg_11cython_blas_zscal)(int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *); /*proto*/
3515 static void (*__pyx_f_5scipy_6linalg_11cython_blas_ztrmv)(char *, char *, char *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *); /*proto*/
3516 
3517 /* Module declarations from 'scipy.linalg.cython_lapack' */
3518 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_cgetrf)(int *, int *, __pyx_t_float_complex *, int *, int *, int *); /*proto*/
3519 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_cgetrs)(char *, int *, int *, __pyx_t_float_complex *, int *, int *, __pyx_t_float_complex *, int *, int *); /*proto*/
3520 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_cpotrf)(char *, int *, __pyx_t_float_complex *, int *, int *); /*proto*/
3521 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_cpotri)(char *, int *, __pyx_t_float_complex *, int *, int *); /*proto*/
3522 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_cpotrs)(char *, int *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *, int *); /*proto*/
3523 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_ctrtrs)(char *, char *, char *, int *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *, int *); /*proto*/
3524 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_dgetrf)(int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *, int *); /*proto*/
3525 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_dgetrs)(char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *); /*proto*/
3526 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_dpotrf)(char *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *); /*proto*/
3527 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_dpotri)(char *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *); /*proto*/
3528 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_dpotrs)(char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *); /*proto*/
3529 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_dtrtrs)(char *, char *, char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *); /*proto*/
3530 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_sgetrf)(int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *, int *); /*proto*/
3531 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_sgetrs)(char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *); /*proto*/
3532 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_spotrf)(char *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *); /*proto*/
3533 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_spotri)(char *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *); /*proto*/
3534 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_spotrs)(char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *); /*proto*/
3535 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_strtrs)(char *, char *, char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *); /*proto*/
3536 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_zgetrf)(int *, int *, __pyx_t_double_complex *, int *, int *, int *); /*proto*/
3537 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_zgetrs)(char *, int *, int *, __pyx_t_double_complex *, int *, int *, __pyx_t_double_complex *, int *, int *); /*proto*/
3538 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_zpotrf)(char *, int *, __pyx_t_double_complex *, int *, int *); /*proto*/
3539 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_zpotri)(char *, int *, __pyx_t_double_complex *, int *, int *); /*proto*/
3540 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_zpotrs)(char *, int *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *, int *); /*proto*/
3541 static void (*__pyx_f_5scipy_6linalg_13cython_lapack_ztrtrs)(char *, char *, char *, int *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *, int *); /*proto*/
3542 
3543 /* Module declarations from 'statsmodels.tsa.statespace._tools' */
3544 static PyObject *(*__pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape)(PyObject *, Py_ssize_t *, int, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape *__pyx_optional_args); /*proto*/
3545 static PyObject *(*__pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape)(PyObject *, Py_ssize_t *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape *__pyx_optional_args); /*proto*/
3546 static int (*__pyx_f_11statsmodels_3tsa_10statespace_6_tools__ssolve_discrete_lyapunov)(__pyx_t_5numpy_float32_t *, __pyx_t_5numpy_float32_t *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__ssolve_discrete_lyapunov *__pyx_optional_args); /*proto*/
3547 static int (*__pyx_f_11statsmodels_3tsa_10statespace_6_tools__dsolve_discrete_lyapunov)(__pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__dsolve_discrete_lyapunov *__pyx_optional_args); /*proto*/
3548 static int (*__pyx_f_11statsmodels_3tsa_10statespace_6_tools__csolve_discrete_lyapunov)(__pyx_t_float_complex *, __pyx_t_float_complex *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__csolve_discrete_lyapunov *__pyx_optional_args); /*proto*/
3549 static int (*__pyx_f_11statsmodels_3tsa_10statespace_6_tools__zsolve_discrete_lyapunov)(__pyx_t_double_complex *, __pyx_t_double_complex *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__zsolve_discrete_lyapunov *__pyx_optional_args); /*proto*/
3550 static int (*__pyx_f_11statsmodels_3tsa_10statespace_6_tools__sldl)(__pyx_t_5numpy_float32_t *, int); /*proto*/
3551 static int (*__pyx_f_11statsmodels_3tsa_10statespace_6_tools__dldl)(__pyx_t_5numpy_float64_t *, int); /*proto*/
3552 static int (*__pyx_f_11statsmodels_3tsa_10statespace_6_tools__cldl)(__pyx_t_float_complex *, int); /*proto*/
3553 static int (*__pyx_f_11statsmodels_3tsa_10statespace_6_tools__zldl)(__pyx_t_double_complex *, int); /*proto*/
3554 
3555 /* Module declarations from 'statsmodels.tsa.statespace._initialization' */
3556 static PyTypeObject *__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_sInitialization = 0;
3557 static PyTypeObject *__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_dInitialization = 0;
3558 static PyTypeObject *__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_cInitialization = 0;
3559 static PyTypeObject *__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_zInitialization = 0;
3560 
3561 /* Module declarations from 'statsmodels.tsa.statespace._representation' */
3562 static PyTypeObject *__pyx_ptype_11statsmodels_3tsa_10statespace_15_representation_sStatespace = 0;
3563 static PyTypeObject *__pyx_ptype_11statsmodels_3tsa_10statespace_15_representation_dStatespace = 0;
3564 static PyTypeObject *__pyx_ptype_11statsmodels_3tsa_10statespace_15_representation_cStatespace = 0;
3565 static PyTypeObject *__pyx_ptype_11statsmodels_3tsa_10statespace_15_representation_zStatespace = 0;
3566 static PyTypeObject *__pyx_array_type = 0;
3567 static PyTypeObject *__pyx_MemviewEnum_type = 0;
3568 static PyTypeObject *__pyx_memoryview_type = 0;
3569 static PyTypeObject *__pyx_memoryviewslice_type = 0;
3570 static int __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN;
3571 static PyObject *generic = 0;
3572 static PyObject *strided = 0;
3573 static PyObject *indirect = 0;
3574 static PyObject *contiguous = 0;
3575 static PyObject *indirect_contiguous = 0;
3576 static int __pyx_memoryview_thread_locks_used;
3577 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
3578 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_sselect_cov(int, int, __pyx_t_5numpy_float32_t *, __pyx_t_5numpy_float32_t *, __pyx_t_5numpy_float32_t *, __pyx_t_5numpy_float32_t *); /*proto*/
3579 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_dselect_cov(int, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *); /*proto*/
3580 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_cselect_cov(int, int, __pyx_t_float_complex *, __pyx_t_float_complex *, __pyx_t_float_complex *, __pyx_t_float_complex *); /*proto*/
3581 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_zselect_cov(int, int, __pyx_t_double_complex *, __pyx_t_double_complex *, __pyx_t_double_complex *, __pyx_t_double_complex *); /*proto*/
3582 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
3583 static void *__pyx_align_pointer(void *, size_t); /*proto*/
3584 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
3585 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
3586 static PyObject *_unellipsify(PyObject *, int); /*proto*/
3587 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
3588 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
3589 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
3590 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
3591 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
3592 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
3593 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3594 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3595 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
3596 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3597 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
3598 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
3599 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
3600 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
3601 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
3602 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
3603 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
3604 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
3605 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
3606 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
3607 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
3608 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
3609 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
3610 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
3611 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
3612 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
3613 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
3614 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
3615 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 };
3616 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 };
3617 static __Pyx_TypeInfo __Pyx_TypeInfo___pyx_t_float_complex = { "float complex", NULL, sizeof(__pyx_t_float_complex), { 0 }, 0, 'C', 0, 0 };
3618 static __Pyx_TypeInfo __Pyx_TypeInfo___pyx_t_double_complex = { "double complex", NULL, sizeof(__pyx_t_double_complex), { 0 }, 0, 'C', 0, 0 };
3619 static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
3620 #define __Pyx_MODULE_NAME "statsmodels.tsa.statespace._representation"
3621 extern int __pyx_module_is_main_statsmodels__tsa__statespace___representation;
3622 int __pyx_module_is_main_statsmodels__tsa__statespace___representation = 0;
3623 
3624 /* Implementation of 'statsmodels.tsa.statespace._representation' */
3625 static PyObject *__pyx_builtin_range;
3626 static PyObject *__pyx_builtin_StopIteration;
3627 static PyObject *__pyx_builtin_IndexError;
3628 static PyObject *__pyx_builtin_RuntimeError;
3629 static PyObject *__pyx_builtin_ImportError;
3630 static PyObject *__pyx_builtin_ValueError;
3631 static PyObject *__pyx_builtin_MemoryError;
3632 static PyObject *__pyx_builtin_enumerate;
3633 static PyObject *__pyx_builtin_TypeError;
3634 static PyObject *__pyx_builtin_Ellipsis;
3635 static PyObject *__pyx_builtin_id;
3636 static const char __pyx_k_F[] = "F";
3637 static const char __pyx_k_O[] = "O";
3638 static const char __pyx_k_T[] = "T";
3639 static const char __pyx_k_c[] = "c";
3640 static const char __pyx_k_d[] = "d";
3641 static const char __pyx_k_s[] = "s";
3642 static const char __pyx_k_t[] = "t";
3643 static const char __pyx_k_z[] = "z";
3644 static const char __pyx_k_id[] = "id";
3645 static const char __pyx_k_np[] = "np";
3646 static const char __pyx_k_eye[] = "eye";
3647 static const char __pyx_k_new[] = "__new__";
3648 static const char __pyx_k_obj[] = "obj";
3649 static const char __pyx_k_obs[] = "obs";
3650 static const char __pyx_k_sum[] = "sum";
3651 static const char __pyx_k_tmp[] = "tmp";
3652 static const char __pyx_k_axis[] = "axis";
3653 static const char __pyx_k_base[] = "base";
3654 static const char __pyx_k_copy[] = "copy";
3655 static const char __pyx_k_dict[] = "__dict__";
3656 static const char __pyx_k_init[] = "init";
3657 static const char __pyx_k_main[] = "__main__";
3658 static const char __pyx_k_mode[] = "mode";
3659 static const char __pyx_k_name[] = "name";
3660 static const char __pyx_k_ndim[] = "ndim";
3661 static const char __pyx_k_pack[] = "pack";
3662 static const char __pyx_k_seek[] = "seek";
3663 static const char __pyx_k_size[] = "size";
3664 static const char __pyx_k_step[] = "step";
3665 static const char __pyx_k_stop[] = "stop";
3666 static const char __pyx_k_test[] = "__test__";
3667 static const char __pyx_k_warn[] = "warn";
3668 static const char __pyx_k_ASCII[] = "ASCII";
3669 static const char __pyx_k_array[] = "array";
3670 static const char __pyx_k_class[] = "__class__";
3671 static const char __pyx_k_clear[] = "clear";
3672 static const char __pyx_k_dtype[] = "dtype";
3673 static const char __pyx_k_error[] = "error";
3674 static const char __pyx_k_flags[] = "flags";
3675 static const char __pyx_k_int32[] = "int32";
3676 static const char __pyx_k_isnan[] = "isnan";
3677 static const char __pyx_k_items[] = "items";
3678 static const char __pyx_k_numpy[] = "numpy";
3679 static const char __pyx_k_order[] = "order";
3680 static const char __pyx_k_range[] = "range";
3681 static const char __pyx_k_reset[] = "reset";
3682 static const char __pyx_k_shape[] = "shape";
3683 static const char __pyx_k_start[] = "start";
3684 static const char __pyx_k_blocks[] = "blocks";
3685 static const char __pyx_k_design[] = "design";
3686 static const char __pyx_k_encode[] = "encode";
3687 static const char __pyx_k_format[] = "format";
3688 static const char __pyx_k_import[] = "__import__";
3689 static const char __pyx_k_linalg[] = "linalg";
3690 static const char __pyx_k_name_2[] = "__name__";
3691 static const char __pyx_k_offset[] = "offset";
3692 static const char __pyx_k_pickle[] = "pickle";
3693 static const char __pyx_k_prefix[] = "prefix";
3694 static const char __pyx_k_reduce[] = "__reduce__";
3695 static const char __pyx_k_struct[] = "struct";
3696 static const char __pyx_k_unpack[] = "unpack";
3697 static const char __pyx_k_update[] = "update";
3698 static const char __pyx_k_diffuse[] = "diffuse";
3699 static const char __pyx_k_float32[] = "float32";
3700 static const char __pyx_k_fortran[] = "fortran";
3701 static const char __pyx_k_memview[] = "memview";
3702 static const char __pyx_k_missing[] = "missing";
3703 static const char __pyx_k_obs_cov[] = "obs_cov";
3704 static const char __pyx_k_Ellipsis[] = "Ellipsis";
3705 static const char __pyx_k_getstate[] = "__getstate__";
3706 static const char __pyx_k_itemsize[] = "itemsize";
3707 static const char __pyx_k_nmissing[] = "nmissing";
3708 static const char __pyx_k_pyx_type[] = "__pyx_type";
3709 static const char __pyx_k_setstate[] = "__setstate__";
3710 static const char __pyx_k_variance[] = "variance";
3711 static const char __pyx_k_warnings[] = "warnings";
3712 static const char __pyx_k_TypeError[] = "TypeError";
3713 static const char __pyx_k_complex64[] = "complex64";
3714 static const char __pyx_k_enumerate[] = "enumerate";
3715 static const char __pyx_k_pyx_state[] = "__pyx_state";
3716 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
3717 static const char __pyx_k_selection[] = "selection";
3718 static const char __pyx_k_state_cov[] = "state_cov";
3719 static const char __pyx_k_IndexError[] = "IndexError";
3720 static const char __pyx_k_ValueError[] = "ValueError";
3721 static const char __pyx_k_initialize[] = "initialize";
3722 static const char __pyx_k_pyx_result[] = "__pyx_result";
3723 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
3724 static const char __pyx_k_stationary[] = "stationary";
3725 static const char __pyx_k_transition[] = "transition";
3726 static const char __pyx_k_ImportError[] = "ImportError";
3727 static const char __pyx_k_LinAlgError[] = "LinAlgError";
3728 static const char __pyx_k_MemoryError[] = "MemoryError";
3729 static const char __pyx_k_PickleError[] = "PickleError";
3730 static const char __pyx_k_cStatespace[] = "cStatespace";
3731 static const char __pyx_k_dStatespace[] = "dStatespace";
3732 static const char __pyx_k_has_missing[] = "has_missing";
3733 static const char __pyx_k_initialized[] = "initialized";
3734 static const char __pyx_k_sStatespace[] = "sStatespace";
3735 static const char __pyx_k_zStatespace[] = "zStatespace";
3736 static const char __pyx_k_RuntimeError[] = "RuntimeError";
3737 static const char __pyx_k_collapse_obs[] = "collapse_obs";
3738 static const char __pyx_k_complex_step[] = "complex_step";
3739 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
3740 static const char __pyx_k_selected_obs[] = "selected_obs";
3741 static const char __pyx_k_stringsource[] = "stringsource";
3742 static const char __pyx_k_StopIteration[] = "StopIteration";
3743 static const char __pyx_k_initial_state[] = "initial_state";
3744 static const char __pyx_k_obs_intercept[] = "obs_intercept";
3745 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
3746 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
3747 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
3748 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
3749 static const char __pyx_k_collapse_design[] = "collapse_design";
3750 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
3751 static const char __pyx_k_initial_state_2[] = "initial state";
3752 static const char __pyx_k_initializations[] = "_initializations";
3753 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
3754 static const char __pyx_k_selected_design[] = "selected_design";
3755 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
3756 static const char __pyx_k_state_intercept[] = "state_intercept";
3757 static const char __pyx_k_collapse_obs_cov[] = "collapse_obs_cov";
3758 static const char __pyx_k_collapse_obs_tmp[] = "collapse_obs_tmp";
3759 static const char __pyx_k_diagonal_obs_cov[] = "diagonal_obs_cov";
3760 static const char __pyx_k_selected_obs_cov[] = "selected_obs_cov";
3761 static const char __pyx_k_transform_design[] = "transform_design";
3762 static const char __pyx_k_collapse_cholesky[] = "collapse_cholesky";
3763 static const char __pyx_k_initial_state_cov[] = "initial_state_cov";
3764 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
3765 static const char __pyx_k_state_intercept_2[] = "state intercept";
3766 static const char __pyx_k_transform_obs_cov[] = "transform_obs_cov";
3767 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
3768 static const char __pyx_k_selected_state_cov[] = "selected_state_cov";
3769 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
3770 static const char __pyx_k_transform_cholesky[] = "transform_cholesky";
3771 static const char __pyx_k_initialization_type[] = "initialization_type";
3772 static const char __pyx_k_initialized_diffuse[] = "initialized_diffuse";
3773 static const char __pyx_k_companion_transition[] = "companion_transition";
3774 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
3775 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
3776 static const char __pyx_k_observation_intercept[] = "observation intercept";
3777 static const char __pyx_k_transform_determinant[] = "transform_determinant";
3778 static const char __pyx_k_transform_diagonalize[] = "transform_diagonalize";
3779 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
3780 static const char __pyx_k_collapse_loglikelihood[] = "collapse_loglikelihood";
3781 static const char __pyx_k_initialized_stationary[] = "initialized_stationary";
3782 static const char __pyx_k_selected_obs_intercept[] = "selected_obs_intercept";
3783 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
3784 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
3785 static const char __pyx_k_state_covariance_matrix[] = "state covariance matrix";
3786 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
3787 static const char __pyx_k_initial_state_covariance[] = "initial state covariance";
3788 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
3789 static const char __pyx_k_initial_diffuse_state_cov[] = "initial_diffuse_state_cov";
3790 static const char __pyx_k_initialize_initialization[] = "_initialize_initialization";
3791 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
3792 static const char __pyx_k_observation_covariance_matrix[] = "observation covariance matrix";
3793 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
3794 static const char __pyx_k_Observation_index_out_of_range[] = "Observation index out of range";
3795 static const char __pyx_k_State_Space_Models_Author_Chad[] = "\nState Space Models\n\nAuthor: Chad Fulton  \nLicense: Simplified-BSD\n";
3796 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
3797 static const char __pyx_k_transform_generalized_collapse[] = "transform_generalized_collapse";
3798 static const char __pyx_k_Invalid_value_in_calculation_of[] = "Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d";
3799 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
3800 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
3801 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
3802 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
3803 static const char __pyx_k_Cannot_collapse_observation_vect[] = "Cannot collapse observation vector it the state dimension is larger than the dimension of the observation vector.";
3804 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
3805 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
3806 static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
3807 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
3808 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
3809 static const char __pyx_k_Invalid_value_in_C_matrix_encoun[] = "Invalid value in C matrix encountered at period %d";
3810 static const char __pyx_k_Invalid_value_in_LDL_factorizati[] = "Invalid value in LDL factorization of observation covariance matrix encountered at period %d";
3811 static const char __pyx_k_Invalid_value_in_ZHZ_matrix_enco[] = "Invalid value in ZHZ matrix encountered at period %d";
3812 static const char __pyx_k_Invalid_value_in_factorization_o[] = "Invalid value in factorization of observation covariance matrix encountered at period %d";
3813 static const char __pyx_k_Invalid_value_in_observation_cov[] = "Invalid value in observation covariance matrix encountered at period %d";
3814 static const char __pyx_k_Non_positive_definite_C_matrix_e[] = "Non-positive-definite C matrix encountered at period %d";
3815 static const char __pyx_k_Non_positive_definite_ZHZ_matrix[] = "Non-positive-definite ZHZ matrix encountered at period %d";
3816 static const char __pyx_k_Non_positive_definite_observatio[] = "Non-positive-definite observation covariance matrix encountered at period %d";
3817 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
3818 static const char __pyx_k_Positive_semi_definite_observati[] = "Positive semi-definite observation covariance matrix encountered at period %d";
3819 static const char __pyx_k_Singular_factorization_of_observ[] = "Singular factorization of observation covariance matrix encountered at period %d";
3820 static const char __pyx_k_Statespace_model_not_initialized[] = "Statespace model not initialized.";
3821 static const char __pyx_k_The_observation_collapse_transfo[] = "The observation collapse transformation does not currently support an observation intercept.";
3822 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
3823 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
3824 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
3825 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
3826 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
3827 static PyObject *__pyx_n_s_ASCII;
3828 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
3829 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
3830 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
3831 static PyObject *__pyx_kp_u_Cannot_collapse_observation_vect;
3832 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
3833 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
3834 static PyObject *__pyx_n_s_Ellipsis;
3835 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
3836 static PyObject *__pyx_n_u_F;
3837 static PyObject *__pyx_n_s_ImportError;
3838 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
3839 static PyObject *__pyx_n_s_IndexError;
3840 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
3841 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
3842 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
3843 static PyObject *__pyx_kp_u_Invalid_value_in_C_matrix_encoun;
3844 static PyObject *__pyx_kp_u_Invalid_value_in_LDL_factorizati;
3845 static PyObject *__pyx_kp_u_Invalid_value_in_ZHZ_matrix_enco;
3846 static PyObject *__pyx_kp_u_Invalid_value_in_calculation_of;
3847 static PyObject *__pyx_kp_u_Invalid_value_in_factorization_o;
3848 static PyObject *__pyx_kp_u_Invalid_value_in_observation_cov;
3849 static PyObject *__pyx_n_s_LinAlgError;
3850 static PyObject *__pyx_n_s_MemoryError;
3851 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
3852 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
3853 static PyObject *__pyx_kp_u_Non_positive_definite_C_matrix_e;
3854 static PyObject *__pyx_kp_u_Non_positive_definite_ZHZ_matrix;
3855 static PyObject *__pyx_kp_u_Non_positive_definite_observatio;
3856 static PyObject *__pyx_n_b_O;
3857 static PyObject *__pyx_kp_u_Observation_index_out_of_range;
3858 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
3859 static PyObject *__pyx_n_s_PickleError;
3860 static PyObject *__pyx_kp_u_Positive_semi_definite_observati;
3861 static PyObject *__pyx_n_s_RuntimeError;
3862 static PyObject *__pyx_kp_u_Singular_factorization_of_observ;
3863 static PyObject *__pyx_kp_u_Statespace_model_not_initialized;
3864 static PyObject *__pyx_n_s_StopIteration;
3865 static PyObject *__pyx_n_s_T;
3866 static PyObject *__pyx_kp_u_The_observation_collapse_transfo;
3867 static PyObject *__pyx_n_s_TypeError;
3868 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
3869 static PyObject *__pyx_n_s_ValueError;
3870 static PyObject *__pyx_n_s_View_MemoryView;
3871 static PyObject *__pyx_n_s_allocate_buffer;
3872 static PyObject *__pyx_n_s_array;
3873 static PyObject *__pyx_n_s_axis;
3874 static PyObject *__pyx_n_s_base;
3875 static PyObject *__pyx_n_s_blocks;
3876 static PyObject *__pyx_n_s_c;
3877 static PyObject *__pyx_n_u_c;
3878 static PyObject *__pyx_n_s_cStatespace;
3879 static PyObject *__pyx_n_s_class;
3880 static PyObject *__pyx_n_s_clear;
3881 static PyObject *__pyx_n_s_cline_in_traceback;
3882 static PyObject *__pyx_n_u_collapse_cholesky;
3883 static PyObject *__pyx_n_u_collapse_design;
3884 static PyObject *__pyx_n_u_collapse_loglikelihood;
3885 static PyObject *__pyx_n_u_collapse_obs;
3886 static PyObject *__pyx_n_u_collapse_obs_cov;
3887 static PyObject *__pyx_n_u_collapse_obs_tmp;
3888 static PyObject *__pyx_n_u_companion_transition;
3889 static PyObject *__pyx_n_s_complex64;
3890 static PyObject *__pyx_n_s_complex_step;
3891 static PyObject *__pyx_kp_s_contiguous_and_direct;
3892 static PyObject *__pyx_kp_s_contiguous_and_indirect;
3893 static PyObject *__pyx_n_s_copy;
3894 static PyObject *__pyx_n_u_d;
3895 static PyObject *__pyx_n_s_dStatespace;
3896 static PyObject *__pyx_n_s_design;
3897 static PyObject *__pyx_n_u_design;
3898 static PyObject *__pyx_n_s_diagonal_obs_cov;
3899 static PyObject *__pyx_n_s_dict;
3900 static PyObject *__pyx_n_u_diffuse;
3901 static PyObject *__pyx_n_s_dtype;
3902 static PyObject *__pyx_n_s_dtype_is_object;
3903 static PyObject *__pyx_n_s_encode;
3904 static PyObject *__pyx_n_s_enumerate;
3905 static PyObject *__pyx_n_s_error;
3906 static PyObject *__pyx_n_s_eye;
3907 static PyObject *__pyx_n_s_flags;
3908 static PyObject *__pyx_n_s_float32;
3909 static PyObject *__pyx_n_s_format;
3910 static PyObject *__pyx_n_s_fortran;
3911 static PyObject *__pyx_n_u_fortran;
3912 static PyObject *__pyx_n_s_getstate;
3913 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
3914 static PyObject *__pyx_n_u_has_missing;
3915 static PyObject *__pyx_n_s_id;
3916 static PyObject *__pyx_n_s_import;
3917 static PyObject *__pyx_n_s_init;
3918 static PyObject *__pyx_n_u_initial_diffuse_state_cov;
3919 static PyObject *__pyx_n_s_initial_state;
3920 static PyObject *__pyx_n_u_initial_state;
3921 static PyObject *__pyx_kp_u_initial_state_2;
3922 static PyObject *__pyx_n_s_initial_state_cov;
3923 static PyObject *__pyx_n_u_initial_state_cov;
3924 static PyObject *__pyx_kp_u_initial_state_covariance;
3925 static PyObject *__pyx_n_s_initialization_type;
3926 static PyObject *__pyx_n_s_initializations;
3927 static PyObject *__pyx_n_s_initialize;
3928 static PyObject *__pyx_n_s_initialize_initialization;
3929 static PyObject *__pyx_n_u_initialized;
3930 static PyObject *__pyx_n_u_initialized_diffuse;
3931 static PyObject *__pyx_n_u_initialized_stationary;
3932 static PyObject *__pyx_n_s_int32;
3933 static PyObject *__pyx_n_s_isnan;
3934 static PyObject *__pyx_n_s_items;
3935 static PyObject *__pyx_n_s_itemsize;
3936 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
3937 static PyObject *__pyx_n_s_linalg;
3938 static PyObject *__pyx_n_s_main;
3939 static PyObject *__pyx_n_s_memview;
3940 static PyObject *__pyx_n_u_missing;
3941 static PyObject *__pyx_n_s_mode;
3942 static PyObject *__pyx_n_s_name;
3943 static PyObject *__pyx_n_s_name_2;
3944 static PyObject *__pyx_n_s_ndim;
3945 static PyObject *__pyx_n_s_new;
3946 static PyObject *__pyx_n_u_nmissing;
3947 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
3948 static PyObject *__pyx_n_s_np;
3949 static PyObject *__pyx_n_s_numpy;
3950 static PyObject *__pyx_kp_u_numpy_core_multiarray_failed_to;
3951 static PyObject *__pyx_kp_u_numpy_core_umath_failed_to_impor;
3952 static PyObject *__pyx_n_s_obj;
3953 static PyObject *__pyx_n_s_obs;
3954 static PyObject *__pyx_n_s_obs_cov;
3955 static PyObject *__pyx_n_s_obs_intercept;
3956 static PyObject *__pyx_kp_u_observation_covariance_matrix;
3957 static PyObject *__pyx_kp_u_observation_intercept;
3958 static PyObject *__pyx_n_s_offset;
3959 static PyObject *__pyx_n_s_order;
3960 static PyObject *__pyx_n_s_pack;
3961 static PyObject *__pyx_n_s_pickle;
3962 static PyObject *__pyx_n_s_prefix;
3963 static PyObject *__pyx_n_s_pyx_PickleError;
3964 static PyObject *__pyx_n_s_pyx_checksum;
3965 static PyObject *__pyx_n_s_pyx_getbuffer;
3966 static PyObject *__pyx_n_s_pyx_result;
3967 static PyObject *__pyx_n_s_pyx_state;
3968 static PyObject *__pyx_n_s_pyx_type;
3969 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
3970 static PyObject *__pyx_n_s_pyx_vtable;
3971 static PyObject *__pyx_n_s_range;
3972 static PyObject *__pyx_n_s_reduce;
3973 static PyObject *__pyx_n_s_reduce_cython;
3974 static PyObject *__pyx_n_s_reduce_ex;
3975 static PyObject *__pyx_n_s_reset;
3976 static PyObject *__pyx_n_u_s;
3977 static PyObject *__pyx_n_s_sStatespace;
3978 static PyObject *__pyx_n_s_seek;
3979 static PyObject *__pyx_n_u_selected_design;
3980 static PyObject *__pyx_n_u_selected_obs;
3981 static PyObject *__pyx_n_u_selected_obs_cov;
3982 static PyObject *__pyx_n_u_selected_obs_intercept;
3983 static PyObject *__pyx_n_u_selected_state_cov;
3984 static PyObject *__pyx_n_s_selection;
3985 static PyObject *__pyx_n_s_setstate;
3986 static PyObject *__pyx_n_s_setstate_cython;
3987 static PyObject *__pyx_n_s_shape;
3988 static PyObject *__pyx_n_s_size;
3989 static PyObject *__pyx_n_s_start;
3990 static PyObject *__pyx_n_s_state_cov;
3991 static PyObject *__pyx_kp_u_state_covariance_matrix;
3992 static PyObject *__pyx_n_s_state_intercept;
3993 static PyObject *__pyx_kp_u_state_intercept_2;
3994 static PyObject *__pyx_n_u_stationary;
3995 static PyObject *__pyx_n_s_step;
3996 static PyObject *__pyx_n_s_stop;
3997 static PyObject *__pyx_kp_s_strided_and_direct;
3998 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
3999 static PyObject *__pyx_kp_s_strided_and_indirect;
4000 static PyObject *__pyx_kp_s_stringsource;
4001 static PyObject *__pyx_n_s_struct;
4002 static PyObject *__pyx_n_s_sum;
4003 static PyObject *__pyx_n_s_t;
4004 static PyObject *__pyx_n_u_t;
4005 static PyObject *__pyx_n_s_test;
4006 static PyObject *__pyx_n_u_tmp;
4007 static PyObject *__pyx_n_u_transform_cholesky;
4008 static PyObject *__pyx_n_u_transform_design;
4009 static PyObject *__pyx_n_u_transform_determinant;
4010 static PyObject *__pyx_n_s_transform_diagonalize;
4011 static PyObject *__pyx_n_s_transform_generalized_collapse;
4012 static PyObject *__pyx_n_u_transform_obs_cov;
4013 static PyObject *__pyx_n_s_transition;
4014 static PyObject *__pyx_n_u_transition;
4015 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
4016 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
4017 static PyObject *__pyx_n_s_unpack;
4018 static PyObject *__pyx_n_s_update;
4019 static PyObject *__pyx_n_s_variance;
4020 static PyObject *__pyx_n_s_warn;
4021 static PyObject *__pyx_n_s_warnings;
4022 static PyObject *__pyx_n_u_z;
4023 static PyObject *__pyx_n_s_zStatespace;
4024 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_obs, __Pyx_memviewslice __pyx_v_design, __Pyx_memviewslice __pyx_v_obs_intercept, __Pyx_memviewslice __pyx_v_obs_cov, __Pyx_memviewslice __pyx_v_transition, __Pyx_memviewslice __pyx_v_state_intercept, __Pyx_memviewslice __pyx_v_selection, __Pyx_memviewslice __pyx_v_state_cov, PyObject *__pyx_v_diagonal_obs_cov); /* proto */
4025 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4026 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
4027 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_init, PyObject *__pyx_v_offset, PyObject *__pyx_v_complex_step, PyObject *__pyx_v_clear); /* proto */
4028 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_initial_state, __Pyx_memviewslice __pyx_v_initial_state_cov); /* proto */
4029 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, __pyx_t_5numpy_float32_t __pyx_v_variance); /* proto */
4030 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_complex_step); /* proto */
4031 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4032 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4033 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, unsigned int __pyx_v_reset); /* proto */
4034 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4035 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4036 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4037 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4038 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4039 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4040 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4041 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4042 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4043 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4044 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4045 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4046 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4047 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4048 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4049 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4050 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4051 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4052 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4053 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4054 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4055 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4056 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4057 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4058 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4059 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4060 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4061 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4062 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4063 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4064 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4065 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4066 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4067 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4068 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4069 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4070 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4071 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4072 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4073 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4074 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4075 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4076 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4077 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4078 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4079 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4080 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4081 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4082 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4083 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4084 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4085 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4086 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4087 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4088 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4089 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self); /* proto */
4090 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_obs, __Pyx_memviewslice __pyx_v_design, __Pyx_memviewslice __pyx_v_obs_intercept, __Pyx_memviewslice __pyx_v_obs_cov, __Pyx_memviewslice __pyx_v_transition, __Pyx_memviewslice __pyx_v_state_intercept, __Pyx_memviewslice __pyx_v_selection, __Pyx_memviewslice __pyx_v_state_cov, PyObject *__pyx_v_diagonal_obs_cov); /* proto */
4091 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4092 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
4093 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_init, PyObject *__pyx_v_offset, PyObject *__pyx_v_complex_step, PyObject *__pyx_v_clear); /* proto */
4094 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_initial_state, __Pyx_memviewslice __pyx_v_initial_state_cov); /* proto */
4095 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_variance); /* proto */
4096 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_complex_step); /* proto */
4097 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4098 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4099 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, unsigned int __pyx_v_reset); /* proto */
4100 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4101 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4102 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4103 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4104 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4105 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4106 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4107 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4108 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4109 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4110 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4111 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4112 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4113 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4114 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4115 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4116 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4117 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4118 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4119 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4120 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4121 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4122 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4123 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4124 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4125 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4126 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4127 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4128 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4129 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4130 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4131 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4132 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4133 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4134 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4135 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4136 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4137 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4138 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4139 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4140 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4141 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4142 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4143 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4144 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4145 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4146 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4147 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4148 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4149 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4150 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4151 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4152 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4153 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4154 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4155 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self); /* proto */
4156 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_obs, __Pyx_memviewslice __pyx_v_design, __Pyx_memviewslice __pyx_v_obs_intercept, __Pyx_memviewslice __pyx_v_obs_cov, __Pyx_memviewslice __pyx_v_transition, __Pyx_memviewslice __pyx_v_state_intercept, __Pyx_memviewslice __pyx_v_selection, __Pyx_memviewslice __pyx_v_state_cov, PyObject *__pyx_v_diagonal_obs_cov); /* proto */
4157 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4158 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
4159 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_init, PyObject *__pyx_v_offset, PyObject *__pyx_v_complex_step, PyObject *__pyx_v_clear); /* proto */
4160 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_initial_state, __Pyx_memviewslice __pyx_v_initial_state_cov); /* proto */
4161 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, __pyx_t_float_complex __pyx_v_variance); /* proto */
4162 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_complex_step); /* proto */
4163 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4164 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4165 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, unsigned int __pyx_v_reset); /* proto */
4166 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4167 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4168 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4169 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4170 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4171 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4172 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4173 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4174 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4175 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4176 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4177 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4178 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4179 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4180 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4181 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4182 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4183 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4184 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4185 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4186 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4187 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4188 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4189 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4190 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4191 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4192 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4193 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4194 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4195 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4196 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4197 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4198 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4199 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4200 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4201 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4202 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4203 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4204 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4205 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4206 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4207 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4208 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4209 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4210 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4211 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4212 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4213 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4214 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4215 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4216 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4217 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4218 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4219 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4220 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4221 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self); /* proto */
4222 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_obs, __Pyx_memviewslice __pyx_v_design, __Pyx_memviewslice __pyx_v_obs_intercept, __Pyx_memviewslice __pyx_v_obs_cov, __Pyx_memviewslice __pyx_v_transition, __Pyx_memviewslice __pyx_v_state_intercept, __Pyx_memviewslice __pyx_v_selection, __Pyx_memviewslice __pyx_v_state_cov, PyObject *__pyx_v_diagonal_obs_cov); /* proto */
4223 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4224 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
4225 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_init, PyObject *__pyx_v_offset, PyObject *__pyx_v_complex_step, PyObject *__pyx_v_clear); /* proto */
4226 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_initial_state, __Pyx_memviewslice __pyx_v_initial_state_cov); /* proto */
4227 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, __pyx_t_double_complex __pyx_v_variance); /* proto */
4228 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_complex_step); /* proto */
4229 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4230 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4231 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, unsigned int __pyx_v_reset); /* proto */
4232 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4233 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4234 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4235 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4236 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4237 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4238 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4239 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4240 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4241 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4242 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4243 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4244 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4245 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4246 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4247 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4248 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4249 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4250 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4251 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4252 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4253 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4254 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4255 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4256 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4257 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4258 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4259 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4260 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4261 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
4262 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4263 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4264 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4265 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4266 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4267 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4268 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4269 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4270 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4271 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4272 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4273 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4274 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4275 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4276 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4277 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4278 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4279 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4280 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4281 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4282 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4283 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4284 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4285 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4286 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4287 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self); /* proto */
4288 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
4289 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
4290 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4291 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4292 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
4293 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
4294 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
4295 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
4296 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
4297 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4298 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
4299 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
4300 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
4301 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
4302 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
4303 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4304 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
4305 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
4306 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
4307 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4308 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4309 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4310 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4311 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4312 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4313 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4314 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4315 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4316 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4317 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4318 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4319 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4320 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4321 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4322 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4323 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
4324 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4325 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
4326 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
4327 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
4328 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
4329 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
4330 static PyObject *__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_sStatespace(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4331 static PyObject *__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_dStatespace(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4332 static PyObject *__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_cStatespace(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4333 static PyObject *__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_zStatespace(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4334 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4335 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4336 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4337 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
4338 static PyObject *__pyx_int_0;
4339 static PyObject *__pyx_int_1;
4340 static PyObject *__pyx_int_184977713;
4341 static PyObject *__pyx_int_neg_1;
4342 static __pyx_t_float_complex __pyx_k__5;
4343 static __pyx_t_double_complex __pyx_k__6;
4344 static PyObject *__pyx_tuple_;
4345 static PyObject *__pyx_tuple__2;
4346 static PyObject *__pyx_tuple__3;
4347 static PyObject *__pyx_tuple__4;
4348 static PyObject *__pyx_tuple__7;
4349 static PyObject *__pyx_tuple__8;
4350 static PyObject *__pyx_tuple__9;
4351 static PyObject *__pyx_slice__23;
4352 static PyObject *__pyx_tuple__10;
4353 static PyObject *__pyx_tuple__11;
4354 static PyObject *__pyx_tuple__12;
4355 static PyObject *__pyx_tuple__13;
4356 static PyObject *__pyx_tuple__14;
4357 static PyObject *__pyx_tuple__15;
4358 static PyObject *__pyx_tuple__16;
4359 static PyObject *__pyx_tuple__17;
4360 static PyObject *__pyx_tuple__18;
4361 static PyObject *__pyx_tuple__19;
4362 static PyObject *__pyx_tuple__20;
4363 static PyObject *__pyx_tuple__21;
4364 static PyObject *__pyx_tuple__22;
4365 static PyObject *__pyx_tuple__24;
4366 static PyObject *__pyx_tuple__25;
4367 static PyObject *__pyx_tuple__26;
4368 static PyObject *__pyx_tuple__27;
4369 static PyObject *__pyx_tuple__28;
4370 static PyObject *__pyx_tuple__29;
4371 static PyObject *__pyx_tuple__30;
4372 static PyObject *__pyx_tuple__31;
4373 static PyObject *__pyx_tuple__32;
4374 static PyObject *__pyx_codeobj__33;
4375 /* Late includes */
4376 
4377 /* "statsmodels/tsa/statespace/_representation.pyx":150
4378  *     # ### Initialize state space model
4379  *     # *Note*: The initial state and state covariance matrix must be provided.
4380  *     def __init__(self,             # <<<<<<<<<<<<<<
4381  *                  np.float32_t [::1,:]   obs,
4382  *                  np.float32_t [::1,:,:] design,
4383  */
4384 
4385 /* Python wrapper */
4386 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1__init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)4387 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4388   __Pyx_memviewslice __pyx_v_obs = { 0, 0, { 0 }, { 0 }, { 0 } };
4389   __Pyx_memviewslice __pyx_v_design = { 0, 0, { 0 }, { 0 }, { 0 } };
4390   __Pyx_memviewslice __pyx_v_obs_intercept = { 0, 0, { 0 }, { 0 }, { 0 } };
4391   __Pyx_memviewslice __pyx_v_obs_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
4392   __Pyx_memviewslice __pyx_v_transition = { 0, 0, { 0 }, { 0 }, { 0 } };
4393   __Pyx_memviewslice __pyx_v_state_intercept = { 0, 0, { 0 }, { 0 }, { 0 } };
4394   __Pyx_memviewslice __pyx_v_selection = { 0, 0, { 0 }, { 0 }, { 0 } };
4395   __Pyx_memviewslice __pyx_v_state_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
4396   PyObject *__pyx_v_diagonal_obs_cov = 0;
4397   int __pyx_lineno = 0;
4398   const char *__pyx_filename = NULL;
4399   int __pyx_clineno = 0;
4400   int __pyx_r;
4401   __Pyx_RefNannyDeclarations
4402   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
4403   {
4404     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obs,&__pyx_n_s_design,&__pyx_n_s_obs_intercept,&__pyx_n_s_obs_cov,&__pyx_n_s_transition,&__pyx_n_s_state_intercept,&__pyx_n_s_selection,&__pyx_n_s_state_cov,&__pyx_n_s_diagonal_obs_cov,0};
4405     PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
4406     values[8] = ((PyObject *)__pyx_int_neg_1);
4407     if (unlikely(__pyx_kwds)) {
4408       Py_ssize_t kw_args;
4409       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4410       switch (pos_args) {
4411         case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4412         CYTHON_FALLTHROUGH;
4413         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4414         CYTHON_FALLTHROUGH;
4415         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4416         CYTHON_FALLTHROUGH;
4417         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4418         CYTHON_FALLTHROUGH;
4419         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4420         CYTHON_FALLTHROUGH;
4421         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4422         CYTHON_FALLTHROUGH;
4423         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4424         CYTHON_FALLTHROUGH;
4425         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4426         CYTHON_FALLTHROUGH;
4427         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4428         CYTHON_FALLTHROUGH;
4429         case  0: break;
4430         default: goto __pyx_L5_argtuple_error;
4431       }
4432       kw_args = PyDict_Size(__pyx_kwds);
4433       switch (pos_args) {
4434         case  0:
4435         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs)) != 0)) kw_args--;
4436         else goto __pyx_L5_argtuple_error;
4437         CYTHON_FALLTHROUGH;
4438         case  1:
4439         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_design)) != 0)) kw_args--;
4440         else {
4441           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 1); __PYX_ERR(0, 150, __pyx_L3_error)
4442         }
4443         CYTHON_FALLTHROUGH;
4444         case  2:
4445         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs_intercept)) != 0)) kw_args--;
4446         else {
4447           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 2); __PYX_ERR(0, 150, __pyx_L3_error)
4448         }
4449         CYTHON_FALLTHROUGH;
4450         case  3:
4451         if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs_cov)) != 0)) kw_args--;
4452         else {
4453           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 3); __PYX_ERR(0, 150, __pyx_L3_error)
4454         }
4455         CYTHON_FALLTHROUGH;
4456         case  4:
4457         if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transition)) != 0)) kw_args--;
4458         else {
4459           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 4); __PYX_ERR(0, 150, __pyx_L3_error)
4460         }
4461         CYTHON_FALLTHROUGH;
4462         case  5:
4463         if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_intercept)) != 0)) kw_args--;
4464         else {
4465           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 5); __PYX_ERR(0, 150, __pyx_L3_error)
4466         }
4467         CYTHON_FALLTHROUGH;
4468         case  6:
4469         if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_selection)) != 0)) kw_args--;
4470         else {
4471           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 6); __PYX_ERR(0, 150, __pyx_L3_error)
4472         }
4473         CYTHON_FALLTHROUGH;
4474         case  7:
4475         if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_cov)) != 0)) kw_args--;
4476         else {
4477           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 7); __PYX_ERR(0, 150, __pyx_L3_error)
4478         }
4479         CYTHON_FALLTHROUGH;
4480         case  8:
4481         if (kw_args > 0) {
4482           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_diagonal_obs_cov);
4483           if (value) { values[8] = value; kw_args--; }
4484         }
4485       }
4486       if (unlikely(kw_args > 0)) {
4487         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 150, __pyx_L3_error)
4488       }
4489     } else {
4490       switch (PyTuple_GET_SIZE(__pyx_args)) {
4491         case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4492         CYTHON_FALLTHROUGH;
4493         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4494         values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4495         values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4496         values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4497         values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4498         values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4499         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4500         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4501         break;
4502         default: goto __pyx_L5_argtuple_error;
4503       }
4504     }
4505     __pyx_v_obs = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs.memview)) __PYX_ERR(0, 151, __pyx_L3_error)
4506     __pyx_v_design = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_design.memview)) __PYX_ERR(0, 152, __pyx_L3_error)
4507     __pyx_v_obs_intercept = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs_intercept.memview)) __PYX_ERR(0, 153, __pyx_L3_error)
4508     __pyx_v_obs_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs_cov.memview)) __PYX_ERR(0, 154, __pyx_L3_error)
4509     __pyx_v_transition = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_transition.memview)) __PYX_ERR(0, 155, __pyx_L3_error)
4510     __pyx_v_state_intercept = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_state_intercept.memview)) __PYX_ERR(0, 156, __pyx_L3_error)
4511     __pyx_v_selection = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_selection.memview)) __PYX_ERR(0, 157, __pyx_L3_error)
4512     __pyx_v_state_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(values[7], PyBUF_WRITABLE); if (unlikely(!__pyx_v_state_cov.memview)) __PYX_ERR(0, 158, __pyx_L3_error)
4513     __pyx_v_diagonal_obs_cov = values[8];
4514   }
4515   goto __pyx_L4_argument_unpacking_done;
4516   __pyx_L5_argtuple_error:;
4517   __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 150, __pyx_L3_error)
4518   __pyx_L3_error:;
4519   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4520   __Pyx_RefNannyFinishContext();
4521   return -1;
4522   __pyx_L4_argument_unpacking_done:;
4523   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace___init__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), __pyx_v_obs, __pyx_v_design, __pyx_v_obs_intercept, __pyx_v_obs_cov, __pyx_v_transition, __pyx_v_state_intercept, __pyx_v_selection, __pyx_v_state_cov, __pyx_v_diagonal_obs_cov);
4524 
4525   /* function exit code */
4526   __Pyx_RefNannyFinishContext();
4527   return __pyx_r;
4528 }
4529 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,__Pyx_memviewslice __pyx_v_obs,__Pyx_memviewslice __pyx_v_design,__Pyx_memviewslice __pyx_v_obs_intercept,__Pyx_memviewslice __pyx_v_obs_cov,__Pyx_memviewslice __pyx_v_transition,__Pyx_memviewslice __pyx_v_state_intercept,__Pyx_memviewslice __pyx_v_selection,__Pyx_memviewslice __pyx_v_state_cov,PyObject * __pyx_v_diagonal_obs_cov)4530 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_obs, __Pyx_memviewslice __pyx_v_design, __Pyx_memviewslice __pyx_v_obs_intercept, __Pyx_memviewslice __pyx_v_obs_cov, __Pyx_memviewslice __pyx_v_transition, __Pyx_memviewslice __pyx_v_state_intercept, __Pyx_memviewslice __pyx_v_selection, __Pyx_memviewslice __pyx_v_state_cov, PyObject *__pyx_v_diagonal_obs_cov) {
4531   npy_intp __pyx_v_dim1[1];
4532   npy_intp __pyx_v_dim2[2];
4533   npy_intp __pyx_v_dim3[3];
4534   int __pyx_r;
4535   __Pyx_RefNannyDeclarations
4536   PyObject *__pyx_t_1 = NULL;
4537   PyObject *__pyx_t_2 = NULL;
4538   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape __pyx_t_3;
4539   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape __pyx_t_4;
4540   int __pyx_t_5;
4541   int __pyx_t_6;
4542   int __pyx_t_7;
4543   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
4544   PyObject *__pyx_t_9 = NULL;
4545   PyObject *__pyx_t_10 = NULL;
4546   PyObject *__pyx_t_11 = NULL;
4547   __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
4548   __Pyx_memviewslice __pyx_t_13 = { 0, 0, { 0 }, { 0 }, { 0 } };
4549   int __pyx_t_14;
4550   int __pyx_t_15;
4551   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
4552   __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
4553   int __pyx_lineno = 0;
4554   const char *__pyx_filename = NULL;
4555   int __pyx_clineno = 0;
4556   __Pyx_RefNannySetupContext("__init__", 0);
4557 
4558   /* "statsmodels/tsa/statespace/_representation.pyx":172
4559  *         # Python and passed to this constructor, so if they are updated in
4560  *         # Python they will also be updated here.
4561  *         self.obs = obs             # <<<<<<<<<<<<<<
4562  *         self.design = design
4563  *         self.obs_intercept = obs_intercept
4564  */
4565   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs, 0);
4566   __PYX_INC_MEMVIEW(&__pyx_v_obs, 0);
4567   __pyx_v_self->obs = __pyx_v_obs;
4568 
4569   /* "statsmodels/tsa/statespace/_representation.pyx":173
4570  *         # Python they will also be updated here.
4571  *         self.obs = obs
4572  *         self.design = design             # <<<<<<<<<<<<<<
4573  *         self.obs_intercept = obs_intercept
4574  *         self.obs_cov = obs_cov
4575  */
4576   __PYX_XDEC_MEMVIEW(&__pyx_v_self->design, 0);
4577   __PYX_INC_MEMVIEW(&__pyx_v_design, 0);
4578   __pyx_v_self->design = __pyx_v_design;
4579 
4580   /* "statsmodels/tsa/statespace/_representation.pyx":174
4581  *         self.obs = obs
4582  *         self.design = design
4583  *         self.obs_intercept = obs_intercept             # <<<<<<<<<<<<<<
4584  *         self.obs_cov = obs_cov
4585  *         self.transition = transition
4586  */
4587   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs_intercept, 0);
4588   __PYX_INC_MEMVIEW(&__pyx_v_obs_intercept, 0);
4589   __pyx_v_self->obs_intercept = __pyx_v_obs_intercept;
4590 
4591   /* "statsmodels/tsa/statespace/_representation.pyx":175
4592  *         self.design = design
4593  *         self.obs_intercept = obs_intercept
4594  *         self.obs_cov = obs_cov             # <<<<<<<<<<<<<<
4595  *         self.transition = transition
4596  *         self.state_intercept = state_intercept
4597  */
4598   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs_cov, 0);
4599   __PYX_INC_MEMVIEW(&__pyx_v_obs_cov, 0);
4600   __pyx_v_self->obs_cov = __pyx_v_obs_cov;
4601 
4602   /* "statsmodels/tsa/statespace/_representation.pyx":176
4603  *         self.obs_intercept = obs_intercept
4604  *         self.obs_cov = obs_cov
4605  *         self.transition = transition             # <<<<<<<<<<<<<<
4606  *         self.state_intercept = state_intercept
4607  *         self.selection = selection
4608  */
4609   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transition, 0);
4610   __PYX_INC_MEMVIEW(&__pyx_v_transition, 0);
4611   __pyx_v_self->transition = __pyx_v_transition;
4612 
4613   /* "statsmodels/tsa/statespace/_representation.pyx":177
4614  *         self.obs_cov = obs_cov
4615  *         self.transition = transition
4616  *         self.state_intercept = state_intercept             # <<<<<<<<<<<<<<
4617  *         self.selection = selection
4618  *         self.state_cov = state_cov
4619  */
4620   __PYX_XDEC_MEMVIEW(&__pyx_v_self->state_intercept, 0);
4621   __PYX_INC_MEMVIEW(&__pyx_v_state_intercept, 0);
4622   __pyx_v_self->state_intercept = __pyx_v_state_intercept;
4623 
4624   /* "statsmodels/tsa/statespace/_representation.pyx":178
4625  *         self.transition = transition
4626  *         self.state_intercept = state_intercept
4627  *         self.selection = selection             # <<<<<<<<<<<<<<
4628  *         self.state_cov = state_cov
4629  *
4630  */
4631   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selection, 0);
4632   __PYX_INC_MEMVIEW(&__pyx_v_selection, 0);
4633   __pyx_v_self->selection = __pyx_v_selection;
4634 
4635   /* "statsmodels/tsa/statespace/_representation.pyx":179
4636  *         self.state_intercept = state_intercept
4637  *         self.selection = selection
4638  *         self.state_cov = state_cov             # <<<<<<<<<<<<<<
4639  *
4640  *         # Dimensions
4641  */
4642   __PYX_XDEC_MEMVIEW(&__pyx_v_self->state_cov, 0);
4643   __PYX_INC_MEMVIEW(&__pyx_v_state_cov, 0);
4644   __pyx_v_self->state_cov = __pyx_v_state_cov;
4645 
4646   /* "statsmodels/tsa/statespace/_representation.pyx":182
4647  *
4648  *         # Dimensions
4649  *         self.k_endog = obs.shape[0]             # <<<<<<<<<<<<<<
4650  *         self.k_states = selection.shape[0]
4651  *         self.k_posdef = selection.shape[1]
4652  */
4653   __pyx_v_self->k_endog = (__pyx_v_obs.shape[0]);
4654 
4655   /* "statsmodels/tsa/statespace/_representation.pyx":183
4656  *         # Dimensions
4657  *         self.k_endog = obs.shape[0]
4658  *         self.k_states = selection.shape[0]             # <<<<<<<<<<<<<<
4659  *         self.k_posdef = selection.shape[1]
4660  *         self.nobs = obs.shape[1]
4661  */
4662   __pyx_v_self->k_states = (__pyx_v_selection.shape[0]);
4663 
4664   /* "statsmodels/tsa/statespace/_representation.pyx":184
4665  *         self.k_endog = obs.shape[0]
4666  *         self.k_states = selection.shape[0]
4667  *         self.k_posdef = selection.shape[1]             # <<<<<<<<<<<<<<
4668  *         self.nobs = obs.shape[1]
4669  *
4670  */
4671   __pyx_v_self->k_posdef = (__pyx_v_selection.shape[1]);
4672 
4673   /* "statsmodels/tsa/statespace/_representation.pyx":185
4674  *         self.k_states = selection.shape[0]
4675  *         self.k_posdef = selection.shape[1]
4676  *         self.nobs = obs.shape[1]             # <<<<<<<<<<<<<<
4677  *
4678  *         # #### Validate matrix dimensions
4679  */
4680   __pyx_v_self->nobs = (__pyx_v_obs.shape[1]);
4681 
4682   /* "statsmodels/tsa/statespace/_representation.pyx":190
4683  *         #
4684  *         # Make sure that the given state-space matrices have consistent sizes
4685  *         tools.validate_matrix_shape('design', &self.design.shape[0],             # <<<<<<<<<<<<<<
4686  *                               self.k_endog, self.k_states, self.nobs)
4687  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
4688  */
4689   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 190, __pyx_L1_error)}
4690 
4691   /* "statsmodels/tsa/statespace/_representation.pyx":191
4692  *         # Make sure that the given state-space matrices have consistent sizes
4693  *         tools.validate_matrix_shape('design', &self.design.shape[0],
4694  *                               self.k_endog, self.k_states, self.nobs)             # <<<<<<<<<<<<<<
4695  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
4696  *                               self.k_endog, self.nobs)
4697  */
4698   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
4699   __Pyx_GOTREF(__pyx_t_1);
4700 
4701   /* "statsmodels/tsa/statespace/_representation.pyx":190
4702  *         #
4703  *         # Make sure that the given state-space matrices have consistent sizes
4704  *         tools.validate_matrix_shape('design', &self.design.shape[0],             # <<<<<<<<<<<<<<
4705  *                               self.k_endog, self.k_states, self.nobs)
4706  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
4707  */
4708   __pyx_t_3.__pyx_n = 1;
4709   __pyx_t_3.nobs = __pyx_t_1;
4710   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_n_u_design, (&(__pyx_v_self->design.shape[0])), __pyx_v_self->k_endog, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
4711   __Pyx_GOTREF(__pyx_t_2);
4712   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4713   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4714 
4715   /* "statsmodels/tsa/statespace/_representation.pyx":192
4716  *         tools.validate_matrix_shape('design', &self.design.shape[0],
4717  *                               self.k_endog, self.k_states, self.nobs)
4718  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],             # <<<<<<<<<<<<<<
4719  *                               self.k_endog, self.nobs)
4720  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
4721  */
4722   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 192, __pyx_L1_error)}
4723 
4724   /* "statsmodels/tsa/statespace/_representation.pyx":193
4725  *                               self.k_endog, self.k_states, self.nobs)
4726  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
4727  *                               self.k_endog, self.nobs)             # <<<<<<<<<<<<<<
4728  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
4729  *                               self.k_endog, self.k_endog, self.nobs)
4730  */
4731   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
4732   __Pyx_GOTREF(__pyx_t_2);
4733 
4734   /* "statsmodels/tsa/statespace/_representation.pyx":192
4735  *         tools.validate_matrix_shape('design', &self.design.shape[0],
4736  *                               self.k_endog, self.k_states, self.nobs)
4737  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],             # <<<<<<<<<<<<<<
4738  *                               self.k_endog, self.nobs)
4739  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
4740  */
4741   __pyx_t_4.__pyx_n = 1;
4742   __pyx_t_4.nobs = __pyx_t_2;
4743   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_observation_intercept, (&(__pyx_v_self->obs_intercept.shape[0])), __pyx_v_self->k_endog, &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
4744   __Pyx_GOTREF(__pyx_t_1);
4745   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4746   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4747 
4748   /* "statsmodels/tsa/statespace/_representation.pyx":194
4749  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
4750  *                               self.k_endog, self.nobs)
4751  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],             # <<<<<<<<<<<<<<
4752  *                               self.k_endog, self.k_endog, self.nobs)
4753  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
4754  */
4755   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 194, __pyx_L1_error)}
4756 
4757   /* "statsmodels/tsa/statespace/_representation.pyx":195
4758  *                               self.k_endog, self.nobs)
4759  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
4760  *                               self.k_endog, self.k_endog, self.nobs)             # <<<<<<<<<<<<<<
4761  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
4762  *                               self.k_states, self.k_states, self.nobs)
4763  */
4764   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
4765   __Pyx_GOTREF(__pyx_t_1);
4766 
4767   /* "statsmodels/tsa/statespace/_representation.pyx":194
4768  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
4769  *                               self.k_endog, self.nobs)
4770  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],             # <<<<<<<<<<<<<<
4771  *                               self.k_endog, self.k_endog, self.nobs)
4772  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
4773  */
4774   __pyx_t_3.__pyx_n = 1;
4775   __pyx_t_3.nobs = __pyx_t_1;
4776   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_observation_covariance_matrix, (&(__pyx_v_self->obs_cov.shape[0])), __pyx_v_self->k_endog, __pyx_v_self->k_endog, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
4777   __Pyx_GOTREF(__pyx_t_2);
4778   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4779   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4780 
4781   /* "statsmodels/tsa/statespace/_representation.pyx":196
4782  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
4783  *                               self.k_endog, self.k_endog, self.nobs)
4784  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],             # <<<<<<<<<<<<<<
4785  *                               self.k_states, self.k_states, self.nobs)
4786  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
4787  */
4788   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 196, __pyx_L1_error)}
4789 
4790   /* "statsmodels/tsa/statespace/_representation.pyx":197
4791  *                               self.k_endog, self.k_endog, self.nobs)
4792  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
4793  *                               self.k_states, self.k_states, self.nobs)             # <<<<<<<<<<<<<<
4794  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
4795  *                               self.k_states, self.nobs)
4796  */
4797   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
4798   __Pyx_GOTREF(__pyx_t_2);
4799 
4800   /* "statsmodels/tsa/statespace/_representation.pyx":196
4801  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
4802  *                               self.k_endog, self.k_endog, self.nobs)
4803  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],             # <<<<<<<<<<<<<<
4804  *                               self.k_states, self.k_states, self.nobs)
4805  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
4806  */
4807   __pyx_t_3.__pyx_n = 1;
4808   __pyx_t_3.nobs = __pyx_t_2;
4809   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_n_u_transition, (&(__pyx_v_self->transition.shape[0])), __pyx_v_self->k_states, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
4810   __Pyx_GOTREF(__pyx_t_1);
4811   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4812   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4813 
4814   /* "statsmodels/tsa/statespace/_representation.pyx":198
4815  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
4816  *                               self.k_states, self.k_states, self.nobs)
4817  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],             # <<<<<<<<<<<<<<
4818  *                               self.k_states, self.nobs)
4819  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
4820  */
4821   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 198, __pyx_L1_error)}
4822 
4823   /* "statsmodels/tsa/statespace/_representation.pyx":199
4824  *                               self.k_states, self.k_states, self.nobs)
4825  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
4826  *                               self.k_states, self.nobs)             # <<<<<<<<<<<<<<
4827  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
4828  *                               self.k_posdef, self.k_posdef, self.nobs)
4829  */
4830   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
4831   __Pyx_GOTREF(__pyx_t_1);
4832 
4833   /* "statsmodels/tsa/statespace/_representation.pyx":198
4834  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
4835  *                               self.k_states, self.k_states, self.nobs)
4836  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],             # <<<<<<<<<<<<<<
4837  *                               self.k_states, self.nobs)
4838  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
4839  */
4840   __pyx_t_4.__pyx_n = 1;
4841   __pyx_t_4.nobs = __pyx_t_1;
4842   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_state_intercept_2, (&(__pyx_v_self->state_intercept.shape[0])), __pyx_v_self->k_states, &__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
4843   __Pyx_GOTREF(__pyx_t_2);
4844   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4845   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4846 
4847   /* "statsmodels/tsa/statespace/_representation.pyx":200
4848  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
4849  *                               self.k_states, self.nobs)
4850  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],             # <<<<<<<<<<<<<<
4851  *                               self.k_posdef, self.k_posdef, self.nobs)
4852  *
4853  */
4854   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 200, __pyx_L1_error)}
4855 
4856   /* "statsmodels/tsa/statespace/_representation.pyx":201
4857  *                               self.k_states, self.nobs)
4858  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
4859  *                               self.k_posdef, self.k_posdef, self.nobs)             # <<<<<<<<<<<<<<
4860  *
4861  *         # Check for a time-invariant model
4862  */
4863   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
4864   __Pyx_GOTREF(__pyx_t_2);
4865 
4866   /* "statsmodels/tsa/statespace/_representation.pyx":200
4867  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
4868  *                               self.k_states, self.nobs)
4869  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],             # <<<<<<<<<<<<<<
4870  *                               self.k_posdef, self.k_posdef, self.nobs)
4871  *
4872  */
4873   __pyx_t_3.__pyx_n = 1;
4874   __pyx_t_3.nobs = __pyx_t_2;
4875   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_state_covariance_matrix, (&(__pyx_v_self->state_cov.shape[0])), __pyx_v_self->k_posdef, __pyx_v_self->k_posdef, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
4876   __Pyx_GOTREF(__pyx_t_1);
4877   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4878   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4879 
4880   /* "statsmodels/tsa/statespace/_representation.pyx":205
4881  *         # Check for a time-invariant model
4882  *         self.time_invariant = (
4883  *             self.design.shape[2] == 1           and             # <<<<<<<<<<<<<<
4884  *             self.obs_intercept.shape[1] == 1    and
4885  *             self.obs_cov.shape[2] == 1          and
4886  */
4887   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 205, __pyx_L1_error)}
4888   __pyx_t_6 = ((__pyx_v_self->design.shape[2]) == 1);
4889   if (__pyx_t_6) {
4890   } else {
4891     __pyx_t_5 = __pyx_t_6;
4892     goto __pyx_L3_bool_binop_done;
4893   }
4894 
4895   /* "statsmodels/tsa/statespace/_representation.pyx":206
4896  *         self.time_invariant = (
4897  *             self.design.shape[2] == 1           and
4898  *             self.obs_intercept.shape[1] == 1    and             # <<<<<<<<<<<<<<
4899  *             self.obs_cov.shape[2] == 1          and
4900  *             self.transition.shape[2] == 1       and
4901  */
4902   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 206, __pyx_L1_error)}
4903   __pyx_t_6 = ((__pyx_v_self->obs_intercept.shape[1]) == 1);
4904   if (__pyx_t_6) {
4905   } else {
4906     __pyx_t_5 = __pyx_t_6;
4907     goto __pyx_L3_bool_binop_done;
4908   }
4909 
4910   /* "statsmodels/tsa/statespace/_representation.pyx":207
4911  *             self.design.shape[2] == 1           and
4912  *             self.obs_intercept.shape[1] == 1    and
4913  *             self.obs_cov.shape[2] == 1          and             # <<<<<<<<<<<<<<
4914  *             self.transition.shape[2] == 1       and
4915  *             self.state_intercept.shape[1] == 1  and
4916  */
4917   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 207, __pyx_L1_error)}
4918   __pyx_t_6 = ((__pyx_v_self->obs_cov.shape[2]) == 1);
4919   if (__pyx_t_6) {
4920   } else {
4921     __pyx_t_5 = __pyx_t_6;
4922     goto __pyx_L3_bool_binop_done;
4923   }
4924 
4925   /* "statsmodels/tsa/statespace/_representation.pyx":208
4926  *             self.obs_intercept.shape[1] == 1    and
4927  *             self.obs_cov.shape[2] == 1          and
4928  *             self.transition.shape[2] == 1       and             # <<<<<<<<<<<<<<
4929  *             self.state_intercept.shape[1] == 1  and
4930  *             self.selection.shape[2] == 1        and
4931  */
4932   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 208, __pyx_L1_error)}
4933   __pyx_t_6 = ((__pyx_v_self->transition.shape[2]) == 1);
4934   if (__pyx_t_6) {
4935   } else {
4936     __pyx_t_5 = __pyx_t_6;
4937     goto __pyx_L3_bool_binop_done;
4938   }
4939 
4940   /* "statsmodels/tsa/statespace/_representation.pyx":209
4941  *             self.obs_cov.shape[2] == 1          and
4942  *             self.transition.shape[2] == 1       and
4943  *             self.state_intercept.shape[1] == 1  and             # <<<<<<<<<<<<<<
4944  *             self.selection.shape[2] == 1        and
4945  *             self.state_cov.shape[2] == 1
4946  */
4947   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 209, __pyx_L1_error)}
4948   __pyx_t_6 = ((__pyx_v_self->state_intercept.shape[1]) == 1);
4949   if (__pyx_t_6) {
4950   } else {
4951     __pyx_t_5 = __pyx_t_6;
4952     goto __pyx_L3_bool_binop_done;
4953   }
4954 
4955   /* "statsmodels/tsa/statespace/_representation.pyx":210
4956  *             self.transition.shape[2] == 1       and
4957  *             self.state_intercept.shape[1] == 1  and
4958  *             self.selection.shape[2] == 1        and             # <<<<<<<<<<<<<<
4959  *             self.state_cov.shape[2] == 1
4960  *         )
4961  */
4962   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 210, __pyx_L1_error)}
4963   __pyx_t_6 = ((__pyx_v_self->selection.shape[2]) == 1);
4964   if (__pyx_t_6) {
4965   } else {
4966     __pyx_t_5 = __pyx_t_6;
4967     goto __pyx_L3_bool_binop_done;
4968   }
4969 
4970   /* "statsmodels/tsa/statespace/_representation.pyx":211
4971  *             self.state_intercept.shape[1] == 1  and
4972  *             self.selection.shape[2] == 1        and
4973  *             self.state_cov.shape[2] == 1             # <<<<<<<<<<<<<<
4974  *         )
4975  *
4976  */
4977   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 211, __pyx_L1_error)}
4978   __pyx_t_6 = ((__pyx_v_self->state_cov.shape[2]) == 1);
4979   __pyx_t_5 = __pyx_t_6;
4980   __pyx_L3_bool_binop_done:;
4981 
4982   /* "statsmodels/tsa/statespace/_representation.pyx":204
4983  *
4984  *         # Check for a time-invariant model
4985  *         self.time_invariant = (             # <<<<<<<<<<<<<<
4986  *             self.design.shape[2] == 1           and
4987  *             self.obs_intercept.shape[1] == 1    and
4988  */
4989   __pyx_v_self->time_invariant = __pyx_t_5;
4990 
4991   /* "statsmodels/tsa/statespace/_representation.pyx":215
4992  *
4993  *         # Set the flags for initialization to be false
4994  *         self.initialized = False             # <<<<<<<<<<<<<<
4995  *         self.initialized_diffuse = False
4996  *         self.initialized_stationary = False
4997  */
4998   __pyx_v_self->initialized = 0;
4999 
5000   /* "statsmodels/tsa/statespace/_representation.pyx":216
5001  *         # Set the flags for initialization to be false
5002  *         self.initialized = False
5003  *         self.initialized_diffuse = False             # <<<<<<<<<<<<<<
5004  *         self.initialized_stationary = False
5005  *
5006  */
5007   __pyx_v_self->initialized_diffuse = 0;
5008 
5009   /* "statsmodels/tsa/statespace/_representation.pyx":217
5010  *         self.initialized = False
5011  *         self.initialized_diffuse = False
5012  *         self.initialized_stationary = False             # <<<<<<<<<<<<<<
5013  *
5014  *         self.diagonal_obs_cov = diagonal_obs_cov
5015  */
5016   __pyx_v_self->initialized_stationary = 0;
5017 
5018   /* "statsmodels/tsa/statespace/_representation.pyx":219
5019  *         self.initialized_stationary = False
5020  *
5021  *         self.diagonal_obs_cov = diagonal_obs_cov             # <<<<<<<<<<<<<<
5022  *         self._diagonal_obs_cov = -1
5023  *
5024  */
5025   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_diagonal_obs_cov); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 219, __pyx_L1_error)
5026   __pyx_v_self->diagonal_obs_cov = __pyx_t_5;
5027 
5028   /* "statsmodels/tsa/statespace/_representation.pyx":220
5029  *
5030  *         self.diagonal_obs_cov = diagonal_obs_cov
5031  *         self._diagonal_obs_cov = -1             # <<<<<<<<<<<<<<
5032  *
5033  *         # Allocate selected state covariance matrix
5034  */
5035   __pyx_v_self->_diagonal_obs_cov = -1;
5036 
5037   /* "statsmodels/tsa/statespace/_representation.pyx":223
5038  *
5039  *         # Allocate selected state covariance matrix
5040  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;             # <<<<<<<<<<<<<<
5041  *         # (we only allocate memory for time-varying array if necessary)
5042  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
5043  */
5044   __pyx_t_5 = __pyx_v_self->k_states;
5045   (__pyx_v_dim3[0]) = __pyx_t_5;
5046   __pyx_t_5 = __pyx_v_self->k_states;
5047   (__pyx_v_dim3[1]) = __pyx_t_5;
5048   (__pyx_v_dim3[2]) = 1;
5049 
5050   /* "statsmodels/tsa/statespace/_representation.pyx":225
5051  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;
5052  *         # (we only allocate memory for time-varying array if necessary)
5053  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:             # <<<<<<<<<<<<<<
5054  *             dim3[2] = self.nobs
5055  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_FLOAT32, FORTRAN)
5056  */
5057   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 225, __pyx_L1_error)}
5058   __pyx_t_7 = (((__pyx_v_self->state_cov.shape[2]) > 1) != 0);
5059   if (!__pyx_t_7) {
5060   } else {
5061     __pyx_t_6 = __pyx_t_7;
5062     goto __pyx_L11_bool_binop_done;
5063   }
5064   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 225, __pyx_L1_error)}
5065   __pyx_t_7 = (((__pyx_v_self->selection.shape[2]) > 1) != 0);
5066   __pyx_t_6 = __pyx_t_7;
5067   __pyx_L11_bool_binop_done:;
5068   if (__pyx_t_6) {
5069 
5070     /* "statsmodels/tsa/statespace/_representation.pyx":226
5071  *         # (we only allocate memory for time-varying array if necessary)
5072  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
5073  *             dim3[2] = self.nobs             # <<<<<<<<<<<<<<
5074  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_FLOAT32, FORTRAN)
5075  *
5076  */
5077     __pyx_t_5 = __pyx_v_self->nobs;
5078     (__pyx_v_dim3[2]) = __pyx_t_5;
5079 
5080     /* "statsmodels/tsa/statespace/_representation.pyx":225
5081  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;
5082  *         # (we only allocate memory for time-varying array if necessary)
5083  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:             # <<<<<<<<<<<<<<
5084  *             dim3[2] = self.nobs
5085  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_FLOAT32, FORTRAN)
5086  */
5087   }
5088 
5089   /* "statsmodels/tsa/statespace/_representation.pyx":227
5090  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
5091  *             dim3[2] = self.nobs
5092  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5093  *
5094  *         # Handle missing data
5095  */
5096   __pyx_t_1 = PyArray_ZEROS(3, __pyx_v_dim3, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
5097   __Pyx_GOTREF(__pyx_t_1);
5098   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 227, __pyx_L1_error)
5099   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5100   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_state_cov, 0);
5101   __pyx_v_self->selected_state_cov = __pyx_t_8;
5102   __pyx_t_8.memview = NULL;
5103   __pyx_t_8.data = NULL;
5104 
5105   /* "statsmodels/tsa/statespace/_representation.pyx":230
5106  *
5107  *         # Handle missing data
5108  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")             # <<<<<<<<<<<<<<
5109  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)
5110  *         self.has_missing = np.sum(self.nmissing) > 0
5111  */
5112   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
5113   __Pyx_GOTREF(__pyx_t_1);
5114   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
5115   __Pyx_GOTREF(__pyx_t_2);
5116   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5117   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 230, __pyx_L1_error)
5118   __Pyx_GOTREF(__pyx_t_9);
5119   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_isnan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 230, __pyx_L1_error)
5120   __Pyx_GOTREF(__pyx_t_10);
5121   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5122   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_obs, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 230, __pyx_L1_error)
5123   __Pyx_GOTREF(__pyx_t_9);
5124   __pyx_t_11 = NULL;
5125   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
5126     __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
5127     if (likely(__pyx_t_11)) {
5128       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
5129       __Pyx_INCREF(__pyx_t_11);
5130       __Pyx_INCREF(function);
5131       __Pyx_DECREF_SET(__pyx_t_10, function);
5132     }
5133   }
5134   __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9);
5135   __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
5136   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5137   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
5138   __Pyx_GOTREF(__pyx_t_1);
5139   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5140   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 230, __pyx_L1_error)
5141   __Pyx_GOTREF(__pyx_t_10);
5142   __Pyx_GIVEREF(__pyx_t_1);
5143   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
5144   __pyx_t_1 = 0;
5145   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
5146   __Pyx_GOTREF(__pyx_t_1);
5147   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 230, __pyx_L1_error)
5148   __Pyx_GOTREF(__pyx_t_9);
5149   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 230, __pyx_L1_error)
5150   __Pyx_GOTREF(__pyx_t_11);
5151   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5152   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 230, __pyx_L1_error)
5153   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5154   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 230, __pyx_L1_error)
5155   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 230, __pyx_L1_error)
5156   __Pyx_GOTREF(__pyx_t_11);
5157   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5158   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5159   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5160   __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 230, __pyx_L1_error)
5161   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5162   __PYX_XDEC_MEMVIEW(&__pyx_v_self->missing, 0);
5163   __pyx_v_self->missing = __pyx_t_12;
5164   __pyx_t_12.memview = NULL;
5165   __pyx_t_12.data = NULL;
5166 
5167   /* "statsmodels/tsa/statespace/_representation.pyx":231
5168  *         # Handle missing data
5169  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")
5170  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)             # <<<<<<<<<<<<<<
5171  *         self.has_missing = np.sum(self.nmissing) > 0
5172  *
5173  */
5174   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 231, __pyx_L1_error)
5175   __Pyx_GOTREF(__pyx_t_11);
5176   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
5177   __Pyx_GOTREF(__pyx_t_1);
5178   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5179   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 231, __pyx_L1_error)
5180   __Pyx_GOTREF(__pyx_t_11);
5181   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sum); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 231, __pyx_L1_error)
5182   __Pyx_GOTREF(__pyx_t_10);
5183   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5184   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 231, __pyx_L1_error)}
5185   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 231, __pyx_L1_error)
5186   __Pyx_GOTREF(__pyx_t_11);
5187   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
5188   __Pyx_GOTREF(__pyx_t_2);
5189   __Pyx_GIVEREF(__pyx_t_11);
5190   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
5191   __pyx_t_11 = 0;
5192   __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 231, __pyx_L1_error)
5193   __Pyx_GOTREF(__pyx_t_11);
5194   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
5195   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error)
5196   __Pyx_GOTREF(__pyx_t_9);
5197   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5198   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5199   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5200   __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 231, __pyx_L1_error)
5201   __Pyx_GOTREF(__pyx_t_11);
5202   __Pyx_GIVEREF(__pyx_t_9);
5203   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
5204   __pyx_t_9 = 0;
5205   __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error)
5206   __Pyx_GOTREF(__pyx_t_9);
5207   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
5208   __Pyx_GOTREF(__pyx_t_2);
5209   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 231, __pyx_L1_error)
5210   __Pyx_GOTREF(__pyx_t_10);
5211   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5212   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
5213   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5214   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 231, __pyx_L1_error)
5215   __Pyx_GOTREF(__pyx_t_10);
5216   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5217   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5218   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5219   __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 231, __pyx_L1_error)
5220   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5221   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nmissing, 0);
5222   __pyx_v_self->nmissing = __pyx_t_13;
5223   __pyx_t_13.memview = NULL;
5224   __pyx_t_13.data = NULL;
5225 
5226   /* "statsmodels/tsa/statespace/_representation.pyx":232
5227  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")
5228  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)
5229  *         self.has_missing = np.sum(self.nmissing) > 0             # <<<<<<<<<<<<<<
5230  *
5231  *         # Create the temporary array
5232  */
5233   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 232, __pyx_L1_error)
5234   __Pyx_GOTREF(__pyx_t_9);
5235   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 232, __pyx_L1_error)
5236   __Pyx_GOTREF(__pyx_t_11);
5237   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5238   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 232, __pyx_L1_error)}
5239   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 232, __pyx_L1_error)
5240   __Pyx_GOTREF(__pyx_t_9);
5241   __pyx_t_1 = NULL;
5242   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
5243     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
5244     if (likely(__pyx_t_1)) {
5245       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
5246       __Pyx_INCREF(__pyx_t_1);
5247       __Pyx_INCREF(function);
5248       __Pyx_DECREF_SET(__pyx_t_11, function);
5249     }
5250   }
5251   __pyx_t_10 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_9);
5252   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5253   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5254   if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 232, __pyx_L1_error)
5255   __Pyx_GOTREF(__pyx_t_10);
5256   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5257   __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 232, __pyx_L1_error)
5258   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
5259   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 232, __pyx_L1_error)
5260   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5261   __pyx_v_self->has_missing = __pyx_t_5;
5262 
5263   /* "statsmodels/tsa/statespace/_representation.pyx":236
5264  *         # Create the temporary array
5265  *         # Holds arrays of dimension $(m \times m)$
5266  *         dim2[0] = self.k_states; dim2[1] = max(self.k_states, self.k_posdef);             # <<<<<<<<<<<<<<
5267  *         self.tmp = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5268  *
5269  */
5270   __pyx_t_5 = __pyx_v_self->k_states;
5271   (__pyx_v_dim2[0]) = __pyx_t_5;
5272   __pyx_t_5 = __pyx_v_self->k_posdef;
5273   __pyx_t_14 = __pyx_v_self->k_states;
5274   if (((__pyx_t_5 > __pyx_t_14) != 0)) {
5275     __pyx_t_15 = __pyx_t_5;
5276   } else {
5277     __pyx_t_15 = __pyx_t_14;
5278   }
5279   (__pyx_v_dim2[1]) = __pyx_t_15;
5280 
5281   /* "statsmodels/tsa/statespace/_representation.pyx":237
5282  *         # Holds arrays of dimension $(m \times m)$
5283  *         dim2[0] = self.k_states; dim2[1] = max(self.k_states, self.k_posdef);
5284  *         self.tmp = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5285  *
5286  *         # Arrays for initialization
5287  */
5288   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 237, __pyx_L1_error)
5289   __Pyx_GOTREF(__pyx_t_11);
5290   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 237, __pyx_L1_error)
5291   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5292   __PYX_XDEC_MEMVIEW(&__pyx_v_self->tmp, 0);
5293   __pyx_v_self->tmp = __pyx_t_16;
5294   __pyx_t_16.memview = NULL;
5295   __pyx_t_16.data = NULL;
5296 
5297   /* "statsmodels/tsa/statespace/_representation.pyx":240
5298  *
5299  *         # Arrays for initialization
5300  *         dim1[0] = self.k_states;             # <<<<<<<<<<<<<<
5301  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5302  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5303  */
5304   __pyx_t_15 = __pyx_v_self->k_states;
5305   (__pyx_v_dim1[0]) = __pyx_t_15;
5306 
5307   /* "statsmodels/tsa/statespace/_representation.pyx":241
5308  *         # Arrays for initialization
5309  *         dim1[0] = self.k_states;
5310  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5311  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5312  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5313  */
5314   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 241, __pyx_L1_error)
5315   __Pyx_GOTREF(__pyx_t_11);
5316   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 241, __pyx_L1_error)
5317   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5318   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
5319   __pyx_v_self->initial_state = __pyx_t_17;
5320   __pyx_t_17.memview = NULL;
5321   __pyx_t_17.data = NULL;
5322 
5323   /* "statsmodels/tsa/statespace/_representation.pyx":242
5324  *         dim1[0] = self.k_states;
5325  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5326  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
5327  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5328  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5329  */
5330   __pyx_t_15 = __pyx_v_self->k_states;
5331   (__pyx_v_dim2[0]) = __pyx_t_15;
5332   __pyx_t_15 = __pyx_v_self->k_states;
5333   (__pyx_v_dim2[1]) = __pyx_t_15;
5334 
5335   /* "statsmodels/tsa/statespace/_representation.pyx":243
5336  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5337  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5338  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5339  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5340  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5341  */
5342   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 243, __pyx_L1_error)
5343   __Pyx_GOTREF(__pyx_t_11);
5344   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 243, __pyx_L1_error)
5345   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5346   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
5347   __pyx_v_self->initial_state_cov = __pyx_t_16;
5348   __pyx_t_16.memview = NULL;
5349   __pyx_t_16.data = NULL;
5350 
5351   /* "statsmodels/tsa/statespace/_representation.pyx":244
5352  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5353  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5354  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
5355  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5356  *
5357  */
5358   __pyx_t_15 = __pyx_v_self->k_states;
5359   (__pyx_v_dim2[0]) = __pyx_t_15;
5360   __pyx_t_15 = __pyx_v_self->k_states;
5361   (__pyx_v_dim2[1]) = __pyx_t_15;
5362 
5363   /* "statsmodels/tsa/statespace/_representation.pyx":245
5364  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5365  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5366  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5367  *
5368  *         # Arrays for missing data
5369  */
5370   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 245, __pyx_L1_error)
5371   __Pyx_GOTREF(__pyx_t_11);
5372   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 245, __pyx_L1_error)
5373   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5374   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_diffuse_state_cov, 0);
5375   __pyx_v_self->initial_diffuse_state_cov = __pyx_t_16;
5376   __pyx_t_16.memview = NULL;
5377   __pyx_t_16.data = NULL;
5378 
5379   /* "statsmodels/tsa/statespace/_representation.pyx":248
5380  *
5381  *         # Arrays for missing data
5382  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
5383  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5384  *         dim1[0] = self.k_endog;
5385  */
5386   __pyx_t_15 = __pyx_v_self->k_endog;
5387   (__pyx_v_dim1[0]) = __pyx_t_15;
5388 
5389   /* "statsmodels/tsa/statespace/_representation.pyx":249
5390  *         # Arrays for missing data
5391  *         dim1[0] = self.k_endog;
5392  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5393  *         dim1[0] = self.k_endog;
5394  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5395  */
5396   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 249, __pyx_L1_error)
5397   __Pyx_GOTREF(__pyx_t_11);
5398   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 249, __pyx_L1_error)
5399   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5400   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs, 0);
5401   __pyx_v_self->selected_obs = __pyx_t_17;
5402   __pyx_t_17.memview = NULL;
5403   __pyx_t_17.data = NULL;
5404 
5405   /* "statsmodels/tsa/statespace/_representation.pyx":250
5406  *         dim1[0] = self.k_endog;
5407  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5408  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
5409  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5410  *         dim1[0] = self.k_endog * self.k_states;
5411  */
5412   __pyx_t_15 = __pyx_v_self->k_endog;
5413   (__pyx_v_dim1[0]) = __pyx_t_15;
5414 
5415   /* "statsmodels/tsa/statespace/_representation.pyx":251
5416  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5417  *         dim1[0] = self.k_endog;
5418  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5419  *         dim1[0] = self.k_endog * self.k_states;
5420  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5421  */
5422   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 251, __pyx_L1_error)
5423   __Pyx_GOTREF(__pyx_t_11);
5424   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 251, __pyx_L1_error)
5425   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5426   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_intercept, 0);
5427   __pyx_v_self->selected_obs_intercept = __pyx_t_17;
5428   __pyx_t_17.memview = NULL;
5429   __pyx_t_17.data = NULL;
5430 
5431   /* "statsmodels/tsa/statespace/_representation.pyx":252
5432  *         dim1[0] = self.k_endog;
5433  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5434  *         dim1[0] = self.k_endog * self.k_states;             # <<<<<<<<<<<<<<
5435  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5436  *         dim1[0] = self.k_endog**2;
5437  */
5438   (__pyx_v_dim1[0]) = (__pyx_v_self->k_endog * __pyx_v_self->k_states);
5439 
5440   /* "statsmodels/tsa/statespace/_representation.pyx":253
5441  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5442  *         dim1[0] = self.k_endog * self.k_states;
5443  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5444  *         dim1[0] = self.k_endog**2;
5445  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5446  */
5447   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 253, __pyx_L1_error)
5448   __Pyx_GOTREF(__pyx_t_11);
5449   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 253, __pyx_L1_error)
5450   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5451   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_design, 0);
5452   __pyx_v_self->selected_design = __pyx_t_17;
5453   __pyx_t_17.memview = NULL;
5454   __pyx_t_17.data = NULL;
5455 
5456   /* "statsmodels/tsa/statespace/_representation.pyx":254
5457  *         dim1[0] = self.k_endog * self.k_states;
5458  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5459  *         dim1[0] = self.k_endog**2;             # <<<<<<<<<<<<<<
5460  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5461  *
5462  */
5463   (__pyx_v_dim1[0]) = __Pyx_pow_long(((long)__pyx_v_self->k_endog), 2);
5464 
5465   /* "statsmodels/tsa/statespace/_representation.pyx":255
5466  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5467  *         dim1[0] = self.k_endog**2;
5468  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5469  *
5470  *         # Arrays for transformations
5471  */
5472   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 255, __pyx_L1_error)
5473   __Pyx_GOTREF(__pyx_t_11);
5474   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 255, __pyx_L1_error)
5475   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5476   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_cov, 0);
5477   __pyx_v_self->selected_obs_cov = __pyx_t_17;
5478   __pyx_t_17.memview = NULL;
5479   __pyx_t_17.data = NULL;
5480 
5481   /* "statsmodels/tsa/statespace/_representation.pyx":258
5482  *
5483  *         # Arrays for transformations
5484  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;             # <<<<<<<<<<<<<<
5485  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5486  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5487  */
5488   __pyx_t_15 = __pyx_v_self->k_endog;
5489   (__pyx_v_dim2[0]) = __pyx_t_15;
5490   __pyx_t_15 = __pyx_v_self->k_endog;
5491   (__pyx_v_dim2[1]) = __pyx_t_15;
5492 
5493   /* "statsmodels/tsa/statespace/_representation.pyx":259
5494  *         # Arrays for transformations
5495  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;
5496  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5497  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5498  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
5499  */
5500   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 259, __pyx_L1_error)
5501   __Pyx_GOTREF(__pyx_t_11);
5502   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 259, __pyx_L1_error)
5503   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5504   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_cholesky, 0);
5505   __pyx_v_self->transform_cholesky = __pyx_t_16;
5506   __pyx_t_16.memview = NULL;
5507   __pyx_t_16.data = NULL;
5508 
5509   /* "statsmodels/tsa/statespace/_representation.pyx":260
5510  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;
5511  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5512  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5513  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
5514  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5515  */
5516   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 260, __pyx_L1_error)
5517   __Pyx_GOTREF(__pyx_t_11);
5518   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 260, __pyx_L1_error)
5519   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5520   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_cov, 0);
5521   __pyx_v_self->transform_obs_cov = __pyx_t_16;
5522   __pyx_t_16.memview = NULL;
5523   __pyx_t_16.data = NULL;
5524 
5525   /* "statsmodels/tsa/statespace/_representation.pyx":261
5526  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5527  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5528  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
5529  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5530  *         dim1[0] = self.k_endog;
5531  */
5532   __pyx_t_15 = __pyx_v_self->k_endog;
5533   (__pyx_v_dim2[0]) = __pyx_t_15;
5534   __pyx_t_15 = __pyx_v_self->k_states;
5535   (__pyx_v_dim2[1]) = __pyx_t_15;
5536 
5537   /* "statsmodels/tsa/statespace/_representation.pyx":262
5538  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5539  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
5540  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5541  *         dim1[0] = self.k_endog;
5542  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5543  */
5544   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 262, __pyx_L1_error)
5545   __Pyx_GOTREF(__pyx_t_11);
5546   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 262, __pyx_L1_error)
5547   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5548   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_design, 0);
5549   __pyx_v_self->transform_design = __pyx_t_16;
5550   __pyx_t_16.memview = NULL;
5551   __pyx_t_16.data = NULL;
5552 
5553   /* "statsmodels/tsa/statespace/_representation.pyx":263
5554  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
5555  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5556  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
5557  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5558  *
5559  */
5560   __pyx_t_15 = __pyx_v_self->k_endog;
5561   (__pyx_v_dim1[0]) = __pyx_t_15;
5562 
5563   /* "statsmodels/tsa/statespace/_representation.pyx":264
5564  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5565  *         dim1[0] = self.k_endog;
5566  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5567  *
5568  *         dim1[0] = self.k_states;
5569  */
5570   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 264, __pyx_L1_error)
5571   __Pyx_GOTREF(__pyx_t_11);
5572   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 264, __pyx_L1_error)
5573   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5574   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_intercept, 0);
5575   __pyx_v_self->transform_obs_intercept = __pyx_t_17;
5576   __pyx_t_17.memview = NULL;
5577   __pyx_t_17.data = NULL;
5578 
5579   /* "statsmodels/tsa/statespace/_representation.pyx":266
5580  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5581  *
5582  *         dim1[0] = self.k_states;             # <<<<<<<<<<<<<<
5583  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5584  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5585  */
5586   __pyx_t_15 = __pyx_v_self->k_states;
5587   (__pyx_v_dim1[0]) = __pyx_t_15;
5588 
5589   /* "statsmodels/tsa/statespace/_representation.pyx":267
5590  *
5591  *         dim1[0] = self.k_states;
5592  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5593  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5594  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5595  */
5596   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 267, __pyx_L1_error)
5597   __Pyx_GOTREF(__pyx_t_11);
5598   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 267, __pyx_L1_error)
5599   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5600   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs, 0);
5601   __pyx_v_self->collapse_obs = __pyx_t_17;
5602   __pyx_t_17.memview = NULL;
5603   __pyx_t_17.data = NULL;
5604 
5605   /* "statsmodels/tsa/statespace/_representation.pyx":268
5606  *         dim1[0] = self.k_states;
5607  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5608  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5609  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5610  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5611  */
5612   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 268, __pyx_L1_error)
5613   __Pyx_GOTREF(__pyx_t_11);
5614   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 268, __pyx_L1_error)
5615   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5616   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_tmp, 0);
5617   __pyx_v_self->collapse_obs_tmp = __pyx_t_17;
5618   __pyx_t_17.memview = NULL;
5619   __pyx_t_17.data = NULL;
5620 
5621   /* "statsmodels/tsa/statespace/_representation.pyx":269
5622  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5623  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5624  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
5625  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5626  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5627  */
5628   __pyx_t_15 = __pyx_v_self->k_states;
5629   (__pyx_v_dim2[0]) = __pyx_t_15;
5630   __pyx_t_15 = __pyx_v_self->k_states;
5631   (__pyx_v_dim2[1]) = __pyx_t_15;
5632 
5633   /* "statsmodels/tsa/statespace/_representation.pyx":270
5634  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
5635  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5636  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5637  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5638  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5639  */
5640   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 270, __pyx_L1_error)
5641   __Pyx_GOTREF(__pyx_t_11);
5642   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 270, __pyx_L1_error)
5643   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5644   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_design, 0);
5645   __pyx_v_self->collapse_design = __pyx_t_16;
5646   __pyx_t_16.memview = NULL;
5647   __pyx_t_16.data = NULL;
5648 
5649   /* "statsmodels/tsa/statespace/_representation.pyx":271
5650  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
5651  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5652  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5653  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5654  *
5655  */
5656   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 271, __pyx_L1_error)
5657   __Pyx_GOTREF(__pyx_t_11);
5658   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 271, __pyx_L1_error)
5659   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5660   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_cov, 0);
5661   __pyx_v_self->collapse_obs_cov = __pyx_t_16;
5662   __pyx_t_16.memview = NULL;
5663   __pyx_t_16.data = NULL;
5664 
5665   /* "statsmodels/tsa/statespace/_representation.pyx":272
5666  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5667  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
5668  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
5669  *
5670  *         # Initialize location
5671  */
5672   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 272, __pyx_L1_error)
5673   __Pyx_GOTREF(__pyx_t_11);
5674   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 272, __pyx_L1_error)
5675   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5676   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_cholesky, 0);
5677   __pyx_v_self->collapse_cholesky = __pyx_t_16;
5678   __pyx_t_16.memview = NULL;
5679   __pyx_t_16.data = NULL;
5680 
5681   /* "statsmodels/tsa/statespace/_representation.pyx":275
5682  *
5683  *         # Initialize location
5684  *         self.t = 0             # <<<<<<<<<<<<<<
5685  *         self._previous_t = 0
5686  *
5687  */
5688   __pyx_v_self->t = 0;
5689 
5690   /* "statsmodels/tsa/statespace/_representation.pyx":276
5691  *         # Initialize location
5692  *         self.t = 0
5693  *         self._previous_t = 0             # <<<<<<<<<<<<<<
5694  *
5695  *         # Initialize dimensions
5696  */
5697   __pyx_v_self->_previous_t = 0;
5698 
5699   /* "statsmodels/tsa/statespace/_representation.pyx":279
5700  *
5701  *         # Initialize dimensions
5702  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)             # <<<<<<<<<<<<<<
5703  *
5704  *     def __reduce__(self):
5705  */
5706   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_self->k_endog, __pyx_v_self->k_states, __pyx_v_self->k_posdef);
5707 
5708   /* "statsmodels/tsa/statespace/_representation.pyx":150
5709  *     # ### Initialize state space model
5710  *     # *Note*: The initial state and state covariance matrix must be provided.
5711  *     def __init__(self,             # <<<<<<<<<<<<<<
5712  *                  np.float32_t [::1,:]   obs,
5713  *                  np.float32_t [::1,:,:] design,
5714  */
5715 
5716   /* function exit code */
5717   __pyx_r = 0;
5718   goto __pyx_L0;
5719   __pyx_L1_error:;
5720   __Pyx_XDECREF(__pyx_t_1);
5721   __Pyx_XDECREF(__pyx_t_2);
5722   __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
5723   __Pyx_XDECREF(__pyx_t_9);
5724   __Pyx_XDECREF(__pyx_t_10);
5725   __Pyx_XDECREF(__pyx_t_11);
5726   __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
5727   __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
5728   __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
5729   __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
5730   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5731   __pyx_r = -1;
5732   __pyx_L0:;
5733   __PYX_XDEC_MEMVIEW(&__pyx_v_obs, 1);
5734   __PYX_XDEC_MEMVIEW(&__pyx_v_design, 1);
5735   __PYX_XDEC_MEMVIEW(&__pyx_v_obs_intercept, 1);
5736   __PYX_XDEC_MEMVIEW(&__pyx_v_obs_cov, 1);
5737   __PYX_XDEC_MEMVIEW(&__pyx_v_transition, 1);
5738   __PYX_XDEC_MEMVIEW(&__pyx_v_state_intercept, 1);
5739   __PYX_XDEC_MEMVIEW(&__pyx_v_selection, 1);
5740   __PYX_XDEC_MEMVIEW(&__pyx_v_state_cov, 1);
5741   __Pyx_RefNannyFinishContext();
5742   return __pyx_r;
5743 }
5744 
5745 /* "statsmodels/tsa/statespace/_representation.pyx":281
5746  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)
5747  *
5748  *     def __reduce__(self):             # <<<<<<<<<<<<<<
5749  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
5750  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
5751  */
5752 
5753 /* Python wrapper */
5754 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3__reduce__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)5755 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5756   PyObject *__pyx_r = 0;
5757   __Pyx_RefNannyDeclarations
5758   __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
5759   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_2__reduce__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
5760 
5761   /* function exit code */
5762   __Pyx_RefNannyFinishContext();
5763   return __pyx_r;
5764 }
5765 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)5766 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
5767   PyObject *__pyx_v_init = NULL;
5768   PyObject *__pyx_v_state = NULL;
5769   PyObject *__pyx_r = NULL;
5770   __Pyx_RefNannyDeclarations
5771   PyObject *__pyx_t_1 = NULL;
5772   PyObject *__pyx_t_2 = NULL;
5773   PyObject *__pyx_t_3 = NULL;
5774   PyObject *__pyx_t_4 = NULL;
5775   PyObject *__pyx_t_5 = NULL;
5776   PyObject *__pyx_t_6 = NULL;
5777   PyObject *__pyx_t_7 = NULL;
5778   PyObject *__pyx_t_8 = NULL;
5779   PyObject *__pyx_t_9 = NULL;
5780   PyObject *__pyx_t_10 = NULL;
5781   PyObject *__pyx_t_11 = NULL;
5782   int __pyx_t_12;
5783   int __pyx_lineno = 0;
5784   const char *__pyx_filename = NULL;
5785   int __pyx_clineno = 0;
5786   __Pyx_RefNannySetupContext("__reduce__", 0);
5787 
5788   /* "statsmodels/tsa/statespace/_representation.pyx":282
5789  *
5790  *     def __reduce__(self):
5791  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),             # <<<<<<<<<<<<<<
5792  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
5793  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
5794  */
5795   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
5796   __Pyx_GOTREF(__pyx_t_1);
5797   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
5798   __Pyx_GOTREF(__pyx_t_2);
5799   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5800   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 282, __pyx_L1_error)}
5801   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
5802   __Pyx_GOTREF(__pyx_t_1);
5803   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
5804   __Pyx_GOTREF(__pyx_t_3);
5805   __Pyx_GIVEREF(__pyx_t_1);
5806   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
5807   __pyx_t_1 = 0;
5808   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
5809   __Pyx_GOTREF(__pyx_t_1);
5810   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
5811   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
5812   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error)
5813   __Pyx_GOTREF(__pyx_t_4);
5814   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5815   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5816   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5817   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
5818   __Pyx_GOTREF(__pyx_t_1);
5819   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
5820   __Pyx_GOTREF(__pyx_t_3);
5821   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5822   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 282, __pyx_L1_error)}
5823   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->design, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
5824   __Pyx_GOTREF(__pyx_t_1);
5825   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
5826   __Pyx_GOTREF(__pyx_t_2);
5827   __Pyx_GIVEREF(__pyx_t_1);
5828   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5829   __pyx_t_1 = 0;
5830   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
5831   __Pyx_GOTREF(__pyx_t_1);
5832   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
5833   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
5834   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error)
5835   __Pyx_GOTREF(__pyx_t_5);
5836   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5837   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5838   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5839 
5840   /* "statsmodels/tsa/statespace/_representation.pyx":283
5841  *     def __reduce__(self):
5842  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
5843  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
5844  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
5845  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
5846  */
5847   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
5848   __Pyx_GOTREF(__pyx_t_1);
5849   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
5850   __Pyx_GOTREF(__pyx_t_2);
5851   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5852   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 283, __pyx_L1_error)}
5853   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
5854   __Pyx_GOTREF(__pyx_t_1);
5855   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
5856   __Pyx_GOTREF(__pyx_t_3);
5857   __Pyx_GIVEREF(__pyx_t_1);
5858   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
5859   __pyx_t_1 = 0;
5860   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
5861   __Pyx_GOTREF(__pyx_t_1);
5862   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 283, __pyx_L1_error)
5863   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 283, __pyx_L1_error)
5864   __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L1_error)
5865   __Pyx_GOTREF(__pyx_t_6);
5866   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5867   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5868   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5869   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
5870   __Pyx_GOTREF(__pyx_t_1);
5871   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
5872   __Pyx_GOTREF(__pyx_t_3);
5873   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5874   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 283, __pyx_L1_error)}
5875   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
5876   __Pyx_GOTREF(__pyx_t_1);
5877   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
5878   __Pyx_GOTREF(__pyx_t_2);
5879   __Pyx_GIVEREF(__pyx_t_1);
5880   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5881   __pyx_t_1 = 0;
5882   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)
5883   __Pyx_GOTREF(__pyx_t_1);
5884   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 283, __pyx_L1_error)
5885   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 283, __pyx_L1_error)
5886   __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L1_error)
5887   __Pyx_GOTREF(__pyx_t_7);
5888   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5889   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5890   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5891 
5892   /* "statsmodels/tsa/statespace/_representation.pyx":284
5893  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
5894  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
5895  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),             # <<<<<<<<<<<<<<
5896  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
5897  *                 self.diagonal_obs_cov)
5898  */
5899   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
5900   __Pyx_GOTREF(__pyx_t_1);
5901   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
5902   __Pyx_GOTREF(__pyx_t_2);
5903   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5904   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 284, __pyx_L1_error)}
5905   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transition, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
5906   __Pyx_GOTREF(__pyx_t_1);
5907   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error)
5908   __Pyx_GOTREF(__pyx_t_3);
5909   __Pyx_GIVEREF(__pyx_t_1);
5910   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
5911   __pyx_t_1 = 0;
5912   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
5913   __Pyx_GOTREF(__pyx_t_1);
5914   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
5915   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
5916   __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 284, __pyx_L1_error)
5917   __Pyx_GOTREF(__pyx_t_8);
5918   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5919   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5920   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5921   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
5922   __Pyx_GOTREF(__pyx_t_1);
5923   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error)
5924   __Pyx_GOTREF(__pyx_t_3);
5925   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5926   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 284, __pyx_L1_error)}
5927   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
5928   __Pyx_GOTREF(__pyx_t_1);
5929   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
5930   __Pyx_GOTREF(__pyx_t_2);
5931   __Pyx_GIVEREF(__pyx_t_1);
5932   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5933   __pyx_t_1 = 0;
5934   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
5935   __Pyx_GOTREF(__pyx_t_1);
5936   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
5937   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
5938   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 284, __pyx_L1_error)
5939   __Pyx_GOTREF(__pyx_t_9);
5940   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5941   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5942   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5943 
5944   /* "statsmodels/tsa/statespace/_representation.pyx":285
5945  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
5946  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
5947  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
5948  *                 self.diagonal_obs_cov)
5949  *         state = {'initialized': self.initialized,
5950  */
5951   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
5952   __Pyx_GOTREF(__pyx_t_1);
5953   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
5954   __Pyx_GOTREF(__pyx_t_2);
5955   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5956   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 285, __pyx_L1_error)}
5957   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selection, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
5958   __Pyx_GOTREF(__pyx_t_1);
5959   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
5960   __Pyx_GOTREF(__pyx_t_3);
5961   __Pyx_GIVEREF(__pyx_t_1);
5962   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
5963   __pyx_t_1 = 0;
5964   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
5965   __Pyx_GOTREF(__pyx_t_1);
5966   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
5967   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
5968   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L1_error)
5969   __Pyx_GOTREF(__pyx_t_10);
5970   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5971   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5972   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5973   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
5974   __Pyx_GOTREF(__pyx_t_1);
5975   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
5976   __Pyx_GOTREF(__pyx_t_3);
5977   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5978   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 285, __pyx_L1_error)}
5979   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
5980   __Pyx_GOTREF(__pyx_t_1);
5981   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error)
5982   __Pyx_GOTREF(__pyx_t_2);
5983   __Pyx_GIVEREF(__pyx_t_1);
5984   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
5985   __pyx_t_1 = 0;
5986   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
5987   __Pyx_GOTREF(__pyx_t_1);
5988   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
5989   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
5990   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 285, __pyx_L1_error)
5991   __Pyx_GOTREF(__pyx_t_11);
5992   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5993   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5994   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5995 
5996   /* "statsmodels/tsa/statespace/_representation.pyx":286
5997  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
5998  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
5999  *                 self.diagonal_obs_cov)             # <<<<<<<<<<<<<<
6000  *         state = {'initialized': self.initialized,
6001  *                  'initialized_diffuse': self.initialized_diffuse,
6002  */
6003   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
6004   __Pyx_GOTREF(__pyx_t_1);
6005 
6006   /* "statsmodels/tsa/statespace/_representation.pyx":282
6007  *
6008  *     def __reduce__(self):
6009  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),             # <<<<<<<<<<<<<<
6010  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
6011  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
6012  */
6013   __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
6014   __Pyx_GOTREF(__pyx_t_2);
6015   __Pyx_GIVEREF(__pyx_t_4);
6016   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
6017   __Pyx_GIVEREF(__pyx_t_5);
6018   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
6019   __Pyx_GIVEREF(__pyx_t_6);
6020   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
6021   __Pyx_GIVEREF(__pyx_t_7);
6022   PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
6023   __Pyx_GIVEREF(__pyx_t_8);
6024   PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_8);
6025   __Pyx_GIVEREF(__pyx_t_9);
6026   PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_9);
6027   __Pyx_GIVEREF(__pyx_t_10);
6028   PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_10);
6029   __Pyx_GIVEREF(__pyx_t_11);
6030   PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_11);
6031   __Pyx_GIVEREF(__pyx_t_1);
6032   PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_t_1);
6033   __pyx_t_4 = 0;
6034   __pyx_t_5 = 0;
6035   __pyx_t_6 = 0;
6036   __pyx_t_7 = 0;
6037   __pyx_t_8 = 0;
6038   __pyx_t_9 = 0;
6039   __pyx_t_10 = 0;
6040   __pyx_t_11 = 0;
6041   __pyx_t_1 = 0;
6042   __pyx_v_init = ((PyObject*)__pyx_t_2);
6043   __pyx_t_2 = 0;
6044 
6045   /* "statsmodels/tsa/statespace/_representation.pyx":287
6046  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
6047  *                 self.diagonal_obs_cov)
6048  *         state = {'initialized': self.initialized,             # <<<<<<<<<<<<<<
6049  *                  'initialized_diffuse': self.initialized_diffuse,
6050  *                  'initialized_stationary': self.initialized_stationary,
6051  */
6052   __pyx_t_2 = __Pyx_PyDict_NewPresized(27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
6053   __Pyx_GOTREF(__pyx_t_2);
6054   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
6055   __Pyx_GOTREF(__pyx_t_1);
6056   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6057   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6058 
6059   /* "statsmodels/tsa/statespace/_representation.pyx":288
6060  *                 self.diagonal_obs_cov)
6061  *         state = {'initialized': self.initialized,
6062  *                  'initialized_diffuse': self.initialized_diffuse,             # <<<<<<<<<<<<<<
6063  *                  'initialized_stationary': self.initialized_stationary,
6064  *                  'initial_state': None,
6065  */
6066   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
6067   __Pyx_GOTREF(__pyx_t_1);
6068   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized_diffuse, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6069   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6070 
6071   /* "statsmodels/tsa/statespace/_representation.pyx":289
6072  *         state = {'initialized': self.initialized,
6073  *                  'initialized_diffuse': self.initialized_diffuse,
6074  *                  'initialized_stationary': self.initialized_stationary,             # <<<<<<<<<<<<<<
6075  *                  'initial_state': None,
6076  *                  'initial_state_cov': None,
6077  */
6078   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
6079   __Pyx_GOTREF(__pyx_t_1);
6080   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized_stationary, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6081   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6082 
6083   /* "statsmodels/tsa/statespace/_representation.pyx":290
6084  *                  'initialized_diffuse': self.initialized_diffuse,
6085  *                  'initialized_stationary': self.initialized_stationary,
6086  *                  'initial_state': None,             # <<<<<<<<<<<<<<
6087  *                  'initial_state_cov': None,
6088  *                  'initial_diffuse_state_cov': None,
6089  */
6090   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_state, Py_None) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6091 
6092   /* "statsmodels/tsa/statespace/_representation.pyx":291
6093  *                  'initialized_stationary': self.initialized_stationary,
6094  *                  'initial_state': None,
6095  *                  'initial_state_cov': None,             # <<<<<<<<<<<<<<
6096  *                  'initial_diffuse_state_cov': None,
6097  *                  'missing': np.array(self.missing, copy=True, order='F'),
6098  */
6099   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_state_cov, Py_None) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6100 
6101   /* "statsmodels/tsa/statespace/_representation.pyx":292
6102  *                  'initial_state': None,
6103  *                  'initial_state_cov': None,
6104  *                  'initial_diffuse_state_cov': None,             # <<<<<<<<<<<<<<
6105  *                  'missing': np.array(self.missing, copy=True, order='F'),
6106  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
6107  */
6108   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_diffuse_state_cov, Py_None) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6109 
6110   /* "statsmodels/tsa/statespace/_representation.pyx":293
6111  *                  'initial_state_cov': None,
6112  *                  'initial_diffuse_state_cov': None,
6113  *                  'missing': np.array(self.missing, copy=True, order='F'),             # <<<<<<<<<<<<<<
6114  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
6115  *                  'has_missing': self.has_missing,
6116  */
6117   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
6118   __Pyx_GOTREF(__pyx_t_1);
6119   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 293, __pyx_L1_error)
6120   __Pyx_GOTREF(__pyx_t_11);
6121   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6122   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 293, __pyx_L1_error)}
6123   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
6124   __Pyx_GOTREF(__pyx_t_1);
6125   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 293, __pyx_L1_error)
6126   __Pyx_GOTREF(__pyx_t_10);
6127   __Pyx_GIVEREF(__pyx_t_1);
6128   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
6129   __pyx_t_1 = 0;
6130   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
6131   __Pyx_GOTREF(__pyx_t_1);
6132   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
6133   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
6134   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 293, __pyx_L1_error)
6135   __Pyx_GOTREF(__pyx_t_9);
6136   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6137   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6138   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6139   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_missing, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6140   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6141 
6142   /* "statsmodels/tsa/statespace/_representation.pyx":294
6143  *                  'initial_diffuse_state_cov': None,
6144  *                  'missing': np.array(self.missing, copy=True, order='F'),
6145  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),             # <<<<<<<<<<<<<<
6146  *                  'has_missing': self.has_missing,
6147  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
6148  */
6149   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 294, __pyx_L1_error)
6150   __Pyx_GOTREF(__pyx_t_9);
6151   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
6152   __Pyx_GOTREF(__pyx_t_1);
6153   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6154   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 294, __pyx_L1_error)}
6155   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 294, __pyx_L1_error)
6156   __Pyx_GOTREF(__pyx_t_9);
6157   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error)
6158   __Pyx_GOTREF(__pyx_t_10);
6159   __Pyx_GIVEREF(__pyx_t_9);
6160   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
6161   __pyx_t_9 = 0;
6162   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 294, __pyx_L1_error)
6163   __Pyx_GOTREF(__pyx_t_9);
6164   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 294, __pyx_L1_error)
6165   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 294, __pyx_L1_error)
6166   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 294, __pyx_L1_error)
6167   __Pyx_GOTREF(__pyx_t_11);
6168   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6169   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6170   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6171   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nmissing, __pyx_t_11) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6172   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6173 
6174   /* "statsmodels/tsa/statespace/_representation.pyx":295
6175  *                  'missing': np.array(self.missing, copy=True, order='F'),
6176  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
6177  *                  'has_missing': self.has_missing,             # <<<<<<<<<<<<<<
6178  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
6179  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
6180  */
6181   __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_self->has_missing); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 295, __pyx_L1_error)
6182   __Pyx_GOTREF(__pyx_t_11);
6183   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_has_missing, __pyx_t_11) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6184   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6185 
6186   /* "statsmodels/tsa/statespace/_representation.pyx":296
6187  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
6188  *                  'has_missing': self.has_missing,
6189  *                  'tmp': np.array(self.tmp, copy=True, order='F'),             # <<<<<<<<<<<<<<
6190  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
6191  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
6192  */
6193   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L1_error)
6194   __Pyx_GOTREF(__pyx_t_11);
6195   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 296, __pyx_L1_error)
6196   __Pyx_GOTREF(__pyx_t_9);
6197   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6198   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 296, __pyx_L1_error)}
6199   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->tmp, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L1_error)
6200   __Pyx_GOTREF(__pyx_t_11);
6201   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 296, __pyx_L1_error)
6202   __Pyx_GOTREF(__pyx_t_10);
6203   __Pyx_GIVEREF(__pyx_t_11);
6204   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
6205   __pyx_t_11 = 0;
6206   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 296, __pyx_L1_error)
6207   __Pyx_GOTREF(__pyx_t_11);
6208   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 296, __pyx_L1_error)
6209   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 296, __pyx_L1_error)
6210   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
6211   __Pyx_GOTREF(__pyx_t_1);
6212   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6213   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6214   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6215   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_tmp, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6216   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6217 
6218   /* "statsmodels/tsa/statespace/_representation.pyx":297
6219  *                  'has_missing': self.has_missing,
6220  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
6221  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
6222  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
6223  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
6224  */
6225   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
6226   __Pyx_GOTREF(__pyx_t_1);
6227   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 297, __pyx_L1_error)
6228   __Pyx_GOTREF(__pyx_t_11);
6229   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6230   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 297, __pyx_L1_error)}
6231   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
6232   __Pyx_GOTREF(__pyx_t_1);
6233   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 297, __pyx_L1_error)
6234   __Pyx_GOTREF(__pyx_t_10);
6235   __Pyx_GIVEREF(__pyx_t_1);
6236   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
6237   __pyx_t_1 = 0;
6238   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
6239   __Pyx_GOTREF(__pyx_t_1);
6240   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 297, __pyx_L1_error)
6241   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 297, __pyx_L1_error)
6242   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 297, __pyx_L1_error)
6243   __Pyx_GOTREF(__pyx_t_9);
6244   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6245   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6246   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6247   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_state_cov, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6248   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6249 
6250   /* "statsmodels/tsa/statespace/_representation.pyx":298
6251  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
6252  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
6253  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),             # <<<<<<<<<<<<<<
6254  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
6255  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
6256  */
6257   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 298, __pyx_L1_error)
6258   __Pyx_GOTREF(__pyx_t_9);
6259   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
6260   __Pyx_GOTREF(__pyx_t_1);
6261   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6262   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 298, __pyx_L1_error)}
6263   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 298, __pyx_L1_error)
6264   __Pyx_GOTREF(__pyx_t_9);
6265   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 298, __pyx_L1_error)
6266   __Pyx_GOTREF(__pyx_t_10);
6267   __Pyx_GIVEREF(__pyx_t_9);
6268   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
6269   __pyx_t_9 = 0;
6270   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 298, __pyx_L1_error)
6271   __Pyx_GOTREF(__pyx_t_9);
6272   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
6273   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
6274   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 298, __pyx_L1_error)
6275   __Pyx_GOTREF(__pyx_t_11);
6276   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6277   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6278   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6279   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs, __pyx_t_11) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6280   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6281 
6282   /* "statsmodels/tsa/statespace/_representation.pyx":299
6283  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
6284  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
6285  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),             # <<<<<<<<<<<<<<
6286  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
6287  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
6288  */
6289   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 299, __pyx_L1_error)
6290   __Pyx_GOTREF(__pyx_t_11);
6291   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 299, __pyx_L1_error)
6292   __Pyx_GOTREF(__pyx_t_9);
6293   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6294   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 299, __pyx_L1_error)}
6295   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 299, __pyx_L1_error)
6296   __Pyx_GOTREF(__pyx_t_11);
6297   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 299, __pyx_L1_error)
6298   __Pyx_GOTREF(__pyx_t_10);
6299   __Pyx_GIVEREF(__pyx_t_11);
6300   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
6301   __pyx_t_11 = 0;
6302   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 299, __pyx_L1_error)
6303   __Pyx_GOTREF(__pyx_t_11);
6304   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 299, __pyx_L1_error)
6305   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 299, __pyx_L1_error)
6306   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
6307   __Pyx_GOTREF(__pyx_t_1);
6308   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6309   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6310   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6311   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs_intercept, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6312   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6313 
6314   /* "statsmodels/tsa/statespace/_representation.pyx":300
6315  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
6316  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
6317  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
6318  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
6319  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
6320  */
6321   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
6322   __Pyx_GOTREF(__pyx_t_1);
6323   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 300, __pyx_L1_error)
6324   __Pyx_GOTREF(__pyx_t_11);
6325   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6326   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 300, __pyx_L1_error)}
6327   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_design, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
6328   __Pyx_GOTREF(__pyx_t_1);
6329   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 300, __pyx_L1_error)
6330   __Pyx_GOTREF(__pyx_t_10);
6331   __Pyx_GIVEREF(__pyx_t_1);
6332   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
6333   __pyx_t_1 = 0;
6334   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
6335   __Pyx_GOTREF(__pyx_t_1);
6336   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
6337   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
6338   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 300, __pyx_L1_error)
6339   __Pyx_GOTREF(__pyx_t_9);
6340   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6341   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6342   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6343   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_design, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6344   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6345 
6346   /* "statsmodels/tsa/statespace/_representation.pyx":301
6347  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
6348  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
6349  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
6350  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
6351  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
6352  */
6353   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 301, __pyx_L1_error)
6354   __Pyx_GOTREF(__pyx_t_9);
6355   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
6356   __Pyx_GOTREF(__pyx_t_1);
6357   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6358   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 301, __pyx_L1_error)}
6359   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_cov, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 301, __pyx_L1_error)
6360   __Pyx_GOTREF(__pyx_t_9);
6361   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 301, __pyx_L1_error)
6362   __Pyx_GOTREF(__pyx_t_10);
6363   __Pyx_GIVEREF(__pyx_t_9);
6364   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
6365   __pyx_t_9 = 0;
6366   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 301, __pyx_L1_error)
6367   __Pyx_GOTREF(__pyx_t_9);
6368   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
6369   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
6370   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 301, __pyx_L1_error)
6371   __Pyx_GOTREF(__pyx_t_11);
6372   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6373   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6374   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6375   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs_cov, __pyx_t_11) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6376   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6377 
6378   /* "statsmodels/tsa/statespace/_representation.pyx":302
6379  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
6380  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
6381  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),             # <<<<<<<<<<<<<<
6382  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
6383  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
6384  */
6385   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L1_error)
6386   __Pyx_GOTREF(__pyx_t_11);
6387   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 302, __pyx_L1_error)
6388   __Pyx_GOTREF(__pyx_t_9);
6389   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6390   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 302, __pyx_L1_error)}
6391   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->transform_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L1_error)
6392   __Pyx_GOTREF(__pyx_t_11);
6393   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 302, __pyx_L1_error)
6394   __Pyx_GOTREF(__pyx_t_10);
6395   __Pyx_GIVEREF(__pyx_t_11);
6396   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
6397   __pyx_t_11 = 0;
6398   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L1_error)
6399   __Pyx_GOTREF(__pyx_t_11);
6400   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
6401   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
6402   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
6403   __Pyx_GOTREF(__pyx_t_1);
6404   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6405   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6406   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6407   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_cholesky, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6408   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6409 
6410   /* "statsmodels/tsa/statespace/_representation.pyx":303
6411  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
6412  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
6413  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
6414  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
6415  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
6416  */
6417   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
6418   __Pyx_GOTREF(__pyx_t_1);
6419   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 303, __pyx_L1_error)
6420   __Pyx_GOTREF(__pyx_t_11);
6421   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6422   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 303, __pyx_L1_error)}
6423   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
6424   __Pyx_GOTREF(__pyx_t_1);
6425   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 303, __pyx_L1_error)
6426   __Pyx_GOTREF(__pyx_t_10);
6427   __Pyx_GIVEREF(__pyx_t_1);
6428   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
6429   __pyx_t_1 = 0;
6430   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
6431   __Pyx_GOTREF(__pyx_t_1);
6432   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 303, __pyx_L1_error)
6433   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 303, __pyx_L1_error)
6434   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 303, __pyx_L1_error)
6435   __Pyx_GOTREF(__pyx_t_9);
6436   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6437   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6438   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6439   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_obs_cov, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6440   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6441 
6442   /* "statsmodels/tsa/statespace/_representation.pyx":304
6443  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
6444  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
6445  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
6446  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
6447  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
6448  */
6449   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 304, __pyx_L1_error)
6450   __Pyx_GOTREF(__pyx_t_9);
6451   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
6452   __Pyx_GOTREF(__pyx_t_1);
6453   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6454   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 304, __pyx_L1_error)}
6455   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->transform_design, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 304, __pyx_L1_error)
6456   __Pyx_GOTREF(__pyx_t_9);
6457   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 304, __pyx_L1_error)
6458   __Pyx_GOTREF(__pyx_t_10);
6459   __Pyx_GIVEREF(__pyx_t_9);
6460   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
6461   __pyx_t_9 = 0;
6462   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 304, __pyx_L1_error)
6463   __Pyx_GOTREF(__pyx_t_9);
6464   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 304, __pyx_L1_error)
6465   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 304, __pyx_L1_error)
6466   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 304, __pyx_L1_error)
6467   __Pyx_GOTREF(__pyx_t_11);
6468   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6469   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6470   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6471   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_design, __pyx_t_11) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6472   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6473 
6474   /* "statsmodels/tsa/statespace/_representation.pyx":305
6475  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
6476  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
6477  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),             # <<<<<<<<<<<<<<
6478  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
6479  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
6480  */
6481   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 305, __pyx_L1_error)
6482   __Pyx_GOTREF(__pyx_t_11);
6483   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 305, __pyx_L1_error)
6484   __Pyx_GOTREF(__pyx_t_9);
6485   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6486   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 305, __pyx_L1_error)}
6487   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 305, __pyx_L1_error)
6488   __Pyx_GOTREF(__pyx_t_11);
6489   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L1_error)
6490   __Pyx_GOTREF(__pyx_t_10);
6491   __Pyx_GIVEREF(__pyx_t_11);
6492   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
6493   __pyx_t_11 = 0;
6494   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 305, __pyx_L1_error)
6495   __Pyx_GOTREF(__pyx_t_11);
6496   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
6497   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
6498   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
6499   __Pyx_GOTREF(__pyx_t_1);
6500   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6501   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6502   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6503   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6504   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6505 
6506   /* "statsmodels/tsa/statespace/_representation.pyx":306
6507  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
6508  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
6509  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),             # <<<<<<<<<<<<<<
6510  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
6511  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
6512  */
6513   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
6514   __Pyx_GOTREF(__pyx_t_1);
6515   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 306, __pyx_L1_error)
6516   __Pyx_GOTREF(__pyx_t_11);
6517   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6518   if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 306, __pyx_L1_error)}
6519   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_tmp, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
6520   __Pyx_GOTREF(__pyx_t_1);
6521   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 306, __pyx_L1_error)
6522   __Pyx_GOTREF(__pyx_t_10);
6523   __Pyx_GIVEREF(__pyx_t_1);
6524   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
6525   __pyx_t_1 = 0;
6526   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
6527   __Pyx_GOTREF(__pyx_t_1);
6528   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 306, __pyx_L1_error)
6529   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 306, __pyx_L1_error)
6530   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 306, __pyx_L1_error)
6531   __Pyx_GOTREF(__pyx_t_9);
6532   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6533   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6534   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6535   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs_tmp, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6536   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6537 
6538   /* "statsmodels/tsa/statespace/_representation.pyx":307
6539  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
6540  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
6541  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
6542  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
6543  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
6544  */
6545   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 307, __pyx_L1_error)
6546   __Pyx_GOTREF(__pyx_t_9);
6547   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
6548   __Pyx_GOTREF(__pyx_t_1);
6549   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6550   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 307, __pyx_L1_error)}
6551   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_design, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 307, __pyx_L1_error)
6552   __Pyx_GOTREF(__pyx_t_9);
6553   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 307, __pyx_L1_error)
6554   __Pyx_GOTREF(__pyx_t_10);
6555   __Pyx_GIVEREF(__pyx_t_9);
6556   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
6557   __pyx_t_9 = 0;
6558   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 307, __pyx_L1_error)
6559   __Pyx_GOTREF(__pyx_t_9);
6560   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
6561   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
6562   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 307, __pyx_L1_error)
6563   __Pyx_GOTREF(__pyx_t_11);
6564   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6565   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6566   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6567   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_design, __pyx_t_11) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6568   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6569 
6570   /* "statsmodels/tsa/statespace/_representation.pyx":308
6571  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
6572  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
6573  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
6574  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
6575  *                  't': self.t,
6576  */
6577   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 308, __pyx_L1_error)
6578   __Pyx_GOTREF(__pyx_t_11);
6579   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 308, __pyx_L1_error)
6580   __Pyx_GOTREF(__pyx_t_9);
6581   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6582   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 308, __pyx_L1_error)}
6583   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 308, __pyx_L1_error)
6584   __Pyx_GOTREF(__pyx_t_11);
6585   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 308, __pyx_L1_error)
6586   __Pyx_GOTREF(__pyx_t_10);
6587   __Pyx_GIVEREF(__pyx_t_11);
6588   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
6589   __pyx_t_11 = 0;
6590   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 308, __pyx_L1_error)
6591   __Pyx_GOTREF(__pyx_t_11);
6592   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
6593   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
6594   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
6595   __Pyx_GOTREF(__pyx_t_1);
6596   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6597   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6598   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6599   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs_cov, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6600   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6601 
6602   /* "statsmodels/tsa/statespace/_representation.pyx":309
6603  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
6604  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
6605  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),             # <<<<<<<<<<<<<<
6606  *                  't': self.t,
6607  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
6608  */
6609   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
6610   __Pyx_GOTREF(__pyx_t_1);
6611   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 309, __pyx_L1_error)
6612   __Pyx_GOTREF(__pyx_t_11);
6613   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6614   if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 309, __pyx_L1_error)}
6615   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
6616   __Pyx_GOTREF(__pyx_t_1);
6617   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 309, __pyx_L1_error)
6618   __Pyx_GOTREF(__pyx_t_10);
6619   __Pyx_GIVEREF(__pyx_t_1);
6620   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
6621   __pyx_t_1 = 0;
6622   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
6623   __Pyx_GOTREF(__pyx_t_1);
6624   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 309, __pyx_L1_error)
6625   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 309, __pyx_L1_error)
6626   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 309, __pyx_L1_error)
6627   __Pyx_GOTREF(__pyx_t_9);
6628   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6629   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6630   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6631   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_cholesky, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6632   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6633 
6634   /* "statsmodels/tsa/statespace/_representation.pyx":310
6635  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
6636  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
6637  *                  't': self.t,             # <<<<<<<<<<<<<<
6638  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
6639  *                  'companion_transition': self.companion_transition,
6640  */
6641   __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->t); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 310, __pyx_L1_error)
6642   __Pyx_GOTREF(__pyx_t_9);
6643   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_t, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6644   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6645 
6646   /* "statsmodels/tsa/statespace/_representation.pyx":311
6647  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
6648  *                  't': self.t,
6649  *                  'collapse_loglikelihood': self.collapse_loglikelihood,             # <<<<<<<<<<<<<<
6650  *                  'companion_transition': self.companion_transition,
6651  *                  'transform_determinant': self.transform_determinant,
6652  */
6653   __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->collapse_loglikelihood); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 311, __pyx_L1_error)
6654   __Pyx_GOTREF(__pyx_t_9);
6655   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_loglikelihood, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6656   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6657 
6658   /* "statsmodels/tsa/statespace/_representation.pyx":312
6659  *                  't': self.t,
6660  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
6661  *                  'companion_transition': self.companion_transition,             # <<<<<<<<<<<<<<
6662  *                  'transform_determinant': self.transform_determinant,
6663  *                  }
6664  */
6665   __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->companion_transition); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 312, __pyx_L1_error)
6666   __Pyx_GOTREF(__pyx_t_9);
6667   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_companion_transition, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6668   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6669 
6670   /* "statsmodels/tsa/statespace/_representation.pyx":313
6671  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
6672  *                  'companion_transition': self.companion_transition,
6673  *                  'transform_determinant': self.transform_determinant,             # <<<<<<<<<<<<<<
6674  *                  }
6675  *         if self.initialized:
6676  */
6677   __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->transform_determinant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 313, __pyx_L1_error)
6678   __Pyx_GOTREF(__pyx_t_9);
6679   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_determinant, __pyx_t_9) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
6680   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6681   __pyx_v_state = ((PyObject*)__pyx_t_2);
6682   __pyx_t_2 = 0;
6683 
6684   /* "statsmodels/tsa/statespace/_representation.pyx":315
6685  *                  'transform_determinant': self.transform_determinant,
6686  *                  }
6687  *         if self.initialized:             # <<<<<<<<<<<<<<
6688  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
6689  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
6690  */
6691   __pyx_t_12 = (__pyx_v_self->initialized != 0);
6692   if (__pyx_t_12) {
6693 
6694     /* "statsmodels/tsa/statespace/_representation.pyx":316
6695  *                  }
6696  *         if self.initialized:
6697  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')             # <<<<<<<<<<<<<<
6698  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
6699  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
6700  */
6701     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
6702     __Pyx_GOTREF(__pyx_t_2);
6703     __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 316, __pyx_L1_error)
6704     __Pyx_GOTREF(__pyx_t_9);
6705     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6706     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 316, __pyx_L1_error)}
6707     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
6708     __Pyx_GOTREF(__pyx_t_2);
6709     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error)
6710     __Pyx_GOTREF(__pyx_t_1);
6711     __Pyx_GIVEREF(__pyx_t_2);
6712     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
6713     __pyx_t_2 = 0;
6714     __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
6715     __Pyx_GOTREF(__pyx_t_2);
6716     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 316, __pyx_L1_error)
6717     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 316, __pyx_L1_error)
6718     __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 316, __pyx_L1_error)
6719     __Pyx_GOTREF(__pyx_t_10);
6720     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6721     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6722     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6723     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_state, __pyx_t_10) < 0)) __PYX_ERR(0, 316, __pyx_L1_error)
6724     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6725 
6726     /* "statsmodels/tsa/statespace/_representation.pyx":317
6727  *         if self.initialized:
6728  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
6729  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')             # <<<<<<<<<<<<<<
6730  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
6731  *         return (self.__class__, init, state)
6732  */
6733     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 317, __pyx_L1_error)
6734     __Pyx_GOTREF(__pyx_t_10);
6735     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error)
6736     __Pyx_GOTREF(__pyx_t_2);
6737     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6738     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 317, __pyx_L1_error)}
6739     __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 317, __pyx_L1_error)
6740     __Pyx_GOTREF(__pyx_t_10);
6741     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
6742     __Pyx_GOTREF(__pyx_t_1);
6743     __Pyx_GIVEREF(__pyx_t_10);
6744     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
6745     __pyx_t_10 = 0;
6746     __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 317, __pyx_L1_error)
6747     __Pyx_GOTREF(__pyx_t_10);
6748     if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
6749     if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
6750     __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 317, __pyx_L1_error)
6751     __Pyx_GOTREF(__pyx_t_9);
6752     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6753     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6754     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6755     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_state_cov, __pyx_t_9) < 0)) __PYX_ERR(0, 317, __pyx_L1_error)
6756     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6757 
6758     /* "statsmodels/tsa/statespace/_representation.pyx":318
6759  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
6760  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
6761  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')             # <<<<<<<<<<<<<<
6762  *         return (self.__class__, init, state)
6763  *
6764  */
6765     __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 318, __pyx_L1_error)
6766     __Pyx_GOTREF(__pyx_t_9);
6767     __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 318, __pyx_L1_error)
6768     __Pyx_GOTREF(__pyx_t_10);
6769     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6770     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 318, __pyx_L1_error)}
6771     __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->initial_diffuse_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 318, __pyx_L1_error)
6772     __Pyx_GOTREF(__pyx_t_9);
6773     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
6774     __Pyx_GOTREF(__pyx_t_1);
6775     __Pyx_GIVEREF(__pyx_t_9);
6776     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
6777     __pyx_t_9 = 0;
6778     __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 318, __pyx_L1_error)
6779     __Pyx_GOTREF(__pyx_t_9);
6780     if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
6781     if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
6782     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
6783     __Pyx_GOTREF(__pyx_t_2);
6784     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6785     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6786     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6787     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_diffuse_state_cov, __pyx_t_2) < 0)) __PYX_ERR(0, 318, __pyx_L1_error)
6788     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6789 
6790     /* "statsmodels/tsa/statespace/_representation.pyx":315
6791  *                  'transform_determinant': self.transform_determinant,
6792  *                  }
6793  *         if self.initialized:             # <<<<<<<<<<<<<<
6794  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
6795  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
6796  */
6797   }
6798 
6799   /* "statsmodels/tsa/statespace/_representation.pyx":319
6800  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
6801  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
6802  *         return (self.__class__, init, state)             # <<<<<<<<<<<<<<
6803  *
6804  *     def __setstate__(self, state):
6805  */
6806   __Pyx_XDECREF(__pyx_r);
6807   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
6808   __Pyx_GOTREF(__pyx_t_2);
6809   __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 319, __pyx_L1_error)
6810   __Pyx_GOTREF(__pyx_t_9);
6811   __Pyx_GIVEREF(__pyx_t_2);
6812   PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
6813   __Pyx_INCREF(__pyx_v_init);
6814   __Pyx_GIVEREF(__pyx_v_init);
6815   PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_init);
6816   __Pyx_INCREF(__pyx_v_state);
6817   __Pyx_GIVEREF(__pyx_v_state);
6818   PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_state);
6819   __pyx_t_2 = 0;
6820   __pyx_r = __pyx_t_9;
6821   __pyx_t_9 = 0;
6822   goto __pyx_L0;
6823 
6824   /* "statsmodels/tsa/statespace/_representation.pyx":281
6825  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)
6826  *
6827  *     def __reduce__(self):             # <<<<<<<<<<<<<<
6828  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
6829  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
6830  */
6831 
6832   /* function exit code */
6833   __pyx_L1_error:;
6834   __Pyx_XDECREF(__pyx_t_1);
6835   __Pyx_XDECREF(__pyx_t_2);
6836   __Pyx_XDECREF(__pyx_t_3);
6837   __Pyx_XDECREF(__pyx_t_4);
6838   __Pyx_XDECREF(__pyx_t_5);
6839   __Pyx_XDECREF(__pyx_t_6);
6840   __Pyx_XDECREF(__pyx_t_7);
6841   __Pyx_XDECREF(__pyx_t_8);
6842   __Pyx_XDECREF(__pyx_t_9);
6843   __Pyx_XDECREF(__pyx_t_10);
6844   __Pyx_XDECREF(__pyx_t_11);
6845   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6846   __pyx_r = NULL;
6847   __pyx_L0:;
6848   __Pyx_XDECREF(__pyx_v_init);
6849   __Pyx_XDECREF(__pyx_v_state);
6850   __Pyx_XGIVEREF(__pyx_r);
6851   __Pyx_RefNannyFinishContext();
6852   return __pyx_r;
6853 }
6854 
6855 /* "statsmodels/tsa/statespace/_representation.pyx":321
6856  *         return (self.__class__, init, state)
6857  *
6858  *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
6859  *         self.initial_state = state['initial_state']
6860  *         self.initial_state_cov = state['initial_state_cov']
6861  */
6862 
6863 /* Python wrapper */
6864 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_5__setstate__(PyObject * __pyx_v_self,PyObject * __pyx_v_state)6865 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
6866   PyObject *__pyx_r = 0;
6867   __Pyx_RefNannyDeclarations
6868   __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
6869   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4__setstate__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_state));
6870 
6871   /* function exit code */
6872   __Pyx_RefNannyFinishContext();
6873   return __pyx_r;
6874 }
6875 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,PyObject * __pyx_v_state)6876 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_state) {
6877   PyObject *__pyx_r = NULL;
6878   __Pyx_RefNannyDeclarations
6879   PyObject *__pyx_t_1 = NULL;
6880   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
6881   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
6882   int __pyx_t_4;
6883   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
6884   __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
6885   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
6886   __pyx_t_5numpy_float32_t __pyx_t_8;
6887   int __pyx_lineno = 0;
6888   const char *__pyx_filename = NULL;
6889   int __pyx_clineno = 0;
6890   __Pyx_RefNannySetupContext("__setstate__", 0);
6891 
6892   /* "statsmodels/tsa/statespace/_representation.pyx":322
6893  *
6894  *     def __setstate__(self, state):
6895  *         self.initial_state = state['initial_state']             # <<<<<<<<<<<<<<
6896  *         self.initial_state_cov = state['initial_state_cov']
6897  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
6898  */
6899   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
6900   __Pyx_GOTREF(__pyx_t_1);
6901   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 322, __pyx_L1_error)
6902   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6903   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
6904   __pyx_v_self->initial_state = __pyx_t_2;
6905   __pyx_t_2.memview = NULL;
6906   __pyx_t_2.data = NULL;
6907 
6908   /* "statsmodels/tsa/statespace/_representation.pyx":323
6909  *     def __setstate__(self, state):
6910  *         self.initial_state = state['initial_state']
6911  *         self.initial_state_cov = state['initial_state_cov']             # <<<<<<<<<<<<<<
6912  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
6913  *         self.initialized = state['initialized']
6914  */
6915   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error)
6916   __Pyx_GOTREF(__pyx_t_1);
6917   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 323, __pyx_L1_error)
6918   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6919   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
6920   __pyx_v_self->initial_state_cov = __pyx_t_3;
6921   __pyx_t_3.memview = NULL;
6922   __pyx_t_3.data = NULL;
6923 
6924   /* "statsmodels/tsa/statespace/_representation.pyx":324
6925  *         self.initial_state = state['initial_state']
6926  *         self.initial_state_cov = state['initial_state_cov']
6927  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']             # <<<<<<<<<<<<<<
6928  *         self.initialized = state['initialized']
6929  *         self.initialized_diffuse = state['initialized_diffuse']
6930  */
6931   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_diffuse_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
6932   __Pyx_GOTREF(__pyx_t_1);
6933   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 324, __pyx_L1_error)
6934   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6935   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_diffuse_state_cov, 0);
6936   __pyx_v_self->initial_diffuse_state_cov = __pyx_t_3;
6937   __pyx_t_3.memview = NULL;
6938   __pyx_t_3.data = NULL;
6939 
6940   /* "statsmodels/tsa/statespace/_representation.pyx":325
6941  *         self.initial_state_cov = state['initial_state_cov']
6942  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
6943  *         self.initialized = state['initialized']             # <<<<<<<<<<<<<<
6944  *         self.initialized_diffuse = state['initialized_diffuse']
6945  *         self.initialized_stationary = state['initialized_stationary']
6946  */
6947   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
6948   __Pyx_GOTREF(__pyx_t_1);
6949   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 325, __pyx_L1_error)
6950   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6951   __pyx_v_self->initialized = __pyx_t_4;
6952 
6953   /* "statsmodels/tsa/statespace/_representation.pyx":326
6954  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
6955  *         self.initialized = state['initialized']
6956  *         self.initialized_diffuse = state['initialized_diffuse']             # <<<<<<<<<<<<<<
6957  *         self.initialized_stationary = state['initialized_stationary']
6958  *         self.selected_state_cov = state['selected_state_cov']
6959  */
6960   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
6961   __Pyx_GOTREF(__pyx_t_1);
6962   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 326, __pyx_L1_error)
6963   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6964   __pyx_v_self->initialized_diffuse = __pyx_t_4;
6965 
6966   /* "statsmodels/tsa/statespace/_representation.pyx":327
6967  *         self.initialized = state['initialized']
6968  *         self.initialized_diffuse = state['initialized_diffuse']
6969  *         self.initialized_stationary = state['initialized_stationary']             # <<<<<<<<<<<<<<
6970  *         self.selected_state_cov = state['selected_state_cov']
6971  *         self.missing = state['missing']
6972  */
6973   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
6974   __Pyx_GOTREF(__pyx_t_1);
6975   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 327, __pyx_L1_error)
6976   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6977   __pyx_v_self->initialized_stationary = __pyx_t_4;
6978 
6979   /* "statsmodels/tsa/statespace/_representation.pyx":328
6980  *         self.initialized_diffuse = state['initialized_diffuse']
6981  *         self.initialized_stationary = state['initialized_stationary']
6982  *         self.selected_state_cov = state['selected_state_cov']             # <<<<<<<<<<<<<<
6983  *         self.missing = state['missing']
6984  *         self.nmissing =state['nmissing']
6985  */
6986   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
6987   __Pyx_GOTREF(__pyx_t_1);
6988   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 328, __pyx_L1_error)
6989   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6990   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_state_cov, 0);
6991   __pyx_v_self->selected_state_cov = __pyx_t_5;
6992   __pyx_t_5.memview = NULL;
6993   __pyx_t_5.data = NULL;
6994 
6995   /* "statsmodels/tsa/statespace/_representation.pyx":329
6996  *         self.initialized_stationary = state['initialized_stationary']
6997  *         self.selected_state_cov = state['selected_state_cov']
6998  *         self.missing = state['missing']             # <<<<<<<<<<<<<<
6999  *         self.nmissing =state['nmissing']
7000  *         self.has_missing = state['has_missing']
7001  */
7002   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
7003   __Pyx_GOTREF(__pyx_t_1);
7004   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 329, __pyx_L1_error)
7005   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7006   __PYX_XDEC_MEMVIEW(&__pyx_v_self->missing, 0);
7007   __pyx_v_self->missing = __pyx_t_6;
7008   __pyx_t_6.memview = NULL;
7009   __pyx_t_6.data = NULL;
7010 
7011   /* "statsmodels/tsa/statespace/_representation.pyx":330
7012  *         self.selected_state_cov = state['selected_state_cov']
7013  *         self.missing = state['missing']
7014  *         self.nmissing =state['nmissing']             # <<<<<<<<<<<<<<
7015  *         self.has_missing = state['has_missing']
7016  *         self.tmp = state['tmp']
7017  */
7018   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_nmissing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
7019   __Pyx_GOTREF(__pyx_t_1);
7020   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 330, __pyx_L1_error)
7021   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7022   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nmissing, 0);
7023   __pyx_v_self->nmissing = __pyx_t_7;
7024   __pyx_t_7.memview = NULL;
7025   __pyx_t_7.data = NULL;
7026 
7027   /* "statsmodels/tsa/statespace/_representation.pyx":331
7028  *         self.missing = state['missing']
7029  *         self.nmissing =state['nmissing']
7030  *         self.has_missing = state['has_missing']             # <<<<<<<<<<<<<<
7031  *         self.tmp = state['tmp']
7032  *         self.selected_obs  = state['selected_obs']
7033  */
7034   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_has_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
7035   __Pyx_GOTREF(__pyx_t_1);
7036   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 331, __pyx_L1_error)
7037   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7038   __pyx_v_self->has_missing = __pyx_t_4;
7039 
7040   /* "statsmodels/tsa/statespace/_representation.pyx":332
7041  *         self.nmissing =state['nmissing']
7042  *         self.has_missing = state['has_missing']
7043  *         self.tmp = state['tmp']             # <<<<<<<<<<<<<<
7044  *         self.selected_obs  = state['selected_obs']
7045  *         self.selected_obs_intercept  = state['selected_obs_intercept']
7046  */
7047   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
7048   __Pyx_GOTREF(__pyx_t_1);
7049   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 332, __pyx_L1_error)
7050   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7051   __PYX_XDEC_MEMVIEW(&__pyx_v_self->tmp, 0);
7052   __pyx_v_self->tmp = __pyx_t_3;
7053   __pyx_t_3.memview = NULL;
7054   __pyx_t_3.data = NULL;
7055 
7056   /* "statsmodels/tsa/statespace/_representation.pyx":333
7057  *         self.has_missing = state['has_missing']
7058  *         self.tmp = state['tmp']
7059  *         self.selected_obs  = state['selected_obs']             # <<<<<<<<<<<<<<
7060  *         self.selected_obs_intercept  = state['selected_obs_intercept']
7061  *         self.selected_design  = state['selected_design']
7062  */
7063   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
7064   __Pyx_GOTREF(__pyx_t_1);
7065   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 333, __pyx_L1_error)
7066   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7067   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs, 0);
7068   __pyx_v_self->selected_obs = __pyx_t_2;
7069   __pyx_t_2.memview = NULL;
7070   __pyx_t_2.data = NULL;
7071 
7072   /* "statsmodels/tsa/statespace/_representation.pyx":334
7073  *         self.tmp = state['tmp']
7074  *         self.selected_obs  = state['selected_obs']
7075  *         self.selected_obs_intercept  = state['selected_obs_intercept']             # <<<<<<<<<<<<<<
7076  *         self.selected_design  = state['selected_design']
7077  *         self.selected_obs_cov  =state['selected_obs_cov']
7078  */
7079   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs_intercept); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error)
7080   __Pyx_GOTREF(__pyx_t_1);
7081   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 334, __pyx_L1_error)
7082   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7083   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_intercept, 0);
7084   __pyx_v_self->selected_obs_intercept = __pyx_t_2;
7085   __pyx_t_2.memview = NULL;
7086   __pyx_t_2.data = NULL;
7087 
7088   /* "statsmodels/tsa/statespace/_representation.pyx":335
7089  *         self.selected_obs  = state['selected_obs']
7090  *         self.selected_obs_intercept  = state['selected_obs_intercept']
7091  *         self.selected_design  = state['selected_design']             # <<<<<<<<<<<<<<
7092  *         self.selected_obs_cov  =state['selected_obs_cov']
7093  *         self.transform_cholesky  = state['transform_cholesky']
7094  */
7095   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error)
7096   __Pyx_GOTREF(__pyx_t_1);
7097   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 335, __pyx_L1_error)
7098   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7099   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_design, 0);
7100   __pyx_v_self->selected_design = __pyx_t_2;
7101   __pyx_t_2.memview = NULL;
7102   __pyx_t_2.data = NULL;
7103 
7104   /* "statsmodels/tsa/statespace/_representation.pyx":336
7105  *         self.selected_obs_intercept  = state['selected_obs_intercept']
7106  *         self.selected_design  = state['selected_design']
7107  *         self.selected_obs_cov  =state['selected_obs_cov']             # <<<<<<<<<<<<<<
7108  *         self.transform_cholesky  = state['transform_cholesky']
7109  *         self.transform_obs_cov  = state['transform_obs_cov']
7110  */
7111   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
7112   __Pyx_GOTREF(__pyx_t_1);
7113   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 336, __pyx_L1_error)
7114   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7115   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_cov, 0);
7116   __pyx_v_self->selected_obs_cov = __pyx_t_2;
7117   __pyx_t_2.memview = NULL;
7118   __pyx_t_2.data = NULL;
7119 
7120   /* "statsmodels/tsa/statespace/_representation.pyx":337
7121  *         self.selected_design  = state['selected_design']
7122  *         self.selected_obs_cov  =state['selected_obs_cov']
7123  *         self.transform_cholesky  = state['transform_cholesky']             # <<<<<<<<<<<<<<
7124  *         self.transform_obs_cov  = state['transform_obs_cov']
7125  *         self.transform_design = state['transform_design']
7126  */
7127   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_cholesky); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
7128   __Pyx_GOTREF(__pyx_t_1);
7129   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 337, __pyx_L1_error)
7130   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7131   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_cholesky, 0);
7132   __pyx_v_self->transform_cholesky = __pyx_t_3;
7133   __pyx_t_3.memview = NULL;
7134   __pyx_t_3.data = NULL;
7135 
7136   /* "statsmodels/tsa/statespace/_representation.pyx":338
7137  *         self.selected_obs_cov  =state['selected_obs_cov']
7138  *         self.transform_cholesky  = state['transform_cholesky']
7139  *         self.transform_obs_cov  = state['transform_obs_cov']             # <<<<<<<<<<<<<<
7140  *         self.transform_design = state['transform_design']
7141  *         self.collapse_obs = state['collapse_obs']
7142  */
7143   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
7144   __Pyx_GOTREF(__pyx_t_1);
7145   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 338, __pyx_L1_error)
7146   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7147   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_cov, 0);
7148   __pyx_v_self->transform_obs_cov = __pyx_t_3;
7149   __pyx_t_3.memview = NULL;
7150   __pyx_t_3.data = NULL;
7151 
7152   /* "statsmodels/tsa/statespace/_representation.pyx":339
7153  *         self.transform_cholesky  = state['transform_cholesky']
7154  *         self.transform_obs_cov  = state['transform_obs_cov']
7155  *         self.transform_design = state['transform_design']             # <<<<<<<<<<<<<<
7156  *         self.collapse_obs = state['collapse_obs']
7157  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
7158  */
7159   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
7160   __Pyx_GOTREF(__pyx_t_1);
7161   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 339, __pyx_L1_error)
7162   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7163   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_design, 0);
7164   __pyx_v_self->transform_design = __pyx_t_3;
7165   __pyx_t_3.memview = NULL;
7166   __pyx_t_3.data = NULL;
7167 
7168   /* "statsmodels/tsa/statespace/_representation.pyx":340
7169  *         self.transform_obs_cov  = state['transform_obs_cov']
7170  *         self.transform_design = state['transform_design']
7171  *         self.collapse_obs = state['collapse_obs']             # <<<<<<<<<<<<<<
7172  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
7173  *         self.collapse_design = state['collapse_design']
7174  */
7175   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
7176   __Pyx_GOTREF(__pyx_t_1);
7177   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 340, __pyx_L1_error)
7178   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7179   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs, 0);
7180   __pyx_v_self->collapse_obs = __pyx_t_2;
7181   __pyx_t_2.memview = NULL;
7182   __pyx_t_2.data = NULL;
7183 
7184   /* "statsmodels/tsa/statespace/_representation.pyx":341
7185  *         self.transform_design = state['transform_design']
7186  *         self.collapse_obs = state['collapse_obs']
7187  *         self.collapse_obs_tmp = state['collapse_obs_tmp']             # <<<<<<<<<<<<<<
7188  *         self.collapse_design = state['collapse_design']
7189  *         self.collapse_obs_cov = state['collapse_obs_cov']
7190  */
7191   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error)
7192   __Pyx_GOTREF(__pyx_t_1);
7193   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 341, __pyx_L1_error)
7194   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7195   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_tmp, 0);
7196   __pyx_v_self->collapse_obs_tmp = __pyx_t_2;
7197   __pyx_t_2.memview = NULL;
7198   __pyx_t_2.data = NULL;
7199 
7200   /* "statsmodels/tsa/statespace/_representation.pyx":342
7201  *         self.collapse_obs = state['collapse_obs']
7202  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
7203  *         self.collapse_design = state['collapse_design']             # <<<<<<<<<<<<<<
7204  *         self.collapse_obs_cov = state['collapse_obs_cov']
7205  *         self.collapse_cholesky = state['collapse_cholesky']
7206  */
7207   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
7208   __Pyx_GOTREF(__pyx_t_1);
7209   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 342, __pyx_L1_error)
7210   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7211   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_design, 0);
7212   __pyx_v_self->collapse_design = __pyx_t_3;
7213   __pyx_t_3.memview = NULL;
7214   __pyx_t_3.data = NULL;
7215 
7216   /* "statsmodels/tsa/statespace/_representation.pyx":343
7217  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
7218  *         self.collapse_design = state['collapse_design']
7219  *         self.collapse_obs_cov = state['collapse_obs_cov']             # <<<<<<<<<<<<<<
7220  *         self.collapse_cholesky = state['collapse_cholesky']
7221  *         self.t = state['t']
7222  */
7223   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
7224   __Pyx_GOTREF(__pyx_t_1);
7225   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 343, __pyx_L1_error)
7226   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7227   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_cov, 0);
7228   __pyx_v_self->collapse_obs_cov = __pyx_t_3;
7229   __pyx_t_3.memview = NULL;
7230   __pyx_t_3.data = NULL;
7231 
7232   /* "statsmodels/tsa/statespace/_representation.pyx":344
7233  *         self.collapse_design = state['collapse_design']
7234  *         self.collapse_obs_cov = state['collapse_obs_cov']
7235  *         self.collapse_cholesky = state['collapse_cholesky']             # <<<<<<<<<<<<<<
7236  *         self.t = state['t']
7237  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
7238  */
7239   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_cholesky); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
7240   __Pyx_GOTREF(__pyx_t_1);
7241   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 344, __pyx_L1_error)
7242   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7243   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_cholesky, 0);
7244   __pyx_v_self->collapse_cholesky = __pyx_t_3;
7245   __pyx_t_3.memview = NULL;
7246   __pyx_t_3.data = NULL;
7247 
7248   /* "statsmodels/tsa/statespace/_representation.pyx":345
7249  *         self.collapse_obs_cov = state['collapse_obs_cov']
7250  *         self.collapse_cholesky = state['collapse_cholesky']
7251  *         self.t = state['t']             # <<<<<<<<<<<<<<
7252  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
7253  *         self.companion_transition = state['companion_transition']
7254  */
7255   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
7256   __Pyx_GOTREF(__pyx_t_1);
7257   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L1_error)
7258   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7259   __pyx_v_self->t = __pyx_t_4;
7260 
7261   /* "statsmodels/tsa/statespace/_representation.pyx":346
7262  *         self.collapse_cholesky = state['collapse_cholesky']
7263  *         self.t = state['t']
7264  *         self.collapse_loglikelihood = state['collapse_loglikelihood']             # <<<<<<<<<<<<<<
7265  *         self.companion_transition = state['companion_transition']
7266  *         self.transform_determinant = state['transform_determinant']
7267  */
7268   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_loglikelihood); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
7269   __Pyx_GOTREF(__pyx_t_1);
7270   __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_8 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error)
7271   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7272   __pyx_v_self->collapse_loglikelihood = __pyx_t_8;
7273 
7274   /* "statsmodels/tsa/statespace/_representation.pyx":347
7275  *         self.t = state['t']
7276  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
7277  *         self.companion_transition = state['companion_transition']             # <<<<<<<<<<<<<<
7278  *         self.transform_determinant = state['transform_determinant']
7279  *
7280  */
7281   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_companion_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
7282   __Pyx_GOTREF(__pyx_t_1);
7283   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L1_error)
7284   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7285   __pyx_v_self->companion_transition = __pyx_t_4;
7286 
7287   /* "statsmodels/tsa/statespace/_representation.pyx":348
7288  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
7289  *         self.companion_transition = state['companion_transition']
7290  *         self.transform_determinant = state['transform_determinant']             # <<<<<<<<<<<<<<
7291  *
7292  *     def initialize(self, init, offset=0, complex_step=False, clear=True):
7293  */
7294   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_determinant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
7295   __Pyx_GOTREF(__pyx_t_1);
7296   __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_8 == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 348, __pyx_L1_error)
7297   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7298   __pyx_v_self->transform_determinant = __pyx_t_8;
7299 
7300   /* "statsmodels/tsa/statespace/_representation.pyx":321
7301  *         return (self.__class__, init, state)
7302  *
7303  *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
7304  *         self.initial_state = state['initial_state']
7305  *         self.initial_state_cov = state['initial_state_cov']
7306  */
7307 
7308   /* function exit code */
7309   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7310   goto __pyx_L0;
7311   __pyx_L1_error:;
7312   __Pyx_XDECREF(__pyx_t_1);
7313   __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
7314   __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
7315   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
7316   __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
7317   __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
7318   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7319   __pyx_r = NULL;
7320   __pyx_L0:;
7321   __Pyx_XGIVEREF(__pyx_r);
7322   __Pyx_RefNannyFinishContext();
7323   return __pyx_r;
7324 }
7325 
7326 /* "statsmodels/tsa/statespace/_representation.pyx":350
7327  *         self.transform_determinant = state['transform_determinant']
7328  *
7329  *     def initialize(self, init, offset=0, complex_step=False, clear=True):             # <<<<<<<<<<<<<<
7330  *         cdef sInitialization _init
7331  *         # Clear initial arrays
7332  */
7333 
7334 /* Python wrapper */
7335 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7initialize(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)7336 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7337   PyObject *__pyx_v_init = 0;
7338   PyObject *__pyx_v_offset = 0;
7339   PyObject *__pyx_v_complex_step = 0;
7340   PyObject *__pyx_v_clear = 0;
7341   int __pyx_lineno = 0;
7342   const char *__pyx_filename = NULL;
7343   int __pyx_clineno = 0;
7344   PyObject *__pyx_r = 0;
7345   __Pyx_RefNannyDeclarations
7346   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
7347   {
7348     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init,&__pyx_n_s_offset,&__pyx_n_s_complex_step,&__pyx_n_s_clear,0};
7349     PyObject* values[4] = {0,0,0,0};
7350     values[1] = ((PyObject *)__pyx_int_0);
7351     values[2] = ((PyObject *)Py_False);
7352     values[3] = ((PyObject *)Py_True);
7353     if (unlikely(__pyx_kwds)) {
7354       Py_ssize_t kw_args;
7355       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7356       switch (pos_args) {
7357         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7358         CYTHON_FALLTHROUGH;
7359         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7360         CYTHON_FALLTHROUGH;
7361         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7362         CYTHON_FALLTHROUGH;
7363         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7364         CYTHON_FALLTHROUGH;
7365         case  0: break;
7366         default: goto __pyx_L5_argtuple_error;
7367       }
7368       kw_args = PyDict_Size(__pyx_kwds);
7369       switch (pos_args) {
7370         case  0:
7371         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init)) != 0)) kw_args--;
7372         else goto __pyx_L5_argtuple_error;
7373         CYTHON_FALLTHROUGH;
7374         case  1:
7375         if (kw_args > 0) {
7376           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset);
7377           if (value) { values[1] = value; kw_args--; }
7378         }
7379         CYTHON_FALLTHROUGH;
7380         case  2:
7381         if (kw_args > 0) {
7382           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complex_step);
7383           if (value) { values[2] = value; kw_args--; }
7384         }
7385         CYTHON_FALLTHROUGH;
7386         case  3:
7387         if (kw_args > 0) {
7388           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_clear);
7389           if (value) { values[3] = value; kw_args--; }
7390         }
7391       }
7392       if (unlikely(kw_args > 0)) {
7393         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize") < 0)) __PYX_ERR(0, 350, __pyx_L3_error)
7394       }
7395     } else {
7396       switch (PyTuple_GET_SIZE(__pyx_args)) {
7397         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
7398         CYTHON_FALLTHROUGH;
7399         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
7400         CYTHON_FALLTHROUGH;
7401         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7402         CYTHON_FALLTHROUGH;
7403         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7404         break;
7405         default: goto __pyx_L5_argtuple_error;
7406       }
7407     }
7408     __pyx_v_init = values[0];
7409     __pyx_v_offset = values[1];
7410     __pyx_v_complex_step = values[2];
7411     __pyx_v_clear = values[3];
7412   }
7413   goto __pyx_L4_argument_unpacking_done;
7414   __pyx_L5_argtuple_error:;
7415   __Pyx_RaiseArgtupleInvalid("initialize", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 350, __pyx_L3_error)
7416   __pyx_L3_error:;
7417   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
7418   __Pyx_RefNannyFinishContext();
7419   return NULL;
7420   __pyx_L4_argument_unpacking_done:;
7421   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6initialize(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), __pyx_v_init, __pyx_v_offset, __pyx_v_complex_step, __pyx_v_clear);
7422 
7423   /* function exit code */
7424   __Pyx_RefNannyFinishContext();
7425   return __pyx_r;
7426 }
7427 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,PyObject * __pyx_v_init,PyObject * __pyx_v_offset,PyObject * __pyx_v_complex_step,PyObject * __pyx_v_clear)7428 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_init, PyObject *__pyx_v_offset, PyObject *__pyx_v_complex_step, PyObject *__pyx_v_clear) {
7429   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *__pyx_v__init = 0;
7430   PyObject *__pyx_v_block_index = NULL;
7431   PyObject *__pyx_v_block_init = NULL;
7432   PyObject *__pyx_r = NULL;
7433   __Pyx_RefNannyDeclarations
7434   int __pyx_t_1;
7435   PyObject *__pyx_t_2 = NULL;
7436   int __pyx_t_3;
7437   PyObject *__pyx_t_4 = NULL;
7438   PyObject *__pyx_t_5 = NULL;
7439   int __pyx_t_6;
7440   int __pyx_t_7;
7441   int __pyx_t_8;
7442   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15sInitialization_initialize __pyx_t_9;
7443   Py_ssize_t __pyx_t_10;
7444   Py_ssize_t __pyx_t_11;
7445   PyObject *__pyx_t_12 = NULL;
7446   PyObject *__pyx_t_13 = NULL;
7447   PyObject *__pyx_t_14 = NULL;
7448   int __pyx_lineno = 0;
7449   const char *__pyx_filename = NULL;
7450   int __pyx_clineno = 0;
7451   __Pyx_RefNannySetupContext("initialize", 0);
7452 
7453   /* "statsmodels/tsa/statespace/_representation.pyx":353
7454  *         cdef sInitialization _init
7455  *         # Clear initial arrays
7456  *         if clear:             # <<<<<<<<<<<<<<
7457  *             self.initial_state[:] = 0
7458  *             self.initial_diffuse_state_cov[:] = 0
7459  */
7460   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clear); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 353, __pyx_L1_error)
7461   if (__pyx_t_1) {
7462 
7463     /* "statsmodels/tsa/statespace/_representation.pyx":354
7464  *         # Clear initial arrays
7465  *         if clear:
7466  *             self.initial_state[:] = 0             # <<<<<<<<<<<<<<
7467  *             self.initial_diffuse_state_cov[:] = 0
7468  *             self.initial_state_cov[:] = 0
7469  */
7470     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 354, __pyx_L1_error)}
7471     {
7472         __pyx_t_5numpy_float32_t __pyx_temp_scalar = 0.0;
7473         {
7474             Py_ssize_t __pyx_temp_extent_0 = __pyx_v_self->initial_state.shape[0];
7475             Py_ssize_t __pyx_temp_stride_0 = __pyx_v_self->initial_state.strides[0];
7476             char *__pyx_temp_pointer_0;
7477             Py_ssize_t __pyx_temp_idx_0;
7478             __pyx_temp_pointer_0 = __pyx_v_self->initial_state.data;
7479             for (__pyx_temp_idx_0 = 0; __pyx_temp_idx_0 < __pyx_temp_extent_0; __pyx_temp_idx_0++) {
7480               *((__pyx_t_5numpy_float32_t *) __pyx_temp_pointer_0) = __pyx_temp_scalar;
7481               __pyx_temp_pointer_0 += __pyx_temp_stride_0;
7482             }
7483         }
7484     }
7485 
7486     /* "statsmodels/tsa/statespace/_representation.pyx":355
7487  *         if clear:
7488  *             self.initial_state[:] = 0
7489  *             self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
7490  *             self.initial_state_cov[:] = 0
7491  *
7492  */
7493     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 355, __pyx_L1_error)}
7494     {
7495         __pyx_t_5numpy_float32_t __pyx_temp_scalar = 0.0;
7496         {
7497             Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
7498             Py_ssize_t __pyx_temp_idx;
7499             __pyx_t_5numpy_float32_t *__pyx_temp_pointer = (__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_diffuse_state_cov.data;
7500             for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
7501               *((__pyx_t_5numpy_float32_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
7502               __pyx_temp_pointer += 1;
7503             }
7504         }
7505     }
7506 
7507     /* "statsmodels/tsa/statespace/_representation.pyx":356
7508  *             self.initial_state[:] = 0
7509  *             self.initial_diffuse_state_cov[:] = 0
7510  *             self.initial_state_cov[:] = 0             # <<<<<<<<<<<<<<
7511  *
7512  *         # If using global initialization, compute the actual elements and
7513  */
7514     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 356, __pyx_L1_error)}
7515     {
7516         __pyx_t_5numpy_float32_t __pyx_temp_scalar = 0.0;
7517         {
7518             Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_state_cov.shape[0] * __pyx_v_self->initial_state_cov.shape[1];
7519             Py_ssize_t __pyx_temp_idx;
7520             __pyx_t_5numpy_float32_t *__pyx_temp_pointer = (__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_state_cov.data;
7521             for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
7522               *((__pyx_t_5numpy_float32_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
7523               __pyx_temp_pointer += 1;
7524             }
7525         }
7526     }
7527 
7528     /* "statsmodels/tsa/statespace/_representation.pyx":353
7529  *         cdef sInitialization _init
7530  *         # Clear initial arrays
7531  *         if clear:             # <<<<<<<<<<<<<<
7532  *             self.initial_state[:] = 0
7533  *             self.initial_diffuse_state_cov[:] = 0
7534  */
7535   }
7536 
7537   /* "statsmodels/tsa/statespace/_representation.pyx":360
7538  *         # If using global initialization, compute the actual elements and
7539  *         # return them
7540  *         self.initialized_diffuse = False             # <<<<<<<<<<<<<<
7541  *         self.initialized_stationary = False
7542  *         if init.initialization_type is not None:
7543  */
7544   __pyx_v_self->initialized_diffuse = 0;
7545 
7546   /* "statsmodels/tsa/statespace/_representation.pyx":361
7547  *         # return them
7548  *         self.initialized_diffuse = False
7549  *         self.initialized_stationary = False             # <<<<<<<<<<<<<<
7550  *         if init.initialization_type is not None:
7551  *             init._initialize_initialization(prefix='s')
7552  */
7553   __pyx_v_self->initialized_stationary = 0;
7554 
7555   /* "statsmodels/tsa/statespace/_representation.pyx":362
7556  *         self.initialized_diffuse = False
7557  *         self.initialized_stationary = False
7558  *         if init.initialization_type is not None:             # <<<<<<<<<<<<<<
7559  *             init._initialize_initialization(prefix='s')
7560  *             _init = init._initializations['s']
7561  */
7562   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
7563   __Pyx_GOTREF(__pyx_t_2);
7564   __pyx_t_1 = (__pyx_t_2 != Py_None);
7565   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7566   __pyx_t_3 = (__pyx_t_1 != 0);
7567   if (__pyx_t_3) {
7568 
7569     /* "statsmodels/tsa/statespace/_representation.pyx":363
7570  *         self.initialized_stationary = False
7571  *         if init.initialization_type is not None:
7572  *             init._initialize_initialization(prefix='s')             # <<<<<<<<<<<<<<
7573  *             _init = init._initializations['s']
7574  *             _init.initialize(init.initialization_type, offset, self,
7575  */
7576     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialize_initialization); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error)
7577     __Pyx_GOTREF(__pyx_t_2);
7578     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error)
7579     __Pyx_GOTREF(__pyx_t_4);
7580     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_prefix, __pyx_n_u_s) < 0) __PYX_ERR(0, 363, __pyx_L1_error)
7581     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error)
7582     __Pyx_GOTREF(__pyx_t_5);
7583     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7584     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7585     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7586 
7587     /* "statsmodels/tsa/statespace/_representation.pyx":364
7588  *         if init.initialization_type is not None:
7589  *             init._initialize_initialization(prefix='s')
7590  *             _init = init._initializations['s']             # <<<<<<<<<<<<<<
7591  *             _init.initialize(init.initialization_type, offset, self,
7592  *                              self.initial_state,
7593  */
7594     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initializations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 364, __pyx_L1_error)
7595     __Pyx_GOTREF(__pyx_t_5);
7596     __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 364, __pyx_L1_error)
7597     __Pyx_GOTREF(__pyx_t_4);
7598     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7599     if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_sInitialization))))) __PYX_ERR(0, 364, __pyx_L1_error)
7600     __pyx_v__init = ((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *)__pyx_t_4);
7601     __pyx_t_4 = 0;
7602 
7603     /* "statsmodels/tsa/statespace/_representation.pyx":365
7604  *             init._initialize_initialization(prefix='s')
7605  *             _init = init._initializations['s']
7606  *             _init.initialize(init.initialization_type, offset, self,             # <<<<<<<<<<<<<<
7607  *                              self.initial_state,
7608  *                              self.initial_diffuse_state_cov,
7609  */
7610     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L1_error)
7611     __Pyx_GOTREF(__pyx_t_4);
7612     __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_offset); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 365, __pyx_L1_error)
7613 
7614     /* "statsmodels/tsa/statespace/_representation.pyx":366
7615  *             _init = init._initializations['s']
7616  *             _init.initialize(init.initialization_type, offset, self,
7617  *                              self.initial_state,             # <<<<<<<<<<<<<<
7618  *                              self.initial_diffuse_state_cov,
7619  *                              self.initial_state_cov, complex_step)
7620  */
7621     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 366, __pyx_L1_error)}
7622 
7623     /* "statsmodels/tsa/statespace/_representation.pyx":367
7624  *             _init.initialize(init.initialization_type, offset, self,
7625  *                              self.initial_state,
7626  *                              self.initial_diffuse_state_cov,             # <<<<<<<<<<<<<<
7627  *                              self.initial_state_cov, complex_step)
7628  *             if init.initialization_type == 'diffuse':
7629  */
7630     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 367, __pyx_L1_error)}
7631 
7632     /* "statsmodels/tsa/statespace/_representation.pyx":368
7633  *                              self.initial_state,
7634  *                              self.initial_diffuse_state_cov,
7635  *                              self.initial_state_cov, complex_step)             # <<<<<<<<<<<<<<
7636  *             if init.initialization_type == 'diffuse':
7637  *                 self.initialized_diffuse = True
7638  */
7639     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 368, __pyx_L1_error)}
7640     __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_complex_step); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L1_error)
7641 
7642     /* "statsmodels/tsa/statespace/_representation.pyx":365
7643  *             init._initialize_initialization(prefix='s')
7644  *             _init = init._initializations['s']
7645  *             _init.initialize(init.initialization_type, offset, self,             # <<<<<<<<<<<<<<
7646  *                              self.initial_state,
7647  *                              self.initial_diffuse_state_cov,
7648  */
7649     __pyx_t_9.__pyx_n = 1;
7650     __pyx_t_9.complex_step = __pyx_t_7;
7651     __pyx_t_8 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_sInitialization *)__pyx_v__init->__pyx_vtab)->initialize(__pyx_v__init, __pyx_t_4, __pyx_t_6, __pyx_v_self, __pyx_v_self->initial_state, __pyx_v_self->initial_diffuse_state_cov, __pyx_v_self->initial_state_cov, 0, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)1))) __PYX_ERR(0, 365, __pyx_L1_error)
7652     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7653 
7654     /* "statsmodels/tsa/statespace/_representation.pyx":369
7655  *                              self.initial_diffuse_state_cov,
7656  *                              self.initial_state_cov, complex_step)
7657  *             if init.initialization_type == 'diffuse':             # <<<<<<<<<<<<<<
7658  *                 self.initialized_diffuse = True
7659  *             if init.initialization_type == 'stationary':
7660  */
7661     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
7662     __Pyx_GOTREF(__pyx_t_4);
7663     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_diffuse, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 369, __pyx_L1_error)
7664     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7665     if (__pyx_t_3) {
7666 
7667       /* "statsmodels/tsa/statespace/_representation.pyx":370
7668  *                              self.initial_state_cov, complex_step)
7669  *             if init.initialization_type == 'diffuse':
7670  *                 self.initialized_diffuse = True             # <<<<<<<<<<<<<<
7671  *             if init.initialization_type == 'stationary':
7672  *                 self.initialized_stationary = True
7673  */
7674       __pyx_v_self->initialized_diffuse = 1;
7675 
7676       /* "statsmodels/tsa/statespace/_representation.pyx":369
7677  *                              self.initial_diffuse_state_cov,
7678  *                              self.initial_state_cov, complex_step)
7679  *             if init.initialization_type == 'diffuse':             # <<<<<<<<<<<<<<
7680  *                 self.initialized_diffuse = True
7681  *             if init.initialization_type == 'stationary':
7682  */
7683     }
7684 
7685     /* "statsmodels/tsa/statespace/_representation.pyx":371
7686  *             if init.initialization_type == 'diffuse':
7687  *                 self.initialized_diffuse = True
7688  *             if init.initialization_type == 'stationary':             # <<<<<<<<<<<<<<
7689  *                 self.initialized_stationary = True
7690  *         # Otherwise, if using blocks, initialize each of the blocks
7691  */
7692     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
7693     __Pyx_GOTREF(__pyx_t_4);
7694     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_stationary, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 371, __pyx_L1_error)
7695     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7696     if (__pyx_t_3) {
7697 
7698       /* "statsmodels/tsa/statespace/_representation.pyx":372
7699  *                 self.initialized_diffuse = True
7700  *             if init.initialization_type == 'stationary':
7701  *                 self.initialized_stationary = True             # <<<<<<<<<<<<<<
7702  *         # Otherwise, if using blocks, initialize each of the blocks
7703  *         else:
7704  */
7705       __pyx_v_self->initialized_stationary = 1;
7706 
7707       /* "statsmodels/tsa/statespace/_representation.pyx":371
7708  *             if init.initialization_type == 'diffuse':
7709  *                 self.initialized_diffuse = True
7710  *             if init.initialization_type == 'stationary':             # <<<<<<<<<<<<<<
7711  *                 self.initialized_stationary = True
7712  *         # Otherwise, if using blocks, initialize each of the blocks
7713  */
7714     }
7715 
7716     /* "statsmodels/tsa/statespace/_representation.pyx":362
7717  *         self.initialized_diffuse = False
7718  *         self.initialized_stationary = False
7719  *         if init.initialization_type is not None:             # <<<<<<<<<<<<<<
7720  *             init._initialize_initialization(prefix='s')
7721  *             _init = init._initializations['s']
7722  */
7723     goto __pyx_L4;
7724   }
7725 
7726   /* "statsmodels/tsa/statespace/_representation.pyx":375
7727  *         # Otherwise, if using blocks, initialize each of the blocks
7728  *         else:
7729  *             for block_index, block_init in init.blocks.items():             # <<<<<<<<<<<<<<
7730  *                 self.initialize(block_init, offset=offset + block_index[0],
7731  *                                 complex_step=complex_step, clear=False)
7732  */
7733   /*else*/ {
7734     __pyx_t_10 = 0;
7735     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_blocks); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 375, __pyx_L1_error)
7736     __Pyx_GOTREF(__pyx_t_5);
7737     if (unlikely(__pyx_t_5 == Py_None)) {
7738       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
7739       __PYX_ERR(0, 375, __pyx_L1_error)
7740     }
7741     __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_items, (&__pyx_t_11), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
7742     __Pyx_GOTREF(__pyx_t_2);
7743     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7744     __Pyx_XDECREF(__pyx_t_4);
7745     __pyx_t_4 = __pyx_t_2;
7746     __pyx_t_2 = 0;
7747     while (1) {
7748       __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_11, &__pyx_t_10, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_8);
7749       if (unlikely(__pyx_t_7 == 0)) break;
7750       if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 375, __pyx_L1_error)
7751       __Pyx_GOTREF(__pyx_t_2);
7752       __Pyx_GOTREF(__pyx_t_5);
7753       __Pyx_XDECREF_SET(__pyx_v_block_index, __pyx_t_2);
7754       __pyx_t_2 = 0;
7755       __Pyx_XDECREF_SET(__pyx_v_block_init, __pyx_t_5);
7756       __pyx_t_5 = 0;
7757 
7758       /* "statsmodels/tsa/statespace/_representation.pyx":376
7759  *         else:
7760  *             for block_index, block_init in init.blocks.items():
7761  *                 self.initialize(block_init, offset=offset + block_index[0],             # <<<<<<<<<<<<<<
7762  *                                 complex_step=complex_step, clear=False)
7763  *
7764  */
7765       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_initialize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 376, __pyx_L1_error)
7766       __Pyx_GOTREF(__pyx_t_5);
7767       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
7768       __Pyx_GOTREF(__pyx_t_2);
7769       __Pyx_INCREF(__pyx_v_block_init);
7770       __Pyx_GIVEREF(__pyx_v_block_init);
7771       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_block_init);
7772       __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 376, __pyx_L1_error)
7773       __Pyx_GOTREF(__pyx_t_12);
7774       __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_block_index, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 376, __pyx_L1_error)
7775       __Pyx_GOTREF(__pyx_t_13);
7776       __pyx_t_14 = PyNumber_Add(__pyx_v_offset, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 376, __pyx_L1_error)
7777       __Pyx_GOTREF(__pyx_t_14);
7778       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7779       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_offset, __pyx_t_14) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
7780       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7781 
7782       /* "statsmodels/tsa/statespace/_representation.pyx":377
7783  *             for block_index, block_init in init.blocks.items():
7784  *                 self.initialize(block_init, offset=offset + block_index[0],
7785  *                                 complex_step=complex_step, clear=False)             # <<<<<<<<<<<<<<
7786  *
7787  *         if not self.initialized:
7788  */
7789       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_complex_step, __pyx_v_complex_step) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
7790       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_clear, Py_False) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
7791 
7792       /* "statsmodels/tsa/statespace/_representation.pyx":376
7793  *         else:
7794  *             for block_index, block_init in init.blocks.items():
7795  *                 self.initialize(block_init, offset=offset + block_index[0],             # <<<<<<<<<<<<<<
7796  *                                 complex_step=complex_step, clear=False)
7797  *
7798  */
7799       __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 376, __pyx_L1_error)
7800       __Pyx_GOTREF(__pyx_t_14);
7801       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7802       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7803       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7804       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
7805     }
7806     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7807   }
7808   __pyx_L4:;
7809 
7810   /* "statsmodels/tsa/statespace/_representation.pyx":379
7811  *                                 complex_step=complex_step, clear=False)
7812  *
7813  *         if not self.initialized:             # <<<<<<<<<<<<<<
7814  *             self.initialized = True
7815  *
7816  */
7817   __pyx_t_3 = ((!(__pyx_v_self->initialized != 0)) != 0);
7818   if (__pyx_t_3) {
7819 
7820     /* "statsmodels/tsa/statespace/_representation.pyx":380
7821  *
7822  *         if not self.initialized:
7823  *             self.initialized = True             # <<<<<<<<<<<<<<
7824  *
7825  *     # ## Initialize: known values
7826  */
7827     __pyx_v_self->initialized = 1;
7828 
7829     /* "statsmodels/tsa/statespace/_representation.pyx":379
7830  *                                 complex_step=complex_step, clear=False)
7831  *
7832  *         if not self.initialized:             # <<<<<<<<<<<<<<
7833  *             self.initialized = True
7834  *
7835  */
7836   }
7837 
7838   /* "statsmodels/tsa/statespace/_representation.pyx":350
7839  *         self.transform_determinant = state['transform_determinant']
7840  *
7841  *     def initialize(self, init, offset=0, complex_step=False, clear=True):             # <<<<<<<<<<<<<<
7842  *         cdef sInitialization _init
7843  *         # Clear initial arrays
7844  */
7845 
7846   /* function exit code */
7847   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7848   goto __pyx_L0;
7849   __pyx_L1_error:;
7850   __Pyx_XDECREF(__pyx_t_2);
7851   __Pyx_XDECREF(__pyx_t_4);
7852   __Pyx_XDECREF(__pyx_t_5);
7853   __Pyx_XDECREF(__pyx_t_12);
7854   __Pyx_XDECREF(__pyx_t_13);
7855   __Pyx_XDECREF(__pyx_t_14);
7856   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
7857   __pyx_r = NULL;
7858   __pyx_L0:;
7859   __Pyx_XDECREF((PyObject *)__pyx_v__init);
7860   __Pyx_XDECREF(__pyx_v_block_index);
7861   __Pyx_XDECREF(__pyx_v_block_init);
7862   __Pyx_XGIVEREF(__pyx_r);
7863   __Pyx_RefNannyFinishContext();
7864   return __pyx_r;
7865 }
7866 
7867 /* "statsmodels/tsa/statespace/_representation.pyx":387
7868  *     # certainty or else as filled with parameters from a maximum likelihood
7869  *     # estimation run.
7870  *     def initialize_known(self, np.float32_t [:] initial_state, np.float32_t [::1,:] initial_state_cov):             # <<<<<<<<<<<<<<
7871  *         """
7872  *         initialize_known(initial_state, initial_state_cov)
7873  */
7874 
7875 /* Python wrapper */
7876 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9initialize_known(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7877 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8initialize_known[] = "\n        initialize_known(initial_state, initial_state_cov)\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9initialize_known(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)7878 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9initialize_known(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7879   __Pyx_memviewslice __pyx_v_initial_state = { 0, 0, { 0 }, { 0 }, { 0 } };
7880   __Pyx_memviewslice __pyx_v_initial_state_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
7881   int __pyx_lineno = 0;
7882   const char *__pyx_filename = NULL;
7883   int __pyx_clineno = 0;
7884   PyObject *__pyx_r = 0;
7885   __Pyx_RefNannyDeclarations
7886   __Pyx_RefNannySetupContext("initialize_known (wrapper)", 0);
7887   {
7888     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_initial_state,&__pyx_n_s_initial_state_cov,0};
7889     PyObject* values[2] = {0,0};
7890     if (unlikely(__pyx_kwds)) {
7891       Py_ssize_t kw_args;
7892       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7893       switch (pos_args) {
7894         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7895         CYTHON_FALLTHROUGH;
7896         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7897         CYTHON_FALLTHROUGH;
7898         case  0: break;
7899         default: goto __pyx_L5_argtuple_error;
7900       }
7901       kw_args = PyDict_Size(__pyx_kwds);
7902       switch (pos_args) {
7903         case  0:
7904         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial_state)) != 0)) kw_args--;
7905         else goto __pyx_L5_argtuple_error;
7906         CYTHON_FALLTHROUGH;
7907         case  1:
7908         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial_state_cov)) != 0)) kw_args--;
7909         else {
7910           __Pyx_RaiseArgtupleInvalid("initialize_known", 1, 2, 2, 1); __PYX_ERR(0, 387, __pyx_L3_error)
7911         }
7912       }
7913       if (unlikely(kw_args > 0)) {
7914         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_known") < 0)) __PYX_ERR(0, 387, __pyx_L3_error)
7915       }
7916     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
7917       goto __pyx_L5_argtuple_error;
7918     } else {
7919       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7920       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7921     }
7922     __pyx_v_initial_state = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_initial_state.memview)) __PYX_ERR(0, 387, __pyx_L3_error)
7923     __pyx_v_initial_state_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_initial_state_cov.memview)) __PYX_ERR(0, 387, __pyx_L3_error)
7924   }
7925   goto __pyx_L4_argument_unpacking_done;
7926   __pyx_L5_argtuple_error:;
7927   __Pyx_RaiseArgtupleInvalid("initialize_known", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 387, __pyx_L3_error)
7928   __pyx_L3_error:;
7929   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialize_known", __pyx_clineno, __pyx_lineno, __pyx_filename);
7930   __Pyx_RefNannyFinishContext();
7931   return NULL;
7932   __pyx_L4_argument_unpacking_done:;
7933   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8initialize_known(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), __pyx_v_initial_state, __pyx_v_initial_state_cov);
7934 
7935   /* function exit code */
7936   __Pyx_RefNannyFinishContext();
7937   return __pyx_r;
7938 }
7939 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,__Pyx_memviewslice __pyx_v_initial_state,__Pyx_memviewslice __pyx_v_initial_state_cov)7940 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_initial_state, __Pyx_memviewslice __pyx_v_initial_state_cov) {
7941   PyObject *__pyx_r = NULL;
7942   __Pyx_RefNannyDeclarations
7943   PyObject *__pyx_t_1 = NULL;
7944   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape __pyx_t_2;
7945   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape __pyx_t_3;
7946   int __pyx_lineno = 0;
7947   const char *__pyx_filename = NULL;
7948   int __pyx_clineno = 0;
7949   __Pyx_RefNannySetupContext("initialize_known", 0);
7950 
7951   /* "statsmodels/tsa/statespace/_representation.pyx":391
7952  *         initialize_known(initial_state, initial_state_cov)
7953  *         """
7954  *         tools.validate_vector_shape('initial state', &initial_state.shape[0], self.k_states, None)             # <<<<<<<<<<<<<<
7955  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)
7956  *
7957  */
7958   __pyx_t_2.__pyx_n = 1;
7959   __pyx_t_2.nobs = Py_None;
7960   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_initial_state_2, (&(__pyx_v_initial_state.shape[0])), __pyx_v_self->k_states, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
7961   __Pyx_GOTREF(__pyx_t_1);
7962   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7963 
7964   /* "statsmodels/tsa/statespace/_representation.pyx":392
7965  *         """
7966  *         tools.validate_vector_shape('initial state', &initial_state.shape[0], self.k_states, None)
7967  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)             # <<<<<<<<<<<<<<
7968  *
7969  *         self.initial_state = initial_state
7970  */
7971   __pyx_t_3.__pyx_n = 1;
7972   __pyx_t_3.nobs = Py_None;
7973   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_initial_state_covariance, (&(__pyx_v_initial_state_cov.shape[0])), __pyx_v_self->k_states, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
7974   __Pyx_GOTREF(__pyx_t_1);
7975   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7976 
7977   /* "statsmodels/tsa/statespace/_representation.pyx":394
7978  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)
7979  *
7980  *         self.initial_state = initial_state             # <<<<<<<<<<<<<<
7981  *         self.initial_state_cov = initial_state_cov
7982  *         self.initial_diffuse_state_cov[:] = 0
7983  */
7984   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
7985   __PYX_INC_MEMVIEW(&__pyx_v_initial_state, 0);
7986   __pyx_v_self->initial_state = __pyx_v_initial_state;
7987 
7988   /* "statsmodels/tsa/statespace/_representation.pyx":395
7989  *
7990  *         self.initial_state = initial_state
7991  *         self.initial_state_cov = initial_state_cov             # <<<<<<<<<<<<<<
7992  *         self.initial_diffuse_state_cov[:] = 0
7993  *
7994  */
7995   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
7996   __PYX_INC_MEMVIEW(&__pyx_v_initial_state_cov, 0);
7997   __pyx_v_self->initial_state_cov = __pyx_v_initial_state_cov;
7998 
7999   /* "statsmodels/tsa/statespace/_representation.pyx":396
8000  *         self.initial_state = initial_state
8001  *         self.initial_state_cov = initial_state_cov
8002  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
8003  *
8004  *         self.initialized = True
8005  */
8006   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 396, __pyx_L1_error)}
8007   {
8008       __pyx_t_5numpy_float32_t __pyx_temp_scalar = 0.0;
8009       {
8010           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
8011           Py_ssize_t __pyx_temp_idx;
8012           __pyx_t_5numpy_float32_t *__pyx_temp_pointer = (__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_diffuse_state_cov.data;
8013           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
8014             *((__pyx_t_5numpy_float32_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
8015             __pyx_temp_pointer += 1;
8016           }
8017       }
8018   }
8019 
8020   /* "statsmodels/tsa/statespace/_representation.pyx":398
8021  *         self.initial_diffuse_state_cov[:] = 0
8022  *
8023  *         self.initialized = True             # <<<<<<<<<<<<<<
8024  *
8025  *     # ## Initialize: approximate diffuse priors
8026  */
8027   __pyx_v_self->initialized = 1;
8028 
8029   /* "statsmodels/tsa/statespace/_representation.pyx":387
8030  *     # certainty or else as filled with parameters from a maximum likelihood
8031  *     # estimation run.
8032  *     def initialize_known(self, np.float32_t [:] initial_state, np.float32_t [::1,:] initial_state_cov):             # <<<<<<<<<<<<<<
8033  *         """
8034  *         initialize_known(initial_state, initial_state_cov)
8035  */
8036 
8037   /* function exit code */
8038   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8039   goto __pyx_L0;
8040   __pyx_L1_error:;
8041   __Pyx_XDECREF(__pyx_t_1);
8042   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialize_known", __pyx_clineno, __pyx_lineno, __pyx_filename);
8043   __pyx_r = NULL;
8044   __pyx_L0:;
8045   __PYX_XDEC_MEMVIEW(&__pyx_v_initial_state, 1);
8046   __PYX_XDEC_MEMVIEW(&__pyx_v_initial_state_cov, 1);
8047   __Pyx_XGIVEREF(__pyx_r);
8048   __Pyx_RefNannyFinishContext();
8049   return __pyx_r;
8050 }
8051 
8052 /* "statsmodels/tsa/statespace/_representation.pyx":407
8053  *     #
8054  *     # *Note:* see Durbin and Koopman section 5.6.1
8055  *     def initialize_approximate_diffuse(self, np.float32_t variance=1e2):             # <<<<<<<<<<<<<<
8056  *         """
8057  *         initialize_approximate_diffuse(variance=1e2)
8058  */
8059 
8060 /* Python wrapper */
8061 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialize_approximate_diffuse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8062 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10initialize_approximate_diffuse[] = "\n        initialize_approximate_diffuse(variance=1e2)\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialize_approximate_diffuse(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)8063 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialize_approximate_diffuse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8064   __pyx_t_5numpy_float32_t __pyx_v_variance;
8065   int __pyx_lineno = 0;
8066   const char *__pyx_filename = NULL;
8067   int __pyx_clineno = 0;
8068   PyObject *__pyx_r = 0;
8069   __Pyx_RefNannyDeclarations
8070   __Pyx_RefNannySetupContext("initialize_approximate_diffuse (wrapper)", 0);
8071   {
8072     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variance,0};
8073     PyObject* values[1] = {0};
8074     if (unlikely(__pyx_kwds)) {
8075       Py_ssize_t kw_args;
8076       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8077       switch (pos_args) {
8078         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8079         CYTHON_FALLTHROUGH;
8080         case  0: break;
8081         default: goto __pyx_L5_argtuple_error;
8082       }
8083       kw_args = PyDict_Size(__pyx_kwds);
8084       switch (pos_args) {
8085         case  0:
8086         if (kw_args > 0) {
8087           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variance);
8088           if (value) { values[0] = value; kw_args--; }
8089         }
8090       }
8091       if (unlikely(kw_args > 0)) {
8092         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_approximate_diffuse") < 0)) __PYX_ERR(0, 407, __pyx_L3_error)
8093       }
8094     } else {
8095       switch (PyTuple_GET_SIZE(__pyx_args)) {
8096         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8097         CYTHON_FALLTHROUGH;
8098         case  0: break;
8099         default: goto __pyx_L5_argtuple_error;
8100       }
8101     }
8102     if (values[0]) {
8103       __pyx_v_variance = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_variance == ((npy_float32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L3_error)
8104     } else {
8105       __pyx_v_variance = ((__pyx_t_5numpy_float32_t)1e2);
8106     }
8107   }
8108   goto __pyx_L4_argument_unpacking_done;
8109   __pyx_L5_argtuple_error:;
8110   __Pyx_RaiseArgtupleInvalid("initialize_approximate_diffuse", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 407, __pyx_L3_error)
8111   __pyx_L3_error:;
8112   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialize_approximate_diffuse", __pyx_clineno, __pyx_lineno, __pyx_filename);
8113   __Pyx_RefNannyFinishContext();
8114   return NULL;
8115   __pyx_L4_argument_unpacking_done:;
8116   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10initialize_approximate_diffuse(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), __pyx_v_variance);
8117 
8118   /* function exit code */
8119   __Pyx_RefNannyFinishContext();
8120   return __pyx_r;
8121 }
8122 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,__pyx_t_5numpy_float32_t __pyx_v_variance)8123 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, __pyx_t_5numpy_float32_t __pyx_v_variance) {
8124   npy_intp __pyx_v_dim[1];
8125   PyObject *__pyx_r = NULL;
8126   __Pyx_RefNannyDeclarations
8127   int __pyx_t_1;
8128   PyObject *__pyx_t_2 = NULL;
8129   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
8130   PyObject *__pyx_t_4 = NULL;
8131   PyObject *__pyx_t_5 = NULL;
8132   PyObject *__pyx_t_6 = NULL;
8133   PyObject *__pyx_t_7 = NULL;
8134   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
8135   int __pyx_lineno = 0;
8136   const char *__pyx_filename = NULL;
8137   int __pyx_clineno = 0;
8138   __Pyx_RefNannySetupContext("initialize_approximate_diffuse", 0);
8139 
8140   /* "statsmodels/tsa/statespace/_representation.pyx":412
8141  *         """
8142  *         cdef np.npy_intp dim[1]
8143  *         dim[0] = self.k_states             # <<<<<<<<<<<<<<
8144  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_FLOAT32, FORTRAN)
8145  *         self.initial_state_cov = np.eye(self.k_states, dtype=np.float32).T * variance
8146  */
8147   __pyx_t_1 = __pyx_v_self->k_states;
8148   (__pyx_v_dim[0]) = __pyx_t_1;
8149 
8150   /* "statsmodels/tsa/statespace/_representation.pyx":413
8151  *         cdef np.npy_intp dim[1]
8152  *         dim[0] = self.k_states
8153  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
8154  *         self.initial_state_cov = np.eye(self.k_states, dtype=np.float32).T * variance
8155  *         self.initial_diffuse_state_cov[:] = 0
8156  */
8157   __pyx_t_2 = PyArray_ZEROS(1, __pyx_v_dim, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
8158   __Pyx_GOTREF(__pyx_t_2);
8159   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 413, __pyx_L1_error)
8160   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8161   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
8162   __pyx_v_self->initial_state = __pyx_t_3;
8163   __pyx_t_3.memview = NULL;
8164   __pyx_t_3.data = NULL;
8165 
8166   /* "statsmodels/tsa/statespace/_representation.pyx":414
8167  *         dim[0] = self.k_states
8168  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_FLOAT32, FORTRAN)
8169  *         self.initial_state_cov = np.eye(self.k_states, dtype=np.float32).T * variance             # <<<<<<<<<<<<<<
8170  *         self.initial_diffuse_state_cov[:] = 0
8171  *
8172  */
8173   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
8174   __Pyx_GOTREF(__pyx_t_2);
8175   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_eye); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
8176   __Pyx_GOTREF(__pyx_t_4);
8177   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8178   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->k_states); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
8179   __Pyx_GOTREF(__pyx_t_2);
8180   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 414, __pyx_L1_error)
8181   __Pyx_GOTREF(__pyx_t_5);
8182   __Pyx_GIVEREF(__pyx_t_2);
8183   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
8184   __pyx_t_2 = 0;
8185   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
8186   __Pyx_GOTREF(__pyx_t_2);
8187   __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 414, __pyx_L1_error)
8188   __Pyx_GOTREF(__pyx_t_6);
8189   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_float32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 414, __pyx_L1_error)
8190   __Pyx_GOTREF(__pyx_t_7);
8191   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8192   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
8193   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8194   __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 414, __pyx_L1_error)
8195   __Pyx_GOTREF(__pyx_t_7);
8196   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8197   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8198   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8199   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
8200   __Pyx_GOTREF(__pyx_t_2);
8201   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8202   __pyx_t_7 = PyFloat_FromDouble(__pyx_v_variance); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 414, __pyx_L1_error)
8203   __Pyx_GOTREF(__pyx_t_7);
8204   __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 414, __pyx_L1_error)
8205   __Pyx_GOTREF(__pyx_t_5);
8206   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8207   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8208   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 414, __pyx_L1_error)
8209   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8210   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
8211   __pyx_v_self->initial_state_cov = __pyx_t_8;
8212   __pyx_t_8.memview = NULL;
8213   __pyx_t_8.data = NULL;
8214 
8215   /* "statsmodels/tsa/statespace/_representation.pyx":415
8216  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_FLOAT32, FORTRAN)
8217  *         self.initial_state_cov = np.eye(self.k_states, dtype=np.float32).T * variance
8218  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
8219  *
8220  *         self.initialized = True
8221  */
8222   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 415, __pyx_L1_error)}
8223   {
8224       __pyx_t_5numpy_float32_t __pyx_temp_scalar = 0.0;
8225       {
8226           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
8227           Py_ssize_t __pyx_temp_idx;
8228           __pyx_t_5numpy_float32_t *__pyx_temp_pointer = (__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_diffuse_state_cov.data;
8229           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
8230             *((__pyx_t_5numpy_float32_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
8231             __pyx_temp_pointer += 1;
8232           }
8233       }
8234   }
8235 
8236   /* "statsmodels/tsa/statespace/_representation.pyx":417
8237  *         self.initial_diffuse_state_cov[:] = 0
8238  *
8239  *         self.initialized = True             # <<<<<<<<<<<<<<
8240  *
8241  *     # ## Initialize: stationary process
8242  */
8243   __pyx_v_self->initialized = 1;
8244 
8245   /* "statsmodels/tsa/statespace/_representation.pyx":407
8246  *     #
8247  *     # *Note:* see Durbin and Koopman section 5.6.1
8248  *     def initialize_approximate_diffuse(self, np.float32_t variance=1e2):             # <<<<<<<<<<<<<<
8249  *         """
8250  *         initialize_approximate_diffuse(variance=1e2)
8251  */
8252 
8253   /* function exit code */
8254   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8255   goto __pyx_L0;
8256   __pyx_L1_error:;
8257   __Pyx_XDECREF(__pyx_t_2);
8258   __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
8259   __Pyx_XDECREF(__pyx_t_4);
8260   __Pyx_XDECREF(__pyx_t_5);
8261   __Pyx_XDECREF(__pyx_t_6);
8262   __Pyx_XDECREF(__pyx_t_7);
8263   __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
8264   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialize_approximate_diffuse", __pyx_clineno, __pyx_lineno, __pyx_filename);
8265   __pyx_r = NULL;
8266   __pyx_L0:;
8267   __Pyx_XGIVEREF(__pyx_r);
8268   __Pyx_RefNannyFinishContext();
8269   return __pyx_r;
8270 }
8271 
8272 /* "statsmodels/tsa/statespace/_representation.pyx":421
8273  *     # ## Initialize: stationary process
8274  *     # *Note:* see Durbin and Koopman section 5.6.2
8275  *     def initialize_stationary(self, complex_step=False):             # <<<<<<<<<<<<<<
8276  *         """
8277  *         initialize_stationary()
8278  */
8279 
8280 /* Python wrapper */
8281 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initialize_stationary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8282 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12initialize_stationary[] = "\n        initialize_stationary()\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initialize_stationary(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)8283 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initialize_stationary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8284   PyObject *__pyx_v_complex_step = 0;
8285   int __pyx_lineno = 0;
8286   const char *__pyx_filename = NULL;
8287   int __pyx_clineno = 0;
8288   PyObject *__pyx_r = 0;
8289   __Pyx_RefNannyDeclarations
8290   __Pyx_RefNannySetupContext("initialize_stationary (wrapper)", 0);
8291   {
8292     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_complex_step,0};
8293     PyObject* values[1] = {0};
8294     values[0] = ((PyObject *)Py_False);
8295     if (unlikely(__pyx_kwds)) {
8296       Py_ssize_t kw_args;
8297       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8298       switch (pos_args) {
8299         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8300         CYTHON_FALLTHROUGH;
8301         case  0: break;
8302         default: goto __pyx_L5_argtuple_error;
8303       }
8304       kw_args = PyDict_Size(__pyx_kwds);
8305       switch (pos_args) {
8306         case  0:
8307         if (kw_args > 0) {
8308           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complex_step);
8309           if (value) { values[0] = value; kw_args--; }
8310         }
8311       }
8312       if (unlikely(kw_args > 0)) {
8313         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_stationary") < 0)) __PYX_ERR(0, 421, __pyx_L3_error)
8314       }
8315     } else {
8316       switch (PyTuple_GET_SIZE(__pyx_args)) {
8317         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8318         CYTHON_FALLTHROUGH;
8319         case  0: break;
8320         default: goto __pyx_L5_argtuple_error;
8321       }
8322     }
8323     __pyx_v_complex_step = values[0];
8324   }
8325   goto __pyx_L4_argument_unpacking_done;
8326   __pyx_L5_argtuple_error:;
8327   __Pyx_RaiseArgtupleInvalid("initialize_stationary", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 421, __pyx_L3_error)
8328   __pyx_L3_error:;
8329   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialize_stationary", __pyx_clineno, __pyx_lineno, __pyx_filename);
8330   __Pyx_RefNannyFinishContext();
8331   return NULL;
8332   __pyx_L4_argument_unpacking_done:;
8333   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12initialize_stationary(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), __pyx_v_complex_step);
8334 
8335   /* function exit code */
8336   __Pyx_RefNannyFinishContext();
8337   return __pyx_r;
8338 }
8339 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,PyObject * __pyx_v_complex_step)8340 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_complex_step) {
8341   npy_intp __pyx_v_dim1[1];
8342   npy_intp __pyx_v_dim2[2];
8343   int __pyx_v_i;
8344   int __pyx_v_info;
8345   int __pyx_v_inc;
8346   int __pyx_v_k_states2;
8347   __pyx_t_5numpy_float64_t __pyx_v_asum;
8348   __pyx_t_5numpy_float64_t __pyx_v_tol;
8349   __pyx_t_5numpy_float32_t __pyx_v_scalar;
8350   __Pyx_memviewslice __pyx_v_ipiv = { 0, 0, { 0 }, { 0 }, { 0 } };
8351   PyObject *__pyx_r = NULL;
8352   __Pyx_RefNannyDeclarations
8353   Py_ssize_t __pyx_t_1;
8354   Py_ssize_t __pyx_t_2;
8355   Py_ssize_t __pyx_t_3;
8356   Py_ssize_t __pyx_t_4;
8357   Py_ssize_t __pyx_t_5;
8358   Py_ssize_t __pyx_t_6;
8359   Py_ssize_t __pyx_t_7;
8360   Py_ssize_t __pyx_t_8;
8361   Py_ssize_t __pyx_t_9;
8362   Py_ssize_t __pyx_t_10;
8363   Py_ssize_t __pyx_t_11;
8364   int __pyx_t_12;
8365   PyObject *__pyx_t_13 = NULL;
8366   __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } };
8367   int __pyx_t_15;
8368   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
8369   int __pyx_t_17;
8370   int __pyx_t_18;
8371   __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } };
8372   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__ssolve_discrete_lyapunov __pyx_t_20;
8373   int __pyx_lineno = 0;
8374   const char *__pyx_filename = NULL;
8375   int __pyx_clineno = 0;
8376   __Pyx_RefNannySetupContext("initialize_stationary", 0);
8377 
8378   /* "statsmodels/tsa/statespace/_representation.pyx":427
8379  *         cdef np.npy_intp dim1[1]
8380  *         cdef np.npy_intp dim2[2]
8381  *         cdef int i, info, inc = 1             # <<<<<<<<<<<<<<
8382  *         cdef int k_states2 = self.k_states**2
8383  *         cdef np.float64_t asum, tol = 1e-9
8384  */
8385   __pyx_v_inc = 1;
8386 
8387   /* "statsmodels/tsa/statespace/_representation.pyx":428
8388  *         cdef np.npy_intp dim2[2]
8389  *         cdef int i, info, inc = 1
8390  *         cdef int k_states2 = self.k_states**2             # <<<<<<<<<<<<<<
8391  *         cdef np.float64_t asum, tol = 1e-9
8392  *         cdef np.float32_t scalar
8393  */
8394   __pyx_v_k_states2 = __Pyx_pow_long(((long)__pyx_v_self->k_states), 2);
8395 
8396   /* "statsmodels/tsa/statespace/_representation.pyx":429
8397  *         cdef int i, info, inc = 1
8398  *         cdef int k_states2 = self.k_states**2
8399  *         cdef np.float64_t asum, tol = 1e-9             # <<<<<<<<<<<<<<
8400  *         cdef np.float32_t scalar
8401  *         cdef int [::1,:] ipiv
8402  */
8403   __pyx_v_tol = 1e-9;
8404 
8405   /* "statsmodels/tsa/statespace/_representation.pyx":435
8406  *         # Create selected state covariance matrix
8407  *         sselect_cov(self.k_states, self.k_posdef,
8408  *                                    &self.tmp[0,0],             # <<<<<<<<<<<<<<
8409  *                                    &self.selection[0,0,0],
8410  *                                    &self.state_cov[0,0,0],
8411  */
8412   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 435, __pyx_L1_error)}
8413   __pyx_t_1 = 0;
8414   __pyx_t_2 = 0;
8415 
8416   /* "statsmodels/tsa/statespace/_representation.pyx":436
8417  *         sselect_cov(self.k_states, self.k_posdef,
8418  *                                    &self.tmp[0,0],
8419  *                                    &self.selection[0,0,0],             # <<<<<<<<<<<<<<
8420  *                                    &self.state_cov[0,0,0],
8421  *                                    &self.selected_state_cov[0,0,0])
8422  */
8423   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 436, __pyx_L1_error)}
8424   __pyx_t_3 = 0;
8425   __pyx_t_4 = 0;
8426   __pyx_t_5 = 0;
8427 
8428   /* "statsmodels/tsa/statespace/_representation.pyx":437
8429  *                                    &self.tmp[0,0],
8430  *                                    &self.selection[0,0,0],
8431  *                                    &self.state_cov[0,0,0],             # <<<<<<<<<<<<<<
8432  *                                    &self.selected_state_cov[0,0,0])
8433  *
8434  */
8435   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 437, __pyx_L1_error)}
8436   __pyx_t_6 = 0;
8437   __pyx_t_7 = 0;
8438   __pyx_t_8 = 0;
8439 
8440   /* "statsmodels/tsa/statespace/_representation.pyx":438
8441  *                                    &self.selection[0,0,0],
8442  *                                    &self.state_cov[0,0,0],
8443  *                                    &self.selected_state_cov[0,0,0])             # <<<<<<<<<<<<<<
8444  *
8445  *         # Initial state mean
8446  */
8447   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 438, __pyx_L1_error)}
8448   __pyx_t_9 = 0;
8449   __pyx_t_10 = 0;
8450   __pyx_t_11 = 0;
8451 
8452   /* "statsmodels/tsa/statespace/_representation.pyx":434
8453  *
8454  *         # Create selected state covariance matrix
8455  *         sselect_cov(self.k_states, self.k_posdef,             # <<<<<<<<<<<<<<
8456  *                                    &self.tmp[0,0],
8457  *                                    &self.selection[0,0,0],
8458  */
8459   (void)(__pyx_f_11statsmodels_3tsa_10statespace_15_representation_sselect_cov(__pyx_v_self->k_states, __pyx_v_self->k_posdef, (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_1)) ) + __pyx_t_2 * __pyx_v_self->tmp.strides[1]) )))), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->selection.data) + __pyx_t_3)) ) + __pyx_t_4 * __pyx_v_self->selection.strides[1]) ) + __pyx_t_5 * __pyx_v_self->selection.strides[2]) )))), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->state_cov.data) + __pyx_t_6)) ) + __pyx_t_7 * __pyx_v_self->state_cov.strides[1]) ) + __pyx_t_8 * __pyx_v_self->state_cov.strides[2]) )))), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->selected_state_cov.data) + __pyx_t_9)) ) + __pyx_t_10 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_11 * __pyx_v_self->selected_state_cov.strides[2]) ))))));
8460 
8461   /* "statsmodels/tsa/statespace/_representation.pyx":441
8462  *
8463  *         # Initial state mean
8464  *         asum = blas.sasum(&self.k_states, &self.state_intercept[0, 0], &inc)             # <<<<<<<<<<<<<<
8465  *
8466  *         dim1[0] = self.k_states
8467  */
8468   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 441, __pyx_L1_error)}
8469   __pyx_t_11 = 0;
8470   __pyx_t_10 = 0;
8471   __pyx_v_asum = __pyx_f_5scipy_6linalg_11cython_blas_sasum((&__pyx_v_self->k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->state_intercept.data) + __pyx_t_11)) ) + __pyx_t_10 * __pyx_v_self->state_intercept.strides[1]) )))), (&__pyx_v_inc));
8472 
8473   /* "statsmodels/tsa/statespace/_representation.pyx":443
8474  *         asum = blas.sasum(&self.k_states, &self.state_intercept[0, 0], &inc)
8475  *
8476  *         dim1[0] = self.k_states             # <<<<<<<<<<<<<<
8477  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
8478  *         if asum > tol:
8479  */
8480   __pyx_t_12 = __pyx_v_self->k_states;
8481   (__pyx_v_dim1[0]) = __pyx_t_12;
8482 
8483   /* "statsmodels/tsa/statespace/_representation.pyx":444
8484  *
8485  *         dim1[0] = self.k_states
8486  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
8487  *         if asum > tol:
8488  *             dim2[0] = self.k_states
8489  */
8490   __pyx_t_13 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 444, __pyx_L1_error)
8491   __Pyx_GOTREF(__pyx_t_13);
8492   __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 444, __pyx_L1_error)
8493   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8494   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
8495   __pyx_v_self->initial_state = __pyx_t_14;
8496   __pyx_t_14.memview = NULL;
8497   __pyx_t_14.data = NULL;
8498 
8499   /* "statsmodels/tsa/statespace/_representation.pyx":445
8500  *         dim1[0] = self.k_states
8501  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
8502  *         if asum > tol:             # <<<<<<<<<<<<<<
8503  *             dim2[0] = self.k_states
8504  *             dim2[1] = self.k_states
8505  */
8506   __pyx_t_15 = ((__pyx_v_asum > __pyx_v_tol) != 0);
8507   if (__pyx_t_15) {
8508 
8509     /* "statsmodels/tsa/statespace/_representation.pyx":446
8510  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
8511  *         if asum > tol:
8512  *             dim2[0] = self.k_states             # <<<<<<<<<<<<<<
8513  *             dim2[1] = self.k_states
8514  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)
8515  */
8516     __pyx_t_12 = __pyx_v_self->k_states;
8517     (__pyx_v_dim2[0]) = __pyx_t_12;
8518 
8519     /* "statsmodels/tsa/statespace/_representation.pyx":447
8520  *         if asum > tol:
8521  *             dim2[0] = self.k_states
8522  *             dim2[1] = self.k_states             # <<<<<<<<<<<<<<
8523  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)
8524  *
8525  */
8526     __pyx_t_12 = __pyx_v_self->k_states;
8527     (__pyx_v_dim2[1]) = __pyx_t_12;
8528 
8529     /* "statsmodels/tsa/statespace/_representation.pyx":448
8530  *             dim2[0] = self.k_states
8531  *             dim2[1] = self.k_states
8532  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)             # <<<<<<<<<<<<<<
8533  *
8534  *             # I - T
8535  */
8536     __pyx_t_13 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_INT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 448, __pyx_L1_error)
8537     __Pyx_GOTREF(__pyx_t_13);
8538     __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 448, __pyx_L1_error)
8539     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8540     __pyx_v_ipiv = __pyx_t_16;
8541     __pyx_t_16.memview = NULL;
8542     __pyx_t_16.data = NULL;
8543 
8544     /* "statsmodels/tsa/statespace/_representation.pyx":451
8545  *
8546  *             # I - T
8547  *             blas.scopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
8548  *                                             &self.tmp[0,0], &inc)
8549  *             scalar = -1.0
8550  */
8551     if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 451, __pyx_L1_error)}
8552     __pyx_t_10 = 0;
8553     __pyx_t_11 = 0;
8554     __pyx_t_9 = 0;
8555 
8556     /* "statsmodels/tsa/statespace/_representation.pyx":452
8557  *             # I - T
8558  *             blas.scopy(&k_states2, &self.transition[0,0,0], &inc,
8559  *                                             &self.tmp[0,0], &inc)             # <<<<<<<<<<<<<<
8560  *             scalar = -1.0
8561  *             blas.sscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
8562  */
8563     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 452, __pyx_L1_error)}
8564     __pyx_t_8 = 0;
8565     __pyx_t_7 = 0;
8566 
8567     /* "statsmodels/tsa/statespace/_representation.pyx":451
8568  *
8569  *             # I - T
8570  *             blas.scopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
8571  *                                             &self.tmp[0,0], &inc)
8572  *             scalar = -1.0
8573  */
8574     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_k_states2), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transition.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_9 * __pyx_v_self->transition.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
8575 
8576     /* "statsmodels/tsa/statespace/_representation.pyx":453
8577  *             blas.scopy(&k_states2, &self.transition[0,0,0], &inc,
8578  *                                             &self.tmp[0,0], &inc)
8579  *             scalar = -1.0             # <<<<<<<<<<<<<<
8580  *             blas.sscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
8581  *             for i in range(self.k_states):
8582  */
8583     __pyx_v_scalar = -1.0;
8584 
8585     /* "statsmodels/tsa/statespace/_representation.pyx":454
8586  *                                             &self.tmp[0,0], &inc)
8587  *             scalar = -1.0
8588  *             blas.sscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)             # <<<<<<<<<<<<<<
8589  *             for i in range(self.k_states):
8590  *                 self.tmp[i, i] = self.tmp[i, i] + 1
8591  */
8592     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 454, __pyx_L1_error)}
8593     __pyx_t_7 = 0;
8594     __pyx_t_8 = 0;
8595     __pyx_f_5scipy_6linalg_11cython_blas_sscal((&__pyx_v_k_states2), (&__pyx_v_scalar), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
8596 
8597     /* "statsmodels/tsa/statespace/_representation.pyx":455
8598  *             scalar = -1.0
8599  *             blas.sscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
8600  *             for i in range(self.k_states):             # <<<<<<<<<<<<<<
8601  *                 self.tmp[i, i] = self.tmp[i, i] + 1
8602  *
8603  */
8604     __pyx_t_12 = __pyx_v_self->k_states;
8605     __pyx_t_17 = __pyx_t_12;
8606     for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
8607       __pyx_v_i = __pyx_t_18;
8608 
8609       /* "statsmodels/tsa/statespace/_representation.pyx":456
8610  *             blas.sscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
8611  *             for i in range(self.k_states):
8612  *                 self.tmp[i, i] = self.tmp[i, i] + 1             # <<<<<<<<<<<<<<
8613  *
8614  *             # c
8615  */
8616       if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 456, __pyx_L1_error)}
8617       __pyx_t_8 = __pyx_v_i;
8618       __pyx_t_7 = __pyx_v_i;
8619       if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 456, __pyx_L1_error)}
8620       __pyx_t_9 = __pyx_v_i;
8621       __pyx_t_11 = __pyx_v_i;
8622       *((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_9)) ) + __pyx_t_11 * __pyx_v_self->tmp.strides[1]) )) = ((*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) ))) + 1.0);
8623     }
8624 
8625     /* "statsmodels/tsa/statespace/_representation.pyx":459
8626  *
8627  *             # c
8628  *             blas.scopy(&self.k_states, &self.state_intercept[0,0], &inc,             # <<<<<<<<<<<<<<
8629  *                                                 &self.initial_state[0], &inc)
8630  *
8631  */
8632     if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 459, __pyx_L1_error)}
8633     __pyx_t_7 = 0;
8634     __pyx_t_8 = 0;
8635 
8636     /* "statsmodels/tsa/statespace/_representation.pyx":460
8637  *             # c
8638  *             blas.scopy(&self.k_states, &self.state_intercept[0,0], &inc,
8639  *                                                 &self.initial_state[0], &inc)             # <<<<<<<<<<<<<<
8640  *
8641  *             # Solve (I - T) x = c
8642  */
8643     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 460, __pyx_L1_error)}
8644     __pyx_t_11 = 0;
8645 
8646     /* "statsmodels/tsa/statespace/_representation.pyx":459
8647  *
8648  *             # c
8649  *             blas.scopy(&self.k_states, &self.state_intercept[0,0], &inc,             # <<<<<<<<<<<<<<
8650  *                                                 &self.initial_state[0], &inc)
8651  *
8652  */
8653     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->state_intercept.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->state_intercept.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_11 * __pyx_v_self->initial_state.strides[0]) )))), (&__pyx_v_inc));
8654 
8655     /* "statsmodels/tsa/statespace/_representation.pyx":463
8656  *
8657  *             # Solve (I - T) x = c
8658  *             lapack.sgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
8659  *                                    &ipiv[0, 0], &info)
8660  *             lapack.sgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
8661  */
8662     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 463, __pyx_L1_error)}
8663     __pyx_t_11 = 0;
8664     __pyx_t_8 = 0;
8665 
8666     /* "statsmodels/tsa/statespace/_representation.pyx":464
8667  *             # Solve (I - T) x = c
8668  *             lapack.sgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
8669  *                                    &ipiv[0, 0], &info)             # <<<<<<<<<<<<<<
8670  *             lapack.sgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
8671  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
8672  */
8673     __pyx_t_7 = 0;
8674     __pyx_t_9 = 0;
8675 
8676     /* "statsmodels/tsa/statespace/_representation.pyx":463
8677  *
8678  *             # Solve (I - T) x = c
8679  *             lapack.sgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
8680  *                                    &ipiv[0, 0], &info)
8681  *             lapack.sgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
8682  */
8683     __pyx_f_5scipy_6linalg_13cython_lapack_sgetrf((&__pyx_v_self->k_states), (&__pyx_v_self->k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_11)) ) + __pyx_t_8 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_self->k_states), (&(*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_ipiv.data) + __pyx_t_7)) ) + __pyx_t_9 * __pyx_v_ipiv.strides[1]) )))), (&__pyx_v_info));
8684 
8685     /* "statsmodels/tsa/statespace/_representation.pyx":465
8686  *             lapack.sgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
8687  *                                    &ipiv[0, 0], &info)
8688  *             lapack.sgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
8689  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
8690  *
8691  */
8692     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 465, __pyx_L1_error)}
8693     __pyx_t_9 = 0;
8694     __pyx_t_7 = 0;
8695 
8696     /* "statsmodels/tsa/statespace/_representation.pyx":466
8697  *                                    &ipiv[0, 0], &info)
8698  *             lapack.sgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
8699  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)             # <<<<<<<<<<<<<<
8700  *
8701  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
8702  */
8703     __pyx_t_8 = 0;
8704     __pyx_t_11 = 0;
8705     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 466, __pyx_L1_error)}
8706     __pyx_t_10 = 0;
8707 
8708     /* "statsmodels/tsa/statespace/_representation.pyx":465
8709  *             lapack.sgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
8710  *                                    &ipiv[0, 0], &info)
8711  *             lapack.sgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
8712  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
8713  *
8714  */
8715     __pyx_f_5scipy_6linalg_13cython_lapack_sgetrs(((char *)"N"), (&__pyx_v_self->k_states), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_9)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_self->k_states), (&(*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_ipiv.data) + __pyx_t_8)) ) + __pyx_t_11 * __pyx_v_ipiv.strides[1]) )))), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_10 * __pyx_v_self->initial_state.strides[0]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
8716 
8717     /* "statsmodels/tsa/statespace/_representation.pyx":445
8718  *         dim1[0] = self.k_states
8719  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT32, FORTRAN)
8720  *         if asum > tol:             # <<<<<<<<<<<<<<
8721  *             dim2[0] = self.k_states
8722  *             dim2[1] = self.k_states
8723  */
8724   }
8725 
8726   /* "statsmodels/tsa/statespace/_representation.pyx":468
8727  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
8728  *
8729  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
8730  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)
8731  *
8732  */
8733   __pyx_t_12 = __pyx_v_self->k_states;
8734   (__pyx_v_dim2[0]) = __pyx_t_12;
8735   __pyx_t_12 = __pyx_v_self->k_states;
8736   (__pyx_v_dim2[1]) = __pyx_t_12;
8737 
8738   /* "statsmodels/tsa/statespace/_representation.pyx":469
8739  *
8740  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
8741  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT32, FORTRAN)             # <<<<<<<<<<<<<<
8742  *
8743  *         # Create a copy of the transition matrix (to avoid overwriting it)
8744  */
8745   __pyx_t_13 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 469, __pyx_L1_error)
8746   __Pyx_GOTREF(__pyx_t_13);
8747   __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 469, __pyx_L1_error)
8748   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
8749   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
8750   __pyx_v_self->initial_state_cov = __pyx_t_19;
8751   __pyx_t_19.memview = NULL;
8752   __pyx_t_19.data = NULL;
8753 
8754   /* "statsmodels/tsa/statespace/_representation.pyx":472
8755  *
8756  *         # Create a copy of the transition matrix (to avoid overwriting it)
8757  *         blas.scopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
8758  *                                    &self.tmp[0,0], &inc)
8759  *
8760  */
8761   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 472, __pyx_L1_error)}
8762   __pyx_t_10 = 0;
8763   __pyx_t_11 = 0;
8764   __pyx_t_8 = 0;
8765 
8766   /* "statsmodels/tsa/statespace/_representation.pyx":473
8767  *         # Create a copy of the transition matrix (to avoid overwriting it)
8768  *         blas.scopy(&k_states2, &self.transition[0,0,0], &inc,
8769  *                                    &self.tmp[0,0], &inc)             # <<<<<<<<<<<<<<
8770  *
8771  *         # Copy the selected state covariance to the initial state covariance
8772  */
8773   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 473, __pyx_L1_error)}
8774   __pyx_t_7 = 0;
8775   __pyx_t_9 = 0;
8776 
8777   /* "statsmodels/tsa/statespace/_representation.pyx":472
8778  *
8779  *         # Create a copy of the transition matrix (to avoid overwriting it)
8780  *         blas.scopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
8781  *                                    &self.tmp[0,0], &inc)
8782  *
8783  */
8784   __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_k_states2), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transition.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_8 * __pyx_v_self->transition.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_7)) ) + __pyx_t_9 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
8785 
8786   /* "statsmodels/tsa/statespace/_representation.pyx":477
8787  *         # Copy the selected state covariance to the initial state covariance
8788  *         # (it will be overwritten with the appropriate matrix)
8789  *         blas.scopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,             # <<<<<<<<<<<<<<
8790  *                                    &self.initial_state_cov[0,0], &inc)
8791  *
8792  */
8793   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 477, __pyx_L1_error)}
8794   __pyx_t_9 = 0;
8795   __pyx_t_7 = 0;
8796   __pyx_t_8 = 0;
8797 
8798   /* "statsmodels/tsa/statespace/_representation.pyx":478
8799  *         # (it will be overwritten with the appropriate matrix)
8800  *         blas.scopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,
8801  *                                    &self.initial_state_cov[0,0], &inc)             # <<<<<<<<<<<<<<
8802  *
8803  *         # Solve the discrete Lyapunov equation to the get initial state
8804  */
8805   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 478, __pyx_L1_error)}
8806   __pyx_t_11 = 0;
8807   __pyx_t_10 = 0;
8808 
8809   /* "statsmodels/tsa/statespace/_representation.pyx":477
8810  *         # Copy the selected state covariance to the initial state covariance
8811  *         # (it will be overwritten with the appropriate matrix)
8812  *         blas.scopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,             # <<<<<<<<<<<<<<
8813  *                                    &self.initial_state_cov[0,0], &inc)
8814  *
8815  */
8816   __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_k_states2), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->selected_state_cov.data) + __pyx_t_9)) ) + __pyx_t_7 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_8 * __pyx_v_self->selected_state_cov.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_state_cov.data) + __pyx_t_11)) ) + __pyx_t_10 * __pyx_v_self->initial_state_cov.strides[1]) )))), (&__pyx_v_inc));
8817 
8818   /* "statsmodels/tsa/statespace/_representation.pyx":482
8819  *         # Solve the discrete Lyapunov equation to the get initial state
8820  *         # covariance matrix
8821  *         tools._ssolve_discrete_lyapunov(&self.tmp[0,0], &self.initial_state_cov[0,0], self.k_states, complex_step)             # <<<<<<<<<<<<<<
8822  *
8823  *         self.initial_diffuse_state_cov[:] = 0
8824  */
8825   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 482, __pyx_L1_error)}
8826   __pyx_t_10 = 0;
8827   __pyx_t_11 = 0;
8828   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 482, __pyx_L1_error)}
8829   __pyx_t_8 = 0;
8830   __pyx_t_7 = 0;
8831   __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_complex_step); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 482, __pyx_L1_error)
8832   __pyx_t_20.__pyx_n = 1;
8833   __pyx_t_20.complex_step = __pyx_t_12;
8834   __pyx_f_11statsmodels_3tsa_10statespace_6_tools__ssolve_discrete_lyapunov((&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->tmp.strides[1]) )))), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_state_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->initial_state_cov.strides[1]) )))), __pyx_v_self->k_states, &__pyx_t_20); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 482, __pyx_L1_error)
8835 
8836   /* "statsmodels/tsa/statespace/_representation.pyx":484
8837  *         tools._ssolve_discrete_lyapunov(&self.tmp[0,0], &self.initial_state_cov[0,0], self.k_states, complex_step)
8838  *
8839  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
8840  *
8841  *         self.initialized = True
8842  */
8843   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 484, __pyx_L1_error)}
8844   {
8845       __pyx_t_5numpy_float32_t __pyx_temp_scalar = 0.0;
8846       {
8847           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
8848           Py_ssize_t __pyx_temp_idx;
8849           __pyx_t_5numpy_float32_t *__pyx_temp_pointer = (__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_diffuse_state_cov.data;
8850           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
8851             *((__pyx_t_5numpy_float32_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
8852             __pyx_temp_pointer += 1;
8853           }
8854       }
8855   }
8856 
8857   /* "statsmodels/tsa/statespace/_representation.pyx":486
8858  *         self.initial_diffuse_state_cov[:] = 0
8859  *
8860  *         self.initialized = True             # <<<<<<<<<<<<<<
8861  *
8862  *     def __iter__(self):
8863  */
8864   __pyx_v_self->initialized = 1;
8865 
8866   /* "statsmodels/tsa/statespace/_representation.pyx":421
8867  *     # ## Initialize: stationary process
8868  *     # *Note:* see Durbin and Koopman section 5.6.2
8869  *     def initialize_stationary(self, complex_step=False):             # <<<<<<<<<<<<<<
8870  *         """
8871  *         initialize_stationary()
8872  */
8873 
8874   /* function exit code */
8875   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8876   goto __pyx_L0;
8877   __pyx_L1_error:;
8878   __Pyx_XDECREF(__pyx_t_13);
8879   __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
8880   __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
8881   __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
8882   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialize_stationary", __pyx_clineno, __pyx_lineno, __pyx_filename);
8883   __pyx_r = NULL;
8884   __pyx_L0:;
8885   __PYX_XDEC_MEMVIEW(&__pyx_v_ipiv, 1);
8886   __Pyx_XGIVEREF(__pyx_r);
8887   __Pyx_RefNannyFinishContext();
8888   return __pyx_r;
8889 }
8890 
8891 /* "statsmodels/tsa/statespace/_representation.pyx":488
8892  *         self.initialized = True
8893  *
8894  *     def __iter__(self):             # <<<<<<<<<<<<<<
8895  *         return self
8896  *
8897  */
8898 
8899 /* Python wrapper */
8900 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15__iter__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15__iter__(PyObject * __pyx_v_self)8901 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15__iter__(PyObject *__pyx_v_self) {
8902   PyObject *__pyx_r = 0;
8903   __Pyx_RefNannyDeclarations
8904   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
8905   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14__iter__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
8906 
8907   /* function exit code */
8908   __Pyx_RefNannyFinishContext();
8909   return __pyx_r;
8910 }
8911 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)8912 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
8913   PyObject *__pyx_r = NULL;
8914   __Pyx_RefNannyDeclarations
8915   __Pyx_RefNannySetupContext("__iter__", 0);
8916 
8917   /* "statsmodels/tsa/statespace/_representation.pyx":489
8918  *
8919  *     def __iter__(self):
8920  *         return self             # <<<<<<<<<<<<<<
8921  *
8922  *     def __next__(self):
8923  */
8924   __Pyx_XDECREF(__pyx_r);
8925   __Pyx_INCREF(((PyObject *)__pyx_v_self));
8926   __pyx_r = ((PyObject *)__pyx_v_self);
8927   goto __pyx_L0;
8928 
8929   /* "statsmodels/tsa/statespace/_representation.pyx":488
8930  *         self.initialized = True
8931  *
8932  *     def __iter__(self):             # <<<<<<<<<<<<<<
8933  *         return self
8934  *
8935  */
8936 
8937   /* function exit code */
8938   __pyx_L0:;
8939   __Pyx_XGIVEREF(__pyx_r);
8940   __Pyx_RefNannyFinishContext();
8941   return __pyx_r;
8942 }
8943 
8944 /* "statsmodels/tsa/statespace/_representation.pyx":491
8945  *         return self
8946  *
8947  *     def __next__(self):             # <<<<<<<<<<<<<<
8948  *         """
8949  *         Advance to the next location
8950  */
8951 
8952 /* Python wrapper */
8953 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17__next__(PyObject *__pyx_v_self); /*proto*/
8954 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__[] = "\n        Advance to the next location\n        ";
8955 #if CYTHON_COMPILING_IN_CPYTHON
8956 struct wrapperbase __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__;
8957 #endif
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17__next__(PyObject * __pyx_v_self)8958 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17__next__(PyObject *__pyx_v_self) {
8959   PyObject *__pyx_r = 0;
8960   __Pyx_RefNannyDeclarations
8961   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
8962   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
8963 
8964   /* function exit code */
8965   __Pyx_RefNannyFinishContext();
8966   return __pyx_r;
8967 }
8968 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)8969 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
8970   PyObject *__pyx_r = NULL;
8971   __Pyx_RefNannyDeclarations
8972   int __pyx_t_1;
8973   PyObject *__pyx_t_2 = NULL;
8974   int __pyx_lineno = 0;
8975   const char *__pyx_filename = NULL;
8976   int __pyx_clineno = 0;
8977   __Pyx_RefNannySetupContext("__next__", 0);
8978 
8979   /* "statsmodels/tsa/statespace/_representation.pyx":495
8980  *         Advance to the next location
8981  *         """
8982  *         if self.t >= self.nobs:             # <<<<<<<<<<<<<<
8983  *             raise StopIteration
8984  *         else:
8985  */
8986   __pyx_t_1 = ((__pyx_v_self->t >= __pyx_v_self->nobs) != 0);
8987   if (unlikely(__pyx_t_1)) {
8988 
8989     /* "statsmodels/tsa/statespace/_representation.pyx":496
8990  *         """
8991  *         if self.t >= self.nobs:
8992  *             raise StopIteration             # <<<<<<<<<<<<<<
8993  *         else:
8994  *             self.seek(self.t+1, 0, 0)
8995  */
8996     __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
8997     __PYX_ERR(0, 496, __pyx_L1_error)
8998 
8999     /* "statsmodels/tsa/statespace/_representation.pyx":495
9000  *         Advance to the next location
9001  *         """
9002  *         if self.t >= self.nobs:             # <<<<<<<<<<<<<<
9003  *             raise StopIteration
9004  *         else:
9005  */
9006   }
9007 
9008   /* "statsmodels/tsa/statespace/_representation.pyx":498
9009  *             raise StopIteration
9010  *         else:
9011  *             self.seek(self.t+1, 0, 0)             # <<<<<<<<<<<<<<
9012  *
9013  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):
9014  */
9015   /*else*/ {
9016     __pyx_t_2 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->seek(__pyx_v_self, (__pyx_v_self->t + 1), 0, 0, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)
9017     __Pyx_GOTREF(__pyx_t_2);
9018     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9019   }
9020 
9021   /* "statsmodels/tsa/statespace/_representation.pyx":491
9022  *         return self
9023  *
9024  *     def __next__(self):             # <<<<<<<<<<<<<<
9025  *         """
9026  *         Advance to the next location
9027  */
9028 
9029   /* function exit code */
9030   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9031   goto __pyx_L0;
9032   __pyx_L1_error:;
9033   __Pyx_XDECREF(__pyx_t_2);
9034   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9035   __pyx_r = NULL;
9036   __pyx_L0:;
9037   __Pyx_XGIVEREF(__pyx_r);
9038   __Pyx_RefNannyFinishContext();
9039   return __pyx_r;
9040 }
9041 
9042 /* "statsmodels/tsa/statespace/_representation.pyx":500
9043  *             self.seek(self.t+1, 0, 0)
9044  *
9045  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):             # <<<<<<<<<<<<<<
9046  *         self._previous_t = self.t
9047  *
9048  */
9049 
9050 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,int __pyx_skip_dispatch,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek * __pyx_optional_args)9051 static PyObject *__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek *__pyx_optional_args) {
9052   unsigned int __pyx_v_reset = ((unsigned int)0);
9053   int __pyx_v_k_endog;
9054   int __pyx_v_design_t;
9055   int __pyx_v_obs_intercept_t;
9056   int __pyx_v_obs_cov_t;
9057   int __pyx_v_transition_t;
9058   int __pyx_v_state_intercept_t;
9059   int __pyx_v_selection_t;
9060   int __pyx_v_state_cov_t;
9061   PyObject *__pyx_r = NULL;
9062   __Pyx_RefNannyDeclarations
9063   PyObject *__pyx_t_1 = NULL;
9064   PyObject *__pyx_t_2 = NULL;
9065   PyObject *__pyx_t_3 = NULL;
9066   PyObject *__pyx_t_4 = NULL;
9067   PyObject *__pyx_t_5 = NULL;
9068   PyObject *__pyx_t_6 = NULL;
9069   PyObject *__pyx_t_7 = NULL;
9070   PyObject *__pyx_t_8 = NULL;
9071   int __pyx_t_9;
9072   PyObject *__pyx_t_10 = NULL;
9073   int __pyx_t_11;
9074   Py_ssize_t __pyx_t_12;
9075   size_t __pyx_t_13;
9076   Py_ssize_t __pyx_t_14;
9077   Py_ssize_t __pyx_t_15;
9078   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform __pyx_t_16;
9079   int __pyx_lineno = 0;
9080   const char *__pyx_filename = NULL;
9081   int __pyx_clineno = 0;
9082   __Pyx_RefNannySetupContext("seek", 0);
9083   if (__pyx_optional_args) {
9084     if (__pyx_optional_args->__pyx_n > 0) {
9085       __pyx_v_reset = __pyx_optional_args->reset;
9086     }
9087   }
9088   /* Check if called by wrapper */
9089   if (unlikely(__pyx_skip_dispatch)) ;
9090   /* Check if overridden in Python */
9091   else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
9092     #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
9093     static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
9094     if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
9095       PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
9096       #endif
9097       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
9098       __Pyx_GOTREF(__pyx_t_1);
9099       if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19seek)) {
9100         __Pyx_XDECREF(__pyx_r);
9101         __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
9102         __Pyx_GOTREF(__pyx_t_3);
9103         __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_transform_diagonalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error)
9104         __Pyx_GOTREF(__pyx_t_4);
9105         __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_transform_generalized_collapse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error)
9106         __Pyx_GOTREF(__pyx_t_5);
9107         __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_reset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
9108         __Pyx_GOTREF(__pyx_t_6);
9109         __Pyx_INCREF(__pyx_t_1);
9110         __pyx_t_7 = __pyx_t_1; __pyx_t_8 = NULL;
9111         __pyx_t_9 = 0;
9112         if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
9113           __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
9114           if (likely(__pyx_t_8)) {
9115             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
9116             __Pyx_INCREF(__pyx_t_8);
9117             __Pyx_INCREF(function);
9118             __Pyx_DECREF_SET(__pyx_t_7, function);
9119             __pyx_t_9 = 1;
9120           }
9121         }
9122         #if CYTHON_FAST_PYCALL
9123         if (PyFunction_Check(__pyx_t_7)) {
9124           PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
9125           __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
9126           __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9127           __Pyx_GOTREF(__pyx_t_2);
9128           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9129           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9130           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9131           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9132         } else
9133         #endif
9134         #if CYTHON_FAST_PYCCALL
9135         if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
9136           PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
9137           __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
9138           __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
9139           __Pyx_GOTREF(__pyx_t_2);
9140           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9141           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9142           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9143           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9144         } else
9145         #endif
9146         {
9147           __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 500, __pyx_L1_error)
9148           __Pyx_GOTREF(__pyx_t_10);
9149           if (__pyx_t_8) {
9150             __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
9151           }
9152           __Pyx_GIVEREF(__pyx_t_3);
9153           PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
9154           __Pyx_GIVEREF(__pyx_t_4);
9155           PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
9156           __Pyx_GIVEREF(__pyx_t_5);
9157           PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
9158           __Pyx_GIVEREF(__pyx_t_6);
9159           PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
9160           __pyx_t_3 = 0;
9161           __pyx_t_4 = 0;
9162           __pyx_t_5 = 0;
9163           __pyx_t_6 = 0;
9164           __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
9165           __Pyx_GOTREF(__pyx_t_2);
9166           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
9167         }
9168         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9169         __pyx_r = __pyx_t_2;
9170         __pyx_t_2 = 0;
9171         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9172         goto __pyx_L0;
9173       }
9174       #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
9175       __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
9176       __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
9177       if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
9178         __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
9179       }
9180       #endif
9181       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9182       #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
9183     }
9184     #endif
9185   }
9186 
9187   /* "statsmodels/tsa/statespace/_representation.pyx":501
9188  *
9189  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):
9190  *         self._previous_t = self.t             # <<<<<<<<<<<<<<
9191  *
9192  *         # Set the global time indicator, if valid
9193  */
9194   __pyx_t_9 = __pyx_v_self->t;
9195   __pyx_v_self->_previous_t = __pyx_t_9;
9196 
9197   /* "statsmodels/tsa/statespace/_representation.pyx":504
9198  *
9199  *         # Set the global time indicator, if valid
9200  *         if t >= self.nobs:             # <<<<<<<<<<<<<<
9201  *             raise IndexError("Observation index out of range")
9202  *         self.t = t
9203  */
9204   __pyx_t_11 = ((__pyx_v_t >= __pyx_v_self->nobs) != 0);
9205   if (unlikely(__pyx_t_11)) {
9206 
9207     /* "statsmodels/tsa/statespace/_representation.pyx":505
9208  *         # Set the global time indicator, if valid
9209  *         if t >= self.nobs:
9210  *             raise IndexError("Observation index out of range")             # <<<<<<<<<<<<<<
9211  *         self.t = t
9212  *
9213  */
9214     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
9215     __Pyx_GOTREF(__pyx_t_1);
9216     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
9217     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9218     __PYX_ERR(0, 505, __pyx_L1_error)
9219 
9220     /* "statsmodels/tsa/statespace/_representation.pyx":504
9221  *
9222  *         # Set the global time indicator, if valid
9223  *         if t >= self.nobs:             # <<<<<<<<<<<<<<
9224  *             raise IndexError("Observation index out of range")
9225  *         self.t = t
9226  */
9227   }
9228 
9229   /* "statsmodels/tsa/statespace/_representation.pyx":506
9230  *         if t >= self.nobs:
9231  *             raise IndexError("Observation index out of range")
9232  *         self.t = t             # <<<<<<<<<<<<<<
9233  *
9234  *         # Indices for possibly time-varying arrays
9235  */
9236   __pyx_v_self->t = __pyx_v_t;
9237 
9238   /* "statsmodels/tsa/statespace/_representation.pyx":511
9239  *         cdef:
9240  *             int k_endog
9241  *             int design_t = 0             # <<<<<<<<<<<<<<
9242  *             int obs_intercept_t = 0
9243  *             int obs_cov_t = 0
9244  */
9245   __pyx_v_design_t = 0;
9246 
9247   /* "statsmodels/tsa/statespace/_representation.pyx":512
9248  *             int k_endog
9249  *             int design_t = 0
9250  *             int obs_intercept_t = 0             # <<<<<<<<<<<<<<
9251  *             int obs_cov_t = 0
9252  *             int transition_t = 0
9253  */
9254   __pyx_v_obs_intercept_t = 0;
9255 
9256   /* "statsmodels/tsa/statespace/_representation.pyx":513
9257  *             int design_t = 0
9258  *             int obs_intercept_t = 0
9259  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
9260  *             int transition_t = 0
9261  *             int state_intercept_t = 0
9262  */
9263   __pyx_v_obs_cov_t = 0;
9264 
9265   /* "statsmodels/tsa/statespace/_representation.pyx":514
9266  *             int obs_intercept_t = 0
9267  *             int obs_cov_t = 0
9268  *             int transition_t = 0             # <<<<<<<<<<<<<<
9269  *             int state_intercept_t = 0
9270  *             int selection_t = 0
9271  */
9272   __pyx_v_transition_t = 0;
9273 
9274   /* "statsmodels/tsa/statespace/_representation.pyx":515
9275  *             int obs_cov_t = 0
9276  *             int transition_t = 0
9277  *             int state_intercept_t = 0             # <<<<<<<<<<<<<<
9278  *             int selection_t = 0
9279  *             int state_cov_t = 0
9280  */
9281   __pyx_v_state_intercept_t = 0;
9282 
9283   /* "statsmodels/tsa/statespace/_representation.pyx":516
9284  *             int transition_t = 0
9285  *             int state_intercept_t = 0
9286  *             int selection_t = 0             # <<<<<<<<<<<<<<
9287  *             int state_cov_t = 0
9288  *
9289  */
9290   __pyx_v_selection_t = 0;
9291 
9292   /* "statsmodels/tsa/statespace/_representation.pyx":517
9293  *             int state_intercept_t = 0
9294  *             int selection_t = 0
9295  *             int state_cov_t = 0             # <<<<<<<<<<<<<<
9296  *
9297  *         # Get indices for possibly time-varying arrays
9298  */
9299   __pyx_v_state_cov_t = 0;
9300 
9301   /* "statsmodels/tsa/statespace/_representation.pyx":520
9302  *
9303  *         # Get indices for possibly time-varying arrays
9304  *         if not self.time_invariant:             # <<<<<<<<<<<<<<
9305  *             if self.design.shape[2] > 1:             design_t = t
9306  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
9307  */
9308   __pyx_t_11 = ((!(__pyx_v_self->time_invariant != 0)) != 0);
9309   if (__pyx_t_11) {
9310 
9311     /* "statsmodels/tsa/statespace/_representation.pyx":521
9312  *         # Get indices for possibly time-varying arrays
9313  *         if not self.time_invariant:
9314  *             if self.design.shape[2] > 1:             design_t = t             # <<<<<<<<<<<<<<
9315  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
9316  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
9317  */
9318     if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 521, __pyx_L1_error)}
9319     __pyx_t_11 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
9320     if (__pyx_t_11) {
9321       __pyx_v_design_t = __pyx_v_t;
9322     }
9323 
9324     /* "statsmodels/tsa/statespace/_representation.pyx":522
9325  *         if not self.time_invariant:
9326  *             if self.design.shape[2] > 1:             design_t = t
9327  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t             # <<<<<<<<<<<<<<
9328  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
9329  *             if self.transition.shape[2] > 1:         transition_t = t
9330  */
9331     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 522, __pyx_L1_error)}
9332     __pyx_t_11 = (((__pyx_v_self->obs_intercept.shape[1]) > 1) != 0);
9333     if (__pyx_t_11) {
9334       __pyx_v_obs_intercept_t = __pyx_v_t;
9335     }
9336 
9337     /* "statsmodels/tsa/statespace/_representation.pyx":523
9338  *             if self.design.shape[2] > 1:             design_t = t
9339  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
9340  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t             # <<<<<<<<<<<<<<
9341  *             if self.transition.shape[2] > 1:         transition_t = t
9342  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
9343  */
9344     if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 523, __pyx_L1_error)}
9345     __pyx_t_11 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
9346     if (__pyx_t_11) {
9347       __pyx_v_obs_cov_t = __pyx_v_t;
9348     }
9349 
9350     /* "statsmodels/tsa/statespace/_representation.pyx":524
9351  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
9352  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
9353  *             if self.transition.shape[2] > 1:         transition_t = t             # <<<<<<<<<<<<<<
9354  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
9355  *             if self.selection.shape[2] > 1:          selection_t = t
9356  */
9357     if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 524, __pyx_L1_error)}
9358     __pyx_t_11 = (((__pyx_v_self->transition.shape[2]) > 1) != 0);
9359     if (__pyx_t_11) {
9360       __pyx_v_transition_t = __pyx_v_t;
9361     }
9362 
9363     /* "statsmodels/tsa/statespace/_representation.pyx":525
9364  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
9365  *             if self.transition.shape[2] > 1:         transition_t = t
9366  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t             # <<<<<<<<<<<<<<
9367  *             if self.selection.shape[2] > 1:          selection_t = t
9368  *             if self.state_cov.shape[2] > 1:          state_cov_t = t
9369  */
9370     if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 525, __pyx_L1_error)}
9371     __pyx_t_11 = (((__pyx_v_self->state_intercept.shape[1]) > 1) != 0);
9372     if (__pyx_t_11) {
9373       __pyx_v_state_intercept_t = __pyx_v_t;
9374     }
9375 
9376     /* "statsmodels/tsa/statespace/_representation.pyx":526
9377  *             if self.transition.shape[2] > 1:         transition_t = t
9378  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
9379  *             if self.selection.shape[2] > 1:          selection_t = t             # <<<<<<<<<<<<<<
9380  *             if self.state_cov.shape[2] > 1:          state_cov_t = t
9381  *
9382  */
9383     if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 526, __pyx_L1_error)}
9384     __pyx_t_11 = (((__pyx_v_self->selection.shape[2]) > 1) != 0);
9385     if (__pyx_t_11) {
9386       __pyx_v_selection_t = __pyx_v_t;
9387     }
9388 
9389     /* "statsmodels/tsa/statespace/_representation.pyx":527
9390  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
9391  *             if self.selection.shape[2] > 1:          selection_t = t
9392  *             if self.state_cov.shape[2] > 1:          state_cov_t = t             # <<<<<<<<<<<<<<
9393  *
9394  *         # Initialize object-level pointers to statespace arrays
9395  */
9396     if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 527, __pyx_L1_error)}
9397     __pyx_t_11 = (((__pyx_v_self->state_cov.shape[2]) > 1) != 0);
9398     if (__pyx_t_11) {
9399       __pyx_v_state_cov_t = __pyx_v_t;
9400     }
9401 
9402     /* "statsmodels/tsa/statespace/_representation.pyx":520
9403  *
9404  *         # Get indices for possibly time-varying arrays
9405  *         if not self.time_invariant:             # <<<<<<<<<<<<<<
9406  *             if self.design.shape[2] > 1:             design_t = t
9407  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
9408  */
9409   }
9410 
9411   /* "statsmodels/tsa/statespace/_representation.pyx":530
9412  *
9413  *         # Initialize object-level pointers to statespace arrays
9414  *         self._obs = &self.obs[0, t]             # <<<<<<<<<<<<<<
9415  *         self._design = &self.design[0, 0, design_t]
9416  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
9417  */
9418   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 530, __pyx_L1_error)}
9419   __pyx_t_12 = 0;
9420   __pyx_t_13 = __pyx_v_t;
9421   __pyx_v_self->_obs = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->obs.data) + __pyx_t_12)) ) + __pyx_t_13 * __pyx_v_self->obs.strides[1]) ))));
9422 
9423   /* "statsmodels/tsa/statespace/_representation.pyx":531
9424  *         # Initialize object-level pointers to statespace arrays
9425  *         self._obs = &self.obs[0, t]
9426  *         self._design = &self.design[0, 0, design_t]             # <<<<<<<<<<<<<<
9427  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
9428  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
9429  */
9430   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 531, __pyx_L1_error)}
9431   __pyx_t_12 = 0;
9432   __pyx_t_14 = 0;
9433   __pyx_t_15 = __pyx_v_design_t;
9434   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->design.data) + __pyx_t_12)) ) + __pyx_t_14 * __pyx_v_self->design.strides[1]) ) + __pyx_t_15 * __pyx_v_self->design.strides[2]) ))));
9435 
9436   /* "statsmodels/tsa/statespace/_representation.pyx":532
9437  *         self._obs = &self.obs[0, t]
9438  *         self._design = &self.design[0, 0, design_t]
9439  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]             # <<<<<<<<<<<<<<
9440  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
9441  *         self._transition = &self.transition[0, 0, transition_t]
9442  */
9443   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 532, __pyx_L1_error)}
9444   __pyx_t_15 = 0;
9445   __pyx_t_14 = __pyx_v_obs_intercept_t;
9446   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->obs_intercept.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->obs_intercept.strides[1]) ))));
9447 
9448   /* "statsmodels/tsa/statespace/_representation.pyx":533
9449  *         self._design = &self.design[0, 0, design_t]
9450  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
9451  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]             # <<<<<<<<<<<<<<
9452  *         self._transition = &self.transition[0, 0, transition_t]
9453  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
9454  */
9455   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 533, __pyx_L1_error)}
9456   __pyx_t_14 = 0;
9457   __pyx_t_15 = 0;
9458   __pyx_t_12 = __pyx_v_obs_cov_t;
9459   __pyx_v_self->_obs_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->obs_cov.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->obs_cov.strides[1]) ) + __pyx_t_12 * __pyx_v_self->obs_cov.strides[2]) ))));
9460 
9461   /* "statsmodels/tsa/statespace/_representation.pyx":534
9462  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
9463  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
9464  *         self._transition = &self.transition[0, 0, transition_t]             # <<<<<<<<<<<<<<
9465  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
9466  *         self._selection = &self.selection[0, 0, selection_t]
9467  */
9468   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 534, __pyx_L1_error)}
9469   __pyx_t_12 = 0;
9470   __pyx_t_15 = 0;
9471   __pyx_t_14 = __pyx_v_transition_t;
9472   __pyx_v_self->_transition = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transition.data) + __pyx_t_12)) ) + __pyx_t_15 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_14 * __pyx_v_self->transition.strides[2]) ))));
9473 
9474   /* "statsmodels/tsa/statespace/_representation.pyx":535
9475  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
9476  *         self._transition = &self.transition[0, 0, transition_t]
9477  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]             # <<<<<<<<<<<<<<
9478  *         self._selection = &self.selection[0, 0, selection_t]
9479  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]
9480  */
9481   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 535, __pyx_L1_error)}
9482   __pyx_t_14 = 0;
9483   __pyx_t_15 = __pyx_v_state_intercept_t;
9484   __pyx_v_self->_state_intercept = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->state_intercept.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->state_intercept.strides[1]) ))));
9485 
9486   /* "statsmodels/tsa/statespace/_representation.pyx":536
9487  *         self._transition = &self.transition[0, 0, transition_t]
9488  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
9489  *         self._selection = &self.selection[0, 0, selection_t]             # <<<<<<<<<<<<<<
9490  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]
9491  *
9492  */
9493   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 536, __pyx_L1_error)}
9494   __pyx_t_15 = 0;
9495   __pyx_t_14 = 0;
9496   __pyx_t_12 = __pyx_v_selection_t;
9497   __pyx_v_self->_selection = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->selection.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->selection.strides[1]) ) + __pyx_t_12 * __pyx_v_self->selection.strides[2]) ))));
9498 
9499   /* "statsmodels/tsa/statespace/_representation.pyx":537
9500  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
9501  *         self._selection = &self.selection[0, 0, selection_t]
9502  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]             # <<<<<<<<<<<<<<
9503  *
9504  *         # Initialize object-level pointers to initialization
9505  */
9506   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 537, __pyx_L1_error)}
9507   __pyx_t_12 = 0;
9508   __pyx_t_14 = 0;
9509   __pyx_t_15 = __pyx_v_state_cov_t;
9510   __pyx_v_self->_state_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->state_cov.data) + __pyx_t_12)) ) + __pyx_t_14 * __pyx_v_self->state_cov.strides[1]) ) + __pyx_t_15 * __pyx_v_self->state_cov.strides[2]) ))));
9511 
9512   /* "statsmodels/tsa/statespace/_representation.pyx":540
9513  *
9514  *         # Initialize object-level pointers to initialization
9515  *         if not self.initialized:             # <<<<<<<<<<<<<<
9516  *             raise RuntimeError("Statespace model not initialized.")
9517  *         self._initial_state = &self.initial_state[0]
9518  */
9519   __pyx_t_11 = ((!(__pyx_v_self->initialized != 0)) != 0);
9520   if (unlikely(__pyx_t_11)) {
9521 
9522     /* "statsmodels/tsa/statespace/_representation.pyx":541
9523  *         # Initialize object-level pointers to initialization
9524  *         if not self.initialized:
9525  *             raise RuntimeError("Statespace model not initialized.")             # <<<<<<<<<<<<<<
9526  *         self._initial_state = &self.initial_state[0]
9527  *         self._initial_state_cov = &self.initial_state_cov[0,0]
9528  */
9529     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
9530     __Pyx_GOTREF(__pyx_t_1);
9531     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
9532     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9533     __PYX_ERR(0, 541, __pyx_L1_error)
9534 
9535     /* "statsmodels/tsa/statespace/_representation.pyx":540
9536  *
9537  *         # Initialize object-level pointers to initialization
9538  *         if not self.initialized:             # <<<<<<<<<<<<<<
9539  *             raise RuntimeError("Statespace model not initialized.")
9540  *         self._initial_state = &self.initial_state[0]
9541  */
9542   }
9543 
9544   /* "statsmodels/tsa/statespace/_representation.pyx":542
9545  *         if not self.initialized:
9546  *             raise RuntimeError("Statespace model not initialized.")
9547  *         self._initial_state = &self.initial_state[0]             # <<<<<<<<<<<<<<
9548  *         self._initial_state_cov = &self.initial_state_cov[0,0]
9549  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]
9550  */
9551   if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 542, __pyx_L1_error)}
9552   __pyx_t_15 = 0;
9553   __pyx_v_self->_initial_state = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_15 * __pyx_v_self->initial_state.strides[0]) ))));
9554 
9555   /* "statsmodels/tsa/statespace/_representation.pyx":543
9556  *             raise RuntimeError("Statespace model not initialized.")
9557  *         self._initial_state = &self.initial_state[0]
9558  *         self._initial_state_cov = &self.initial_state_cov[0,0]             # <<<<<<<<<<<<<<
9559  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]
9560  *
9561  */
9562   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 543, __pyx_L1_error)}
9563   __pyx_t_15 = 0;
9564   __pyx_t_14 = 0;
9565   __pyx_v_self->_initial_state_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_state_cov.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->initial_state_cov.strides[1]) ))));
9566 
9567   /* "statsmodels/tsa/statespace/_representation.pyx":544
9568  *         self._initial_state = &self.initial_state[0]
9569  *         self._initial_state_cov = &self.initial_state_cov[0,0]
9570  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]             # <<<<<<<<<<<<<<
9571  *
9572  *         # Create the selected state covariance matrix
9573  */
9574   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 544, __pyx_L1_error)}
9575   __pyx_t_14 = 0;
9576   __pyx_t_15 = 0;
9577   __pyx_v_self->_initial_diffuse_state_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->initial_diffuse_state_cov.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->initial_diffuse_state_cov.strides[1]) ))));
9578 
9579   /* "statsmodels/tsa/statespace/_representation.pyx":547
9580  *
9581  *         # Create the selected state covariance matrix
9582  *         self.select_state_cov(t)             # <<<<<<<<<<<<<<
9583  *
9584  *         # Handle missing data
9585  */
9586   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->select_state_cov(__pyx_v_self, __pyx_v_t);
9587 
9588   /* "statsmodels/tsa/statespace/_representation.pyx":551
9589  *         # Handle missing data
9590  *         # Note: this modifies object pointers and _* dimensions
9591  *         k_endog = self.select_missing(t)             # <<<<<<<<<<<<<<
9592  *
9593  *         # Set dimensions
9594  */
9595   __pyx_v_k_endog = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->select_missing(__pyx_v_self, __pyx_v_t);
9596 
9597   /* "statsmodels/tsa/statespace/_representation.pyx":554
9598  *
9599  *         # Set dimensions
9600  *         self.set_dimensions(k_endog, self.k_states, self.k_posdef)             # <<<<<<<<<<<<<<
9601  *
9602  *         # Handle transformations
9603  */
9604   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_k_endog, __pyx_v_self->k_states, __pyx_v_self->k_posdef);
9605 
9606   /* "statsmodels/tsa/statespace/_representation.pyx":557
9607  *
9608  *         # Handle transformations
9609  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)             # <<<<<<<<<<<<<<
9610  *
9611  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
9612  */
9613   __pyx_t_16.__pyx_n = 1;
9614   __pyx_t_16.reset = __pyx_v_reset;
9615   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->transform(__pyx_v_self, __pyx_v_t, __pyx_v_self->_previous_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, &__pyx_t_16); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error)
9616 
9617   /* "statsmodels/tsa/statespace/_representation.pyx":500
9618  *             self.seek(self.t+1, 0, 0)
9619  *
9620  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):             # <<<<<<<<<<<<<<
9621  *         self._previous_t = self.t
9622  *
9623  */
9624 
9625   /* function exit code */
9626   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9627   goto __pyx_L0;
9628   __pyx_L1_error:;
9629   __Pyx_XDECREF(__pyx_t_1);
9630   __Pyx_XDECREF(__pyx_t_2);
9631   __Pyx_XDECREF(__pyx_t_3);
9632   __Pyx_XDECREF(__pyx_t_4);
9633   __Pyx_XDECREF(__pyx_t_5);
9634   __Pyx_XDECREF(__pyx_t_6);
9635   __Pyx_XDECREF(__pyx_t_7);
9636   __Pyx_XDECREF(__pyx_t_8);
9637   __Pyx_XDECREF(__pyx_t_10);
9638   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
9639   __pyx_r = 0;
9640   __pyx_L0:;
9641   __Pyx_XGIVEREF(__pyx_r);
9642   __Pyx_RefNannyFinishContext();
9643   return __pyx_r;
9644 }
9645 
9646 /* Python wrapper */
9647 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19seek(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)9648 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9649   unsigned int __pyx_v_t;
9650   unsigned int __pyx_v_transform_diagonalize;
9651   unsigned int __pyx_v_transform_generalized_collapse;
9652   unsigned int __pyx_v_reset;
9653   int __pyx_lineno = 0;
9654   const char *__pyx_filename = NULL;
9655   int __pyx_clineno = 0;
9656   PyObject *__pyx_r = 0;
9657   __Pyx_RefNannyDeclarations
9658   __Pyx_RefNannySetupContext("seek (wrapper)", 0);
9659   {
9660     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_transform_diagonalize,&__pyx_n_s_transform_generalized_collapse,&__pyx_n_s_reset,0};
9661     PyObject* values[4] = {0,0,0,0};
9662     if (unlikely(__pyx_kwds)) {
9663       Py_ssize_t kw_args;
9664       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9665       switch (pos_args) {
9666         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9667         CYTHON_FALLTHROUGH;
9668         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9669         CYTHON_FALLTHROUGH;
9670         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9671         CYTHON_FALLTHROUGH;
9672         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9673         CYTHON_FALLTHROUGH;
9674         case  0: break;
9675         default: goto __pyx_L5_argtuple_error;
9676       }
9677       kw_args = PyDict_Size(__pyx_kwds);
9678       switch (pos_args) {
9679         case  0:
9680         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
9681         else goto __pyx_L5_argtuple_error;
9682         CYTHON_FALLTHROUGH;
9683         case  1:
9684         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_diagonalize)) != 0)) kw_args--;
9685         else {
9686           __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, 1); __PYX_ERR(0, 500, __pyx_L3_error)
9687         }
9688         CYTHON_FALLTHROUGH;
9689         case  2:
9690         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_generalized_collapse)) != 0)) kw_args--;
9691         else {
9692           __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, 2); __PYX_ERR(0, 500, __pyx_L3_error)
9693         }
9694         CYTHON_FALLTHROUGH;
9695         case  3:
9696         if (kw_args > 0) {
9697           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
9698           if (value) { values[3] = value; kw_args--; }
9699         }
9700       }
9701       if (unlikely(kw_args > 0)) {
9702         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) __PYX_ERR(0, 500, __pyx_L3_error)
9703       }
9704     } else {
9705       switch (PyTuple_GET_SIZE(__pyx_args)) {
9706         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
9707         CYTHON_FALLTHROUGH;
9708         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9709         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9710         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9711         break;
9712         default: goto __pyx_L5_argtuple_error;
9713       }
9714     }
9715     __pyx_v_t = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_t == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 500, __pyx_L3_error)
9716     __pyx_v_transform_diagonalize = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_transform_diagonalize == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 500, __pyx_L3_error)
9717     __pyx_v_transform_generalized_collapse = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_transform_generalized_collapse == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 500, __pyx_L3_error)
9718     if (values[3]) {
9719       __pyx_v_reset = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_reset == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 500, __pyx_L3_error)
9720     } else {
9721       __pyx_v_reset = ((unsigned int)0);
9722     }
9723   }
9724   goto __pyx_L4_argument_unpacking_done;
9725   __pyx_L5_argtuple_error:;
9726   __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 500, __pyx_L3_error)
9727   __pyx_L3_error:;
9728   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
9729   __Pyx_RefNannyFinishContext();
9730   return NULL;
9731   __pyx_L4_argument_unpacking_done:;
9732   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18seek(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), __pyx_v_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, __pyx_v_reset);
9733 
9734   /* function exit code */
9735   __Pyx_RefNannyFinishContext();
9736   return __pyx_r;
9737 }
9738 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,unsigned int __pyx_v_reset)9739 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, unsigned int __pyx_v_reset) {
9740   PyObject *__pyx_r = NULL;
9741   __Pyx_RefNannyDeclarations
9742   PyObject *__pyx_t_1 = NULL;
9743   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek __pyx_t_2;
9744   int __pyx_lineno = 0;
9745   const char *__pyx_filename = NULL;
9746   int __pyx_clineno = 0;
9747   __Pyx_RefNannySetupContext("seek", 0);
9748   __Pyx_XDECREF(__pyx_r);
9749   __pyx_t_2.__pyx_n = 1;
9750   __pyx_t_2.reset = __pyx_v_reset;
9751   __pyx_t_1 = __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_sStatespace->seek(__pyx_v_self, __pyx_v_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
9752   __Pyx_GOTREF(__pyx_t_1);
9753   __pyx_r = __pyx_t_1;
9754   __pyx_t_1 = 0;
9755   goto __pyx_L0;
9756 
9757   /* function exit code */
9758   __pyx_L1_error:;
9759   __Pyx_XDECREF(__pyx_t_1);
9760   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
9761   __pyx_r = NULL;
9762   __pyx_L0:;
9763   __Pyx_XGIVEREF(__pyx_r);
9764   __Pyx_RefNannyFinishContext();
9765   return __pyx_r;
9766 }
9767 
9768 /* "statsmodels/tsa/statespace/_representation.pyx":559
9769  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)
9770  *
9771  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):             # <<<<<<<<<<<<<<
9772  *         self._k_endog = k_endog
9773  *         self._k_states = k_states
9774  */
9775 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_k_endog,unsigned int __pyx_v_k_states,unsigned int __pyx_v_k_posdef)9776 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_k_endog, unsigned int __pyx_v_k_states, unsigned int __pyx_v_k_posdef) {
9777   __Pyx_RefNannyDeclarations
9778   __Pyx_RefNannySetupContext("set_dimensions", 0);
9779 
9780   /* "statsmodels/tsa/statespace/_representation.pyx":560
9781  *
9782  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
9783  *         self._k_endog = k_endog             # <<<<<<<<<<<<<<
9784  *         self._k_states = k_states
9785  *         self._k_posdef = k_posdef
9786  */
9787   __pyx_v_self->_k_endog = __pyx_v_k_endog;
9788 
9789   /* "statsmodels/tsa/statespace/_representation.pyx":561
9790  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
9791  *         self._k_endog = k_endog
9792  *         self._k_states = k_states             # <<<<<<<<<<<<<<
9793  *         self._k_posdef = k_posdef
9794  *         self._k_endog2 = k_endog**2
9795  */
9796   __pyx_v_self->_k_states = __pyx_v_k_states;
9797 
9798   /* "statsmodels/tsa/statespace/_representation.pyx":562
9799  *         self._k_endog = k_endog
9800  *         self._k_states = k_states
9801  *         self._k_posdef = k_posdef             # <<<<<<<<<<<<<<
9802  *         self._k_endog2 = k_endog**2
9803  *         self._k_states2 = k_states**2
9804  */
9805   __pyx_v_self->_k_posdef = __pyx_v_k_posdef;
9806 
9807   /* "statsmodels/tsa/statespace/_representation.pyx":563
9808  *         self._k_states = k_states
9809  *         self._k_posdef = k_posdef
9810  *         self._k_endog2 = k_endog**2             # <<<<<<<<<<<<<<
9811  *         self._k_states2 = k_states**2
9812  *         self._k_posdef2 = k_posdef**2
9813  */
9814   __pyx_v_self->_k_endog2 = __Pyx_pow_long(((long)__pyx_v_k_endog), 2);
9815 
9816   /* "statsmodels/tsa/statespace/_representation.pyx":564
9817  *         self._k_posdef = k_posdef
9818  *         self._k_endog2 = k_endog**2
9819  *         self._k_states2 = k_states**2             # <<<<<<<<<<<<<<
9820  *         self._k_posdef2 = k_posdef**2
9821  *         self._k_endogstates = k_endog * k_states
9822  */
9823   __pyx_v_self->_k_states2 = __Pyx_pow_long(((long)__pyx_v_k_states), 2);
9824 
9825   /* "statsmodels/tsa/statespace/_representation.pyx":565
9826  *         self._k_endog2 = k_endog**2
9827  *         self._k_states2 = k_states**2
9828  *         self._k_posdef2 = k_posdef**2             # <<<<<<<<<<<<<<
9829  *         self._k_endogstates = k_endog * k_states
9830  *         self._k_statesposdef = k_states * k_posdef
9831  */
9832   __pyx_v_self->_k_posdef2 = __Pyx_pow_long(((long)__pyx_v_k_posdef), 2);
9833 
9834   /* "statsmodels/tsa/statespace/_representation.pyx":566
9835  *         self._k_states2 = k_states**2
9836  *         self._k_posdef2 = k_posdef**2
9837  *         self._k_endogstates = k_endog * k_states             # <<<<<<<<<<<<<<
9838  *         self._k_statesposdef = k_states * k_posdef
9839  *
9840  */
9841   __pyx_v_self->_k_endogstates = (__pyx_v_k_endog * __pyx_v_k_states);
9842 
9843   /* "statsmodels/tsa/statespace/_representation.pyx":567
9844  *         self._k_posdef2 = k_posdef**2
9845  *         self._k_endogstates = k_endog * k_states
9846  *         self._k_statesposdef = k_states * k_posdef             # <<<<<<<<<<<<<<
9847  *
9848  *     cdef void select_state_cov(self, unsigned int t):
9849  */
9850   __pyx_v_self->_k_statesposdef = (__pyx_v_k_states * __pyx_v_k_posdef);
9851 
9852   /* "statsmodels/tsa/statespace/_representation.pyx":559
9853  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)
9854  *
9855  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):             # <<<<<<<<<<<<<<
9856  *         self._k_endog = k_endog
9857  *         self._k_states = k_states
9858  */
9859 
9860   /* function exit code */
9861   __Pyx_RefNannyFinishContext();
9862 }
9863 
9864 /* "statsmodels/tsa/statespace/_representation.pyx":569
9865  *         self._k_statesposdef = k_states * k_posdef
9866  *
9867  *     cdef void select_state_cov(self, unsigned int t):             # <<<<<<<<<<<<<<
9868  *         cdef int selected_state_cov_t = 0
9869  *
9870  */
9871 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_t)9872 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
9873   int __pyx_v_selected_state_cov_t;
9874   __Pyx_RefNannyDeclarations
9875   int __pyx_t_1;
9876   int __pyx_t_2;
9877   Py_ssize_t __pyx_t_3;
9878   Py_ssize_t __pyx_t_4;
9879   Py_ssize_t __pyx_t_5;
9880   int __pyx_lineno = 0;
9881   const char *__pyx_filename = NULL;
9882   int __pyx_clineno = 0;
9883   __Pyx_RefNannySetupContext("select_state_cov", 0);
9884 
9885   /* "statsmodels/tsa/statespace/_representation.pyx":570
9886  *
9887  *     cdef void select_state_cov(self, unsigned int t):
9888  *         cdef int selected_state_cov_t = 0             # <<<<<<<<<<<<<<
9889  *
9890  *         # ### Get selected state covariance matrix
9891  */
9892   __pyx_v_selected_state_cov_t = 0;
9893 
9894   /* "statsmodels/tsa/statespace/_representation.pyx":573
9895  *
9896  *         # ### Get selected state covariance matrix
9897  *         if t == 0 or self.selected_state_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
9898  *             selected_state_cov_t = t
9899  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
9900  */
9901   __pyx_t_2 = ((__pyx_v_t == 0) != 0);
9902   if (!__pyx_t_2) {
9903   } else {
9904     __pyx_t_1 = __pyx_t_2;
9905     goto __pyx_L4_bool_binop_done;
9906   }
9907   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 573, __pyx_L1_error)}
9908   __pyx_t_2 = (((__pyx_v_self->selected_state_cov.shape[2]) > 1) != 0);
9909   __pyx_t_1 = __pyx_t_2;
9910   __pyx_L4_bool_binop_done:;
9911   if (__pyx_t_1) {
9912 
9913     /* "statsmodels/tsa/statespace/_representation.pyx":574
9914  *         # ### Get selected state covariance matrix
9915  *         if t == 0 or self.selected_state_cov.shape[2] > 1:
9916  *             selected_state_cov_t = t             # <<<<<<<<<<<<<<
9917  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
9918  *
9919  */
9920     __pyx_v_selected_state_cov_t = __pyx_v_t;
9921 
9922     /* "statsmodels/tsa/statespace/_representation.pyx":575
9923  *         if t == 0 or self.selected_state_cov.shape[2] > 1:
9924  *             selected_state_cov_t = t
9925  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]             # <<<<<<<<<<<<<<
9926  *
9927  *             sselect_cov(self.k_states, self.k_posdef,
9928  */
9929     if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 575, __pyx_L1_error)}
9930     __pyx_t_3 = 0;
9931     __pyx_t_4 = 0;
9932     __pyx_t_5 = __pyx_v_selected_state_cov_t;
9933     __pyx_v_self->_selected_state_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->selected_state_cov.data) + __pyx_t_3)) ) + __pyx_t_4 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_5 * __pyx_v_self->selected_state_cov.strides[2]) ))));
9934 
9935     /* "statsmodels/tsa/statespace/_representation.pyx":578
9936  *
9937  *             sselect_cov(self.k_states, self.k_posdef,
9938  *                                        &self.tmp[0,0],             # <<<<<<<<<<<<<<
9939  *                                        self._selection,
9940  *                                        self._state_cov,
9941  */
9942     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 578, __pyx_L1_error)}
9943     __pyx_t_5 = 0;
9944     __pyx_t_4 = 0;
9945 
9946     /* "statsmodels/tsa/statespace/_representation.pyx":577
9947  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
9948  *
9949  *             sselect_cov(self.k_states, self.k_posdef,             # <<<<<<<<<<<<<<
9950  *                                        &self.tmp[0,0],
9951  *                                        self._selection,
9952  */
9953     (void)(__pyx_f_11statsmodels_3tsa_10statespace_15_representation_sselect_cov(__pyx_v_self->k_states, __pyx_v_self->k_posdef, (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->tmp.data) + __pyx_t_5)) ) + __pyx_t_4 * __pyx_v_self->tmp.strides[1]) )))), __pyx_v_self->_selection, __pyx_v_self->_state_cov, __pyx_v_self->_selected_state_cov));
9954 
9955     /* "statsmodels/tsa/statespace/_representation.pyx":573
9956  *
9957  *         # ### Get selected state covariance matrix
9958  *         if t == 0 or self.selected_state_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
9959  *             selected_state_cov_t = t
9960  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
9961  */
9962     goto __pyx_L3;
9963   }
9964 
9965   /* "statsmodels/tsa/statespace/_representation.pyx":583
9966  *                                        self._selected_state_cov)
9967  *         else:
9968  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]             # <<<<<<<<<<<<<<
9969  *
9970  *     cdef int select_missing(self, unsigned int t):
9971  */
9972   /*else*/ {
9973     if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 583, __pyx_L1_error)}
9974     __pyx_t_4 = 0;
9975     __pyx_t_5 = 0;
9976     __pyx_t_3 = 0;
9977     __pyx_v_self->_selected_state_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->selected_state_cov.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_3 * __pyx_v_self->selected_state_cov.strides[2]) ))));
9978   }
9979   __pyx_L3:;
9980 
9981   /* "statsmodels/tsa/statespace/_representation.pyx":569
9982  *         self._k_statesposdef = k_states * k_posdef
9983  *
9984  *     cdef void select_state_cov(self, unsigned int t):             # <<<<<<<<<<<<<<
9985  *         cdef int selected_state_cov_t = 0
9986  *
9987  */
9988 
9989   /* function exit code */
9990   goto __pyx_L0;
9991   __pyx_L1_error:;
9992   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.sStatespace.select_state_cov", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
9993   __pyx_L0:;
9994   __Pyx_RefNannyFinishContext();
9995 }
9996 
9997 /* "statsmodels/tsa/statespace/_representation.pyx":585
9998  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]
9999  *
10000  *     cdef int select_missing(self, unsigned int t):             # <<<<<<<<<<<<<<
10001  *         # Note: this assumes that object pointers are already initialized
10002  *         # Note: this assumes that transform_... will be done *later*
10003  */
10004 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_t)10005 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
10006   int __pyx_v_k_endog;
10007   int __pyx_r;
10008   __Pyx_RefNannyDeclarations
10009   int __pyx_t_1;
10010   size_t __pyx_t_2;
10011   int __pyx_t_3;
10012   int __pyx_lineno = 0;
10013   const char *__pyx_filename = NULL;
10014   int __pyx_clineno = 0;
10015   __Pyx_RefNannySetupContext("select_missing", 0);
10016 
10017   /* "statsmodels/tsa/statespace/_representation.pyx":588
10018  *         # Note: this assumes that object pointers are already initialized
10019  *         # Note: this assumes that transform_... will be done *later*
10020  *         cdef int k_endog = self.k_endog             # <<<<<<<<<<<<<<
10021  *
10022  *         # Set the current iteration nmissing
10023  */
10024   __pyx_t_1 = __pyx_v_self->k_endog;
10025   __pyx_v_k_endog = __pyx_t_1;
10026 
10027   /* "statsmodels/tsa/statespace/_representation.pyx":591
10028  *
10029  *         # Set the current iteration nmissing
10030  *         self._nmissing = self.nmissing[t]             # <<<<<<<<<<<<<<
10031  *
10032  *         # ### Perform missing selections
10033  */
10034   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 591, __pyx_L1_error)}
10035   __pyx_t_2 = __pyx_v_t;
10036   __pyx_v_self->_nmissing = (*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_2 * __pyx_v_self->nmissing.strides[0]) )));
10037 
10038   /* "statsmodels/tsa/statespace/_representation.pyx":608
10039  *         # forecasting), we actually set do not change the dimension, but we set
10040  *         # the design matrix to the zeros array.
10041  *         if self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
10042  *             self._select_missing_entire_obs(t)
10043  *         elif self._nmissing > 0:
10044  */
10045   __pyx_t_3 = ((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0);
10046   if (__pyx_t_3) {
10047 
10048     /* "statsmodels/tsa/statespace/_representation.pyx":609
10049  *         # the design matrix to the zeros array.
10050  *         if self._nmissing == self.k_endog:
10051  *             self._select_missing_entire_obs(t)             # <<<<<<<<<<<<<<
10052  *         elif self._nmissing > 0:
10053  *             self._select_missing_partial_obs(t)
10054  */
10055     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->_select_missing_entire_obs(__pyx_v_self, __pyx_v_t);
10056 
10057     /* "statsmodels/tsa/statespace/_representation.pyx":608
10058  *         # forecasting), we actually set do not change the dimension, but we set
10059  *         # the design matrix to the zeros array.
10060  *         if self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
10061  *             self._select_missing_entire_obs(t)
10062  *         elif self._nmissing > 0:
10063  */
10064     goto __pyx_L3;
10065   }
10066 
10067   /* "statsmodels/tsa/statespace/_representation.pyx":610
10068  *         if self._nmissing == self.k_endog:
10069  *             self._select_missing_entire_obs(t)
10070  *         elif self._nmissing > 0:             # <<<<<<<<<<<<<<
10071  *             self._select_missing_partial_obs(t)
10072  *             k_endog = self.k_endog - self._nmissing
10073  */
10074   __pyx_t_3 = ((__pyx_v_self->_nmissing > 0) != 0);
10075   if (__pyx_t_3) {
10076 
10077     /* "statsmodels/tsa/statespace/_representation.pyx":611
10078  *             self._select_missing_entire_obs(t)
10079  *         elif self._nmissing > 0:
10080  *             self._select_missing_partial_obs(t)             # <<<<<<<<<<<<<<
10081  *             k_endog = self.k_endog - self._nmissing
10082  *
10083  */
10084     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->_select_missing_partial_obs(__pyx_v_self, __pyx_v_t);
10085 
10086     /* "statsmodels/tsa/statespace/_representation.pyx":612
10087  *         elif self._nmissing > 0:
10088  *             self._select_missing_partial_obs(t)
10089  *             k_endog = self.k_endog - self._nmissing             # <<<<<<<<<<<<<<
10090  *
10091  *         # Return the number of non-missing endogenous variables
10092  */
10093     __pyx_v_k_endog = (__pyx_v_self->k_endog - __pyx_v_self->_nmissing);
10094 
10095     /* "statsmodels/tsa/statespace/_representation.pyx":610
10096  *         if self._nmissing == self.k_endog:
10097  *             self._select_missing_entire_obs(t)
10098  *         elif self._nmissing > 0:             # <<<<<<<<<<<<<<
10099  *             self._select_missing_partial_obs(t)
10100  *             k_endog = self.k_endog - self._nmissing
10101  */
10102   }
10103   __pyx_L3:;
10104 
10105   /* "statsmodels/tsa/statespace/_representation.pyx":615
10106  *
10107  *         # Return the number of non-missing endogenous variables
10108  *         return k_endog             # <<<<<<<<<<<<<<
10109  *
10110  *     cdef void _select_missing_entire_obs(self, unsigned int t):
10111  */
10112   __pyx_r = __pyx_v_k_endog;
10113   goto __pyx_L0;
10114 
10115   /* "statsmodels/tsa/statespace/_representation.pyx":585
10116  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]
10117  *
10118  *     cdef int select_missing(self, unsigned int t):             # <<<<<<<<<<<<<<
10119  *         # Note: this assumes that object pointers are already initialized
10120  *         # Note: this assumes that transform_... will be done *later*
10121  */
10122 
10123   /* function exit code */
10124   __pyx_L1_error:;
10125   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.sStatespace.select_missing", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
10126   __pyx_r = 0;
10127   __pyx_L0:;
10128   __Pyx_RefNannyFinishContext();
10129   return __pyx_r;
10130 }
10131 
10132 /* "statsmodels/tsa/statespace/_representation.pyx":617
10133  *         return k_endog
10134  *
10135  *     cdef void _select_missing_entire_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
10136  *         cdef:
10137  *             int i, j
10138  */
10139 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,CYTHON_UNUSED unsigned int __pyx_v_t)10140 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_t) {
10141   int __pyx_v_i;
10142   int __pyx_v_j;
10143   __Pyx_RefNannyDeclarations
10144   int __pyx_t_1;
10145   int __pyx_t_2;
10146   int __pyx_t_3;
10147   int __pyx_t_4;
10148   int __pyx_t_5;
10149   int __pyx_t_6;
10150   Py_ssize_t __pyx_t_7;
10151   int __pyx_lineno = 0;
10152   const char *__pyx_filename = NULL;
10153   int __pyx_clineno = 0;
10154   __Pyx_RefNannySetupContext("_select_missing_entire_obs", 0);
10155 
10156   /* "statsmodels/tsa/statespace/_representation.pyx":622
10157  *
10158  *         # Design matrix is set to zeros
10159  *         for i in range(self.k_states):             # <<<<<<<<<<<<<<
10160  *             for j in range(self.k_endog):
10161  *                 self.selected_design[j + i*self.k_endog] = 0.0
10162  */
10163   __pyx_t_1 = __pyx_v_self->k_states;
10164   __pyx_t_2 = __pyx_t_1;
10165   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
10166     __pyx_v_i = __pyx_t_3;
10167 
10168     /* "statsmodels/tsa/statespace/_representation.pyx":623
10169  *         # Design matrix is set to zeros
10170  *         for i in range(self.k_states):
10171  *             for j in range(self.k_endog):             # <<<<<<<<<<<<<<
10172  *                 self.selected_design[j + i*self.k_endog] = 0.0
10173  *         self._design = &self.selected_design[0]
10174  */
10175     __pyx_t_4 = __pyx_v_self->k_endog;
10176     __pyx_t_5 = __pyx_t_4;
10177     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
10178       __pyx_v_j = __pyx_t_6;
10179 
10180       /* "statsmodels/tsa/statespace/_representation.pyx":624
10181  *         for i in range(self.k_states):
10182  *             for j in range(self.k_endog):
10183  *                 self.selected_design[j + i*self.k_endog] = 0.0             # <<<<<<<<<<<<<<
10184  *         self._design = &self.selected_design[0]
10185  *
10186  */
10187       if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 624, __pyx_L1_error)}
10188       __pyx_t_7 = (__pyx_v_j + (__pyx_v_i * __pyx_v_self->k_endog));
10189       *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_7 * __pyx_v_self->selected_design.strides[0]) )) = 0.0;
10190     }
10191   }
10192 
10193   /* "statsmodels/tsa/statespace/_representation.pyx":625
10194  *             for j in range(self.k_endog):
10195  *                 self.selected_design[j + i*self.k_endog] = 0.0
10196  *         self._design = &self.selected_design[0]             # <<<<<<<<<<<<<<
10197  *
10198  *     cdef void _select_missing_partial_obs(self, unsigned int t):
10199  */
10200   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 625, __pyx_L1_error)}
10201   __pyx_t_7 = 0;
10202   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_7 * __pyx_v_self->selected_design.strides[0]) ))));
10203 
10204   /* "statsmodels/tsa/statespace/_representation.pyx":617
10205  *         return k_endog
10206  *
10207  *     cdef void _select_missing_entire_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
10208  *         cdef:
10209  *             int i, j
10210  */
10211 
10212   /* function exit code */
10213   goto __pyx_L0;
10214   __pyx_L1_error:;
10215   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.sStatespace._select_missing_entire_obs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
10216   __pyx_L0:;
10217   __Pyx_RefNannyFinishContext();
10218 }
10219 
10220 /* "statsmodels/tsa/statespace/_representation.pyx":627
10221  *         self._design = &self.selected_design[0]
10222  *
10223  *     cdef void _select_missing_partial_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
10224  *         cdef:
10225  *             int i, j, k, l
10226  */
10227 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_t)10228 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
10229   int __pyx_v_i;
10230   int __pyx_v_j;
10231   int __pyx_v_k;
10232   int __pyx_v_l;
10233   CYTHON_UNUSED int __pyx_v_inc;
10234   CYTHON_UNUSED int __pyx_v_design_t;
10235   CYTHON_UNUSED int __pyx_v_obs_cov_t;
10236   int __pyx_v_k_endog;
10237   __Pyx_RefNannyDeclarations
10238   int __pyx_t_1;
10239   int __pyx_t_2;
10240   int __pyx_t_3;
10241   Py_ssize_t __pyx_t_4;
10242   size_t __pyx_t_5;
10243   int __pyx_t_6;
10244   int __pyx_t_7;
10245   int __pyx_t_8;
10246   int __pyx_t_9;
10247   int __pyx_lineno = 0;
10248   const char *__pyx_filename = NULL;
10249   int __pyx_clineno = 0;
10250   __Pyx_RefNannySetupContext("_select_missing_partial_obs", 0);
10251 
10252   /* "statsmodels/tsa/statespace/_representation.pyx":630
10253  *         cdef:
10254  *             int i, j, k, l
10255  *             int inc = 1             # <<<<<<<<<<<<<<
10256  *             int design_t = 0
10257  *             int obs_cov_t = 0
10258  */
10259   __pyx_v_inc = 1;
10260 
10261   /* "statsmodels/tsa/statespace/_representation.pyx":631
10262  *             int i, j, k, l
10263  *             int inc = 1
10264  *             int design_t = 0             # <<<<<<<<<<<<<<
10265  *             int obs_cov_t = 0
10266  *             int k_endog = self.k_endog - self._nmissing
10267  */
10268   __pyx_v_design_t = 0;
10269 
10270   /* "statsmodels/tsa/statespace/_representation.pyx":632
10271  *             int inc = 1
10272  *             int design_t = 0
10273  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
10274  *             int k_endog = self.k_endog - self._nmissing
10275  *
10276  */
10277   __pyx_v_obs_cov_t = 0;
10278 
10279   /* "statsmodels/tsa/statespace/_representation.pyx":633
10280  *             int design_t = 0
10281  *             int obs_cov_t = 0
10282  *             int k_endog = self.k_endog - self._nmissing             # <<<<<<<<<<<<<<
10283  *
10284  *         k = 0
10285  */
10286   __pyx_v_k_endog = (__pyx_v_self->k_endog - __pyx_v_self->_nmissing);
10287 
10288   /* "statsmodels/tsa/statespace/_representation.pyx":635
10289  *             int k_endog = self.k_endog - self._nmissing
10290  *
10291  *         k = 0             # <<<<<<<<<<<<<<
10292  *         for i in range(self.k_endog):
10293  *             if not self.missing[i, t]:
10294  */
10295   __pyx_v_k = 0;
10296 
10297   /* "statsmodels/tsa/statespace/_representation.pyx":636
10298  *
10299  *         k = 0
10300  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
10301  *             if not self.missing[i, t]:
10302  *
10303  */
10304   __pyx_t_1 = __pyx_v_self->k_endog;
10305   __pyx_t_2 = __pyx_t_1;
10306   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
10307     __pyx_v_i = __pyx_t_3;
10308 
10309     /* "statsmodels/tsa/statespace/_representation.pyx":637
10310  *         k = 0
10311  *         for i in range(self.k_endog):
10312  *             if not self.missing[i, t]:             # <<<<<<<<<<<<<<
10313  *
10314  *                 self.selected_obs[k] = self._obs[i]
10315  */
10316     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 637, __pyx_L1_error)}
10317     __pyx_t_4 = __pyx_v_i;
10318     __pyx_t_5 = __pyx_v_t;
10319     __pyx_t_6 = ((!((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->missing.strides[1]) ))) != 0)) != 0);
10320     if (__pyx_t_6) {
10321 
10322       /* "statsmodels/tsa/statespace/_representation.pyx":639
10323  *             if not self.missing[i, t]:
10324  *
10325  *                 self.selected_obs[k] = self._obs[i]             # <<<<<<<<<<<<<<
10326  *                 self.selected_obs_intercept[k] = self._obs_intercept[i]
10327  *
10328  */
10329       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 639, __pyx_L1_error)}
10330       __pyx_t_4 = __pyx_v_k;
10331       *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_4 * __pyx_v_self->selected_obs.strides[0]) )) = (__pyx_v_self->_obs[__pyx_v_i]);
10332 
10333       /* "statsmodels/tsa/statespace/_representation.pyx":640
10334  *
10335  *                 self.selected_obs[k] = self._obs[i]
10336  *                 self.selected_obs_intercept[k] = self._obs_intercept[i]             # <<<<<<<<<<<<<<
10337  *
10338  *                 # i is rows, k is rows
10339  */
10340       if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 640, __pyx_L1_error)}
10341       __pyx_t_4 = __pyx_v_k;
10342       *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs_intercept.data + __pyx_t_4 * __pyx_v_self->selected_obs_intercept.strides[0]) )) = (__pyx_v_self->_obs_intercept[__pyx_v_i]);
10343 
10344       /* "statsmodels/tsa/statespace/_representation.pyx":645
10345  *                 blas.scopy(&self.k_states,
10346  *                       &self._design[i], &self.k_endog,
10347  *                       &self.selected_design[k], &k_endog)             # <<<<<<<<<<<<<<
10348  *
10349  *                 # i, k is columns, j, l is rows
10350  */
10351       if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 645, __pyx_L1_error)}
10352       __pyx_t_4 = __pyx_v_k;
10353 
10354       /* "statsmodels/tsa/statespace/_representation.pyx":643
10355  *
10356  *                 # i is rows, k is rows
10357  *                 blas.scopy(&self.k_states,             # <<<<<<<<<<<<<<
10358  *                       &self._design[i], &self.k_endog,
10359  *                       &self.selected_design[k], &k_endog)
10360  */
10361       __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->k_states), (&(__pyx_v_self->_design[__pyx_v_i])), (&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_4 * __pyx_v_self->selected_design.strides[0]) )))), (&__pyx_v_k_endog));
10362 
10363       /* "statsmodels/tsa/statespace/_representation.pyx":648
10364  *
10365  *                 # i, k is columns, j, l is rows
10366  *                 l = 0             # <<<<<<<<<<<<<<
10367  *                 for j in range(self.k_endog):
10368  *                     if not self.missing[j, t]:
10369  */
10370       __pyx_v_l = 0;
10371 
10372       /* "statsmodels/tsa/statespace/_representation.pyx":649
10373  *                 # i, k is columns, j, l is rows
10374  *                 l = 0
10375  *                 for j in range(self.k_endog):             # <<<<<<<<<<<<<<
10376  *                     if not self.missing[j, t]:
10377  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
10378  */
10379       __pyx_t_7 = __pyx_v_self->k_endog;
10380       __pyx_t_8 = __pyx_t_7;
10381       for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
10382         __pyx_v_j = __pyx_t_9;
10383 
10384         /* "statsmodels/tsa/statespace/_representation.pyx":650
10385  *                 l = 0
10386  *                 for j in range(self.k_endog):
10387  *                     if not self.missing[j, t]:             # <<<<<<<<<<<<<<
10388  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
10389  *                         l += 1
10390  */
10391         if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 650, __pyx_L1_error)}
10392         __pyx_t_4 = __pyx_v_j;
10393         __pyx_t_5 = __pyx_v_t;
10394         __pyx_t_6 = ((!((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->missing.strides[1]) ))) != 0)) != 0);
10395         if (__pyx_t_6) {
10396 
10397           /* "statsmodels/tsa/statespace/_representation.pyx":651
10398  *                 for j in range(self.k_endog):
10399  *                     if not self.missing[j, t]:
10400  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]             # <<<<<<<<<<<<<<
10401  *                         l += 1
10402  *                 k += 1
10403  */
10404           if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 651, __pyx_L1_error)}
10405           __pyx_t_4 = (__pyx_v_l + (__pyx_v_k * __pyx_v_k_endog));
10406           *((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs_cov.data + __pyx_t_4 * __pyx_v_self->selected_obs_cov.strides[0]) )) = (__pyx_v_self->_obs_cov[(__pyx_v_j + (__pyx_v_i * __pyx_v_self->k_endog))]);
10407 
10408           /* "statsmodels/tsa/statespace/_representation.pyx":652
10409  *                     if not self.missing[j, t]:
10410  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
10411  *                         l += 1             # <<<<<<<<<<<<<<
10412  *                 k += 1
10413  *         self._obs = &self.selected_obs[0]
10414  */
10415           __pyx_v_l = (__pyx_v_l + 1);
10416 
10417           /* "statsmodels/tsa/statespace/_representation.pyx":650
10418  *                 l = 0
10419  *                 for j in range(self.k_endog):
10420  *                     if not self.missing[j, t]:             # <<<<<<<<<<<<<<
10421  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
10422  *                         l += 1
10423  */
10424         }
10425       }
10426 
10427       /* "statsmodels/tsa/statespace/_representation.pyx":653
10428  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
10429  *                         l += 1
10430  *                 k += 1             # <<<<<<<<<<<<<<
10431  *         self._obs = &self.selected_obs[0]
10432  *         self._obs_intercept = &self.selected_obs_intercept[0]
10433  */
10434       __pyx_v_k = (__pyx_v_k + 1);
10435 
10436       /* "statsmodels/tsa/statespace/_representation.pyx":637
10437  *         k = 0
10438  *         for i in range(self.k_endog):
10439  *             if not self.missing[i, t]:             # <<<<<<<<<<<<<<
10440  *
10441  *                 self.selected_obs[k] = self._obs[i]
10442  */
10443     }
10444   }
10445 
10446   /* "statsmodels/tsa/statespace/_representation.pyx":654
10447  *                         l += 1
10448  *                 k += 1
10449  *         self._obs = &self.selected_obs[0]             # <<<<<<<<<<<<<<
10450  *         self._obs_intercept = &self.selected_obs_intercept[0]
10451  *         self._design = &self.selected_design[0]
10452  */
10453   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 654, __pyx_L1_error)}
10454   __pyx_t_4 = 0;
10455   __pyx_v_self->_obs = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_4 * __pyx_v_self->selected_obs.strides[0]) ))));
10456 
10457   /* "statsmodels/tsa/statespace/_representation.pyx":655
10458  *                 k += 1
10459  *         self._obs = &self.selected_obs[0]
10460  *         self._obs_intercept = &self.selected_obs_intercept[0]             # <<<<<<<<<<<<<<
10461  *         self._design = &self.selected_design[0]
10462  *         self._obs_cov = &self.selected_obs_cov[0]
10463  */
10464   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 655, __pyx_L1_error)}
10465   __pyx_t_4 = 0;
10466   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs_intercept.data + __pyx_t_4 * __pyx_v_self->selected_obs_intercept.strides[0]) ))));
10467 
10468   /* "statsmodels/tsa/statespace/_representation.pyx":656
10469  *         self._obs = &self.selected_obs[0]
10470  *         self._obs_intercept = &self.selected_obs_intercept[0]
10471  *         self._design = &self.selected_design[0]             # <<<<<<<<<<<<<<
10472  *         self._obs_cov = &self.selected_obs_cov[0]
10473  *
10474  */
10475   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 656, __pyx_L1_error)}
10476   __pyx_t_4 = 0;
10477   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_4 * __pyx_v_self->selected_design.strides[0]) ))));
10478 
10479   /* "statsmodels/tsa/statespace/_representation.pyx":657
10480  *         self._obs_intercept = &self.selected_obs_intercept[0]
10481  *         self._design = &self.selected_design[0]
10482  *         self._obs_cov = &self.selected_obs_cov[0]             # <<<<<<<<<<<<<<
10483  *
10484  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:
10485  */
10486   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 657, __pyx_L1_error)}
10487   __pyx_t_4 = 0;
10488   __pyx_v_self->_obs_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs_cov.data + __pyx_t_4 * __pyx_v_self->selected_obs_cov.strides[0]) ))));
10489 
10490   /* "statsmodels/tsa/statespace/_representation.pyx":627
10491  *         self._design = &self.selected_design[0]
10492  *
10493  *     cdef void _select_missing_partial_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
10494  *         cdef:
10495  *             int i, j, k, l
10496  */
10497 
10498   /* function exit code */
10499   goto __pyx_L0;
10500   __pyx_L1_error:;
10501   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.sStatespace._select_missing_partial_obs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
10502   __pyx_L0:;
10503   __Pyx_RefNannyFinishContext();
10504 }
10505 
10506 /* "statsmodels/tsa/statespace/_representation.pyx":659
10507  *         self._obs_cov = &self.selected_obs_cov[0]
10508  *
10509  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
10510  *         # Reset the collapsed loglikelihood
10511  *         self.collapse_loglikelihood = 0
10512  */
10513 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform * __pyx_optional_args)10514 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform *__pyx_optional_args) {
10515   unsigned int __pyx_v_reset = ((unsigned int)0);
10516   int __pyx_v_k_endog;
10517   __Pyx_RefNannyDeclarations
10518   int __pyx_t_1;
10519   int __pyx_t_2;
10520   int __pyx_t_3;
10521   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse __pyx_t_4;
10522   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize __pyx_t_5;
10523   int __pyx_lineno = 0;
10524   const char *__pyx_filename = NULL;
10525   int __pyx_clineno = 0;
10526   __Pyx_RefNannySetupContext("transform", 0);
10527   if (__pyx_optional_args) {
10528     if (__pyx_optional_args->__pyx_n > 0) {
10529       __pyx_v_reset = __pyx_optional_args->reset;
10530     }
10531   }
10532 
10533   /* "statsmodels/tsa/statespace/_representation.pyx":661
10534  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:
10535  *         # Reset the collapsed loglikelihood
10536  *         self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
10537  *
10538  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:
10539  */
10540   __pyx_v_self->collapse_loglikelihood = 0.0;
10541 
10542   /* "statsmodels/tsa/statespace/_representation.pyx":663
10543  *         self.collapse_loglikelihood = 0
10544  *
10545  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:             # <<<<<<<<<<<<<<
10546  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
10547  *             # Reset dimensions
10548  */
10549   __pyx_t_2 = (__pyx_v_transform_generalized_collapse != 0);
10550   if (__pyx_t_2) {
10551   } else {
10552     __pyx_t_1 = __pyx_t_2;
10553     goto __pyx_L4_bool_binop_done;
10554   }
10555   __pyx_t_2 = ((!((__pyx_v_self->_k_endog <= __pyx_v_self->_k_states) != 0)) != 0);
10556   __pyx_t_1 = __pyx_t_2;
10557   __pyx_L4_bool_binop_done:;
10558   if (__pyx_t_1) {
10559 
10560     /* "statsmodels/tsa/statespace/_representation.pyx":664
10561  *
10562  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:
10563  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)             # <<<<<<<<<<<<<<
10564  *             # Reset dimensions
10565  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
10566  */
10567     __pyx_t_4.__pyx_n = 1;
10568     __pyx_t_4.reset = __pyx_v_reset;
10569     __pyx_t_3 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->transform_generalized_collapse(__pyx_v_self, __pyx_v_t, __pyx_v_previous_t, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 664, __pyx_L1_error)
10570     __pyx_v_k_endog = __pyx_t_3;
10571 
10572     /* "statsmodels/tsa/statespace/_representation.pyx":666
10573  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
10574  *             # Reset dimensions
10575  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)             # <<<<<<<<<<<<<<
10576  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):
10577  *             self.transform_diagonalize(t, previous_t, reset)
10578  */
10579     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_k_endog, __pyx_v_self->_k_states, __pyx_v_self->_k_posdef);
10580 
10581     /* "statsmodels/tsa/statespace/_representation.pyx":663
10582  *         self.collapse_loglikelihood = 0
10583  *
10584  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:             # <<<<<<<<<<<<<<
10585  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
10586  *             # Reset dimensions
10587  */
10588     goto __pyx_L3;
10589   }
10590 
10591   /* "statsmodels/tsa/statespace/_representation.pyx":667
10592  *             # Reset dimensions
10593  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
10594  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):             # <<<<<<<<<<<<<<
10595  *             self.transform_diagonalize(t, previous_t, reset)
10596  *
10597  */
10598   __pyx_t_2 = (__pyx_v_transform_diagonalize != 0);
10599   if (__pyx_t_2) {
10600   } else {
10601     __pyx_t_1 = __pyx_t_2;
10602     goto __pyx_L6_bool_binop_done;
10603   }
10604   __pyx_t_2 = ((!((__pyx_v_self->diagonal_obs_cov == 1) != 0)) != 0);
10605   __pyx_t_1 = __pyx_t_2;
10606   __pyx_L6_bool_binop_done:;
10607   if (__pyx_t_1) {
10608 
10609     /* "statsmodels/tsa/statespace/_representation.pyx":668
10610  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
10611  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):
10612  *             self.transform_diagonalize(t, previous_t, reset)             # <<<<<<<<<<<<<<
10613  *
10614  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:
10615  */
10616     __pyx_t_5.__pyx_n = 1;
10617     __pyx_t_5.reset = __pyx_v_reset;
10618     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self->__pyx_vtab)->transform_diagonalize(__pyx_v_self, __pyx_v_t, __pyx_v_previous_t, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 668, __pyx_L1_error)
10619 
10620     /* "statsmodels/tsa/statespace/_representation.pyx":667
10621  *             # Reset dimensions
10622  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
10623  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):             # <<<<<<<<<<<<<<
10624  *             self.transform_diagonalize(t, previous_t, reset)
10625  *
10626  */
10627   }
10628   __pyx_L3:;
10629 
10630   /* "statsmodels/tsa/statespace/_representation.pyx":659
10631  *         self._obs_cov = &self.selected_obs_cov[0]
10632  *
10633  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
10634  *         # Reset the collapsed loglikelihood
10635  *         self.collapse_loglikelihood = 0
10636  */
10637 
10638   /* function exit code */
10639   goto __pyx_L0;
10640   __pyx_L1_error:;
10641   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
10642   __pyx_L0:;
10643   __Pyx_RefNannyFinishContext();
10644 }
10645 
10646 /* "statsmodels/tsa/statespace/_representation.pyx":670
10647  *             self.transform_diagonalize(t, previous_t, reset)
10648  *
10649  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
10650  *         # Note: this assumes that initialize_object_pointers has *already* been done
10651  *         # Note: this assumes that select_missing has *already* been done
10652  */
10653 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize * __pyx_optional_args)10654 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize *__pyx_optional_args) {
10655   unsigned int __pyx_v_reset = ((unsigned int)0);
10656   int __pyx_v_i;
10657   int __pyx_v_j;
10658   int __pyx_v_inc;
10659   int __pyx_v_obs_cov_t;
10660   int __pyx_v_info;
10661   int __pyx_v_reset_missing;
10662   int __pyx_v_diagonal_obs_cov;
10663   __pyx_t_5numpy_float32_t *__pyx_v__transform_obs_cov;
10664   __pyx_t_5numpy_float32_t *__pyx_v__transform_cholesky;
10665   __Pyx_RefNannyDeclarations
10666   Py_ssize_t __pyx_t_1;
10667   Py_ssize_t __pyx_t_2;
10668   int __pyx_t_3;
10669   size_t __pyx_t_4;
10670   int __pyx_t_5;
10671   int __pyx_t_6;
10672   int __pyx_t_7;
10673   size_t __pyx_t_8;
10674   int __pyx_t_9;
10675   int __pyx_t_10;
10676   int __pyx_t_11;
10677   int __pyx_t_12;
10678   Py_ssize_t __pyx_t_13;
10679   PyObject *__pyx_t_14 = NULL;
10680   PyObject *__pyx_t_15 = NULL;
10681   PyObject *__pyx_t_16 = NULL;
10682   PyObject *__pyx_t_17 = NULL;
10683   int __pyx_lineno = 0;
10684   const char *__pyx_filename = NULL;
10685   int __pyx_clineno = 0;
10686   __Pyx_RefNannySetupContext("transform_diagonalize", 0);
10687   if (__pyx_optional_args) {
10688     if (__pyx_optional_args->__pyx_n > 0) {
10689       __pyx_v_reset = __pyx_optional_args->reset;
10690     }
10691   }
10692 
10693   /* "statsmodels/tsa/statespace/_representation.pyx":676
10694  *         # TODO need to also transform observation intercept
10695  *         cdef:
10696  *             int i, j, inc=1             # <<<<<<<<<<<<<<
10697  *             int obs_cov_t = 0
10698  *             int info
10699  */
10700   __pyx_v_inc = 1;
10701 
10702   /* "statsmodels/tsa/statespace/_representation.pyx":677
10703  *         cdef:
10704  *             int i, j, inc=1
10705  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
10706  *             int info
10707  *             int reset_missing
10708  */
10709   __pyx_v_obs_cov_t = 0;
10710 
10711   /* "statsmodels/tsa/statespace/_representation.pyx":681
10712  *             int reset_missing
10713  *             int diagonal_obs_cov
10714  *             np.float32_t * _transform_obs_cov = &self.transform_obs_cov[0, 0]             # <<<<<<<<<<<<<<
10715  *             np.float32_t * _transform_cholesky = &self.transform_cholesky[0, 0]
10716  *
10717  */
10718   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 681, __pyx_L1_error)}
10719   __pyx_t_1 = 0;
10720   __pyx_t_2 = 0;
10721   __pyx_v__transform_obs_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_obs_cov.data) + __pyx_t_1)) ) + __pyx_t_2 * __pyx_v_self->transform_obs_cov.strides[1]) ))));
10722 
10723   /* "statsmodels/tsa/statespace/_representation.pyx":682
10724  *             int diagonal_obs_cov
10725  *             np.float32_t * _transform_obs_cov = &self.transform_obs_cov[0, 0]
10726  *             np.float32_t * _transform_cholesky = &self.transform_cholesky[0, 0]             # <<<<<<<<<<<<<<
10727  *
10728  *         if self.obs_cov.shape[2] > 1:
10729  */
10730   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 682, __pyx_L1_error)}
10731   __pyx_t_2 = 0;
10732   __pyx_t_1 = 0;
10733   __pyx_v__transform_cholesky = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_2)) ) + __pyx_t_1 * __pyx_v_self->transform_cholesky.strides[1]) ))));
10734 
10735   /* "statsmodels/tsa/statespace/_representation.pyx":684
10736  *             np.float32_t * _transform_cholesky = &self.transform_cholesky[0, 0]
10737  *
10738  *         if self.obs_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
10739  *             obs_cov_t = t
10740  *
10741  */
10742   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 684, __pyx_L1_error)}
10743   __pyx_t_3 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
10744   if (__pyx_t_3) {
10745 
10746     /* "statsmodels/tsa/statespace/_representation.pyx":685
10747  *
10748  *         if self.obs_cov.shape[2] > 1:
10749  *             obs_cov_t = t             # <<<<<<<<<<<<<<
10750  *
10751  *         # Handle missing data
10752  */
10753     __pyx_v_obs_cov_t = __pyx_v_t;
10754 
10755     /* "statsmodels/tsa/statespace/_representation.pyx":684
10756  *             np.float32_t * _transform_cholesky = &self.transform_cholesky[0, 0]
10757  *
10758  *         if self.obs_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
10759  *             obs_cov_t = t
10760  *
10761  */
10762   }
10763 
10764   /* "statsmodels/tsa/statespace/_representation.pyx":688
10765  *
10766  *         # Handle missing data
10767  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
10768  *             return
10769  *         reset_missing = 0
10770  */
10771   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 688, __pyx_L1_error)}
10772   __pyx_t_4 = __pyx_v_t;
10773   __pyx_t_3 = (((*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_4 * __pyx_v_self->nmissing.strides[0]) ))) == __pyx_v_self->k_endog) != 0);
10774   if (__pyx_t_3) {
10775 
10776     /* "statsmodels/tsa/statespace/_representation.pyx":689
10777  *         # Handle missing data
10778  *         if self.nmissing[t] == self.k_endog:
10779  *             return             # <<<<<<<<<<<<<<
10780  *         reset_missing = 0
10781  *         for i in range(self.k_endog):
10782  */
10783     goto __pyx_L0;
10784 
10785     /* "statsmodels/tsa/statespace/_representation.pyx":688
10786  *
10787  *         # Handle missing data
10788  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
10789  *             return
10790  *         reset_missing = 0
10791  */
10792   }
10793 
10794   /* "statsmodels/tsa/statespace/_representation.pyx":690
10795  *         if self.nmissing[t] == self.k_endog:
10796  *             return
10797  *         reset_missing = 0             # <<<<<<<<<<<<<<
10798  *         for i in range(self.k_endog):
10799  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
10800  */
10801   __pyx_v_reset_missing = 0;
10802 
10803   /* "statsmodels/tsa/statespace/_representation.pyx":691
10804  *             return
10805  *         reset_missing = 0
10806  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
10807  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
10808  *
10809  */
10810   __pyx_t_5 = __pyx_v_self->k_endog;
10811   __pyx_t_6 = __pyx_t_5;
10812   for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
10813     __pyx_v_i = __pyx_t_7;
10814 
10815     /* "statsmodels/tsa/statespace/_representation.pyx":692
10816  *         reset_missing = 0
10817  *         for i in range(self.k_endog):
10818  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])             # <<<<<<<<<<<<<<
10819  *
10820  *         # If the flag for a diagonal covariancem matrix is not set globally in
10821  */
10822     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 692, __pyx_L1_error)}
10823     __pyx_t_1 = __pyx_v_i;
10824     __pyx_t_4 = __pyx_v_t;
10825     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 692, __pyx_L1_error)}
10826     __pyx_t_2 = __pyx_v_i;
10827     __pyx_t_8 = __pyx_v_previous_t;
10828     __pyx_v_reset_missing = (__pyx_v_reset_missing + (!(((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_1)) ) + __pyx_t_4 * __pyx_v_self->missing.strides[1]) ))) == (*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_2)) ) + __pyx_t_8 * __pyx_v_self->missing.strides[1]) )))) != 0)));
10829   }
10830 
10831   /* "statsmodels/tsa/statespace/_representation.pyx":696
10832  *         # If the flag for a diagonal covariancem matrix is not set globally in
10833  *         # the model one way or the other, then we need to check
10834  *         diagonal_obs_cov = self.diagonal_obs_cov             # <<<<<<<<<<<<<<
10835  *         if diagonal_obs_cov == -1:
10836  *             # We don't need to check for a diagonal covariance matrix each t,
10837  */
10838   __pyx_t_5 = __pyx_v_self->diagonal_obs_cov;
10839   __pyx_v_diagonal_obs_cov = __pyx_t_5;
10840 
10841   /* "statsmodels/tsa/statespace/_representation.pyx":697
10842  *         # the model one way or the other, then we need to check
10843  *         diagonal_obs_cov = self.diagonal_obs_cov
10844  *         if diagonal_obs_cov == -1:             # <<<<<<<<<<<<<<
10845  *             # We don't need to check for a diagonal covariance matrix each t,
10846  *             # except in the following cases:
10847  */
10848   __pyx_t_3 = ((__pyx_v_diagonal_obs_cov == -1L) != 0);
10849   if (__pyx_t_3) {
10850 
10851     /* "statsmodels/tsa/statespace/_representation.pyx":700
10852  *             # We don't need to check for a diagonal covariance matrix each t,
10853  *             # except in the following cases:
10854  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
10855  *                 diagonal_obs_cov = 1
10856  *                 for i in range(self.k_endog):
10857  */
10858     __pyx_t_9 = ((__pyx_v_self->_diagonal_obs_cov == -1L) != 0);
10859     if (!__pyx_t_9) {
10860     } else {
10861       __pyx_t_3 = __pyx_t_9;
10862       goto __pyx_L9_bool_binop_done;
10863     }
10864     __pyx_t_9 = ((__pyx_v_t == 0) != 0);
10865     if (!__pyx_t_9) {
10866     } else {
10867       __pyx_t_3 = __pyx_t_9;
10868       goto __pyx_L9_bool_binop_done;
10869     }
10870     if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 700, __pyx_L1_error)}
10871     __pyx_t_9 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
10872     if (!__pyx_t_9) {
10873     } else {
10874       __pyx_t_3 = __pyx_t_9;
10875       goto __pyx_L9_bool_binop_done;
10876     }
10877     __pyx_t_9 = (__pyx_v_reset_missing != 0);
10878     if (!__pyx_t_9) {
10879     } else {
10880       __pyx_t_3 = __pyx_t_9;
10881       goto __pyx_L9_bool_binop_done;
10882     }
10883     __pyx_t_9 = (__pyx_v_reset != 0);
10884     __pyx_t_3 = __pyx_t_9;
10885     __pyx_L9_bool_binop_done:;
10886     if (__pyx_t_3) {
10887 
10888       /* "statsmodels/tsa/statespace/_representation.pyx":701
10889  *             # except in the following cases:
10890  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
10891  *                 diagonal_obs_cov = 1             # <<<<<<<<<<<<<<
10892  *                 for i in range(self.k_endog):
10893  *                     for j in range(self.k_endog):
10894  */
10895       __pyx_v_diagonal_obs_cov = 1;
10896 
10897       /* "statsmodels/tsa/statespace/_representation.pyx":702
10898  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
10899  *                 diagonal_obs_cov = 1
10900  *                 for i in range(self.k_endog):             # <<<<<<<<<<<<<<
10901  *                     for j in range(self.k_endog):
10902  *                         if i == j:
10903  */
10904       __pyx_t_5 = __pyx_v_self->k_endog;
10905       __pyx_t_6 = __pyx_t_5;
10906       for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
10907         __pyx_v_i = __pyx_t_7;
10908 
10909         /* "statsmodels/tsa/statespace/_representation.pyx":703
10910  *                 diagonal_obs_cov = 1
10911  *                 for i in range(self.k_endog):
10912  *                     for j in range(self.k_endog):             # <<<<<<<<<<<<<<
10913  *                         if i == j:
10914  *                             continue
10915  */
10916         __pyx_t_10 = __pyx_v_self->k_endog;
10917         __pyx_t_11 = __pyx_t_10;
10918         for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
10919           __pyx_v_j = __pyx_t_12;
10920 
10921           /* "statsmodels/tsa/statespace/_representation.pyx":704
10922  *                 for i in range(self.k_endog):
10923  *                     for j in range(self.k_endog):
10924  *                         if i == j:             # <<<<<<<<<<<<<<
10925  *                             continue
10926  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
10927  */
10928           __pyx_t_3 = ((__pyx_v_i == __pyx_v_j) != 0);
10929           if (__pyx_t_3) {
10930 
10931             /* "statsmodels/tsa/statespace/_representation.pyx":705
10932  *                     for j in range(self.k_endog):
10933  *                         if i == j:
10934  *                             continue             # <<<<<<<<<<<<<<
10935  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
10936  *                             diagonal_obs_cov = 0
10937  */
10938             goto __pyx_L16_continue;
10939 
10940             /* "statsmodels/tsa/statespace/_representation.pyx":704
10941  *                 for i in range(self.k_endog):
10942  *                     for j in range(self.k_endog):
10943  *                         if i == j:             # <<<<<<<<<<<<<<
10944  *                             continue
10945  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
10946  */
10947           }
10948 
10949           /* "statsmodels/tsa/statespace/_representation.pyx":706
10950  *                         if i == j:
10951  *                             continue
10952  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):             # <<<<<<<<<<<<<<
10953  *                             diagonal_obs_cov = 0
10954  *                             break
10955  */
10956           if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 706, __pyx_L1_error)}
10957           __pyx_t_2 = __pyx_v_i;
10958           __pyx_t_1 = __pyx_v_j;
10959           __pyx_t_13 = __pyx_v_obs_cov_t;
10960           __pyx_t_3 = ((!((fabsf((*((__pyx_t_5numpy_float32_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->obs_cov.data) + __pyx_t_2)) ) + __pyx_t_1 * __pyx_v_self->obs_cov.strides[1]) ) + __pyx_t_13 * __pyx_v_self->obs_cov.strides[2]) )))) < 1e-9) != 0)) != 0);
10961           if (__pyx_t_3) {
10962 
10963             /* "statsmodels/tsa/statespace/_representation.pyx":707
10964  *                             continue
10965  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
10966  *                             diagonal_obs_cov = 0             # <<<<<<<<<<<<<<
10967  *                             break
10968  *             # Otherwise, we use whatever value was produced last period
10969  */
10970             __pyx_v_diagonal_obs_cov = 0;
10971 
10972             /* "statsmodels/tsa/statespace/_representation.pyx":708
10973  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
10974  *                             diagonal_obs_cov = 0
10975  *                             break             # <<<<<<<<<<<<<<
10976  *             # Otherwise, we use whatever value was produced last period
10977  *             else:
10978  */
10979             goto __pyx_L17_break;
10980 
10981             /* "statsmodels/tsa/statespace/_representation.pyx":706
10982  *                         if i == j:
10983  *                             continue
10984  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):             # <<<<<<<<<<<<<<
10985  *                             diagonal_obs_cov = 0
10986  *                             break
10987  */
10988           }
10989           __pyx_L16_continue:;
10990         }
10991         __pyx_L17_break:;
10992       }
10993 
10994       /* "statsmodels/tsa/statespace/_representation.pyx":700
10995  *             # We don't need to check for a diagonal covariance matrix each t,
10996  *             # except in the following cases:
10997  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
10998  *                 diagonal_obs_cov = 1
10999  *                 for i in range(self.k_endog):
11000  */
11001       goto __pyx_L8;
11002     }
11003 
11004     /* "statsmodels/tsa/statespace/_representation.pyx":711
11005  *             # Otherwise, we use whatever value was produced last period
11006  *             else:
11007  *                 diagonal_obs_cov = self._diagonal_obs_cov             # <<<<<<<<<<<<<<
11008  *         self._diagonal_obs_cov = diagonal_obs_cov
11009  *         if diagonal_obs_cov == 1:
11010  */
11011     /*else*/ {
11012       __pyx_t_5 = __pyx_v_self->_diagonal_obs_cov;
11013       __pyx_v_diagonal_obs_cov = __pyx_t_5;
11014     }
11015     __pyx_L8:;
11016 
11017     /* "statsmodels/tsa/statespace/_representation.pyx":697
11018  *         # the model one way or the other, then we need to check
11019  *         diagonal_obs_cov = self.diagonal_obs_cov
11020  *         if diagonal_obs_cov == -1:             # <<<<<<<<<<<<<<
11021  *             # We don't need to check for a diagonal covariance matrix each t,
11022  *             # except in the following cases:
11023  */
11024   }
11025 
11026   /* "statsmodels/tsa/statespace/_representation.pyx":712
11027  *             else:
11028  *                 diagonal_obs_cov = self._diagonal_obs_cov
11029  *         self._diagonal_obs_cov = diagonal_obs_cov             # <<<<<<<<<<<<<<
11030  *         if diagonal_obs_cov == 1:
11031  *             return
11032  */
11033   __pyx_v_self->_diagonal_obs_cov = __pyx_v_diagonal_obs_cov;
11034 
11035   /* "statsmodels/tsa/statespace/_representation.pyx":713
11036  *                 diagonal_obs_cov = self._diagonal_obs_cov
11037  *         self._diagonal_obs_cov = diagonal_obs_cov
11038  *         if diagonal_obs_cov == 1:             # <<<<<<<<<<<<<<
11039  *             return
11040  *
11041  */
11042   __pyx_t_3 = ((__pyx_v_diagonal_obs_cov == 1) != 0);
11043   if (__pyx_t_3) {
11044 
11045     /* "statsmodels/tsa/statespace/_representation.pyx":714
11046  *         self._diagonal_obs_cov = diagonal_obs_cov
11047  *         if diagonal_obs_cov == 1:
11048  *             return             # <<<<<<<<<<<<<<
11049  *
11050  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
11051  */
11052     goto __pyx_L0;
11053 
11054     /* "statsmodels/tsa/statespace/_representation.pyx":713
11055  *                 diagonal_obs_cov = self._diagonal_obs_cov
11056  *         self._diagonal_obs_cov = diagonal_obs_cov
11057  *         if diagonal_obs_cov == 1:             # <<<<<<<<<<<<<<
11058  *             return
11059  *
11060  */
11061   }
11062 
11063   /* "statsmodels/tsa/statespace/_representation.pyx":718
11064  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
11065  *         # decomposition of *self._obs_cov
11066  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
11067  *             # LDL decomposition
11068  *             blas.scopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
11069  */
11070   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
11071   if (!__pyx_t_9) {
11072   } else {
11073     __pyx_t_3 = __pyx_t_9;
11074     goto __pyx_L22_bool_binop_done;
11075   }
11076   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 718, __pyx_L1_error)}
11077   __pyx_t_9 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
11078   if (!__pyx_t_9) {
11079   } else {
11080     __pyx_t_3 = __pyx_t_9;
11081     goto __pyx_L22_bool_binop_done;
11082   }
11083   __pyx_t_9 = (__pyx_v_reset_missing != 0);
11084   if (!__pyx_t_9) {
11085   } else {
11086     __pyx_t_3 = __pyx_t_9;
11087     goto __pyx_L22_bool_binop_done;
11088   }
11089   __pyx_t_9 = (__pyx_v_reset != 0);
11090   __pyx_t_3 = __pyx_t_9;
11091   __pyx_L22_bool_binop_done:;
11092   if (__pyx_t_3) {
11093 
11094     /* "statsmodels/tsa/statespace/_representation.pyx":720
11095  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
11096  *             # LDL decomposition
11097  *             blas.scopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)             # <<<<<<<<<<<<<<
11098  *             info = tools._sldl(_transform_cholesky, self._k_endog)
11099  *
11100  */
11101     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->_k_endog2), __pyx_v_self->_obs_cov, (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_inc));
11102 
11103     /* "statsmodels/tsa/statespace/_representation.pyx":721
11104  *             # LDL decomposition
11105  *             blas.scopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
11106  *             info = tools._sldl(_transform_cholesky, self._k_endog)             # <<<<<<<<<<<<<<
11107  *
11108  *             # Check for errors
11109  */
11110     __pyx_t_5 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools__sldl(__pyx_v__transform_cholesky, __pyx_v_self->_k_endog); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L1_error)
11111     __pyx_v_info = __pyx_t_5;
11112 
11113     /* "statsmodels/tsa/statespace/_representation.pyx":724
11114  *
11115  *             # Check for errors
11116  *             if info > 0:             # <<<<<<<<<<<<<<
11117  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
11118  *             elif info < 0:
11119  */
11120     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
11121     if (__pyx_t_3) {
11122 
11123       /* "statsmodels/tsa/statespace/_representation.pyx":725
11124  *             # Check for errors
11125  *             if info > 0:
11126  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)             # <<<<<<<<<<<<<<
11127  *             elif info < 0:
11128  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
11129  */
11130       __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_warnings); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 725, __pyx_L1_error)
11131       __Pyx_GOTREF(__pyx_t_15);
11132       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_warn); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 725, __pyx_L1_error)
11133       __Pyx_GOTREF(__pyx_t_16);
11134       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11135       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 725, __pyx_L1_error)
11136       __Pyx_GOTREF(__pyx_t_15);
11137       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Positive_semi_definite_observati, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 725, __pyx_L1_error)
11138       __Pyx_GOTREF(__pyx_t_17);
11139       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11140       __pyx_t_15 = NULL;
11141       if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
11142         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
11143         if (likely(__pyx_t_15)) {
11144           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
11145           __Pyx_INCREF(__pyx_t_15);
11146           __Pyx_INCREF(function);
11147           __Pyx_DECREF_SET(__pyx_t_16, function);
11148         }
11149       }
11150       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
11151       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
11152       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11153       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 725, __pyx_L1_error)
11154       __Pyx_GOTREF(__pyx_t_14);
11155       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11156       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11157 
11158       /* "statsmodels/tsa/statespace/_representation.pyx":724
11159  *
11160  *             # Check for errors
11161  *             if info > 0:             # <<<<<<<<<<<<<<
11162  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
11163  *             elif info < 0:
11164  */
11165       goto __pyx_L26;
11166     }
11167 
11168     /* "statsmodels/tsa/statespace/_representation.pyx":726
11169  *             if info > 0:
11170  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
11171  *             elif info < 0:             # <<<<<<<<<<<<<<
11172  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
11173  *
11174  */
11175     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
11176     if (unlikely(__pyx_t_3)) {
11177 
11178       /* "statsmodels/tsa/statespace/_representation.pyx":727
11179  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
11180  *             elif info < 0:
11181  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
11182  *
11183  *             # Currently both L and D are stored in transform_cholesky
11184  */
11185       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 727, __pyx_L1_error)
11186       __Pyx_GOTREF(__pyx_t_16);
11187       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 727, __pyx_L1_error)
11188       __Pyx_GOTREF(__pyx_t_17);
11189       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11190       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 727, __pyx_L1_error)
11191       __Pyx_GOTREF(__pyx_t_16);
11192       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11193       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 727, __pyx_L1_error)
11194       __Pyx_GOTREF(__pyx_t_17);
11195       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_LDL_factorizati, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 727, __pyx_L1_error)
11196       __Pyx_GOTREF(__pyx_t_15);
11197       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11198       __pyx_t_17 = NULL;
11199       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
11200         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
11201         if (likely(__pyx_t_17)) {
11202           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
11203           __Pyx_INCREF(__pyx_t_17);
11204           __Pyx_INCREF(function);
11205           __Pyx_DECREF_SET(__pyx_t_16, function);
11206         }
11207       }
11208       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
11209       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
11210       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11211       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 727, __pyx_L1_error)
11212       __Pyx_GOTREF(__pyx_t_14);
11213       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11214       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
11215       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11216       __PYX_ERR(0, 727, __pyx_L1_error)
11217 
11218       /* "statsmodels/tsa/statespace/_representation.pyx":726
11219  *             if info > 0:
11220  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
11221  *             elif info < 0:             # <<<<<<<<<<<<<<
11222  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
11223  *
11224  */
11225     }
11226     __pyx_L26:;
11227 
11228     /* "statsmodels/tsa/statespace/_representation.pyx":730
11229  *
11230  *             # Currently both L and D are stored in transform_cholesky
11231  *             for i in range(self._k_endog): # i is rows             # <<<<<<<<<<<<<<
11232  *                 for j in range(self._k_endog): # j is columns
11233  *                     # Diagonal elements come from the diagonal
11234  */
11235     __pyx_t_5 = __pyx_v_self->_k_endog;
11236     __pyx_t_6 = __pyx_t_5;
11237     for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
11238       __pyx_v_i = __pyx_t_7;
11239 
11240       /* "statsmodels/tsa/statespace/_representation.pyx":731
11241  *             # Currently both L and D are stored in transform_cholesky
11242  *             for i in range(self._k_endog): # i is rows
11243  *                 for j in range(self._k_endog): # j is columns             # <<<<<<<<<<<<<<
11244  *                     # Diagonal elements come from the diagonal
11245  *                     if i == j:
11246  */
11247       __pyx_t_10 = __pyx_v_self->_k_endog;
11248       __pyx_t_11 = __pyx_t_10;
11249       for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
11250         __pyx_v_j = __pyx_t_12;
11251 
11252         /* "statsmodels/tsa/statespace/_representation.pyx":733
11253  *                 for j in range(self._k_endog): # j is columns
11254  *                     # Diagonal elements come from the diagonal
11255  *                     if i == j:             # <<<<<<<<<<<<<<
11256  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]
11257  *                     # Other elements are zero
11258  */
11259         __pyx_t_3 = ((__pyx_v_i == __pyx_v_j) != 0);
11260         if (__pyx_t_3) {
11261 
11262           /* "statsmodels/tsa/statespace/_representation.pyx":734
11263  *                     # Diagonal elements come from the diagonal
11264  *                     if i == j:
11265  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]             # <<<<<<<<<<<<<<
11266  *                     # Other elements are zero
11267  *                     else:
11268  */
11269           (__pyx_v__transform_obs_cov[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]) = (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]);
11270 
11271           /* "statsmodels/tsa/statespace/_representation.pyx":733
11272  *                 for j in range(self._k_endog): # j is columns
11273  *                     # Diagonal elements come from the diagonal
11274  *                     if i == j:             # <<<<<<<<<<<<<<
11275  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]
11276  *                     # Other elements are zero
11277  */
11278           goto __pyx_L31;
11279         }
11280 
11281         /* "statsmodels/tsa/statespace/_representation.pyx":737
11282  *                     # Other elements are zero
11283  *                     else:
11284  *                         _transform_obs_cov[i + j * self._k_endog] = 0             # <<<<<<<<<<<<<<
11285  *
11286  *                     # Zero out the upper triangle of the cholesky
11287  */
11288         /*else*/ {
11289           (__pyx_v__transform_obs_cov[(__pyx_v_i + (__pyx_v_j * __pyx_v_self->_k_endog))]) = 0.0;
11290         }
11291         __pyx_L31:;
11292 
11293         /* "statsmodels/tsa/statespace/_representation.pyx":740
11294  *
11295  *                     # Zero out the upper triangle of the cholesky
11296  *                     if j > i:             # <<<<<<<<<<<<<<
11297  *                         _transform_cholesky[i + j * self._k_endog] = 0
11298  *
11299  */
11300         __pyx_t_3 = ((__pyx_v_j > __pyx_v_i) != 0);
11301         if (__pyx_t_3) {
11302 
11303           /* "statsmodels/tsa/statespace/_representation.pyx":741
11304  *                     # Zero out the upper triangle of the cholesky
11305  *                     if j > i:
11306  *                         _transform_cholesky[i + j * self._k_endog] = 0             # <<<<<<<<<<<<<<
11307  *
11308  *                 # Convert from L to C simply by setting the diagonal elements to ones
11309  */
11310           (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_j * __pyx_v_self->_k_endog))]) = 0.0;
11311 
11312           /* "statsmodels/tsa/statespace/_representation.pyx":740
11313  *
11314  *                     # Zero out the upper triangle of the cholesky
11315  *                     if j > i:             # <<<<<<<<<<<<<<
11316  *                         _transform_cholesky[i + j * self._k_endog] = 0
11317  *
11318  */
11319         }
11320       }
11321 
11322       /* "statsmodels/tsa/statespace/_representation.pyx":744
11323  *
11324  *                 # Convert from L to C simply by setting the diagonal elements to ones
11325  *                 _transform_cholesky[i + i * self._k_endog] = 1             # <<<<<<<<<<<<<<
11326  *
11327  *         # Solve for y_t^*
11328  */
11329       (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]) = 1.0;
11330     }
11331 
11332     /* "statsmodels/tsa/statespace/_representation.pyx":718
11333  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
11334  *         # decomposition of *self._obs_cov
11335  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
11336  *             # LDL decomposition
11337  *             blas.scopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
11338  */
11339   }
11340 
11341   /* "statsmodels/tsa/statespace/_representation.pyx":749
11342  *         # (unless this is a completely missing observation)
11343  *         # TODO: note that this can cause problems if this function is run twice
11344  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
11345  *             # If we have some missing elements, selected_obs is already populated
11346  *             if self._nmissing == 0:
11347  */
11348   __pyx_t_3 = ((!((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0)) != 0);
11349   if (__pyx_t_3) {
11350 
11351     /* "statsmodels/tsa/statespace/_representation.pyx":751
11352  *         if not self._nmissing == self.k_endog:
11353  *             # If we have some missing elements, selected_obs is already populated
11354  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
11355  *                 blas.scopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
11356  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,
11357  */
11358     __pyx_t_3 = ((__pyx_v_self->_nmissing == 0) != 0);
11359     if (__pyx_t_3) {
11360 
11361       /* "statsmodels/tsa/statespace/_representation.pyx":752
11362  *             # If we have some missing elements, selected_obs is already populated
11363  *             if self._nmissing == 0:
11364  *                 blas.scopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
11365  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,
11366  *                         _transform_cholesky, &self.k_endog,
11367  */
11368       if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 752, __pyx_L1_error)}
11369       __pyx_t_13 = 0;
11370       __pyx_t_8 = __pyx_v_t;
11371       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 752, __pyx_L1_error)}
11372       __pyx_t_1 = 0;
11373       __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->obs.data) + __pyx_t_13)) ) + __pyx_t_8 * __pyx_v_self->obs.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
11374 
11375       /* "statsmodels/tsa/statespace/_representation.pyx":751
11376  *         if not self._nmissing == self.k_endog:
11377  *             # If we have some missing elements, selected_obs is already populated
11378  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
11379  *                 blas.scopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
11380  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,
11381  */
11382     }
11383 
11384     /* "statsmodels/tsa/statespace/_representation.pyx":755
11385  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,
11386  *                         _transform_cholesky, &self.k_endog,
11387  *                         &self.selected_obs[0], &self._k_endog, &info)             # <<<<<<<<<<<<<<
11388  *
11389  *             # Check for errors
11390  */
11391     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 755, __pyx_L1_error)}
11392     __pyx_t_1 = 0;
11393 
11394     /* "statsmodels/tsa/statespace/_representation.pyx":753
11395  *             if self._nmissing == 0:
11396  *                 blas.scopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
11397  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
11398  *                         _transform_cholesky, &self.k_endog,
11399  *                         &self.selected_obs[0], &self._k_endog, &info)
11400  */
11401     __pyx_f_5scipy_6linalg_13cython_lapack_strtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
11402 
11403     /* "statsmodels/tsa/statespace/_representation.pyx":758
11404  *
11405  *             # Check for errors
11406  *             if info > 0:             # <<<<<<<<<<<<<<
11407  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11408  *             elif info < 0:
11409  */
11410     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
11411     if (unlikely(__pyx_t_3)) {
11412 
11413       /* "statsmodels/tsa/statespace/_representation.pyx":759
11414  *             # Check for errors
11415  *             if info > 0:
11416  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
11417  *             elif info < 0:
11418  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
11419  */
11420       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 759, __pyx_L1_error)
11421       __Pyx_GOTREF(__pyx_t_16);
11422       __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 759, __pyx_L1_error)
11423       __Pyx_GOTREF(__pyx_t_15);
11424       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11425       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 759, __pyx_L1_error)
11426       __Pyx_GOTREF(__pyx_t_16);
11427       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11428       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 759, __pyx_L1_error)
11429       __Pyx_GOTREF(__pyx_t_15);
11430       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Singular_factorization_of_observ, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 759, __pyx_L1_error)
11431       __Pyx_GOTREF(__pyx_t_17);
11432       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11433       __pyx_t_15 = NULL;
11434       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
11435         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
11436         if (likely(__pyx_t_15)) {
11437           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
11438           __Pyx_INCREF(__pyx_t_15);
11439           __Pyx_INCREF(function);
11440           __Pyx_DECREF_SET(__pyx_t_16, function);
11441         }
11442       }
11443       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
11444       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
11445       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11446       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 759, __pyx_L1_error)
11447       __Pyx_GOTREF(__pyx_t_14);
11448       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11449       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
11450       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11451       __PYX_ERR(0, 759, __pyx_L1_error)
11452 
11453       /* "statsmodels/tsa/statespace/_representation.pyx":758
11454  *
11455  *             # Check for errors
11456  *             if info > 0:             # <<<<<<<<<<<<<<
11457  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11458  *             elif info < 0:
11459  */
11460     }
11461 
11462     /* "statsmodels/tsa/statespace/_representation.pyx":760
11463  *             if info > 0:
11464  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11465  *             elif info < 0:             # <<<<<<<<<<<<<<
11466  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
11467  *
11468  */
11469     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
11470     if (unlikely(__pyx_t_3)) {
11471 
11472       /* "statsmodels/tsa/statespace/_representation.pyx":761
11473  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11474  *             elif info < 0:
11475  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
11476  *
11477  *             # Setup the pointer
11478  */
11479       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 761, __pyx_L1_error)
11480       __Pyx_GOTREF(__pyx_t_16);
11481       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 761, __pyx_L1_error)
11482       __Pyx_GOTREF(__pyx_t_17);
11483       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11484       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 761, __pyx_L1_error)
11485       __Pyx_GOTREF(__pyx_t_16);
11486       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11487       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 761, __pyx_L1_error)
11488       __Pyx_GOTREF(__pyx_t_17);
11489       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 761, __pyx_L1_error)
11490       __Pyx_GOTREF(__pyx_t_15);
11491       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11492       __pyx_t_17 = NULL;
11493       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
11494         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
11495         if (likely(__pyx_t_17)) {
11496           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
11497           __Pyx_INCREF(__pyx_t_17);
11498           __Pyx_INCREF(function);
11499           __Pyx_DECREF_SET(__pyx_t_16, function);
11500         }
11501       }
11502       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
11503       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
11504       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11505       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 761, __pyx_L1_error)
11506       __Pyx_GOTREF(__pyx_t_14);
11507       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11508       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
11509       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11510       __PYX_ERR(0, 761, __pyx_L1_error)
11511 
11512       /* "statsmodels/tsa/statespace/_representation.pyx":760
11513  *             if info > 0:
11514  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11515  *             elif info < 0:             # <<<<<<<<<<<<<<
11516  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
11517  *
11518  */
11519     }
11520 
11521     /* "statsmodels/tsa/statespace/_representation.pyx":764
11522  *
11523  *             # Setup the pointer
11524  *             self._obs = &self.selected_obs[0]             # <<<<<<<<<<<<<<
11525  *
11526  *         # Solve for d_t^*, if necessary
11527  */
11528     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 764, __pyx_L1_error)}
11529     __pyx_t_1 = 0;
11530     __pyx_v_self->_obs = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) ))));
11531 
11532     /* "statsmodels/tsa/statespace/_representation.pyx":749
11533  *         # (unless this is a completely missing observation)
11534  *         # TODO: note that this can cause problems if this function is run twice
11535  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
11536  *             # If we have some missing elements, selected_obs is already populated
11537  *             if self._nmissing == 0:
11538  */
11539   }
11540 
11541   /* "statsmodels/tsa/statespace/_representation.pyx":767
11542  *
11543  *         # Solve for d_t^*, if necessary
11544  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
11545  *             blas.scopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
11546  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,
11547  */
11548   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
11549   if (!__pyx_t_9) {
11550   } else {
11551     __pyx_t_3 = __pyx_t_9;
11552     goto __pyx_L37_bool_binop_done;
11553   }
11554   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 767, __pyx_L1_error)}
11555   __pyx_t_9 = (((__pyx_v_self->obs_intercept.shape[1]) > 1) != 0);
11556   if (!__pyx_t_9) {
11557   } else {
11558     __pyx_t_3 = __pyx_t_9;
11559     goto __pyx_L37_bool_binop_done;
11560   }
11561   __pyx_t_9 = (__pyx_v_reset_missing != 0);
11562   if (!__pyx_t_9) {
11563   } else {
11564     __pyx_t_3 = __pyx_t_9;
11565     goto __pyx_L37_bool_binop_done;
11566   }
11567   __pyx_t_9 = (__pyx_v_reset != 0);
11568   __pyx_t_3 = __pyx_t_9;
11569   __pyx_L37_bool_binop_done:;
11570   if (__pyx_t_3) {
11571 
11572     /* "statsmodels/tsa/statespace/_representation.pyx":768
11573  *         # Solve for d_t^*, if necessary
11574  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:
11575  *             blas.scopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)             # <<<<<<<<<<<<<<
11576  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,
11577  *                         _transform_cholesky, &self.k_endog,
11578  */
11579     if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 768, __pyx_L1_error)}
11580     __pyx_t_1 = 0;
11581     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->_k_endog), __pyx_v_self->_obs_intercept, (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) )))), (&__pyx_v_inc));
11582 
11583     /* "statsmodels/tsa/statespace/_representation.pyx":771
11584  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,
11585  *                         _transform_cholesky, &self.k_endog,
11586  *                         &self.transform_obs_intercept[0], &self._k_endog,             # <<<<<<<<<<<<<<
11587  *                         &info)
11588  *
11589  */
11590     if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 771, __pyx_L1_error)}
11591     __pyx_t_1 = 0;
11592 
11593     /* "statsmodels/tsa/statespace/_representation.pyx":769
11594  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:
11595  *             blas.scopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
11596  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
11597  *                         _transform_cholesky, &self.k_endog,
11598  *                         &self.transform_obs_intercept[0], &self._k_endog,
11599  */
11600     __pyx_f_5scipy_6linalg_13cython_lapack_strtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
11601 
11602     /* "statsmodels/tsa/statespace/_representation.pyx":767
11603  *
11604  *         # Solve for d_t^*, if necessary
11605  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
11606  *             blas.scopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
11607  *             lapack.strtrs("L", "N", "U", &self._k_endog, &inc,
11608  */
11609   }
11610 
11611   /* "statsmodels/tsa/statespace/_representation.pyx":775
11612  *
11613  *         # Solve for Z_t^*, if necessary
11614  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
11615  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
11616  *             lapack.strtrs("L", "N", "U", &self._k_endog, &self._k_states,
11617  */
11618   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
11619   if (!__pyx_t_9) {
11620   } else {
11621     __pyx_t_3 = __pyx_t_9;
11622     goto __pyx_L42_bool_binop_done;
11623   }
11624   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 775, __pyx_L1_error)}
11625   __pyx_t_9 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
11626   if (!__pyx_t_9) {
11627   } else {
11628     __pyx_t_3 = __pyx_t_9;
11629     goto __pyx_L42_bool_binop_done;
11630   }
11631   __pyx_t_9 = (__pyx_v_reset_missing != 0);
11632   if (!__pyx_t_9) {
11633   } else {
11634     __pyx_t_3 = __pyx_t_9;
11635     goto __pyx_L42_bool_binop_done;
11636   }
11637   __pyx_t_9 = (__pyx_v_reset != 0);
11638   __pyx_t_3 = __pyx_t_9;
11639   __pyx_L42_bool_binop_done:;
11640   if (__pyx_t_3) {
11641 
11642     /* "statsmodels/tsa/statespace/_representation.pyx":776
11643  *         # Solve for Z_t^*, if necessary
11644  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:
11645  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)             # <<<<<<<<<<<<<<
11646  *             lapack.strtrs("L", "N", "U", &self._k_endog, &self._k_states,
11647  *                         _transform_cholesky, &self.k_endog,
11648  */
11649     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 776, __pyx_L1_error)}
11650     __pyx_t_1 = 0;
11651     __pyx_t_13 = 0;
11652     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->_k_endogstates), __pyx_v_self->_design, (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_design.data) + __pyx_t_1)) ) + __pyx_t_13 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_inc));
11653 
11654     /* "statsmodels/tsa/statespace/_representation.pyx":779
11655  *             lapack.strtrs("L", "N", "U", &self._k_endog, &self._k_states,
11656  *                         _transform_cholesky, &self.k_endog,
11657  *                         &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
11658  *                         &info)
11659  *
11660  */
11661     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 779, __pyx_L1_error)}
11662     __pyx_t_13 = 0;
11663     __pyx_t_1 = 0;
11664 
11665     /* "statsmodels/tsa/statespace/_representation.pyx":777
11666  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:
11667  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
11668  *             lapack.strtrs("L", "N", "U", &self._k_endog, &self._k_states,             # <<<<<<<<<<<<<<
11669  *                         _transform_cholesky, &self.k_endog,
11670  *                         &self.transform_design[0,0], &self._k_endog,
11671  */
11672     __pyx_f_5scipy_6linalg_13cython_lapack_strtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_self->_k_states), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_design.data) + __pyx_t_13)) ) + __pyx_t_1 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
11673 
11674     /* "statsmodels/tsa/statespace/_representation.pyx":783
11675  *
11676  *             # Check for errors
11677  *             if info > 0:             # <<<<<<<<<<<<<<
11678  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11679  *             elif info < 0:
11680  */
11681     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
11682     if (unlikely(__pyx_t_3)) {
11683 
11684       /* "statsmodels/tsa/statespace/_representation.pyx":784
11685  *             # Check for errors
11686  *             if info > 0:
11687  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
11688  *             elif info < 0:
11689  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
11690  */
11691       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 784, __pyx_L1_error)
11692       __Pyx_GOTREF(__pyx_t_16);
11693       __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 784, __pyx_L1_error)
11694       __Pyx_GOTREF(__pyx_t_15);
11695       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11696       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 784, __pyx_L1_error)
11697       __Pyx_GOTREF(__pyx_t_16);
11698       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11699       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 784, __pyx_L1_error)
11700       __Pyx_GOTREF(__pyx_t_15);
11701       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Singular_factorization_of_observ, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 784, __pyx_L1_error)
11702       __Pyx_GOTREF(__pyx_t_17);
11703       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11704       __pyx_t_15 = NULL;
11705       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
11706         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
11707         if (likely(__pyx_t_15)) {
11708           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
11709           __Pyx_INCREF(__pyx_t_15);
11710           __Pyx_INCREF(function);
11711           __Pyx_DECREF_SET(__pyx_t_16, function);
11712         }
11713       }
11714       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
11715       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
11716       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11717       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 784, __pyx_L1_error)
11718       __Pyx_GOTREF(__pyx_t_14);
11719       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11720       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
11721       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11722       __PYX_ERR(0, 784, __pyx_L1_error)
11723 
11724       /* "statsmodels/tsa/statespace/_representation.pyx":783
11725  *
11726  *             # Check for errors
11727  *             if info > 0:             # <<<<<<<<<<<<<<
11728  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11729  *             elif info < 0:
11730  */
11731     }
11732 
11733     /* "statsmodels/tsa/statespace/_representation.pyx":785
11734  *             if info > 0:
11735  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11736  *             elif info < 0:             # <<<<<<<<<<<<<<
11737  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
11738  *
11739  */
11740     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
11741     if (unlikely(__pyx_t_3)) {
11742 
11743       /* "statsmodels/tsa/statespace/_representation.pyx":786
11744  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11745  *             elif info < 0:
11746  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
11747  *
11748  *         # Setup final pointers
11749  */
11750       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 786, __pyx_L1_error)
11751       __Pyx_GOTREF(__pyx_t_16);
11752       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 786, __pyx_L1_error)
11753       __Pyx_GOTREF(__pyx_t_17);
11754       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11755       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 786, __pyx_L1_error)
11756       __Pyx_GOTREF(__pyx_t_16);
11757       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11758       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 786, __pyx_L1_error)
11759       __Pyx_GOTREF(__pyx_t_17);
11760       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 786, __pyx_L1_error)
11761       __Pyx_GOTREF(__pyx_t_15);
11762       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
11763       __pyx_t_17 = NULL;
11764       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
11765         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
11766         if (likely(__pyx_t_17)) {
11767           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
11768           __Pyx_INCREF(__pyx_t_17);
11769           __Pyx_INCREF(function);
11770           __Pyx_DECREF_SET(__pyx_t_16, function);
11771         }
11772       }
11773       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
11774       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
11775       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
11776       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 786, __pyx_L1_error)
11777       __Pyx_GOTREF(__pyx_t_14);
11778       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
11779       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
11780       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
11781       __PYX_ERR(0, 786, __pyx_L1_error)
11782 
11783       /* "statsmodels/tsa/statespace/_representation.pyx":785
11784  *             if info > 0:
11785  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
11786  *             elif info < 0:             # <<<<<<<<<<<<<<
11787  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
11788  *
11789  */
11790     }
11791 
11792     /* "statsmodels/tsa/statespace/_representation.pyx":775
11793  *
11794  *         # Solve for Z_t^*, if necessary
11795  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
11796  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
11797  *             lapack.strtrs("L", "N", "U", &self._k_endog, &self._k_states,
11798  */
11799   }
11800 
11801   /* "statsmodels/tsa/statespace/_representation.pyx":789
11802  *
11803  *         # Setup final pointers
11804  *         self._design = &self.transform_design[0,0]             # <<<<<<<<<<<<<<
11805  *         self._obs_cov = &self.transform_obs_cov[0,0]
11806  *         self._obs_intercept = &self.transform_obs_intercept[0]
11807  */
11808   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 789, __pyx_L1_error)}
11809   __pyx_t_1 = 0;
11810   __pyx_t_13 = 0;
11811   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_design.data) + __pyx_t_1)) ) + __pyx_t_13 * __pyx_v_self->transform_design.strides[1]) ))));
11812 
11813   /* "statsmodels/tsa/statespace/_representation.pyx":790
11814  *         # Setup final pointers
11815  *         self._design = &self.transform_design[0,0]
11816  *         self._obs_cov = &self.transform_obs_cov[0,0]             # <<<<<<<<<<<<<<
11817  *         self._obs_intercept = &self.transform_obs_intercept[0]
11818  *
11819  */
11820   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 790, __pyx_L1_error)}
11821   __pyx_t_13 = 0;
11822   __pyx_t_1 = 0;
11823   __pyx_v_self->_obs_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_obs_cov.data) + __pyx_t_13)) ) + __pyx_t_1 * __pyx_v_self->transform_obs_cov.strides[1]) ))));
11824 
11825   /* "statsmodels/tsa/statespace/_representation.pyx":791
11826  *         self._design = &self.transform_design[0,0]
11827  *         self._obs_cov = &self.transform_obs_cov[0,0]
11828  *         self._obs_intercept = &self.transform_obs_intercept[0]             # <<<<<<<<<<<<<<
11829  *
11830  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:
11831  */
11832   if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 791, __pyx_L1_error)}
11833   __pyx_t_1 = 0;
11834   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) ))));
11835 
11836   /* "statsmodels/tsa/statespace/_representation.pyx":670
11837  *             self.transform_diagonalize(t, previous_t, reset)
11838  *
11839  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
11840  *         # Note: this assumes that initialize_object_pointers has *already* been done
11841  *         # Note: this assumes that select_missing has *already* been done
11842  */
11843 
11844   /* function exit code */
11845   goto __pyx_L0;
11846   __pyx_L1_error:;
11847   __Pyx_XDECREF(__pyx_t_14);
11848   __Pyx_XDECREF(__pyx_t_15);
11849   __Pyx_XDECREF(__pyx_t_16);
11850   __Pyx_XDECREF(__pyx_t_17);
11851   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transform_diagonalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
11852   __pyx_L0:;
11853   __Pyx_RefNannyFinishContext();
11854 }
11855 
11856 /* "statsmodels/tsa/statespace/_representation.pyx":793
11857  *         self._obs_intercept = &self.transform_obs_intercept[0]
11858  *
11859  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:             # <<<<<<<<<<<<<<
11860  *         # Note: this assumes that initialize_object_pointers has *already* been done
11861  *         # Note: this assumes that select_missing has *already* been done
11862  */
11863 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse * __pyx_optional_args)11864 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse *__pyx_optional_args) {
11865   unsigned int __pyx_v_reset = ((unsigned int)1);
11866   int __pyx_v_i;
11867   int __pyx_v_j;
11868   int __pyx_v_k;
11869   int __pyx_v_l;
11870   int __pyx_v_inc;
11871   int __pyx_v_info;
11872   int __pyx_v_reset_missing;
11873   __pyx_t_5numpy_float32_t __pyx_v_alpha;
11874   __pyx_t_5numpy_float32_t __pyx_v_beta;
11875   __pyx_t_5numpy_float32_t __pyx_v_gamma;
11876   int __pyx_v_k_states;
11877   CYTHON_UNUSED int __pyx_v_k_states2;
11878   CYTHON_UNUSED int __pyx_v_k_endogstates;
11879   int __pyx_r;
11880   __Pyx_RefNannyDeclarations
11881   int __pyx_t_1;
11882   int __pyx_t_2;
11883   PyObject *__pyx_t_3 = NULL;
11884   size_t __pyx_t_4;
11885   int __pyx_t_5;
11886   int __pyx_t_6;
11887   Py_ssize_t __pyx_t_7;
11888   Py_ssize_t __pyx_t_8;
11889   size_t __pyx_t_9;
11890   PyObject *__pyx_t_10 = NULL;
11891   PyObject *__pyx_t_11 = NULL;
11892   PyObject *__pyx_t_12 = NULL;
11893   int __pyx_t_13;
11894   int __pyx_t_14;
11895   Py_ssize_t __pyx_t_15;
11896   Py_ssize_t __pyx_t_16;
11897   int __pyx_lineno = 0;
11898   const char *__pyx_filename = NULL;
11899   int __pyx_clineno = 0;
11900   __Pyx_RefNannySetupContext("transform_generalized_collapse", 0);
11901   if (__pyx_optional_args) {
11902     if (__pyx_optional_args->__pyx_n > 0) {
11903       __pyx_v_reset = __pyx_optional_args->reset;
11904     }
11905   }
11906 
11907   /* "statsmodels/tsa/statespace/_representation.pyx":798
11908  *         # TODO need unit tests, especially for the missing case
11909  *         cdef:
11910  *             int i, j, k, l, inc=1             # <<<<<<<<<<<<<<
11911  *             int obs_cov_t, design_t
11912  *             int info
11913  */
11914   __pyx_v_inc = 1;
11915 
11916   /* "statsmodels/tsa/statespace/_representation.pyx":802
11917  *             int info
11918  *             int reset_missing
11919  *             np.float32_t alpha = 1.0             # <<<<<<<<<<<<<<
11920  *             np.float32_t beta = 0.0
11921  *             np.float32_t gamma = -1.0
11922  */
11923   __pyx_v_alpha = 1.0;
11924 
11925   /* "statsmodels/tsa/statespace/_representation.pyx":803
11926  *             int reset_missing
11927  *             np.float32_t alpha = 1.0
11928  *             np.float32_t beta = 0.0             # <<<<<<<<<<<<<<
11929  *             np.float32_t gamma = -1.0
11930  *             int k_states = self._k_states
11931  */
11932   __pyx_v_beta = 0.0;
11933 
11934   /* "statsmodels/tsa/statespace/_representation.pyx":804
11935  *             np.float32_t alpha = 1.0
11936  *             np.float32_t beta = 0.0
11937  *             np.float32_t gamma = -1.0             # <<<<<<<<<<<<<<
11938  *             int k_states = self._k_states
11939  *             int k_states2 = self._k_states2
11940  */
11941   __pyx_v_gamma = -1.0;
11942 
11943   /* "statsmodels/tsa/statespace/_representation.pyx":805
11944  *             np.float32_t beta = 0.0
11945  *             np.float32_t gamma = -1.0
11946  *             int k_states = self._k_states             # <<<<<<<<<<<<<<
11947  *             int k_states2 = self._k_states2
11948  *             int k_endogstates = self._k_endogstates
11949  */
11950   __pyx_t_1 = __pyx_v_self->_k_states;
11951   __pyx_v_k_states = __pyx_t_1;
11952 
11953   /* "statsmodels/tsa/statespace/_representation.pyx":806
11954  *             np.float32_t gamma = -1.0
11955  *             int k_states = self._k_states
11956  *             int k_states2 = self._k_states2             # <<<<<<<<<<<<<<
11957  *             int k_endogstates = self._k_endogstates
11958  *
11959  */
11960   __pyx_t_1 = __pyx_v_self->_k_states2;
11961   __pyx_v_k_states2 = __pyx_t_1;
11962 
11963   /* "statsmodels/tsa/statespace/_representation.pyx":807
11964  *             int k_states = self._k_states
11965  *             int k_states2 = self._k_states2
11966  *             int k_endogstates = self._k_endogstates             # <<<<<<<<<<<<<<
11967  *
11968  *         # $y_t^* = \bar A^* y_t = C_t Z_t' H_t^{-1} y_t$
11969  */
11970   __pyx_t_1 = __pyx_v_self->_k_endogstates;
11971   __pyx_v_k_endogstates = __pyx_t_1;
11972 
11973   /* "statsmodels/tsa/statespace/_representation.pyx":814
11974  *
11975  *         # Make sure we have enough observations to perform collapse
11976  *         if self.k_endog < self.k_states:             # <<<<<<<<<<<<<<
11977  *             raise RuntimeError('Cannot collapse observation vector it the'
11978  *                                ' state dimension is larger than the dimension'
11979  */
11980   __pyx_t_2 = ((__pyx_v_self->k_endog < __pyx_v_self->k_states) != 0);
11981   if (unlikely(__pyx_t_2)) {
11982 
11983     /* "statsmodels/tsa/statespace/_representation.pyx":815
11984  *         # Make sure we have enough observations to perform collapse
11985  *         if self.k_endog < self.k_states:
11986  *             raise RuntimeError('Cannot collapse observation vector it the'             # <<<<<<<<<<<<<<
11987  *                                ' state dimension is larger than the dimension'
11988  *                                ' of the observation vector.')
11989  */
11990     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 815, __pyx_L1_error)
11991     __Pyx_GOTREF(__pyx_t_3);
11992     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
11993     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11994     __PYX_ERR(0, 815, __pyx_L1_error)
11995 
11996     /* "statsmodels/tsa/statespace/_representation.pyx":814
11997  *
11998  *         # Make sure we have enough observations to perform collapse
11999  *         if self.k_endog < self.k_states:             # <<<<<<<<<<<<<<
12000  *             raise RuntimeError('Cannot collapse observation vector it the'
12001  *                                ' state dimension is larger than the dimension'
12002  */
12003   }
12004 
12005   /* "statsmodels/tsa/statespace/_representation.pyx":821
12006  *         # Adjust for a VAR transition (i.e. design = [#, 0], where the zeros
12007  *         # correspond to all states except the first k_posdef states)
12008  *         if self.subset_design:             # <<<<<<<<<<<<<<
12009  *             k_states = self._k_posdef
12010  *             k_states2 = self._k_posdef2
12011  */
12012   __pyx_t_2 = (__pyx_v_self->subset_design != 0);
12013   if (__pyx_t_2) {
12014 
12015     /* "statsmodels/tsa/statespace/_representation.pyx":822
12016  *         # correspond to all states except the first k_posdef states)
12017  *         if self.subset_design:
12018  *             k_states = self._k_posdef             # <<<<<<<<<<<<<<
12019  *             k_states2 = self._k_posdef2
12020  *             k_endogstates = self._k_endog * self._k_posdef
12021  */
12022     __pyx_t_1 = __pyx_v_self->_k_posdef;
12023     __pyx_v_k_states = __pyx_t_1;
12024 
12025     /* "statsmodels/tsa/statespace/_representation.pyx":823
12026  *         if self.subset_design:
12027  *             k_states = self._k_posdef
12028  *             k_states2 = self._k_posdef2             # <<<<<<<<<<<<<<
12029  *             k_endogstates = self._k_endog * self._k_posdef
12030  *
12031  */
12032     __pyx_t_1 = __pyx_v_self->_k_posdef2;
12033     __pyx_v_k_states2 = __pyx_t_1;
12034 
12035     /* "statsmodels/tsa/statespace/_representation.pyx":824
12036  *             k_states = self._k_posdef
12037  *             k_states2 = self._k_posdef2
12038  *             k_endogstates = self._k_endog * self._k_posdef             # <<<<<<<<<<<<<<
12039  *
12040  *         # Handle missing data
12041  */
12042     __pyx_v_k_endogstates = (__pyx_v_self->_k_endog * __pyx_v_self->_k_posdef);
12043 
12044     /* "statsmodels/tsa/statespace/_representation.pyx":821
12045  *         # Adjust for a VAR transition (i.e. design = [#, 0], where the zeros
12046  *         # correspond to all states except the first k_posdef states)
12047  *         if self.subset_design:             # <<<<<<<<<<<<<<
12048  *             k_states = self._k_posdef
12049  *             k_states2 = self._k_posdef2
12050  */
12051   }
12052 
12053   /* "statsmodels/tsa/statespace/_representation.pyx":827
12054  *
12055  *         # Handle missing data
12056  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
12057  *             return self.k_states
12058  *         reset_missing = 0
12059  */
12060   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 827, __pyx_L1_error)}
12061   __pyx_t_4 = __pyx_v_t;
12062   __pyx_t_2 = (((*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_4 * __pyx_v_self->nmissing.strides[0]) ))) == __pyx_v_self->k_endog) != 0);
12063   if (__pyx_t_2) {
12064 
12065     /* "statsmodels/tsa/statespace/_representation.pyx":828
12066  *         # Handle missing data
12067  *         if self.nmissing[t] == self.k_endog:
12068  *             return self.k_states             # <<<<<<<<<<<<<<
12069  *         reset_missing = 0
12070  *         for i in range(self.k_endog):
12071  */
12072     __pyx_r = __pyx_v_self->k_states;
12073     goto __pyx_L0;
12074 
12075     /* "statsmodels/tsa/statespace/_representation.pyx":827
12076  *
12077  *         # Handle missing data
12078  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
12079  *             return self.k_states
12080  *         reset_missing = 0
12081  */
12082   }
12083 
12084   /* "statsmodels/tsa/statespace/_representation.pyx":829
12085  *         if self.nmissing[t] == self.k_endog:
12086  *             return self.k_states
12087  *         reset_missing = 0             # <<<<<<<<<<<<<<
12088  *         for i in range(self.k_endog):
12089  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
12090  */
12091   __pyx_v_reset_missing = 0;
12092 
12093   /* "statsmodels/tsa/statespace/_representation.pyx":830
12094  *             return self.k_states
12095  *         reset_missing = 0
12096  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
12097  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
12098  *
12099  */
12100   __pyx_t_1 = __pyx_v_self->k_endog;
12101   __pyx_t_5 = __pyx_t_1;
12102   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
12103     __pyx_v_i = __pyx_t_6;
12104 
12105     /* "statsmodels/tsa/statespace/_representation.pyx":831
12106  *         reset_missing = 0
12107  *         for i in range(self.k_endog):
12108  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])             # <<<<<<<<<<<<<<
12109  *
12110  *         # Initialize the transformation
12111  */
12112     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 831, __pyx_L1_error)}
12113     __pyx_t_7 = __pyx_v_i;
12114     __pyx_t_4 = __pyx_v_t;
12115     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 831, __pyx_L1_error)}
12116     __pyx_t_8 = __pyx_v_i;
12117     __pyx_t_9 = __pyx_v_previous_t;
12118     __pyx_v_reset_missing = (__pyx_v_reset_missing + (!(((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_7)) ) + __pyx_t_4 * __pyx_v_self->missing.strides[1]) ))) == (*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_8)) ) + __pyx_t_9 * __pyx_v_self->missing.strides[1]) )))) != 0)));
12119   }
12120 
12121   /* "statsmodels/tsa/statespace/_representation.pyx":834
12122  *
12123  *         # Initialize the transformation
12124  *         if self.collapse_obs_cov[0,0] == 0:             # <<<<<<<<<<<<<<
12125  *             # Set H_t^* to identity
12126  *             for i in range(k_states):
12127  */
12128   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 834, __pyx_L1_error)}
12129   __pyx_t_8 = 0;
12130   __pyx_t_7 = 0;
12131   __pyx_t_2 = (((*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_obs_cov.strides[1]) ))) == 0.0) != 0);
12132   if (__pyx_t_2) {
12133 
12134     /* "statsmodels/tsa/statespace/_representation.pyx":836
12135  *         if self.collapse_obs_cov[0,0] == 0:
12136  *             # Set H_t^* to identity
12137  *             for i in range(k_states):             # <<<<<<<<<<<<<<
12138  *                 self.collapse_obs_cov[i,i] = 1
12139  *
12140  */
12141     __pyx_t_1 = __pyx_v_k_states;
12142     __pyx_t_5 = __pyx_t_1;
12143     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
12144       __pyx_v_i = __pyx_t_6;
12145 
12146       /* "statsmodels/tsa/statespace/_representation.pyx":837
12147  *             # Set H_t^* to identity
12148  *             for i in range(k_states):
12149  *                 self.collapse_obs_cov[i,i] = 1             # <<<<<<<<<<<<<<
12150  *
12151  *             # Make sure we do not have an observation intercept
12152  */
12153       if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 837, __pyx_L1_error)}
12154       __pyx_t_7 = __pyx_v_i;
12155       __pyx_t_8 = __pyx_v_i;
12156       *((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_obs_cov.strides[1]) )) = 1.0;
12157     }
12158 
12159     /* "statsmodels/tsa/statespace/_representation.pyx":840
12160  *
12161  *             # Make sure we do not have an observation intercept
12162  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:             # <<<<<<<<<<<<<<
12163  *                 raise RuntimeError('The observation collapse transformation'
12164  *                                    ' does not currently support an observation'
12165  */
12166     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 840, __pyx_L1_error)
12167     __Pyx_GOTREF(__pyx_t_10);
12168     __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 840, __pyx_L1_error)
12169     __Pyx_GOTREF(__pyx_t_11);
12170     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12171     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 840, __pyx_L1_error)}
12172     __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 840, __pyx_L1_error)
12173     __Pyx_GOTREF(__pyx_t_10);
12174     __pyx_t_12 = NULL;
12175     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
12176       __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
12177       if (likely(__pyx_t_12)) {
12178         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
12179         __Pyx_INCREF(__pyx_t_12);
12180         __Pyx_INCREF(function);
12181         __Pyx_DECREF_SET(__pyx_t_11, function);
12182       }
12183     }
12184     __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10);
12185     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
12186     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12187     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 840, __pyx_L1_error)
12188     __Pyx_GOTREF(__pyx_t_3);
12189     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12190     __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 840, __pyx_L1_error)
12191     __Pyx_GOTREF(__pyx_t_11);
12192     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12193     __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 840, __pyx_L1_error)
12194     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12195     __pyx_t_14 = ((!__pyx_t_13) != 0);
12196     if (!__pyx_t_14) {
12197     } else {
12198       __pyx_t_2 = __pyx_t_14;
12199       goto __pyx_L12_bool_binop_done;
12200     }
12201     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 840, __pyx_L1_error)}
12202     __pyx_t_14 = (((__pyx_v_self->obs_intercept.shape[2]) > 1) != 0);
12203     __pyx_t_2 = __pyx_t_14;
12204     __pyx_L12_bool_binop_done:;
12205     if (unlikely(__pyx_t_2)) {
12206 
12207       /* "statsmodels/tsa/statespace/_representation.pyx":841
12208  *             # Make sure we do not have an observation intercept
12209  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:
12210  *                 raise RuntimeError('The observation collapse transformation'             # <<<<<<<<<<<<<<
12211  *                                    ' does not currently support an observation'
12212  *                                    ' intercept.')
12213  */
12214       __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 841, __pyx_L1_error)
12215       __Pyx_GOTREF(__pyx_t_11);
12216       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12217       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12218       __PYX_ERR(0, 841, __pyx_L1_error)
12219 
12220       /* "statsmodels/tsa/statespace/_representation.pyx":840
12221  *
12222  *             # Make sure we do not have an observation intercept
12223  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:             # <<<<<<<<<<<<<<
12224  *                 raise RuntimeError('The observation collapse transformation'
12225  *                                    ' does not currently support an observation'
12226  */
12227     }
12228 
12229     /* "statsmodels/tsa/statespace/_representation.pyx":834
12230  *
12231  *         # Initialize the transformation
12232  *         if self.collapse_obs_cov[0,0] == 0:             # <<<<<<<<<<<<<<
12233  *             # Set H_t^* to identity
12234  *             for i in range(k_states):
12235  */
12236   }
12237 
12238   /* "statsmodels/tsa/statespace/_representation.pyx":846
12239  *
12240  *         # Perform the Cholesky decomposition of H_t, if necessary
12241  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
12242  *             # Cholesky decomposition: $H = L L'$
12243  *             blas.scopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
12244  */
12245   __pyx_t_14 = ((__pyx_v_t == 0) != 0);
12246   if (!__pyx_t_14) {
12247   } else {
12248     __pyx_t_2 = __pyx_t_14;
12249     goto __pyx_L15_bool_binop_done;
12250   }
12251   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 846, __pyx_L1_error)}
12252   __pyx_t_14 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
12253   if (!__pyx_t_14) {
12254   } else {
12255     __pyx_t_2 = __pyx_t_14;
12256     goto __pyx_L15_bool_binop_done;
12257   }
12258   __pyx_t_14 = (__pyx_v_reset_missing != 0);
12259   if (!__pyx_t_14) {
12260   } else {
12261     __pyx_t_2 = __pyx_t_14;
12262     goto __pyx_L15_bool_binop_done;
12263   }
12264   __pyx_t_14 = (__pyx_v_reset != 0);
12265   __pyx_t_2 = __pyx_t_14;
12266   __pyx_L15_bool_binop_done:;
12267   if (__pyx_t_2) {
12268 
12269     /* "statsmodels/tsa/statespace/_representation.pyx":848
12270  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
12271  *             # Cholesky decomposition: $H = L L'$
12272  *             blas.scopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)             # <<<<<<<<<<<<<<
12273  *             lapack.spotrf("L", &self._k_endog, &self.transform_cholesky[0,0], &self._k_endog, &info)
12274  *
12275  */
12276     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 848, __pyx_L1_error)}
12277     __pyx_t_8 = 0;
12278     __pyx_t_7 = 0;
12279     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->_k_endog2), __pyx_v_self->_obs_cov, (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_inc));
12280 
12281     /* "statsmodels/tsa/statespace/_representation.pyx":849
12282  *             # Cholesky decomposition: $H = L L'$
12283  *             blas.scopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
12284  *             lapack.spotrf("L", &self._k_endog, &self.transform_cholesky[0,0], &self._k_endog, &info)             # <<<<<<<<<<<<<<
12285  *
12286  *             # Check for errors
12287  */
12288     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 849, __pyx_L1_error)}
12289     __pyx_t_7 = 0;
12290     __pyx_t_8 = 0;
12291     __pyx_f_5scipy_6linalg_13cython_lapack_spotrf(((char *)"L"), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
12292 
12293     /* "statsmodels/tsa/statespace/_representation.pyx":852
12294  *
12295  *             # Check for errors
12296  *             if info > 0:             # <<<<<<<<<<<<<<
12297  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
12298  *             elif info < 0:
12299  */
12300     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
12301     if (unlikely(__pyx_t_2)) {
12302 
12303       /* "statsmodels/tsa/statespace/_representation.pyx":853
12304  *             # Check for errors
12305  *             if info > 0:
12306  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
12307  *             elif info < 0:
12308  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
12309  */
12310       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error)
12311       __Pyx_GOTREF(__pyx_t_3);
12312       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 853, __pyx_L1_error)
12313       __Pyx_GOTREF(__pyx_t_10);
12314       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12315       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error)
12316       __Pyx_GOTREF(__pyx_t_3);
12317       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12318       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 853, __pyx_L1_error)
12319       __Pyx_GOTREF(__pyx_t_10);
12320       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_observatio, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 853, __pyx_L1_error)
12321       __Pyx_GOTREF(__pyx_t_12);
12322       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12323       __pyx_t_10 = NULL;
12324       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12325         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
12326         if (likely(__pyx_t_10)) {
12327           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12328           __Pyx_INCREF(__pyx_t_10);
12329           __Pyx_INCREF(function);
12330           __Pyx_DECREF_SET(__pyx_t_3, function);
12331         }
12332       }
12333       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
12334       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12335       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12336       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 853, __pyx_L1_error)
12337       __Pyx_GOTREF(__pyx_t_11);
12338       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12339       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12340       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12341       __PYX_ERR(0, 853, __pyx_L1_error)
12342 
12343       /* "statsmodels/tsa/statespace/_representation.pyx":852
12344  *
12345  *             # Check for errors
12346  *             if info > 0:             # <<<<<<<<<<<<<<
12347  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
12348  *             elif info < 0:
12349  */
12350     }
12351 
12352     /* "statsmodels/tsa/statespace/_representation.pyx":854
12353  *             if info > 0:
12354  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
12355  *             elif info < 0:             # <<<<<<<<<<<<<<
12356  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
12357  *
12358  */
12359     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
12360     if (unlikely(__pyx_t_2)) {
12361 
12362       /* "statsmodels/tsa/statespace/_representation.pyx":855
12363  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
12364  *             elif info < 0:
12365  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
12366  *
12367  *             # Calculate the determinant (just the squared product of the
12368  */
12369       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
12370       __Pyx_GOTREF(__pyx_t_3);
12371       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 855, __pyx_L1_error)
12372       __Pyx_GOTREF(__pyx_t_12);
12373       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12374       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
12375       __Pyx_GOTREF(__pyx_t_3);
12376       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12377       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 855, __pyx_L1_error)
12378       __Pyx_GOTREF(__pyx_t_12);
12379       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_observation_cov, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 855, __pyx_L1_error)
12380       __Pyx_GOTREF(__pyx_t_10);
12381       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12382       __pyx_t_12 = NULL;
12383       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12384         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
12385         if (likely(__pyx_t_12)) {
12386           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12387           __Pyx_INCREF(__pyx_t_12);
12388           __Pyx_INCREF(function);
12389           __Pyx_DECREF_SET(__pyx_t_3, function);
12390         }
12391       }
12392       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
12393       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
12394       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12395       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 855, __pyx_L1_error)
12396       __Pyx_GOTREF(__pyx_t_11);
12397       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12398       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12399       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12400       __PYX_ERR(0, 855, __pyx_L1_error)
12401 
12402       /* "statsmodels/tsa/statespace/_representation.pyx":854
12403  *             if info > 0:
12404  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
12405  *             elif info < 0:             # <<<<<<<<<<<<<<
12406  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
12407  *
12408  */
12409     }
12410 
12411     /* "statsmodels/tsa/statespace/_representation.pyx":859
12412  *             # Calculate the determinant (just the squared product of the
12413  *             # diagonals, in the Cholesky decomposition case)
12414  *             self.transform_determinant = 0.             # <<<<<<<<<<<<<<
12415  *             for i in range(self._k_endog):
12416  *                 j = i * (self._k_endog + 1)
12417  */
12418     __pyx_v_self->transform_determinant = 0.;
12419 
12420     /* "statsmodels/tsa/statespace/_representation.pyx":860
12421  *             # diagonals, in the Cholesky decomposition case)
12422  *             self.transform_determinant = 0.
12423  *             for i in range(self._k_endog):             # <<<<<<<<<<<<<<
12424  *                 j = i * (self._k_endog + 1)
12425  *                 k = j % self.k_endog
12426  */
12427     __pyx_t_1 = __pyx_v_self->_k_endog;
12428     __pyx_t_5 = __pyx_t_1;
12429     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
12430       __pyx_v_i = __pyx_t_6;
12431 
12432       /* "statsmodels/tsa/statespace/_representation.pyx":861
12433  *             self.transform_determinant = 0.
12434  *             for i in range(self._k_endog):
12435  *                 j = i * (self._k_endog + 1)             # <<<<<<<<<<<<<<
12436  *                 k = j % self.k_endog
12437  *                 l = j // self.k_endog
12438  */
12439       __pyx_v_j = (__pyx_v_i * (__pyx_v_self->_k_endog + 1));
12440 
12441       /* "statsmodels/tsa/statespace/_representation.pyx":862
12442  *             for i in range(self._k_endog):
12443  *                 j = i * (self._k_endog + 1)
12444  *                 k = j % self.k_endog             # <<<<<<<<<<<<<<
12445  *                 l = j // self.k_endog
12446  *                 if not self.transform_cholesky[k, l] == 0:
12447  */
12448       if (unlikely(__pyx_v_self->k_endog == 0)) {
12449         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
12450         __PYX_ERR(0, 862, __pyx_L1_error)
12451       }
12452       __pyx_v_k = __Pyx_mod_int(__pyx_v_j, __pyx_v_self->k_endog);
12453 
12454       /* "statsmodels/tsa/statespace/_representation.pyx":863
12455  *                 j = i * (self._k_endog + 1)
12456  *                 k = j % self.k_endog
12457  *                 l = j // self.k_endog             # <<<<<<<<<<<<<<
12458  *                 if not self.transform_cholesky[k, l] == 0:
12459  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])
12460  */
12461       if (unlikely(__pyx_v_self->k_endog == 0)) {
12462         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
12463         __PYX_ERR(0, 863, __pyx_L1_error)
12464       }
12465       else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_self->k_endog == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_j))) {
12466         PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
12467         __PYX_ERR(0, 863, __pyx_L1_error)
12468       }
12469       __pyx_v_l = __Pyx_div_int(__pyx_v_j, __pyx_v_self->k_endog);
12470 
12471       /* "statsmodels/tsa/statespace/_representation.pyx":864
12472  *                 k = j % self.k_endog
12473  *                 l = j // self.k_endog
12474  *                 if not self.transform_cholesky[k, l] == 0:             # <<<<<<<<<<<<<<
12475  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])
12476  *             self.transform_determinant = 2 * self.transform_determinant
12477  */
12478       if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 864, __pyx_L1_error)}
12479       __pyx_t_8 = __pyx_v_k;
12480       __pyx_t_7 = __pyx_v_l;
12481       __pyx_t_2 = ((!(((*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_cholesky.strides[1]) ))) == 0.0) != 0)) != 0);
12482       if (__pyx_t_2) {
12483 
12484         /* "statsmodels/tsa/statespace/_representation.pyx":865
12485  *                 l = j // self.k_endog
12486  *                 if not self.transform_cholesky[k, l] == 0:
12487  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])             # <<<<<<<<<<<<<<
12488  *             self.transform_determinant = 2 * self.transform_determinant
12489  *
12490  */
12491         if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 865, __pyx_L1_error)}
12492         __pyx_t_7 = __pyx_v_k;
12493         __pyx_t_8 = __pyx_v_l;
12494         __pyx_v_self->transform_determinant = (__pyx_v_self->transform_determinant + log((*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))));
12495 
12496         /* "statsmodels/tsa/statespace/_representation.pyx":864
12497  *                 k = j % self.k_endog
12498  *                 l = j // self.k_endog
12499  *                 if not self.transform_cholesky[k, l] == 0:             # <<<<<<<<<<<<<<
12500  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])
12501  *             self.transform_determinant = 2 * self.transform_determinant
12502  */
12503       }
12504     }
12505 
12506     /* "statsmodels/tsa/statespace/_representation.pyx":866
12507  *                 if not self.transform_cholesky[k, l] == 0:
12508  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])
12509  *             self.transform_determinant = 2 * self.transform_determinant             # <<<<<<<<<<<<<<
12510  *
12511  *         # Get $Z_t \equiv C^{-1}$, if necessary
12512  */
12513     __pyx_v_self->transform_determinant = (2.0 * __pyx_v_self->transform_determinant);
12514 
12515     /* "statsmodels/tsa/statespace/_representation.pyx":846
12516  *
12517  *         # Perform the Cholesky decomposition of H_t, if necessary
12518  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
12519  *             # Cholesky decomposition: $H = L L'$
12520  *             blas.scopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
12521  */
12522   }
12523 
12524   /* "statsmodels/tsa/statespace/_representation.pyx":869
12525  *
12526  *         # Get $Z_t \equiv C^{-1}$, if necessary
12527  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
12528  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
12529  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
12530  */
12531   __pyx_t_14 = ((__pyx_v_t == 0) != 0);
12532   if (!__pyx_t_14) {
12533   } else {
12534     __pyx_t_2 = __pyx_t_14;
12535     goto __pyx_L24_bool_binop_done;
12536   }
12537   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 869, __pyx_L1_error)}
12538   __pyx_t_14 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
12539   if (!__pyx_t_14) {
12540   } else {
12541     __pyx_t_2 = __pyx_t_14;
12542     goto __pyx_L24_bool_binop_done;
12543   }
12544   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 869, __pyx_L1_error)}
12545   __pyx_t_14 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
12546   if (!__pyx_t_14) {
12547   } else {
12548     __pyx_t_2 = __pyx_t_14;
12549     goto __pyx_L24_bool_binop_done;
12550   }
12551   __pyx_t_14 = (__pyx_v_reset_missing != 0);
12552   if (!__pyx_t_14) {
12553   } else {
12554     __pyx_t_2 = __pyx_t_14;
12555     goto __pyx_L24_bool_binop_done;
12556   }
12557   __pyx_t_14 = (__pyx_v_reset != 0);
12558   __pyx_t_2 = __pyx_t_14;
12559   __pyx_L24_bool_binop_done:;
12560   if (__pyx_t_2) {
12561 
12562     /* "statsmodels/tsa/statespace/_representation.pyx":871
12563  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:
12564  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
12565  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)             # <<<<<<<<<<<<<<
12566  *             lapack.spotrs("L", &self._k_endog, &k_states,
12567  *                             &self.transform_cholesky[0,0], &self._k_endog,
12568  */
12569     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 871, __pyx_L1_error)}
12570     __pyx_t_8 = 0;
12571     __pyx_t_7 = 0;
12572     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->_k_endogstates), __pyx_v_self->_design, (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_design.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_inc));
12573 
12574     /* "statsmodels/tsa/statespace/_representation.pyx":873
12575  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
12576  *             lapack.spotrs("L", &self._k_endog, &k_states,
12577  *                             &self.transform_cholesky[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
12578  *                             &self.transform_design[0,0], &self._k_endog,
12579  *                             &info)
12580  */
12581     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 873, __pyx_L1_error)}
12582     __pyx_t_7 = 0;
12583     __pyx_t_8 = 0;
12584 
12585     /* "statsmodels/tsa/statespace/_representation.pyx":874
12586  *             lapack.spotrs("L", &self._k_endog, &k_states,
12587  *                             &self.transform_cholesky[0,0], &self._k_endog,
12588  *                             &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
12589  *                             &info)
12590  *
12591  */
12592     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 874, __pyx_L1_error)}
12593     __pyx_t_15 = 0;
12594     __pyx_t_16 = 0;
12595 
12596     /* "statsmodels/tsa/statespace/_representation.pyx":872
12597  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
12598  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
12599  *             lapack.spotrs("L", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
12600  *                             &self.transform_cholesky[0,0], &self._k_endog,
12601  *                             &self.transform_design[0,0], &self._k_endog,
12602  */
12603     __pyx_f_5scipy_6linalg_13cython_lapack_spotrs(((char *)"L"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
12604 
12605     /* "statsmodels/tsa/statespace/_representation.pyx":878
12606  *
12607  *             # Check for errors
12608  *             if not info == 0:             # <<<<<<<<<<<<<<
12609  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)
12610  *
12611  */
12612     __pyx_t_2 = ((!((__pyx_v_info == 0) != 0)) != 0);
12613     if (unlikely(__pyx_t_2)) {
12614 
12615       /* "statsmodels/tsa/statespace/_representation.pyx":879
12616  *             # Check for errors
12617  *             if not info == 0:
12618  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
12619  *
12620  *             # Calculate $(H_t^{-1} Z_t)' Z_t$
12621  */
12622       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
12623       __Pyx_GOTREF(__pyx_t_3);
12624       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 879, __pyx_L1_error)
12625       __Pyx_GOTREF(__pyx_t_10);
12626       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12627       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error)
12628       __Pyx_GOTREF(__pyx_t_3);
12629       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12630       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 879, __pyx_L1_error)
12631       __Pyx_GOTREF(__pyx_t_10);
12632       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_calculation_of, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 879, __pyx_L1_error)
12633       __Pyx_GOTREF(__pyx_t_12);
12634       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12635       __pyx_t_10 = NULL;
12636       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12637         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
12638         if (likely(__pyx_t_10)) {
12639           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12640           __Pyx_INCREF(__pyx_t_10);
12641           __Pyx_INCREF(function);
12642           __Pyx_DECREF_SET(__pyx_t_3, function);
12643         }
12644       }
12645       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
12646       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12647       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12648       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 879, __pyx_L1_error)
12649       __Pyx_GOTREF(__pyx_t_11);
12650       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12651       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12652       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12653       __PYX_ERR(0, 879, __pyx_L1_error)
12654 
12655       /* "statsmodels/tsa/statespace/_representation.pyx":878
12656  *
12657  *             # Check for errors
12658  *             if not info == 0:             # <<<<<<<<<<<<<<
12659  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)
12660  *
12661  */
12662     }
12663 
12664     /* "statsmodels/tsa/statespace/_representation.pyx":885
12665  *             blas.sgemm("T", "N", &k_states, &k_states, &self._k_endog,
12666  *                    &alpha, self._design, &self._k_endog,
12667  *                            &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
12668  *                    &beta, &self.collapse_cholesky[0,0], &self._k_states)
12669  *
12670  */
12671     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 885, __pyx_L1_error)}
12672     __pyx_t_16 = 0;
12673     __pyx_t_15 = 0;
12674 
12675     /* "statsmodels/tsa/statespace/_representation.pyx":886
12676  *                    &alpha, self._design, &self._k_endog,
12677  *                            &self.transform_design[0,0], &self._k_endog,
12678  *                    &beta, &self.collapse_cholesky[0,0], &self._k_states)             # <<<<<<<<<<<<<<
12679  *
12680  *             # Calculate $(Z_t' H_t^{-1} Z_t)^{-1}$ via Cholesky inversion
12681  */
12682     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 886, __pyx_L1_error)}
12683     __pyx_t_8 = 0;
12684     __pyx_t_7 = 0;
12685 
12686     /* "statsmodels/tsa/statespace/_representation.pyx":883
12687  *             # Calculate $(H_t^{-1} Z_t)' Z_t$
12688  *             # $(m \times m) = (m \times p) (p \times p) (p \times m)$
12689  *             blas.sgemm("T", "N", &k_states, &k_states, &self._k_endog,             # <<<<<<<<<<<<<<
12690  *                    &alpha, self._design, &self._k_endog,
12691  *                            &self.transform_design[0,0], &self._k_endog,
12692  */
12693     __pyx_f_5scipy_6linalg_11cython_blas_sgemm(((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&__pyx_v_k_states), (&__pyx_v_self->_k_endog), (&__pyx_v_alpha), __pyx_v_self->_design, (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_design.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_beta), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states));
12694 
12695     /* "statsmodels/tsa/statespace/_representation.pyx":889
12696  *
12697  *             # Calculate $(Z_t' H_t^{-1} Z_t)^{-1}$ via Cholesky inversion
12698  *             lapack.spotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
12699  *             # Check for errors
12700  *             if info > 0:
12701  */
12702     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 889, __pyx_L1_error)}
12703     __pyx_t_7 = 0;
12704     __pyx_t_8 = 0;
12705     __pyx_f_5scipy_6linalg_13cython_lapack_spotrf(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
12706 
12707     /* "statsmodels/tsa/statespace/_representation.pyx":891
12708  *             lapack.spotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
12709  *             # Check for errors
12710  *             if info > 0:             # <<<<<<<<<<<<<<
12711  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
12712  *             elif info < 0:
12713  */
12714     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
12715     if (unlikely(__pyx_t_2)) {
12716 
12717       /* "statsmodels/tsa/statespace/_representation.pyx":892
12718  *             # Check for errors
12719  *             if info > 0:
12720  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
12721  *             elif info < 0:
12722  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
12723  */
12724       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 892, __pyx_L1_error)
12725       __Pyx_GOTREF(__pyx_t_3);
12726       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 892, __pyx_L1_error)
12727       __Pyx_GOTREF(__pyx_t_12);
12728       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12729       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 892, __pyx_L1_error)
12730       __Pyx_GOTREF(__pyx_t_3);
12731       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12732       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 892, __pyx_L1_error)
12733       __Pyx_GOTREF(__pyx_t_12);
12734       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_ZHZ_matrix, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 892, __pyx_L1_error)
12735       __Pyx_GOTREF(__pyx_t_10);
12736       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12737       __pyx_t_12 = NULL;
12738       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12739         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
12740         if (likely(__pyx_t_12)) {
12741           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12742           __Pyx_INCREF(__pyx_t_12);
12743           __Pyx_INCREF(function);
12744           __Pyx_DECREF_SET(__pyx_t_3, function);
12745         }
12746       }
12747       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
12748       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
12749       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12750       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 892, __pyx_L1_error)
12751       __Pyx_GOTREF(__pyx_t_11);
12752       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12753       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12754       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12755       __PYX_ERR(0, 892, __pyx_L1_error)
12756 
12757       /* "statsmodels/tsa/statespace/_representation.pyx":891
12758  *             lapack.spotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
12759  *             # Check for errors
12760  *             if info > 0:             # <<<<<<<<<<<<<<
12761  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
12762  *             elif info < 0:
12763  */
12764     }
12765 
12766     /* "statsmodels/tsa/statespace/_representation.pyx":893
12767  *             if info > 0:
12768  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
12769  *             elif info < 0:             # <<<<<<<<<<<<<<
12770  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
12771  *             lapack.spotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
12772  */
12773     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
12774     if (unlikely(__pyx_t_2)) {
12775 
12776       /* "statsmodels/tsa/statespace/_representation.pyx":894
12777  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
12778  *             elif info < 0:
12779  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
12780  *             lapack.spotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
12781  *
12782  */
12783       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error)
12784       __Pyx_GOTREF(__pyx_t_3);
12785       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 894, __pyx_L1_error)
12786       __Pyx_GOTREF(__pyx_t_10);
12787       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12788       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error)
12789       __Pyx_GOTREF(__pyx_t_3);
12790       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12791       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 894, __pyx_L1_error)
12792       __Pyx_GOTREF(__pyx_t_10);
12793       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_ZHZ_matrix_enco, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 894, __pyx_L1_error)
12794       __Pyx_GOTREF(__pyx_t_12);
12795       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12796       __pyx_t_10 = NULL;
12797       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12798         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
12799         if (likely(__pyx_t_10)) {
12800           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12801           __Pyx_INCREF(__pyx_t_10);
12802           __Pyx_INCREF(function);
12803           __Pyx_DECREF_SET(__pyx_t_3, function);
12804         }
12805       }
12806       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
12807       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12808       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12809       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 894, __pyx_L1_error)
12810       __Pyx_GOTREF(__pyx_t_11);
12811       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12812       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12813       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12814       __PYX_ERR(0, 894, __pyx_L1_error)
12815 
12816       /* "statsmodels/tsa/statespace/_representation.pyx":893
12817  *             if info > 0:
12818  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
12819  *             elif info < 0:             # <<<<<<<<<<<<<<
12820  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
12821  *             lapack.spotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
12822  */
12823     }
12824 
12825     /* "statsmodels/tsa/statespace/_representation.pyx":895
12826  *             elif info < 0:
12827  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
12828  *             lapack.spotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
12829  *
12830  *             # Calculate $C_t$ (the upper triangular cholesky decomposition of $(Z_t' H_t^{-1} Z_t)^{-1}$)
12831  */
12832     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 895, __pyx_L1_error)}
12833     __pyx_t_8 = 0;
12834     __pyx_t_7 = 0;
12835     __pyx_f_5scipy_6linalg_13cython_lapack_spotri(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
12836 
12837     /* "statsmodels/tsa/statespace/_representation.pyx":898
12838  *
12839  *             # Calculate $C_t$ (the upper triangular cholesky decomposition of $(Z_t' H_t^{-1} Z_t)^{-1}$)
12840  *             lapack.spotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
12841  *
12842  *             # Check for errors
12843  */
12844     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 898, __pyx_L1_error)}
12845     __pyx_t_7 = 0;
12846     __pyx_t_8 = 0;
12847     __pyx_f_5scipy_6linalg_13cython_lapack_spotrf(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
12848 
12849     /* "statsmodels/tsa/statespace/_representation.pyx":901
12850  *
12851  *             # Check for errors
12852  *             if info > 0:             # <<<<<<<<<<<<<<
12853  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
12854  *             elif info < 0:
12855  */
12856     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
12857     if (unlikely(__pyx_t_2)) {
12858 
12859       /* "statsmodels/tsa/statespace/_representation.pyx":902
12860  *             # Check for errors
12861  *             if info > 0:
12862  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
12863  *             elif info < 0:
12864  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
12865  */
12866       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error)
12867       __Pyx_GOTREF(__pyx_t_3);
12868       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 902, __pyx_L1_error)
12869       __Pyx_GOTREF(__pyx_t_12);
12870       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12871       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error)
12872       __Pyx_GOTREF(__pyx_t_3);
12873       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12874       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 902, __pyx_L1_error)
12875       __Pyx_GOTREF(__pyx_t_12);
12876       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_C_matrix_e, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L1_error)
12877       __Pyx_GOTREF(__pyx_t_10);
12878       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12879       __pyx_t_12 = NULL;
12880       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12881         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
12882         if (likely(__pyx_t_12)) {
12883           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12884           __Pyx_INCREF(__pyx_t_12);
12885           __Pyx_INCREF(function);
12886           __Pyx_DECREF_SET(__pyx_t_3, function);
12887         }
12888       }
12889       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
12890       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
12891       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12892       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 902, __pyx_L1_error)
12893       __Pyx_GOTREF(__pyx_t_11);
12894       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12895       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12896       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12897       __PYX_ERR(0, 902, __pyx_L1_error)
12898 
12899       /* "statsmodels/tsa/statespace/_representation.pyx":901
12900  *
12901  *             # Check for errors
12902  *             if info > 0:             # <<<<<<<<<<<<<<
12903  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
12904  *             elif info < 0:
12905  */
12906     }
12907 
12908     /* "statsmodels/tsa/statespace/_representation.pyx":903
12909  *             if info > 0:
12910  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
12911  *             elif info < 0:             # <<<<<<<<<<<<<<
12912  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
12913  *
12914  */
12915     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
12916     if (unlikely(__pyx_t_2)) {
12917 
12918       /* "statsmodels/tsa/statespace/_representation.pyx":904
12919  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
12920  *             elif info < 0:
12921  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
12922  *
12923  *             # Calculate $C_t'^{-1} \equiv Z_t$
12924  */
12925       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error)
12926       __Pyx_GOTREF(__pyx_t_3);
12927       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 904, __pyx_L1_error)
12928       __Pyx_GOTREF(__pyx_t_10);
12929       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12930       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error)
12931       __Pyx_GOTREF(__pyx_t_3);
12932       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12933       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 904, __pyx_L1_error)
12934       __Pyx_GOTREF(__pyx_t_10);
12935       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_C_matrix_encoun, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 904, __pyx_L1_error)
12936       __Pyx_GOTREF(__pyx_t_12);
12937       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12938       __pyx_t_10 = NULL;
12939       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12940         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
12941         if (likely(__pyx_t_10)) {
12942           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12943           __Pyx_INCREF(__pyx_t_10);
12944           __Pyx_INCREF(function);
12945           __Pyx_DECREF_SET(__pyx_t_3, function);
12946         }
12947       }
12948       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
12949       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12950       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
12951       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 904, __pyx_L1_error)
12952       __Pyx_GOTREF(__pyx_t_11);
12953       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12954       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
12955       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12956       __PYX_ERR(0, 904, __pyx_L1_error)
12957 
12958       /* "statsmodels/tsa/statespace/_representation.pyx":903
12959  *             if info > 0:
12960  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
12961  *             elif info < 0:             # <<<<<<<<<<<<<<
12962  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
12963  *
12964  */
12965     }
12966 
12967     /* "statsmodels/tsa/statespace/_representation.pyx":909
12968  *             # Do so by solving the system: $C_t' x = I$
12969  *             # (Recall that collapse_obs_cov is an identity matrix)
12970  *             blas.scopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)             # <<<<<<<<<<<<<<
12971  *             lapack.strtrs("U", "T", "N", &k_states, &k_states,
12972  *                         &self.collapse_cholesky[0,0], &self._k_states,
12973  */
12974     if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 909, __pyx_L1_error)}
12975     __pyx_t_8 = 0;
12976     __pyx_t_7 = 0;
12977     if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 909, __pyx_L1_error)}
12978     __pyx_t_15 = 0;
12979     __pyx_t_16 = 0;
12980     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->_k_states2), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_obs_cov.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->collapse_design.strides[1]) )))), (&__pyx_v_inc));
12981 
12982     /* "statsmodels/tsa/statespace/_representation.pyx":911
12983  *             blas.scopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)
12984  *             lapack.strtrs("U", "T", "N", &k_states, &k_states,
12985  *                         &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
12986  *                         &self.collapse_design[0,0], &self._k_states,
12987  *                         &info)
12988  */
12989     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 911, __pyx_L1_error)}
12990     __pyx_t_16 = 0;
12991     __pyx_t_15 = 0;
12992 
12993     /* "statsmodels/tsa/statespace/_representation.pyx":912
12994  *             lapack.strtrs("U", "T", "N", &k_states, &k_states,
12995  *                         &self.collapse_cholesky[0,0], &self._k_states,
12996  *                         &self.collapse_design[0,0], &self._k_states,             # <<<<<<<<<<<<<<
12997  *                         &info)
12998  *
12999  */
13000     if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 912, __pyx_L1_error)}
13001     __pyx_t_7 = 0;
13002     __pyx_t_8 = 0;
13003 
13004     /* "statsmodels/tsa/statespace/_representation.pyx":910
13005  *             # (Recall that collapse_obs_cov is an identity matrix)
13006  *             blas.scopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)
13007  *             lapack.strtrs("U", "T", "N", &k_states, &k_states,             # <<<<<<<<<<<<<<
13008  *                         &self.collapse_cholesky[0,0], &self._k_states,
13009  *                         &self.collapse_design[0,0], &self._k_states,
13010  */
13011     __pyx_f_5scipy_6linalg_13cython_lapack_strtrs(((char *)"U"), ((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_design.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_design.strides[1]) )))), (&__pyx_v_self->_k_states), (&__pyx_v_info));
13012 
13013     /* "statsmodels/tsa/statespace/_representation.pyx":869
13014  *
13015  *         # Get $Z_t \equiv C^{-1}$, if necessary
13016  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
13017  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
13018  *             blas.scopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
13019  */
13020   }
13021 
13022   /* "statsmodels/tsa/statespace/_representation.pyx":917
13023  *         # Calculate $\bar y_t^* = \bar A_t^* y_t = C_t Z_t' H_t^{-1} y_t$
13024  *         # (unless this is a completely missing observation)
13025  *         self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
13026  *         if not self._nmissing == self.k_endog:
13027  *             # If we have some missing elements, selected_obs is already populated
13028  */
13029   __pyx_v_self->collapse_loglikelihood = 0.0;
13030 
13031   /* "statsmodels/tsa/statespace/_representation.pyx":918
13032  *         # (unless this is a completely missing observation)
13033  *         self.collapse_loglikelihood = 0
13034  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
13035  *             # If we have some missing elements, selected_obs is already populated
13036  *             if self._nmissing == 0:
13037  */
13038   __pyx_t_2 = ((!((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0)) != 0);
13039   if (__pyx_t_2) {
13040 
13041     /* "statsmodels/tsa/statespace/_representation.pyx":920
13042  *         if not self._nmissing == self.k_endog:
13043  *             # If we have some missing elements, selected_obs is already populated
13044  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
13045  *                 blas.scopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
13046  *             # $\\# = Z_t' H_t^{-1} y_t$
13047  */
13048     __pyx_t_2 = ((__pyx_v_self->_nmissing == 0) != 0);
13049     if (__pyx_t_2) {
13050 
13051       /* "statsmodels/tsa/statespace/_representation.pyx":921
13052  *             # If we have some missing elements, selected_obs is already populated
13053  *             if self._nmissing == 0:
13054  *                 blas.scopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
13055  *             # $\\# = Z_t' H_t^{-1} y_t$
13056  *             blas.sgemv("T", &self._k_endog, &k_states,
13057  */
13058       if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 921, __pyx_L1_error)}
13059       __pyx_t_8 = 0;
13060       __pyx_t_9 = __pyx_v_t;
13061       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 921, __pyx_L1_error)}
13062       __pyx_t_7 = 0;
13063       __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->obs.data) + __pyx_t_8)) ) + __pyx_t_9 * __pyx_v_self->obs.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_7 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
13064 
13065       /* "statsmodels/tsa/statespace/_representation.pyx":920
13066  *         if not self._nmissing == self.k_endog:
13067  *             # If we have some missing elements, selected_obs is already populated
13068  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
13069  *                 blas.scopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
13070  *             # $\\# = Z_t' H_t^{-1} y_t$
13071  */
13072     }
13073 
13074     /* "statsmodels/tsa/statespace/_representation.pyx":924
13075  *             # $\\# = Z_t' H_t^{-1} y_t$
13076  *             blas.sgemv("T", &self._k_endog, &k_states,
13077  *                   &alpha, &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
13078  *                           &self.selected_obs[0], &inc,
13079  *                   &beta, &self.collapse_obs[0], &inc)
13080  */
13081     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 924, __pyx_L1_error)}
13082     __pyx_t_7 = 0;
13083     __pyx_t_8 = 0;
13084 
13085     /* "statsmodels/tsa/statespace/_representation.pyx":925
13086  *             blas.sgemv("T", &self._k_endog, &k_states,
13087  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
13088  *                           &self.selected_obs[0], &inc,             # <<<<<<<<<<<<<<
13089  *                   &beta, &self.collapse_obs[0], &inc)
13090  *             # $y_t^* = C_t \\#$
13091  */
13092     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 925, __pyx_L1_error)}
13093     __pyx_t_15 = 0;
13094 
13095     /* "statsmodels/tsa/statespace/_representation.pyx":926
13096  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
13097  *                           &self.selected_obs[0], &inc,
13098  *                   &beta, &self.collapse_obs[0], &inc)             # <<<<<<<<<<<<<<
13099  *             # $y_t^* = C_t \\#$
13100  *             blas.strmv("U", "N", "N", &k_states,
13101  */
13102     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 926, __pyx_L1_error)}
13103     __pyx_t_16 = 0;
13104 
13105     /* "statsmodels/tsa/statespace/_representation.pyx":923
13106  *                 blas.scopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
13107  *             # $\\# = Z_t' H_t^{-1} y_t$
13108  *             blas.sgemv("T", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
13109  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
13110  *                           &self.selected_obs[0], &inc,
13111  */
13112     __pyx_f_5scipy_6linalg_11cython_blas_sgemv(((char *)"T"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&__pyx_v_alpha), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_design.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc), (&__pyx_v_beta), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_16 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc));
13113 
13114     /* "statsmodels/tsa/statespace/_representation.pyx":929
13115  *             # $y_t^* = C_t \\#$
13116  *             blas.strmv("U", "N", "N", &k_states,
13117  *                                 &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
13118  *                                 &self.collapse_obs[0], &inc)
13119  *
13120  */
13121     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 929, __pyx_L1_error)}
13122     __pyx_t_16 = 0;
13123     __pyx_t_15 = 0;
13124 
13125     /* "statsmodels/tsa/statespace/_representation.pyx":930
13126  *             blas.strmv("U", "N", "N", &k_states,
13127  *                                 &self.collapse_cholesky[0,0], &self._k_states,
13128  *                                 &self.collapse_obs[0], &inc)             # <<<<<<<<<<<<<<
13129  *
13130  *             # Get residuals for loglikelihood calculation
13131  */
13132     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 930, __pyx_L1_error)}
13133     __pyx_t_8 = 0;
13134 
13135     /* "statsmodels/tsa/statespace/_representation.pyx":928
13136  *                   &beta, &self.collapse_obs[0], &inc)
13137  *             # $y_t^* = C_t \\#$
13138  *             blas.strmv("U", "N", "N", &k_states,             # <<<<<<<<<<<<<<
13139  *                                 &self.collapse_cholesky[0,0], &self._k_states,
13140  *                                 &self.collapse_obs[0], &inc)
13141  */
13142     __pyx_f_5scipy_6linalg_11cython_blas_strmv(((char *)"U"), ((char *)"N"), ((char *)"N"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_8 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc));
13143 
13144     /* "statsmodels/tsa/statespace/_representation.pyx":942
13145  *
13146  *             # $ \\# = C_t' y_t^*$
13147  *             blas.scopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)             # <<<<<<<<<<<<<<
13148  *             blas.strmv("U", "T", "N", &k_states,
13149  *                                 &self.collapse_cholesky[0,0], &self._k_states,
13150  */
13151     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 942, __pyx_L1_error)}
13152     __pyx_t_8 = 0;
13153     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 942, __pyx_L1_error)}
13154     __pyx_t_15 = 0;
13155     __pyx_f_5scipy_6linalg_11cython_blas_scopy((&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_8 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_15 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc));
13156 
13157     /* "statsmodels/tsa/statespace/_representation.pyx":944
13158  *             blas.scopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)
13159  *             blas.strmv("U", "T", "N", &k_states,
13160  *                                 &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
13161  *                                 &self.collapse_obs_tmp[0], &inc)
13162  *
13163  */
13164     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 944, __pyx_L1_error)}
13165     __pyx_t_15 = 0;
13166     __pyx_t_8 = 0;
13167 
13168     /* "statsmodels/tsa/statespace/_representation.pyx":945
13169  *             blas.strmv("U", "T", "N", &k_states,
13170  *                                 &self.collapse_cholesky[0,0], &self._k_states,
13171  *                                 &self.collapse_obs_tmp[0], &inc)             # <<<<<<<<<<<<<<
13172  *
13173  *             # $e_t = - Z_t C_t' y_t^* + y_t$
13174  */
13175     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 945, __pyx_L1_error)}
13176     __pyx_t_16 = 0;
13177 
13178     /* "statsmodels/tsa/statespace/_representation.pyx":943
13179  *             # $ \\# = C_t' y_t^*$
13180  *             blas.scopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)
13181  *             blas.strmv("U", "T", "N", &k_states,             # <<<<<<<<<<<<<<
13182  *                                 &self.collapse_cholesky[0,0], &self._k_states,
13183  *                                 &self.collapse_obs_tmp[0], &inc)
13184  */
13185     __pyx_f_5scipy_6linalg_11cython_blas_strmv(((char *)"U"), ((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_15)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_16 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc));
13186 
13187     /* "statsmodels/tsa/statespace/_representation.pyx":950
13188  *             blas.sgemv("N", &self._k_endog, &k_states,
13189  *                   &gamma, self._design, &self._k_endog,
13190  *                           &self.collapse_obs_tmp[0], &inc,             # <<<<<<<<<<<<<<
13191  *                   &alpha, &self.selected_obs[0], &inc)
13192  *
13193  */
13194     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 950, __pyx_L1_error)}
13195     __pyx_t_16 = 0;
13196 
13197     /* "statsmodels/tsa/statespace/_representation.pyx":951
13198  *                   &gamma, self._design, &self._k_endog,
13199  *                           &self.collapse_obs_tmp[0], &inc,
13200  *                   &alpha, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
13201  *
13202  *             # Calculate e_t' H_t^{-1} e_t via Cholesky solver
13203  */
13204     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 951, __pyx_L1_error)}
13205     __pyx_t_8 = 0;
13206 
13207     /* "statsmodels/tsa/statespace/_representation.pyx":948
13208  *
13209  *             # $e_t = - Z_t C_t' y_t^* + y_t$
13210  *             blas.sgemv("N", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
13211  *                   &gamma, self._design, &self._k_endog,
13212  *                           &self.collapse_obs_tmp[0], &inc,
13213  */
13214     __pyx_f_5scipy_6linalg_11cython_blas_sgemv(((char *)"N"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&__pyx_v_gamma), __pyx_v_self->_design, (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_16 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc), (&__pyx_v_alpha), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_8 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
13215 
13216     /* "statsmodels/tsa/statespace/_representation.pyx":959
13217  *             # solve of $L x = e_t$  where L is lower triangular
13218  *             lapack.strtrs("L", "N", "N", &self._k_endog, &inc,
13219  *                         &self.transform_cholesky[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
13220  *                         &self.selected_obs[0], &self._k_endog,
13221  *                         &info)
13222  */
13223     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 959, __pyx_L1_error)}
13224     __pyx_t_8 = 0;
13225     __pyx_t_16 = 0;
13226 
13227     /* "statsmodels/tsa/statespace/_representation.pyx":960
13228  *             lapack.strtrs("L", "N", "N", &self._k_endog, &inc,
13229  *                         &self.transform_cholesky[0,0], &self._k_endog,
13230  *                         &self.selected_obs[0], &self._k_endog,             # <<<<<<<<<<<<<<
13231  *                         &info)
13232  *
13233  */
13234     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 960, __pyx_L1_error)}
13235     __pyx_t_15 = 0;
13236 
13237     /* "statsmodels/tsa/statespace/_representation.pyx":958
13238  *             # We have $L$ in `transform_cholesky`, so we want to do a linear
13239  *             # solve of $L x = e_t$  where L is lower triangular
13240  *             lapack.strtrs("L", "N", "N", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
13241  *                         &self.transform_cholesky[0,0], &self._k_endog,
13242  *                         &self.selected_obs[0], &self._k_endog,
13243  */
13244     __pyx_f_5scipy_6linalg_13cython_lapack_strtrs(((char *)"L"), ((char *)"N"), ((char *)"N"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_16 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
13245 
13246     /* "statsmodels/tsa/statespace/_representation.pyx":966
13247  *
13248  *             # $e_t' H_t^{-1} e_t = (L^{-1} e_t)' L^{-1} e_t = \sum_i e_{i,t}**2$
13249  *             self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
13250  *             for i in range(self._k_endog):
13251  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2
13252  */
13253     __pyx_v_self->collapse_loglikelihood = 0.0;
13254 
13255     /* "statsmodels/tsa/statespace/_representation.pyx":967
13256  *             # $e_t' H_t^{-1} e_t = (L^{-1} e_t)' L^{-1} e_t = \sum_i e_{i,t}**2$
13257  *             self.collapse_loglikelihood = 0
13258  *             for i in range(self._k_endog):             # <<<<<<<<<<<<<<
13259  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2
13260  *
13261  */
13262     __pyx_t_1 = __pyx_v_self->_k_endog;
13263     __pyx_t_5 = __pyx_t_1;
13264     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
13265       __pyx_v_i = __pyx_t_6;
13266 
13267       /* "statsmodels/tsa/statespace/_representation.pyx":968
13268  *             self.collapse_loglikelihood = 0
13269  *             for i in range(self._k_endog):
13270  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2             # <<<<<<<<<<<<<<
13271  *
13272  *             # (p-m) log( 2*pi) + log( |H_t| )
13273  */
13274       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 968, __pyx_L1_error)}
13275       __pyx_t_15 = __pyx_v_i;
13276       __pyx_v_self->collapse_loglikelihood = (__pyx_v_self->collapse_loglikelihood + powf((*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) ))), 2.0));
13277     }
13278 
13279     /* "statsmodels/tsa/statespace/_representation.pyx":971
13280  *
13281  *             # (p-m) log( 2*pi) + log( |H_t| )
13282  *             self.collapse_loglikelihood = (             # <<<<<<<<<<<<<<
13283  *                 self.collapse_loglikelihood +
13284  *                 (self._k_endog - k_states)*dlog(2*NPY_PI) +
13285  */
13286     __pyx_v_self->collapse_loglikelihood = ((__pyx_v_self->collapse_loglikelihood + ((__pyx_v_self->_k_endog - __pyx_v_k_states) * log((2.0 * NPY_PI)))) + __pyx_v_self->transform_determinant);
13287 
13288     /* "statsmodels/tsa/statespace/_representation.pyx":978
13289  *
13290  *             # -0.5 * ...
13291  *             self.collapse_loglikelihood = -0.5 * self.collapse_loglikelihood             # <<<<<<<<<<<<<<
13292  *
13293  *         # Set pointers
13294  */
13295     __pyx_v_self->collapse_loglikelihood = (-0.5 * __pyx_v_self->collapse_loglikelihood);
13296 
13297     /* "statsmodels/tsa/statespace/_representation.pyx":918
13298  *         # (unless this is a completely missing observation)
13299  *         self.collapse_loglikelihood = 0
13300  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
13301  *             # If we have some missing elements, selected_obs is already populated
13302  *             if self._nmissing == 0:
13303  */
13304   }
13305 
13306   /* "statsmodels/tsa/statespace/_representation.pyx":981
13307  *
13308  *         # Set pointers
13309  *         self._obs = &self.collapse_obs[0]             # <<<<<<<<<<<<<<
13310  *         self._design = &self.collapse_design[0,0]
13311  *         self._obs_cov = &self.collapse_obs_cov[0,0]
13312  */
13313   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 981, __pyx_L1_error)}
13314   __pyx_t_15 = 0;
13315   __pyx_v_self->_obs = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_15 * __pyx_v_self->collapse_obs.strides[0]) ))));
13316 
13317   /* "statsmodels/tsa/statespace/_representation.pyx":982
13318  *         # Set pointers
13319  *         self._obs = &self.collapse_obs[0]
13320  *         self._design = &self.collapse_design[0,0]             # <<<<<<<<<<<<<<
13321  *         self._obs_cov = &self.collapse_obs_cov[0,0]
13322  *
13323  */
13324   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 982, __pyx_L1_error)}
13325   __pyx_t_15 = 0;
13326   __pyx_t_16 = 0;
13327   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->collapse_design.strides[1]) ))));
13328 
13329   /* "statsmodels/tsa/statespace/_representation.pyx":983
13330  *         self._obs = &self.collapse_obs[0]
13331  *         self._design = &self.collapse_design[0,0]
13332  *         self._obs_cov = &self.collapse_obs_cov[0,0]             # <<<<<<<<<<<<<<
13333  *
13334  *         # TODO can I replace this with k_states? I think I should be able to
13335  */
13336   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 983, __pyx_L1_error)}
13337   __pyx_t_16 = 0;
13338   __pyx_t_15 = 0;
13339   __pyx_v_self->_obs_cov = (&(*((__pyx_t_5numpy_float32_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float32_t *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_obs_cov.strides[1]) ))));
13340 
13341   /* "statsmodels/tsa/statespace/_representation.pyx":986
13342  *
13343  *         # TODO can I replace this with k_states? I think I should be able to
13344  *         return self._k_states             # <<<<<<<<<<<<<<
13345  *
13346  * # ### Selected covariance matrice
13347  */
13348   __pyx_r = __pyx_v_self->_k_states;
13349   goto __pyx_L0;
13350 
13351   /* "statsmodels/tsa/statespace/_representation.pyx":793
13352  *         self._obs_intercept = &self.transform_obs_intercept[0]
13353  *
13354  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:             # <<<<<<<<<<<<<<
13355  *         # Note: this assumes that initialize_object_pointers has *already* been done
13356  *         # Note: this assumes that select_missing has *already* been done
13357  */
13358 
13359   /* function exit code */
13360   __pyx_L1_error:;
13361   __Pyx_XDECREF(__pyx_t_3);
13362   __Pyx_XDECREF(__pyx_t_10);
13363   __Pyx_XDECREF(__pyx_t_11);
13364   __Pyx_XDECREF(__pyx_t_12);
13365   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transform_generalized_collapse", __pyx_clineno, __pyx_lineno, __pyx_filename);
13366   __pyx_r = 0;
13367   __pyx_L0:;
13368   __Pyx_RefNannyFinishContext();
13369   return __pyx_r;
13370 }
13371 
13372 /* "statsmodels/tsa/statespace/_representation.pxd":15
13373  * cdef class sStatespace(object):
13374  *     # Statespace dimensions
13375  *     cdef readonly int nobs, k_endog, k_states, k_posdef             # <<<<<<<<<<<<<<
13376  *
13377  *     # Statespace representation matrices
13378  */
13379 
13380 /* Python wrapper */
13381 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4nobs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4nobs_1__get__(PyObject * __pyx_v_self)13382 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4nobs_1__get__(PyObject *__pyx_v_self) {
13383   PyObject *__pyx_r = 0;
13384   __Pyx_RefNannyDeclarations
13385   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13386   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4nobs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13387 
13388   /* function exit code */
13389   __Pyx_RefNannyFinishContext();
13390   return __pyx_r;
13391 }
13392 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13393 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13394   PyObject *__pyx_r = NULL;
13395   __Pyx_RefNannyDeclarations
13396   PyObject *__pyx_t_1 = NULL;
13397   int __pyx_lineno = 0;
13398   const char *__pyx_filename = NULL;
13399   int __pyx_clineno = 0;
13400   __Pyx_RefNannySetupContext("__get__", 0);
13401   __Pyx_XDECREF(__pyx_r);
13402   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
13403   __Pyx_GOTREF(__pyx_t_1);
13404   __pyx_r = __pyx_t_1;
13405   __pyx_t_1 = 0;
13406   goto __pyx_L0;
13407 
13408   /* function exit code */
13409   __pyx_L1_error:;
13410   __Pyx_XDECREF(__pyx_t_1);
13411   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.nobs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13412   __pyx_r = NULL;
13413   __pyx_L0:;
13414   __Pyx_XGIVEREF(__pyx_r);
13415   __Pyx_RefNannyFinishContext();
13416   return __pyx_r;
13417 }
13418 
13419 /* Python wrapper */
13420 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7k_endog_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7k_endog_1__get__(PyObject * __pyx_v_self)13421 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7k_endog_1__get__(PyObject *__pyx_v_self) {
13422   PyObject *__pyx_r = 0;
13423   __Pyx_RefNannyDeclarations
13424   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13425   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7k_endog___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13426 
13427   /* function exit code */
13428   __Pyx_RefNannyFinishContext();
13429   return __pyx_r;
13430 }
13431 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13432 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13433   PyObject *__pyx_r = NULL;
13434   __Pyx_RefNannyDeclarations
13435   PyObject *__pyx_t_1 = NULL;
13436   int __pyx_lineno = 0;
13437   const char *__pyx_filename = NULL;
13438   int __pyx_clineno = 0;
13439   __Pyx_RefNannySetupContext("__get__", 0);
13440   __Pyx_XDECREF(__pyx_r);
13441   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_endog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
13442   __Pyx_GOTREF(__pyx_t_1);
13443   __pyx_r = __pyx_t_1;
13444   __pyx_t_1 = 0;
13445   goto __pyx_L0;
13446 
13447   /* function exit code */
13448   __pyx_L1_error:;
13449   __Pyx_XDECREF(__pyx_t_1);
13450   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.k_endog.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13451   __pyx_r = NULL;
13452   __pyx_L0:;
13453   __Pyx_XGIVEREF(__pyx_r);
13454   __Pyx_RefNannyFinishContext();
13455   return __pyx_r;
13456 }
13457 
13458 /* Python wrapper */
13459 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_states_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_states_1__get__(PyObject * __pyx_v_self)13460 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_states_1__get__(PyObject *__pyx_v_self) {
13461   PyObject *__pyx_r = 0;
13462   __Pyx_RefNannyDeclarations
13463   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13464   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_states___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13465 
13466   /* function exit code */
13467   __Pyx_RefNannyFinishContext();
13468   return __pyx_r;
13469 }
13470 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13471 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13472   PyObject *__pyx_r = NULL;
13473   __Pyx_RefNannyDeclarations
13474   PyObject *__pyx_t_1 = NULL;
13475   int __pyx_lineno = 0;
13476   const char *__pyx_filename = NULL;
13477   int __pyx_clineno = 0;
13478   __Pyx_RefNannySetupContext("__get__", 0);
13479   __Pyx_XDECREF(__pyx_r);
13480   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
13481   __Pyx_GOTREF(__pyx_t_1);
13482   __pyx_r = __pyx_t_1;
13483   __pyx_t_1 = 0;
13484   goto __pyx_L0;
13485 
13486   /* function exit code */
13487   __pyx_L1_error:;
13488   __Pyx_XDECREF(__pyx_t_1);
13489   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.k_states.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13490   __pyx_r = NULL;
13491   __pyx_L0:;
13492   __Pyx_XGIVEREF(__pyx_r);
13493   __Pyx_RefNannyFinishContext();
13494   return __pyx_r;
13495 }
13496 
13497 /* Python wrapper */
13498 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_posdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_posdef_1__get__(PyObject * __pyx_v_self)13499 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_posdef_1__get__(PyObject *__pyx_v_self) {
13500   PyObject *__pyx_r = 0;
13501   __Pyx_RefNannyDeclarations
13502   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13503   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_posdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13504 
13505   /* function exit code */
13506   __Pyx_RefNannyFinishContext();
13507   return __pyx_r;
13508 }
13509 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13510 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13511   PyObject *__pyx_r = NULL;
13512   __Pyx_RefNannyDeclarations
13513   PyObject *__pyx_t_1 = NULL;
13514   int __pyx_lineno = 0;
13515   const char *__pyx_filename = NULL;
13516   int __pyx_clineno = 0;
13517   __Pyx_RefNannySetupContext("__get__", 0);
13518   __Pyx_XDECREF(__pyx_r);
13519   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_posdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
13520   __Pyx_GOTREF(__pyx_t_1);
13521   __pyx_r = __pyx_t_1;
13522   __pyx_t_1 = 0;
13523   goto __pyx_L0;
13524 
13525   /* function exit code */
13526   __pyx_L1_error:;
13527   __Pyx_XDECREF(__pyx_t_1);
13528   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.k_posdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13529   __pyx_r = NULL;
13530   __pyx_L0:;
13531   __Pyx_XGIVEREF(__pyx_r);
13532   __Pyx_RefNannyFinishContext();
13533   return __pyx_r;
13534 }
13535 
13536 /* "statsmodels/tsa/statespace/_representation.pxd":18
13537  *
13538  *     # Statespace representation matrices
13539  *     cdef readonly np.float32_t [::1,:] obs, obs_intercept, state_intercept             # <<<<<<<<<<<<<<
13540  *     cdef readonly np.float32_t [:] initial_state
13541  *     cdef readonly np.float32_t [::1,:] initial_state_cov, initial_diffuse_state_cov
13542  */
13543 
13544 /* Python wrapper */
13545 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3obs_1__get__(PyObject * __pyx_v_self)13546 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3obs_1__get__(PyObject *__pyx_v_self) {
13547   PyObject *__pyx_r = 0;
13548   __Pyx_RefNannyDeclarations
13549   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13550   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13551 
13552   /* function exit code */
13553   __Pyx_RefNannyFinishContext();
13554   return __pyx_r;
13555 }
13556 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13557 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13558   PyObject *__pyx_r = NULL;
13559   __Pyx_RefNannyDeclarations
13560   PyObject *__pyx_t_1 = NULL;
13561   int __pyx_lineno = 0;
13562   const char *__pyx_filename = NULL;
13563   int __pyx_clineno = 0;
13564   __Pyx_RefNannySetupContext("__get__", 0);
13565   __Pyx_XDECREF(__pyx_r);
13566   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 18, __pyx_L1_error)}
13567   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L1_error)
13568   __Pyx_GOTREF(__pyx_t_1);
13569   __pyx_r = __pyx_t_1;
13570   __pyx_t_1 = 0;
13571   goto __pyx_L0;
13572 
13573   /* function exit code */
13574   __pyx_L1_error:;
13575   __Pyx_XDECREF(__pyx_t_1);
13576   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13577   __pyx_r = NULL;
13578   __pyx_L0:;
13579   __Pyx_XGIVEREF(__pyx_r);
13580   __Pyx_RefNannyFinishContext();
13581   return __pyx_r;
13582 }
13583 
13584 /* Python wrapper */
13585 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13obs_intercept_1__get__(PyObject * __pyx_v_self)13586 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13obs_intercept_1__get__(PyObject *__pyx_v_self) {
13587   PyObject *__pyx_r = 0;
13588   __Pyx_RefNannyDeclarations
13589   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13590   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13591 
13592   /* function exit code */
13593   __Pyx_RefNannyFinishContext();
13594   return __pyx_r;
13595 }
13596 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13597 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13598   PyObject *__pyx_r = NULL;
13599   __Pyx_RefNannyDeclarations
13600   PyObject *__pyx_t_1 = NULL;
13601   int __pyx_lineno = 0;
13602   const char *__pyx_filename = NULL;
13603   int __pyx_clineno = 0;
13604   __Pyx_RefNannySetupContext("__get__", 0);
13605   __Pyx_XDECREF(__pyx_r);
13606   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 18, __pyx_L1_error)}
13607   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L1_error)
13608   __Pyx_GOTREF(__pyx_t_1);
13609   __pyx_r = __pyx_t_1;
13610   __pyx_t_1 = 0;
13611   goto __pyx_L0;
13612 
13613   /* function exit code */
13614   __pyx_L1_error:;
13615   __Pyx_XDECREF(__pyx_t_1);
13616   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13617   __pyx_r = NULL;
13618   __pyx_L0:;
13619   __Pyx_XGIVEREF(__pyx_r);
13620   __Pyx_RefNannyFinishContext();
13621   return __pyx_r;
13622 }
13623 
13624 /* Python wrapper */
13625 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15state_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15state_intercept_1__get__(PyObject * __pyx_v_self)13626 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15state_intercept_1__get__(PyObject *__pyx_v_self) {
13627   PyObject *__pyx_r = 0;
13628   __Pyx_RefNannyDeclarations
13629   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13630   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15state_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13631 
13632   /* function exit code */
13633   __Pyx_RefNannyFinishContext();
13634   return __pyx_r;
13635 }
13636 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13637 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13638   PyObject *__pyx_r = NULL;
13639   __Pyx_RefNannyDeclarations
13640   PyObject *__pyx_t_1 = NULL;
13641   int __pyx_lineno = 0;
13642   const char *__pyx_filename = NULL;
13643   int __pyx_clineno = 0;
13644   __Pyx_RefNannySetupContext("__get__", 0);
13645   __Pyx_XDECREF(__pyx_r);
13646   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 18, __pyx_L1_error)}
13647   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L1_error)
13648   __Pyx_GOTREF(__pyx_t_1);
13649   __pyx_r = __pyx_t_1;
13650   __pyx_t_1 = 0;
13651   goto __pyx_L0;
13652 
13653   /* function exit code */
13654   __pyx_L1_error:;
13655   __Pyx_XDECREF(__pyx_t_1);
13656   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.state_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13657   __pyx_r = NULL;
13658   __pyx_L0:;
13659   __Pyx_XGIVEREF(__pyx_r);
13660   __Pyx_RefNannyFinishContext();
13661   return __pyx_r;
13662 }
13663 
13664 /* "statsmodels/tsa/statespace/_representation.pxd":19
13665  *     # Statespace representation matrices
13666  *     cdef readonly np.float32_t [::1,:] obs, obs_intercept, state_intercept
13667  *     cdef readonly np.float32_t [:] initial_state             # <<<<<<<<<<<<<<
13668  *     cdef readonly np.float32_t [::1,:] initial_state_cov, initial_diffuse_state_cov
13669  *     cdef readonly np.float32_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
13670  */
13671 
13672 /* Python wrapper */
13673 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initial_state_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initial_state_1__get__(PyObject * __pyx_v_self)13674 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initial_state_1__get__(PyObject *__pyx_v_self) {
13675   PyObject *__pyx_r = 0;
13676   __Pyx_RefNannyDeclarations
13677   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13678   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initial_state___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13679 
13680   /* function exit code */
13681   __Pyx_RefNannyFinishContext();
13682   return __pyx_r;
13683 }
13684 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13685 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13686   PyObject *__pyx_r = NULL;
13687   __Pyx_RefNannyDeclarations
13688   PyObject *__pyx_t_1 = NULL;
13689   int __pyx_lineno = 0;
13690   const char *__pyx_filename = NULL;
13691   int __pyx_clineno = 0;
13692   __Pyx_RefNannySetupContext("__get__", 0);
13693   __Pyx_XDECREF(__pyx_r);
13694   if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 19, __pyx_L1_error)}
13695   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error)
13696   __Pyx_GOTREF(__pyx_t_1);
13697   __pyx_r = __pyx_t_1;
13698   __pyx_t_1 = 0;
13699   goto __pyx_L0;
13700 
13701   /* function exit code */
13702   __pyx_L1_error:;
13703   __Pyx_XDECREF(__pyx_t_1);
13704   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initial_state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13705   __pyx_r = NULL;
13706   __pyx_L0:;
13707   __Pyx_XGIVEREF(__pyx_r);
13708   __Pyx_RefNannyFinishContext();
13709   return __pyx_r;
13710 }
13711 
13712 /* "statsmodels/tsa/statespace/_representation.pxd":20
13713  *     cdef readonly np.float32_t [::1,:] obs, obs_intercept, state_intercept
13714  *     cdef readonly np.float32_t [:] initial_state
13715  *     cdef readonly np.float32_t [::1,:] initial_state_cov, initial_diffuse_state_cov             # <<<<<<<<<<<<<<
13716  *     cdef readonly np.float32_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
13717  *
13718  */
13719 
13720 /* Python wrapper */
13721 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17initial_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17initial_state_cov_1__get__(PyObject * __pyx_v_self)13722 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17initial_state_cov_1__get__(PyObject *__pyx_v_self) {
13723   PyObject *__pyx_r = 0;
13724   __Pyx_RefNannyDeclarations
13725   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13726   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17initial_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13727 
13728   /* function exit code */
13729   __Pyx_RefNannyFinishContext();
13730   return __pyx_r;
13731 }
13732 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13733 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13734   PyObject *__pyx_r = NULL;
13735   __Pyx_RefNannyDeclarations
13736   PyObject *__pyx_t_1 = NULL;
13737   int __pyx_lineno = 0;
13738   const char *__pyx_filename = NULL;
13739   int __pyx_clineno = 0;
13740   __Pyx_RefNannySetupContext("__get__", 0);
13741   __Pyx_XDECREF(__pyx_r);
13742   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 20, __pyx_L1_error)}
13743   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 20, __pyx_L1_error)
13744   __Pyx_GOTREF(__pyx_t_1);
13745   __pyx_r = __pyx_t_1;
13746   __pyx_t_1 = 0;
13747   goto __pyx_L0;
13748 
13749   /* function exit code */
13750   __pyx_L1_error:;
13751   __Pyx_XDECREF(__pyx_t_1);
13752   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initial_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13753   __pyx_r = NULL;
13754   __pyx_L0:;
13755   __Pyx_XGIVEREF(__pyx_r);
13756   __Pyx_RefNannyFinishContext();
13757   return __pyx_r;
13758 }
13759 
13760 /* Python wrapper */
13761 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_25initial_diffuse_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_25initial_diffuse_state_cov_1__get__(PyObject * __pyx_v_self)13762 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_25initial_diffuse_state_cov_1__get__(PyObject *__pyx_v_self) {
13763   PyObject *__pyx_r = 0;
13764   __Pyx_RefNannyDeclarations
13765   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13766   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_25initial_diffuse_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13767 
13768   /* function exit code */
13769   __Pyx_RefNannyFinishContext();
13770   return __pyx_r;
13771 }
13772 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13773 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13774   PyObject *__pyx_r = NULL;
13775   __Pyx_RefNannyDeclarations
13776   PyObject *__pyx_t_1 = NULL;
13777   int __pyx_lineno = 0;
13778   const char *__pyx_filename = NULL;
13779   int __pyx_clineno = 0;
13780   __Pyx_RefNannySetupContext("__get__", 0);
13781   __Pyx_XDECREF(__pyx_r);
13782   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 20, __pyx_L1_error)}
13783   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_diffuse_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 20, __pyx_L1_error)
13784   __Pyx_GOTREF(__pyx_t_1);
13785   __pyx_r = __pyx_t_1;
13786   __pyx_t_1 = 0;
13787   goto __pyx_L0;
13788 
13789   /* function exit code */
13790   __pyx_L1_error:;
13791   __Pyx_XDECREF(__pyx_t_1);
13792   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initial_diffuse_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13793   __pyx_r = NULL;
13794   __pyx_L0:;
13795   __Pyx_XGIVEREF(__pyx_r);
13796   __Pyx_RefNannyFinishContext();
13797   return __pyx_r;
13798 }
13799 
13800 /* "statsmodels/tsa/statespace/_representation.pxd":21
13801  *     cdef readonly np.float32_t [:] initial_state
13802  *     cdef readonly np.float32_t [::1,:] initial_state_cov, initial_diffuse_state_cov
13803  *     cdef readonly np.float32_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov             # <<<<<<<<<<<<<<
13804  *
13805  *     cdef readonly int [::1,:] missing
13806  */
13807 
13808 /* Python wrapper */
13809 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6design_1__get__(PyObject * __pyx_v_self)13810 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6design_1__get__(PyObject *__pyx_v_self) {
13811   PyObject *__pyx_r = 0;
13812   __Pyx_RefNannyDeclarations
13813   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13814   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13815 
13816   /* function exit code */
13817   __Pyx_RefNannyFinishContext();
13818   return __pyx_r;
13819 }
13820 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13821 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13822   PyObject *__pyx_r = NULL;
13823   __Pyx_RefNannyDeclarations
13824   PyObject *__pyx_t_1 = NULL;
13825   int __pyx_lineno = 0;
13826   const char *__pyx_filename = NULL;
13827   int __pyx_clineno = 0;
13828   __Pyx_RefNannySetupContext("__get__", 0);
13829   __Pyx_XDECREF(__pyx_r);
13830   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 21, __pyx_L1_error)}
13831   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->design, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
13832   __Pyx_GOTREF(__pyx_t_1);
13833   __pyx_r = __pyx_t_1;
13834   __pyx_t_1 = 0;
13835   goto __pyx_L0;
13836 
13837   /* function exit code */
13838   __pyx_L1_error:;
13839   __Pyx_XDECREF(__pyx_t_1);
13840   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13841   __pyx_r = NULL;
13842   __pyx_L0:;
13843   __Pyx_XGIVEREF(__pyx_r);
13844   __Pyx_RefNannyFinishContext();
13845   return __pyx_r;
13846 }
13847 
13848 /* Python wrapper */
13849 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7obs_cov_1__get__(PyObject * __pyx_v_self)13850 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7obs_cov_1__get__(PyObject *__pyx_v_self) {
13851   PyObject *__pyx_r = 0;
13852   __Pyx_RefNannyDeclarations
13853   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13854   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13855 
13856   /* function exit code */
13857   __Pyx_RefNannyFinishContext();
13858   return __pyx_r;
13859 }
13860 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13861 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13862   PyObject *__pyx_r = NULL;
13863   __Pyx_RefNannyDeclarations
13864   PyObject *__pyx_t_1 = NULL;
13865   int __pyx_lineno = 0;
13866   const char *__pyx_filename = NULL;
13867   int __pyx_clineno = 0;
13868   __Pyx_RefNannySetupContext("__get__", 0);
13869   __Pyx_XDECREF(__pyx_r);
13870   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 21, __pyx_L1_error)}
13871   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
13872   __Pyx_GOTREF(__pyx_t_1);
13873   __pyx_r = __pyx_t_1;
13874   __pyx_t_1 = 0;
13875   goto __pyx_L0;
13876 
13877   /* function exit code */
13878   __pyx_L1_error:;
13879   __Pyx_XDECREF(__pyx_t_1);
13880   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13881   __pyx_r = NULL;
13882   __pyx_L0:;
13883   __Pyx_XGIVEREF(__pyx_r);
13884   __Pyx_RefNannyFinishContext();
13885   return __pyx_r;
13886 }
13887 
13888 /* Python wrapper */
13889 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10transition_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10transition_1__get__(PyObject * __pyx_v_self)13890 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10transition_1__get__(PyObject *__pyx_v_self) {
13891   PyObject *__pyx_r = 0;
13892   __Pyx_RefNannyDeclarations
13893   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13894   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10transition___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13895 
13896   /* function exit code */
13897   __Pyx_RefNannyFinishContext();
13898   return __pyx_r;
13899 }
13900 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13901 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13902   PyObject *__pyx_r = NULL;
13903   __Pyx_RefNannyDeclarations
13904   PyObject *__pyx_t_1 = NULL;
13905   int __pyx_lineno = 0;
13906   const char *__pyx_filename = NULL;
13907   int __pyx_clineno = 0;
13908   __Pyx_RefNannySetupContext("__get__", 0);
13909   __Pyx_XDECREF(__pyx_r);
13910   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 21, __pyx_L1_error)}
13911   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transition, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
13912   __Pyx_GOTREF(__pyx_t_1);
13913   __pyx_r = __pyx_t_1;
13914   __pyx_t_1 = 0;
13915   goto __pyx_L0;
13916 
13917   /* function exit code */
13918   __pyx_L1_error:;
13919   __Pyx_XDECREF(__pyx_t_1);
13920   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13921   __pyx_r = NULL;
13922   __pyx_L0:;
13923   __Pyx_XGIVEREF(__pyx_r);
13924   __Pyx_RefNannyFinishContext();
13925   return __pyx_r;
13926 }
13927 
13928 /* Python wrapper */
13929 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9selection_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9selection_1__get__(PyObject * __pyx_v_self)13930 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9selection_1__get__(PyObject *__pyx_v_self) {
13931   PyObject *__pyx_r = 0;
13932   __Pyx_RefNannyDeclarations
13933   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13934   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9selection___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13935 
13936   /* function exit code */
13937   __Pyx_RefNannyFinishContext();
13938   return __pyx_r;
13939 }
13940 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13941 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13942   PyObject *__pyx_r = NULL;
13943   __Pyx_RefNannyDeclarations
13944   PyObject *__pyx_t_1 = NULL;
13945   int __pyx_lineno = 0;
13946   const char *__pyx_filename = NULL;
13947   int __pyx_clineno = 0;
13948   __Pyx_RefNannySetupContext("__get__", 0);
13949   __Pyx_XDECREF(__pyx_r);
13950   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 21, __pyx_L1_error)}
13951   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selection, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
13952   __Pyx_GOTREF(__pyx_t_1);
13953   __pyx_r = __pyx_t_1;
13954   __pyx_t_1 = 0;
13955   goto __pyx_L0;
13956 
13957   /* function exit code */
13958   __pyx_L1_error:;
13959   __Pyx_XDECREF(__pyx_t_1);
13960   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.selection.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13961   __pyx_r = NULL;
13962   __pyx_L0:;
13963   __Pyx_XGIVEREF(__pyx_r);
13964   __Pyx_RefNannyFinishContext();
13965   return __pyx_r;
13966 }
13967 
13968 /* Python wrapper */
13969 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9state_cov_1__get__(PyObject * __pyx_v_self)13970 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9state_cov_1__get__(PyObject *__pyx_v_self) {
13971   PyObject *__pyx_r = 0;
13972   __Pyx_RefNannyDeclarations
13973   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13974   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
13975 
13976   /* function exit code */
13977   __Pyx_RefNannyFinishContext();
13978   return __pyx_r;
13979 }
13980 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)13981 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
13982   PyObject *__pyx_r = NULL;
13983   __Pyx_RefNannyDeclarations
13984   PyObject *__pyx_t_1 = NULL;
13985   int __pyx_lineno = 0;
13986   const char *__pyx_filename = NULL;
13987   int __pyx_clineno = 0;
13988   __Pyx_RefNannySetupContext("__get__", 0);
13989   __Pyx_XDECREF(__pyx_r);
13990   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 21, __pyx_L1_error)}
13991   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
13992   __Pyx_GOTREF(__pyx_t_1);
13993   __pyx_r = __pyx_t_1;
13994   __pyx_t_1 = 0;
13995   goto __pyx_L0;
13996 
13997   /* function exit code */
13998   __pyx_L1_error:;
13999   __Pyx_XDECREF(__pyx_t_1);
14000   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14001   __pyx_r = NULL;
14002   __pyx_L0:;
14003   __Pyx_XGIVEREF(__pyx_r);
14004   __Pyx_RefNannyFinishContext();
14005   return __pyx_r;
14006 }
14007 
14008 /* Python wrapper */
14009 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18selected_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18selected_state_cov_1__get__(PyObject * __pyx_v_self)14010 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18selected_state_cov_1__get__(PyObject *__pyx_v_self) {
14011   PyObject *__pyx_r = 0;
14012   __Pyx_RefNannyDeclarations
14013   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14014   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18selected_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14015 
14016   /* function exit code */
14017   __Pyx_RefNannyFinishContext();
14018   return __pyx_r;
14019 }
14020 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14021 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14022   PyObject *__pyx_r = NULL;
14023   __Pyx_RefNannyDeclarations
14024   PyObject *__pyx_t_1 = NULL;
14025   int __pyx_lineno = 0;
14026   const char *__pyx_filename = NULL;
14027   int __pyx_clineno = 0;
14028   __Pyx_RefNannySetupContext("__get__", 0);
14029   __Pyx_XDECREF(__pyx_r);
14030   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 21, __pyx_L1_error)}
14031   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
14032   __Pyx_GOTREF(__pyx_t_1);
14033   __pyx_r = __pyx_t_1;
14034   __pyx_t_1 = 0;
14035   goto __pyx_L0;
14036 
14037   /* function exit code */
14038   __pyx_L1_error:;
14039   __Pyx_XDECREF(__pyx_t_1);
14040   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.selected_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14041   __pyx_r = NULL;
14042   __pyx_L0:;
14043   __Pyx_XGIVEREF(__pyx_r);
14044   __Pyx_RefNannyFinishContext();
14045   return __pyx_r;
14046 }
14047 
14048 /* "statsmodels/tsa/statespace/_representation.pxd":23
14049  *     cdef readonly np.float32_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
14050  *
14051  *     cdef readonly int [::1,:] missing             # <<<<<<<<<<<<<<
14052  *     cdef readonly int [:] nmissing
14053  *     cdef readonly int has_missing
14054  */
14055 
14056 /* Python wrapper */
14057 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7missing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7missing_1__get__(PyObject * __pyx_v_self)14058 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7missing_1__get__(PyObject *__pyx_v_self) {
14059   PyObject *__pyx_r = 0;
14060   __Pyx_RefNannyDeclarations
14061   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14062   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7missing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14063 
14064   /* function exit code */
14065   __Pyx_RefNannyFinishContext();
14066   return __pyx_r;
14067 }
14068 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14069 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14070   PyObject *__pyx_r = NULL;
14071   __Pyx_RefNannyDeclarations
14072   PyObject *__pyx_t_1 = NULL;
14073   int __pyx_lineno = 0;
14074   const char *__pyx_filename = NULL;
14075   int __pyx_clineno = 0;
14076   __Pyx_RefNannySetupContext("__get__", 0);
14077   __Pyx_XDECREF(__pyx_r);
14078   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 23, __pyx_L1_error)}
14079   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 23, __pyx_L1_error)
14080   __Pyx_GOTREF(__pyx_t_1);
14081   __pyx_r = __pyx_t_1;
14082   __pyx_t_1 = 0;
14083   goto __pyx_L0;
14084 
14085   /* function exit code */
14086   __pyx_L1_error:;
14087   __Pyx_XDECREF(__pyx_t_1);
14088   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.missing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14089   __pyx_r = NULL;
14090   __pyx_L0:;
14091   __Pyx_XGIVEREF(__pyx_r);
14092   __Pyx_RefNannyFinishContext();
14093   return __pyx_r;
14094 }
14095 
14096 /* "statsmodels/tsa/statespace/_representation.pxd":24
14097  *
14098  *     cdef readonly int [::1,:] missing
14099  *     cdef readonly int [:] nmissing             # <<<<<<<<<<<<<<
14100  *     cdef readonly int has_missing
14101  *
14102  */
14103 
14104 /* Python wrapper */
14105 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8nmissing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8nmissing_1__get__(PyObject * __pyx_v_self)14106 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8nmissing_1__get__(PyObject *__pyx_v_self) {
14107   PyObject *__pyx_r = 0;
14108   __Pyx_RefNannyDeclarations
14109   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14110   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8nmissing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14111 
14112   /* function exit code */
14113   __Pyx_RefNannyFinishContext();
14114   return __pyx_r;
14115 }
14116 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14117 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14118   PyObject *__pyx_r = NULL;
14119   __Pyx_RefNannyDeclarations
14120   PyObject *__pyx_t_1 = NULL;
14121   int __pyx_lineno = 0;
14122   const char *__pyx_filename = NULL;
14123   int __pyx_clineno = 0;
14124   __Pyx_RefNannySetupContext("__get__", 0);
14125   __Pyx_XDECREF(__pyx_r);
14126   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 24, __pyx_L1_error)}
14127   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 24, __pyx_L1_error)
14128   __Pyx_GOTREF(__pyx_t_1);
14129   __pyx_r = __pyx_t_1;
14130   __pyx_t_1 = 0;
14131   goto __pyx_L0;
14132 
14133   /* function exit code */
14134   __pyx_L1_error:;
14135   __Pyx_XDECREF(__pyx_t_1);
14136   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.nmissing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14137   __pyx_r = NULL;
14138   __pyx_L0:;
14139   __Pyx_XGIVEREF(__pyx_r);
14140   __Pyx_RefNannyFinishContext();
14141   return __pyx_r;
14142 }
14143 
14144 /* "statsmodels/tsa/statespace/_representation.pxd":25
14145  *     cdef readonly int [::1,:] missing
14146  *     cdef readonly int [:] nmissing
14147  *     cdef readonly int has_missing             # <<<<<<<<<<<<<<
14148  *
14149  *     # Flags
14150  */
14151 
14152 /* Python wrapper */
14153 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11has_missing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11has_missing_1__get__(PyObject * __pyx_v_self)14154 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11has_missing_1__get__(PyObject *__pyx_v_self) {
14155   PyObject *__pyx_r = 0;
14156   __Pyx_RefNannyDeclarations
14157   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14158   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11has_missing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14159 
14160   /* function exit code */
14161   __Pyx_RefNannyFinishContext();
14162   return __pyx_r;
14163 }
14164 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14165 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14166   PyObject *__pyx_r = NULL;
14167   __Pyx_RefNannyDeclarations
14168   PyObject *__pyx_t_1 = NULL;
14169   int __pyx_lineno = 0;
14170   const char *__pyx_filename = NULL;
14171   int __pyx_clineno = 0;
14172   __Pyx_RefNannySetupContext("__get__", 0);
14173   __Pyx_XDECREF(__pyx_r);
14174   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->has_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 25, __pyx_L1_error)
14175   __Pyx_GOTREF(__pyx_t_1);
14176   __pyx_r = __pyx_t_1;
14177   __pyx_t_1 = 0;
14178   goto __pyx_L0;
14179 
14180   /* function exit code */
14181   __pyx_L1_error:;
14182   __Pyx_XDECREF(__pyx_t_1);
14183   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.has_missing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14184   __pyx_r = NULL;
14185   __pyx_L0:;
14186   __Pyx_XGIVEREF(__pyx_r);
14187   __Pyx_RefNannyFinishContext();
14188   return __pyx_r;
14189 }
14190 
14191 /* "statsmodels/tsa/statespace/_representation.pxd":28
14192  *
14193  *     # Flags
14194  *     cdef readonly int time_invariant             # <<<<<<<<<<<<<<
14195  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
14196  *     cdef public int diagonal_obs_cov
14197  */
14198 
14199 /* Python wrapper */
14200 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14time_invariant_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14time_invariant_1__get__(PyObject * __pyx_v_self)14201 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14time_invariant_1__get__(PyObject *__pyx_v_self) {
14202   PyObject *__pyx_r = 0;
14203   __Pyx_RefNannyDeclarations
14204   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14205   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14time_invariant___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14206 
14207   /* function exit code */
14208   __Pyx_RefNannyFinishContext();
14209   return __pyx_r;
14210 }
14211 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14212 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14213   PyObject *__pyx_r = NULL;
14214   __Pyx_RefNannyDeclarations
14215   PyObject *__pyx_t_1 = NULL;
14216   int __pyx_lineno = 0;
14217   const char *__pyx_filename = NULL;
14218   int __pyx_clineno = 0;
14219   __Pyx_RefNannySetupContext("__get__", 0);
14220   __Pyx_XDECREF(__pyx_r);
14221   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time_invariant); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 28, __pyx_L1_error)
14222   __Pyx_GOTREF(__pyx_t_1);
14223   __pyx_r = __pyx_t_1;
14224   __pyx_t_1 = 0;
14225   goto __pyx_L0;
14226 
14227   /* function exit code */
14228   __pyx_L1_error:;
14229   __Pyx_XDECREF(__pyx_t_1);
14230   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.time_invariant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14231   __pyx_r = NULL;
14232   __pyx_L0:;
14233   __Pyx_XGIVEREF(__pyx_r);
14234   __Pyx_RefNannyFinishContext();
14235   return __pyx_r;
14236 }
14237 
14238 /* "statsmodels/tsa/statespace/_representation.pxd":29
14239  *     # Flags
14240  *     cdef readonly int time_invariant
14241  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary             # <<<<<<<<<<<<<<
14242  *     cdef public int diagonal_obs_cov
14243  *     cdef readonly int _diagonal_obs_cov
14244  */
14245 
14246 /* Python wrapper */
14247 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialized_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialized_1__get__(PyObject * __pyx_v_self)14248 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialized_1__get__(PyObject *__pyx_v_self) {
14249   PyObject *__pyx_r = 0;
14250   __Pyx_RefNannyDeclarations
14251   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14252   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialized___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14253 
14254   /* function exit code */
14255   __Pyx_RefNannyFinishContext();
14256   return __pyx_r;
14257 }
14258 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14259 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14260   PyObject *__pyx_r = NULL;
14261   __Pyx_RefNannyDeclarations
14262   PyObject *__pyx_t_1 = NULL;
14263   int __pyx_lineno = 0;
14264   const char *__pyx_filename = NULL;
14265   int __pyx_clineno = 0;
14266   __Pyx_RefNannySetupContext("__get__", 0);
14267   __Pyx_XDECREF(__pyx_r);
14268   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error)
14269   __Pyx_GOTREF(__pyx_t_1);
14270   __pyx_r = __pyx_t_1;
14271   __pyx_t_1 = 0;
14272   goto __pyx_L0;
14273 
14274   /* function exit code */
14275   __pyx_L1_error:;
14276   __Pyx_XDECREF(__pyx_t_1);
14277   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14278   __pyx_r = NULL;
14279   __pyx_L0:;
14280   __Pyx_XGIVEREF(__pyx_r);
14281   __Pyx_RefNannyFinishContext();
14282   return __pyx_r;
14283 }
14284 
14285 /* Python wrapper */
14286 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19initialized_diffuse_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19initialized_diffuse_1__get__(PyObject * __pyx_v_self)14287 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19initialized_diffuse_1__get__(PyObject *__pyx_v_self) {
14288   PyObject *__pyx_r = 0;
14289   __Pyx_RefNannyDeclarations
14290   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14291   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19initialized_diffuse___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14292 
14293   /* function exit code */
14294   __Pyx_RefNannyFinishContext();
14295   return __pyx_r;
14296 }
14297 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14298 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14299   PyObject *__pyx_r = NULL;
14300   __Pyx_RefNannyDeclarations
14301   PyObject *__pyx_t_1 = NULL;
14302   int __pyx_lineno = 0;
14303   const char *__pyx_filename = NULL;
14304   int __pyx_clineno = 0;
14305   __Pyx_RefNannySetupContext("__get__", 0);
14306   __Pyx_XDECREF(__pyx_r);
14307   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error)
14308   __Pyx_GOTREF(__pyx_t_1);
14309   __pyx_r = __pyx_t_1;
14310   __pyx_t_1 = 0;
14311   goto __pyx_L0;
14312 
14313   /* function exit code */
14314   __pyx_L1_error:;
14315   __Pyx_XDECREF(__pyx_t_1);
14316   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialized_diffuse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14317   __pyx_r = NULL;
14318   __pyx_L0:;
14319   __Pyx_XGIVEREF(__pyx_r);
14320   __Pyx_RefNannyFinishContext();
14321   return __pyx_r;
14322 }
14323 
14324 /* Python wrapper */
14325 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22initialized_stationary_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22initialized_stationary_1__get__(PyObject * __pyx_v_self)14326 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22initialized_stationary_1__get__(PyObject *__pyx_v_self) {
14327   PyObject *__pyx_r = 0;
14328   __Pyx_RefNannyDeclarations
14329   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14330   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22initialized_stationary___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14331 
14332   /* function exit code */
14333   __Pyx_RefNannyFinishContext();
14334   return __pyx_r;
14335 }
14336 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14337 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14338   PyObject *__pyx_r = NULL;
14339   __Pyx_RefNannyDeclarations
14340   PyObject *__pyx_t_1 = NULL;
14341   int __pyx_lineno = 0;
14342   const char *__pyx_filename = NULL;
14343   int __pyx_clineno = 0;
14344   __Pyx_RefNannySetupContext("__get__", 0);
14345   __Pyx_XDECREF(__pyx_r);
14346   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error)
14347   __Pyx_GOTREF(__pyx_t_1);
14348   __pyx_r = __pyx_t_1;
14349   __pyx_t_1 = 0;
14350   goto __pyx_L0;
14351 
14352   /* function exit code */
14353   __pyx_L1_error:;
14354   __Pyx_XDECREF(__pyx_t_1);
14355   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.initialized_stationary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14356   __pyx_r = NULL;
14357   __pyx_L0:;
14358   __Pyx_XGIVEREF(__pyx_r);
14359   __Pyx_RefNannyFinishContext();
14360   return __pyx_r;
14361 }
14362 
14363 /* "statsmodels/tsa/statespace/_representation.pxd":30
14364  *     cdef readonly int time_invariant
14365  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
14366  *     cdef public int diagonal_obs_cov             # <<<<<<<<<<<<<<
14367  *     cdef readonly int _diagonal_obs_cov
14368  *     cdef public int subset_design
14369  */
14370 
14371 /* Python wrapper */
14372 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_1__get__(PyObject * __pyx_v_self)14373 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_1__get__(PyObject *__pyx_v_self) {
14374   PyObject *__pyx_r = 0;
14375   __Pyx_RefNannyDeclarations
14376   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14377   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14378 
14379   /* function exit code */
14380   __Pyx_RefNannyFinishContext();
14381   return __pyx_r;
14382 }
14383 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14384 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14385   PyObject *__pyx_r = NULL;
14386   __Pyx_RefNannyDeclarations
14387   PyObject *__pyx_t_1 = NULL;
14388   int __pyx_lineno = 0;
14389   const char *__pyx_filename = NULL;
14390   int __pyx_clineno = 0;
14391   __Pyx_RefNannySetupContext("__get__", 0);
14392   __Pyx_XDECREF(__pyx_r);
14393   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 30, __pyx_L1_error)
14394   __Pyx_GOTREF(__pyx_t_1);
14395   __pyx_r = __pyx_t_1;
14396   __pyx_t_1 = 0;
14397   goto __pyx_L0;
14398 
14399   /* function exit code */
14400   __pyx_L1_error:;
14401   __Pyx_XDECREF(__pyx_t_1);
14402   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.diagonal_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14403   __pyx_r = NULL;
14404   __pyx_L0:;
14405   __Pyx_XGIVEREF(__pyx_r);
14406   __Pyx_RefNannyFinishContext();
14407   return __pyx_r;
14408 }
14409 
14410 /* Python wrapper */
14411 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)14412 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
14413   int __pyx_r;
14414   __Pyx_RefNannyDeclarations
14415   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
14416   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
14417 
14418   /* function exit code */
14419   __Pyx_RefNannyFinishContext();
14420   return __pyx_r;
14421 }
14422 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,PyObject * __pyx_v_value)14423 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
14424   int __pyx_r;
14425   __Pyx_RefNannyDeclarations
14426   int __pyx_t_1;
14427   int __pyx_lineno = 0;
14428   const char *__pyx_filename = NULL;
14429   int __pyx_clineno = 0;
14430   __Pyx_RefNannySetupContext("__set__", 0);
14431   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
14432   __pyx_v_self->diagonal_obs_cov = __pyx_t_1;
14433 
14434   /* function exit code */
14435   __pyx_r = 0;
14436   goto __pyx_L0;
14437   __pyx_L1_error:;
14438   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.diagonal_obs_cov.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14439   __pyx_r = -1;
14440   __pyx_L0:;
14441   __Pyx_RefNannyFinishContext();
14442   return __pyx_r;
14443 }
14444 
14445 /* "statsmodels/tsa/statespace/_representation.pxd":31
14446  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
14447  *     cdef public int diagonal_obs_cov
14448  *     cdef readonly int _diagonal_obs_cov             # <<<<<<<<<<<<<<
14449  *     cdef public int subset_design
14450  *     cdef public int companion_transition
14451  */
14452 
14453 /* Python wrapper */
14454 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17_diagonal_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17_diagonal_obs_cov_1__get__(PyObject * __pyx_v_self)14455 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17_diagonal_obs_cov_1__get__(PyObject *__pyx_v_self) {
14456   PyObject *__pyx_r = 0;
14457   __Pyx_RefNannyDeclarations
14458   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14459   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17_diagonal_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14460 
14461   /* function exit code */
14462   __Pyx_RefNannyFinishContext();
14463   return __pyx_r;
14464 }
14465 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14466 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14467   PyObject *__pyx_r = NULL;
14468   __Pyx_RefNannyDeclarations
14469   PyObject *__pyx_t_1 = NULL;
14470   int __pyx_lineno = 0;
14471   const char *__pyx_filename = NULL;
14472   int __pyx_clineno = 0;
14473   __Pyx_RefNannySetupContext("__get__", 0);
14474   __Pyx_XDECREF(__pyx_r);
14475   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error)
14476   __Pyx_GOTREF(__pyx_t_1);
14477   __pyx_r = __pyx_t_1;
14478   __pyx_t_1 = 0;
14479   goto __pyx_L0;
14480 
14481   /* function exit code */
14482   __pyx_L1_error:;
14483   __Pyx_XDECREF(__pyx_t_1);
14484   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._diagonal_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14485   __pyx_r = NULL;
14486   __pyx_L0:;
14487   __Pyx_XGIVEREF(__pyx_r);
14488   __Pyx_RefNannyFinishContext();
14489   return __pyx_r;
14490 }
14491 
14492 /* "statsmodels/tsa/statespace/_representation.pxd":32
14493  *     cdef public int diagonal_obs_cov
14494  *     cdef readonly int _diagonal_obs_cov
14495  *     cdef public int subset_design             # <<<<<<<<<<<<<<
14496  *     cdef public int companion_transition
14497  *
14498  */
14499 
14500 /* Python wrapper */
14501 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_1__get__(PyObject * __pyx_v_self)14502 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_1__get__(PyObject *__pyx_v_self) {
14503   PyObject *__pyx_r = 0;
14504   __Pyx_RefNannyDeclarations
14505   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14506   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14507 
14508   /* function exit code */
14509   __Pyx_RefNannyFinishContext();
14510   return __pyx_r;
14511 }
14512 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14513 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14514   PyObject *__pyx_r = NULL;
14515   __Pyx_RefNannyDeclarations
14516   PyObject *__pyx_t_1 = NULL;
14517   int __pyx_lineno = 0;
14518   const char *__pyx_filename = NULL;
14519   int __pyx_clineno = 0;
14520   __Pyx_RefNannySetupContext("__get__", 0);
14521   __Pyx_XDECREF(__pyx_r);
14522   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->subset_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error)
14523   __Pyx_GOTREF(__pyx_t_1);
14524   __pyx_r = __pyx_t_1;
14525   __pyx_t_1 = 0;
14526   goto __pyx_L0;
14527 
14528   /* function exit code */
14529   __pyx_L1_error:;
14530   __Pyx_XDECREF(__pyx_t_1);
14531   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.subset_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14532   __pyx_r = NULL;
14533   __pyx_L0:;
14534   __Pyx_XGIVEREF(__pyx_r);
14535   __Pyx_RefNannyFinishContext();
14536   return __pyx_r;
14537 }
14538 
14539 /* Python wrapper */
14540 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)14541 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
14542   int __pyx_r;
14543   __Pyx_RefNannyDeclarations
14544   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
14545   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
14546 
14547   /* function exit code */
14548   __Pyx_RefNannyFinishContext();
14549   return __pyx_r;
14550 }
14551 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,PyObject * __pyx_v_value)14552 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
14553   int __pyx_r;
14554   __Pyx_RefNannyDeclarations
14555   int __pyx_t_1;
14556   int __pyx_lineno = 0;
14557   const char *__pyx_filename = NULL;
14558   int __pyx_clineno = 0;
14559   __Pyx_RefNannySetupContext("__set__", 0);
14560   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 32, __pyx_L1_error)
14561   __pyx_v_self->subset_design = __pyx_t_1;
14562 
14563   /* function exit code */
14564   __pyx_r = 0;
14565   goto __pyx_L0;
14566   __pyx_L1_error:;
14567   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.subset_design.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14568   __pyx_r = -1;
14569   __pyx_L0:;
14570   __Pyx_RefNannyFinishContext();
14571   return __pyx_r;
14572 }
14573 
14574 /* "statsmodels/tsa/statespace/_representation.pxd":33
14575  *     cdef readonly int _diagonal_obs_cov
14576  *     cdef public int subset_design
14577  *     cdef public int companion_transition             # <<<<<<<<<<<<<<
14578  *
14579  *     # Temporary arrays
14580  */
14581 
14582 /* Python wrapper */
14583 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_1__get__(PyObject * __pyx_v_self)14584 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_1__get__(PyObject *__pyx_v_self) {
14585   PyObject *__pyx_r = 0;
14586   __Pyx_RefNannyDeclarations
14587   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14588   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14589 
14590   /* function exit code */
14591   __Pyx_RefNannyFinishContext();
14592   return __pyx_r;
14593 }
14594 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14595 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14596   PyObject *__pyx_r = NULL;
14597   __Pyx_RefNannyDeclarations
14598   PyObject *__pyx_t_1 = NULL;
14599   int __pyx_lineno = 0;
14600   const char *__pyx_filename = NULL;
14601   int __pyx_clineno = 0;
14602   __Pyx_RefNannySetupContext("__get__", 0);
14603   __Pyx_XDECREF(__pyx_r);
14604   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->companion_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error)
14605   __Pyx_GOTREF(__pyx_t_1);
14606   __pyx_r = __pyx_t_1;
14607   __pyx_t_1 = 0;
14608   goto __pyx_L0;
14609 
14610   /* function exit code */
14611   __pyx_L1_error:;
14612   __Pyx_XDECREF(__pyx_t_1);
14613   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.companion_transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14614   __pyx_r = NULL;
14615   __pyx_L0:;
14616   __Pyx_XGIVEREF(__pyx_r);
14617   __Pyx_RefNannyFinishContext();
14618   return __pyx_r;
14619 }
14620 
14621 /* Python wrapper */
14622 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)14623 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
14624   int __pyx_r;
14625   __Pyx_RefNannyDeclarations
14626   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
14627   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
14628 
14629   /* function exit code */
14630   __Pyx_RefNannyFinishContext();
14631   return __pyx_r;
14632 }
14633 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self,PyObject * __pyx_v_value)14634 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
14635   int __pyx_r;
14636   __Pyx_RefNannyDeclarations
14637   int __pyx_t_1;
14638   int __pyx_lineno = 0;
14639   const char *__pyx_filename = NULL;
14640   int __pyx_clineno = 0;
14641   __Pyx_RefNannySetupContext("__set__", 0);
14642   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 33, __pyx_L1_error)
14643   __pyx_v_self->companion_transition = __pyx_t_1;
14644 
14645   /* function exit code */
14646   __pyx_r = 0;
14647   goto __pyx_L0;
14648   __pyx_L1_error:;
14649   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.companion_transition.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14650   __pyx_r = -1;
14651   __pyx_L0:;
14652   __Pyx_RefNannyFinishContext();
14653   return __pyx_r;
14654 }
14655 
14656 /* "statsmodels/tsa/statespace/_representation.pxd":39
14657  *
14658  *     # Temporary selection arrays
14659  *     cdef readonly np.float32_t [:] selected_obs             # <<<<<<<<<<<<<<
14660  *     cdef readonly np.float32_t [:] selected_obs_intercept
14661  *     cdef readonly np.float32_t [:] selected_design
14662  */
14663 
14664 /* Python wrapper */
14665 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12selected_obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12selected_obs_1__get__(PyObject * __pyx_v_self)14666 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12selected_obs_1__get__(PyObject *__pyx_v_self) {
14667   PyObject *__pyx_r = 0;
14668   __Pyx_RefNannyDeclarations
14669   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14670   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12selected_obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14671 
14672   /* function exit code */
14673   __Pyx_RefNannyFinishContext();
14674   return __pyx_r;
14675 }
14676 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14677 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14678   PyObject *__pyx_r = NULL;
14679   __Pyx_RefNannyDeclarations
14680   PyObject *__pyx_t_1 = NULL;
14681   int __pyx_lineno = 0;
14682   const char *__pyx_filename = NULL;
14683   int __pyx_clineno = 0;
14684   __Pyx_RefNannySetupContext("__get__", 0);
14685   __Pyx_XDECREF(__pyx_r);
14686   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 39, __pyx_L1_error)}
14687   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 39, __pyx_L1_error)
14688   __Pyx_GOTREF(__pyx_t_1);
14689   __pyx_r = __pyx_t_1;
14690   __pyx_t_1 = 0;
14691   goto __pyx_L0;
14692 
14693   /* function exit code */
14694   __pyx_L1_error:;
14695   __Pyx_XDECREF(__pyx_t_1);
14696   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.selected_obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14697   __pyx_r = NULL;
14698   __pyx_L0:;
14699   __Pyx_XGIVEREF(__pyx_r);
14700   __Pyx_RefNannyFinishContext();
14701   return __pyx_r;
14702 }
14703 
14704 /* "statsmodels/tsa/statespace/_representation.pxd":40
14705  *     # Temporary selection arrays
14706  *     cdef readonly np.float32_t [:] selected_obs
14707  *     cdef readonly np.float32_t [:] selected_obs_intercept             # <<<<<<<<<<<<<<
14708  *     cdef readonly np.float32_t [:] selected_design
14709  *     cdef readonly np.float32_t [:] selected_obs_cov
14710  */
14711 
14712 /* Python wrapper */
14713 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22selected_obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22selected_obs_intercept_1__get__(PyObject * __pyx_v_self)14714 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22selected_obs_intercept_1__get__(PyObject *__pyx_v_self) {
14715   PyObject *__pyx_r = 0;
14716   __Pyx_RefNannyDeclarations
14717   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14718   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22selected_obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14719 
14720   /* function exit code */
14721   __Pyx_RefNannyFinishContext();
14722   return __pyx_r;
14723 }
14724 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14725 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14726   PyObject *__pyx_r = NULL;
14727   __Pyx_RefNannyDeclarations
14728   PyObject *__pyx_t_1 = NULL;
14729   int __pyx_lineno = 0;
14730   const char *__pyx_filename = NULL;
14731   int __pyx_clineno = 0;
14732   __Pyx_RefNannySetupContext("__get__", 0);
14733   __Pyx_XDECREF(__pyx_r);
14734   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 40, __pyx_L1_error)}
14735   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 40, __pyx_L1_error)
14736   __Pyx_GOTREF(__pyx_t_1);
14737   __pyx_r = __pyx_t_1;
14738   __pyx_t_1 = 0;
14739   goto __pyx_L0;
14740 
14741   /* function exit code */
14742   __pyx_L1_error:;
14743   __Pyx_XDECREF(__pyx_t_1);
14744   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.selected_obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14745   __pyx_r = NULL;
14746   __pyx_L0:;
14747   __Pyx_XGIVEREF(__pyx_r);
14748   __Pyx_RefNannyFinishContext();
14749   return __pyx_r;
14750 }
14751 
14752 /* "statsmodels/tsa/statespace/_representation.pxd":41
14753  *     cdef readonly np.float32_t [:] selected_obs
14754  *     cdef readonly np.float32_t [:] selected_obs_intercept
14755  *     cdef readonly np.float32_t [:] selected_design             # <<<<<<<<<<<<<<
14756  *     cdef readonly np.float32_t [:] selected_obs_cov
14757  *
14758  */
14759 
14760 /* Python wrapper */
14761 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15selected_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15selected_design_1__get__(PyObject * __pyx_v_self)14762 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15selected_design_1__get__(PyObject *__pyx_v_self) {
14763   PyObject *__pyx_r = 0;
14764   __Pyx_RefNannyDeclarations
14765   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14766   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15selected_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14767 
14768   /* function exit code */
14769   __Pyx_RefNannyFinishContext();
14770   return __pyx_r;
14771 }
14772 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14773 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14774   PyObject *__pyx_r = NULL;
14775   __Pyx_RefNannyDeclarations
14776   PyObject *__pyx_t_1 = NULL;
14777   int __pyx_lineno = 0;
14778   const char *__pyx_filename = NULL;
14779   int __pyx_clineno = 0;
14780   __Pyx_RefNannySetupContext("__get__", 0);
14781   __Pyx_XDECREF(__pyx_r);
14782   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 41, __pyx_L1_error)}
14783   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_design, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 41, __pyx_L1_error)
14784   __Pyx_GOTREF(__pyx_t_1);
14785   __pyx_r = __pyx_t_1;
14786   __pyx_t_1 = 0;
14787   goto __pyx_L0;
14788 
14789   /* function exit code */
14790   __pyx_L1_error:;
14791   __Pyx_XDECREF(__pyx_t_1);
14792   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.selected_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14793   __pyx_r = NULL;
14794   __pyx_L0:;
14795   __Pyx_XGIVEREF(__pyx_r);
14796   __Pyx_RefNannyFinishContext();
14797   return __pyx_r;
14798 }
14799 
14800 /* "statsmodels/tsa/statespace/_representation.pxd":42
14801  *     cdef readonly np.float32_t [:] selected_obs_intercept
14802  *     cdef readonly np.float32_t [:] selected_design
14803  *     cdef readonly np.float32_t [:] selected_obs_cov             # <<<<<<<<<<<<<<
14804  *
14805  *     # Temporary transformation arrays
14806  */
14807 
14808 /* Python wrapper */
14809 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16selected_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16selected_obs_cov_1__get__(PyObject * __pyx_v_self)14810 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16selected_obs_cov_1__get__(PyObject *__pyx_v_self) {
14811   PyObject *__pyx_r = 0;
14812   __Pyx_RefNannyDeclarations
14813   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14814   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16selected_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14815 
14816   /* function exit code */
14817   __Pyx_RefNannyFinishContext();
14818   return __pyx_r;
14819 }
14820 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14821 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14822   PyObject *__pyx_r = NULL;
14823   __Pyx_RefNannyDeclarations
14824   PyObject *__pyx_t_1 = NULL;
14825   int __pyx_lineno = 0;
14826   const char *__pyx_filename = NULL;
14827   int __pyx_clineno = 0;
14828   __Pyx_RefNannySetupContext("__get__", 0);
14829   __Pyx_XDECREF(__pyx_r);
14830   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 42, __pyx_L1_error)}
14831   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_cov, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 42, __pyx_L1_error)
14832   __Pyx_GOTREF(__pyx_t_1);
14833   __pyx_r = __pyx_t_1;
14834   __pyx_t_1 = 0;
14835   goto __pyx_L0;
14836 
14837   /* function exit code */
14838   __pyx_L1_error:;
14839   __Pyx_XDECREF(__pyx_t_1);
14840   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.selected_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14841   __pyx_r = NULL;
14842   __pyx_L0:;
14843   __Pyx_XGIVEREF(__pyx_r);
14844   __Pyx_RefNannyFinishContext();
14845   return __pyx_r;
14846 }
14847 
14848 /* "statsmodels/tsa/statespace/_representation.pxd":45
14849  *
14850  *     # Temporary transformation arrays
14851  *     cdef readonly np.float32_t [::1,:] transform_cholesky             # <<<<<<<<<<<<<<
14852  *     cdef readonly np.float32_t [::1,:] transform_obs_cov
14853  *     cdef readonly np.float32_t [::1,:] transform_design
14854  */
14855 
14856 /* Python wrapper */
14857 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18transform_cholesky_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18transform_cholesky_1__get__(PyObject * __pyx_v_self)14858 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18transform_cholesky_1__get__(PyObject *__pyx_v_self) {
14859   PyObject *__pyx_r = 0;
14860   __Pyx_RefNannyDeclarations
14861   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14862   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18transform_cholesky___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14863 
14864   /* function exit code */
14865   __Pyx_RefNannyFinishContext();
14866   return __pyx_r;
14867 }
14868 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14869 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14870   PyObject *__pyx_r = NULL;
14871   __Pyx_RefNannyDeclarations
14872   PyObject *__pyx_t_1 = NULL;
14873   int __pyx_lineno = 0;
14874   const char *__pyx_filename = NULL;
14875   int __pyx_clineno = 0;
14876   __Pyx_RefNannySetupContext("__get__", 0);
14877   __Pyx_XDECREF(__pyx_r);
14878   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 45, __pyx_L1_error)}
14879   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error)
14880   __Pyx_GOTREF(__pyx_t_1);
14881   __pyx_r = __pyx_t_1;
14882   __pyx_t_1 = 0;
14883   goto __pyx_L0;
14884 
14885   /* function exit code */
14886   __pyx_L1_error:;
14887   __Pyx_XDECREF(__pyx_t_1);
14888   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transform_cholesky.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14889   __pyx_r = NULL;
14890   __pyx_L0:;
14891   __Pyx_XGIVEREF(__pyx_r);
14892   __Pyx_RefNannyFinishContext();
14893   return __pyx_r;
14894 }
14895 
14896 /* "statsmodels/tsa/statespace/_representation.pxd":46
14897  *     # Temporary transformation arrays
14898  *     cdef readonly np.float32_t [::1,:] transform_cholesky
14899  *     cdef readonly np.float32_t [::1,:] transform_obs_cov             # <<<<<<<<<<<<<<
14900  *     cdef readonly np.float32_t [::1,:] transform_design
14901  *     cdef readonly np.float32_t [:] transform_obs_intercept
14902  */
14903 
14904 /* Python wrapper */
14905 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17transform_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17transform_obs_cov_1__get__(PyObject * __pyx_v_self)14906 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17transform_obs_cov_1__get__(PyObject *__pyx_v_self) {
14907   PyObject *__pyx_r = 0;
14908   __Pyx_RefNannyDeclarations
14909   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14910   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17transform_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14911 
14912   /* function exit code */
14913   __Pyx_RefNannyFinishContext();
14914   return __pyx_r;
14915 }
14916 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14917 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14918   PyObject *__pyx_r = NULL;
14919   __Pyx_RefNannyDeclarations
14920   PyObject *__pyx_t_1 = NULL;
14921   int __pyx_lineno = 0;
14922   const char *__pyx_filename = NULL;
14923   int __pyx_clineno = 0;
14924   __Pyx_RefNannySetupContext("__get__", 0);
14925   __Pyx_XDECREF(__pyx_r);
14926   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 46, __pyx_L1_error)}
14927   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 46, __pyx_L1_error)
14928   __Pyx_GOTREF(__pyx_t_1);
14929   __pyx_r = __pyx_t_1;
14930   __pyx_t_1 = 0;
14931   goto __pyx_L0;
14932 
14933   /* function exit code */
14934   __pyx_L1_error:;
14935   __Pyx_XDECREF(__pyx_t_1);
14936   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transform_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14937   __pyx_r = NULL;
14938   __pyx_L0:;
14939   __Pyx_XGIVEREF(__pyx_r);
14940   __Pyx_RefNannyFinishContext();
14941   return __pyx_r;
14942 }
14943 
14944 /* "statsmodels/tsa/statespace/_representation.pxd":47
14945  *     cdef readonly np.float32_t [::1,:] transform_cholesky
14946  *     cdef readonly np.float32_t [::1,:] transform_obs_cov
14947  *     cdef readonly np.float32_t [::1,:] transform_design             # <<<<<<<<<<<<<<
14948  *     cdef readonly np.float32_t [:] transform_obs_intercept
14949  *     cdef readonly np.float32_t transform_determinant
14950  */
14951 
14952 /* Python wrapper */
14953 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16transform_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16transform_design_1__get__(PyObject * __pyx_v_self)14954 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16transform_design_1__get__(PyObject *__pyx_v_self) {
14955   PyObject *__pyx_r = 0;
14956   __Pyx_RefNannyDeclarations
14957   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14958   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16transform_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
14959 
14960   /* function exit code */
14961   __Pyx_RefNannyFinishContext();
14962   return __pyx_r;
14963 }
14964 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)14965 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
14966   PyObject *__pyx_r = NULL;
14967   __Pyx_RefNannyDeclarations
14968   PyObject *__pyx_t_1 = NULL;
14969   int __pyx_lineno = 0;
14970   const char *__pyx_filename = NULL;
14971   int __pyx_clineno = 0;
14972   __Pyx_RefNannySetupContext("__get__", 0);
14973   __Pyx_XDECREF(__pyx_r);
14974   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 47, __pyx_L1_error)}
14975   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_design, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error)
14976   __Pyx_GOTREF(__pyx_t_1);
14977   __pyx_r = __pyx_t_1;
14978   __pyx_t_1 = 0;
14979   goto __pyx_L0;
14980 
14981   /* function exit code */
14982   __pyx_L1_error:;
14983   __Pyx_XDECREF(__pyx_t_1);
14984   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transform_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14985   __pyx_r = NULL;
14986   __pyx_L0:;
14987   __Pyx_XGIVEREF(__pyx_r);
14988   __Pyx_RefNannyFinishContext();
14989   return __pyx_r;
14990 }
14991 
14992 /* "statsmodels/tsa/statespace/_representation.pxd":48
14993  *     cdef readonly np.float32_t [::1,:] transform_obs_cov
14994  *     cdef readonly np.float32_t [::1,:] transform_design
14995  *     cdef readonly np.float32_t [:] transform_obs_intercept             # <<<<<<<<<<<<<<
14996  *     cdef readonly np.float32_t transform_determinant
14997  *
14998  */
14999 
15000 /* Python wrapper */
15001 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_23transform_obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_23transform_obs_intercept_1__get__(PyObject * __pyx_v_self)15002 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_23transform_obs_intercept_1__get__(PyObject *__pyx_v_self) {
15003   PyObject *__pyx_r = 0;
15004   __Pyx_RefNannyDeclarations
15005   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15006   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_23transform_obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15007 
15008   /* function exit code */
15009   __Pyx_RefNannyFinishContext();
15010   return __pyx_r;
15011 }
15012 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15013 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15014   PyObject *__pyx_r = NULL;
15015   __Pyx_RefNannyDeclarations
15016   PyObject *__pyx_t_1 = NULL;
15017   int __pyx_lineno = 0;
15018   const char *__pyx_filename = NULL;
15019   int __pyx_clineno = 0;
15020   __Pyx_RefNannySetupContext("__get__", 0);
15021   __Pyx_XDECREF(__pyx_r);
15022   if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 48, __pyx_L1_error)}
15023   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 48, __pyx_L1_error)
15024   __Pyx_GOTREF(__pyx_t_1);
15025   __pyx_r = __pyx_t_1;
15026   __pyx_t_1 = 0;
15027   goto __pyx_L0;
15028 
15029   /* function exit code */
15030   __pyx_L1_error:;
15031   __Pyx_XDECREF(__pyx_t_1);
15032   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transform_obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15033   __pyx_r = NULL;
15034   __pyx_L0:;
15035   __Pyx_XGIVEREF(__pyx_r);
15036   __Pyx_RefNannyFinishContext();
15037   return __pyx_r;
15038 }
15039 
15040 /* "statsmodels/tsa/statespace/_representation.pxd":49
15041  *     cdef readonly np.float32_t [::1,:] transform_design
15042  *     cdef readonly np.float32_t [:] transform_obs_intercept
15043  *     cdef readonly np.float32_t transform_determinant             # <<<<<<<<<<<<<<
15044  *
15045  *     cdef readonly np.float32_t [:] collapse_obs
15046  */
15047 
15048 /* Python wrapper */
15049 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_21transform_determinant_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_21transform_determinant_1__get__(PyObject * __pyx_v_self)15050 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_21transform_determinant_1__get__(PyObject *__pyx_v_self) {
15051   PyObject *__pyx_r = 0;
15052   __Pyx_RefNannyDeclarations
15053   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15054   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_21transform_determinant___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15055 
15056   /* function exit code */
15057   __Pyx_RefNannyFinishContext();
15058   return __pyx_r;
15059 }
15060 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15061 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15062   PyObject *__pyx_r = NULL;
15063   __Pyx_RefNannyDeclarations
15064   PyObject *__pyx_t_1 = NULL;
15065   int __pyx_lineno = 0;
15066   const char *__pyx_filename = NULL;
15067   int __pyx_clineno = 0;
15068   __Pyx_RefNannySetupContext("__get__", 0);
15069   __Pyx_XDECREF(__pyx_r);
15070   __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->transform_determinant); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 49, __pyx_L1_error)
15071   __Pyx_GOTREF(__pyx_t_1);
15072   __pyx_r = __pyx_t_1;
15073   __pyx_t_1 = 0;
15074   goto __pyx_L0;
15075 
15076   /* function exit code */
15077   __pyx_L1_error:;
15078   __Pyx_XDECREF(__pyx_t_1);
15079   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.transform_determinant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15080   __pyx_r = NULL;
15081   __pyx_L0:;
15082   __Pyx_XGIVEREF(__pyx_r);
15083   __Pyx_RefNannyFinishContext();
15084   return __pyx_r;
15085 }
15086 
15087 /* "statsmodels/tsa/statespace/_representation.pxd":51
15088  *     cdef readonly np.float32_t transform_determinant
15089  *
15090  *     cdef readonly np.float32_t [:] collapse_obs             # <<<<<<<<<<<<<<
15091  *     cdef readonly np.float32_t [:] collapse_obs_tmp
15092  *     cdef readonly np.float32_t [::1,:] collapse_design
15093  */
15094 
15095 /* Python wrapper */
15096 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12collapse_obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12collapse_obs_1__get__(PyObject * __pyx_v_self)15097 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12collapse_obs_1__get__(PyObject *__pyx_v_self) {
15098   PyObject *__pyx_r = 0;
15099   __Pyx_RefNannyDeclarations
15100   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15101   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12collapse_obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15102 
15103   /* function exit code */
15104   __Pyx_RefNannyFinishContext();
15105   return __pyx_r;
15106 }
15107 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15108 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15109   PyObject *__pyx_r = NULL;
15110   __Pyx_RefNannyDeclarations
15111   PyObject *__pyx_t_1 = NULL;
15112   int __pyx_lineno = 0;
15113   const char *__pyx_filename = NULL;
15114   int __pyx_clineno = 0;
15115   __Pyx_RefNannySetupContext("__get__", 0);
15116   __Pyx_XDECREF(__pyx_r);
15117   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 51, __pyx_L1_error)}
15118   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 51, __pyx_L1_error)
15119   __Pyx_GOTREF(__pyx_t_1);
15120   __pyx_r = __pyx_t_1;
15121   __pyx_t_1 = 0;
15122   goto __pyx_L0;
15123 
15124   /* function exit code */
15125   __pyx_L1_error:;
15126   __Pyx_XDECREF(__pyx_t_1);
15127   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.collapse_obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15128   __pyx_r = NULL;
15129   __pyx_L0:;
15130   __Pyx_XGIVEREF(__pyx_r);
15131   __Pyx_RefNannyFinishContext();
15132   return __pyx_r;
15133 }
15134 
15135 /* "statsmodels/tsa/statespace/_representation.pxd":52
15136  *
15137  *     cdef readonly np.float32_t [:] collapse_obs
15138  *     cdef readonly np.float32_t [:] collapse_obs_tmp             # <<<<<<<<<<<<<<
15139  *     cdef readonly np.float32_t [::1,:] collapse_design
15140  *     cdef readonly np.float32_t [::1,:] collapse_obs_cov
15141  */
15142 
15143 /* Python wrapper */
15144 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_tmp_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_tmp_1__get__(PyObject * __pyx_v_self)15145 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_tmp_1__get__(PyObject *__pyx_v_self) {
15146   PyObject *__pyx_r = 0;
15147   __Pyx_RefNannyDeclarations
15148   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15149   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_tmp___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15150 
15151   /* function exit code */
15152   __Pyx_RefNannyFinishContext();
15153   return __pyx_r;
15154 }
15155 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15156 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15157   PyObject *__pyx_r = NULL;
15158   __Pyx_RefNannyDeclarations
15159   PyObject *__pyx_t_1 = NULL;
15160   int __pyx_lineno = 0;
15161   const char *__pyx_filename = NULL;
15162   int __pyx_clineno = 0;
15163   __Pyx_RefNannySetupContext("__get__", 0);
15164   __Pyx_XDECREF(__pyx_r);
15165   if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 52, __pyx_L1_error)}
15166   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_tmp, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 52, __pyx_L1_error)
15167   __Pyx_GOTREF(__pyx_t_1);
15168   __pyx_r = __pyx_t_1;
15169   __pyx_t_1 = 0;
15170   goto __pyx_L0;
15171 
15172   /* function exit code */
15173   __pyx_L1_error:;
15174   __Pyx_XDECREF(__pyx_t_1);
15175   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.collapse_obs_tmp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15176   __pyx_r = NULL;
15177   __pyx_L0:;
15178   __Pyx_XGIVEREF(__pyx_r);
15179   __Pyx_RefNannyFinishContext();
15180   return __pyx_r;
15181 }
15182 
15183 /* "statsmodels/tsa/statespace/_representation.pxd":53
15184  *     cdef readonly np.float32_t [:] collapse_obs
15185  *     cdef readonly np.float32_t [:] collapse_obs_tmp
15186  *     cdef readonly np.float32_t [::1,:] collapse_design             # <<<<<<<<<<<<<<
15187  *     cdef readonly np.float32_t [::1,:] collapse_obs_cov
15188  *     cdef readonly np.float32_t [::1,:] collapse_cholesky
15189  */
15190 
15191 /* Python wrapper */
15192 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15collapse_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15collapse_design_1__get__(PyObject * __pyx_v_self)15193 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15collapse_design_1__get__(PyObject *__pyx_v_self) {
15194   PyObject *__pyx_r = 0;
15195   __Pyx_RefNannyDeclarations
15196   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15197   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15collapse_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15198 
15199   /* function exit code */
15200   __Pyx_RefNannyFinishContext();
15201   return __pyx_r;
15202 }
15203 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15204 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15205   PyObject *__pyx_r = NULL;
15206   __Pyx_RefNannyDeclarations
15207   PyObject *__pyx_t_1 = NULL;
15208   int __pyx_lineno = 0;
15209   const char *__pyx_filename = NULL;
15210   int __pyx_clineno = 0;
15211   __Pyx_RefNannySetupContext("__get__", 0);
15212   __Pyx_XDECREF(__pyx_r);
15213   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 53, __pyx_L1_error)}
15214   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_design, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error)
15215   __Pyx_GOTREF(__pyx_t_1);
15216   __pyx_r = __pyx_t_1;
15217   __pyx_t_1 = 0;
15218   goto __pyx_L0;
15219 
15220   /* function exit code */
15221   __pyx_L1_error:;
15222   __Pyx_XDECREF(__pyx_t_1);
15223   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.collapse_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15224   __pyx_r = NULL;
15225   __pyx_L0:;
15226   __Pyx_XGIVEREF(__pyx_r);
15227   __Pyx_RefNannyFinishContext();
15228   return __pyx_r;
15229 }
15230 
15231 /* "statsmodels/tsa/statespace/_representation.pxd":54
15232  *     cdef readonly np.float32_t [:] collapse_obs_tmp
15233  *     cdef readonly np.float32_t [::1,:] collapse_design
15234  *     cdef readonly np.float32_t [::1,:] collapse_obs_cov             # <<<<<<<<<<<<<<
15235  *     cdef readonly np.float32_t [::1,:] collapse_cholesky
15236  *     cdef readonly np.float32_t collapse_loglikelihood
15237  */
15238 
15239 /* Python wrapper */
15240 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_cov_1__get__(PyObject * __pyx_v_self)15241 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_cov_1__get__(PyObject *__pyx_v_self) {
15242   PyObject *__pyx_r = 0;
15243   __Pyx_RefNannyDeclarations
15244   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15245   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15246 
15247   /* function exit code */
15248   __Pyx_RefNannyFinishContext();
15249   return __pyx_r;
15250 }
15251 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15252 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15253   PyObject *__pyx_r = NULL;
15254   __Pyx_RefNannyDeclarations
15255   PyObject *__pyx_t_1 = NULL;
15256   int __pyx_lineno = 0;
15257   const char *__pyx_filename = NULL;
15258   int __pyx_clineno = 0;
15259   __Pyx_RefNannySetupContext("__get__", 0);
15260   __Pyx_XDECREF(__pyx_r);
15261   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 54, __pyx_L1_error)}
15262   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error)
15263   __Pyx_GOTREF(__pyx_t_1);
15264   __pyx_r = __pyx_t_1;
15265   __pyx_t_1 = 0;
15266   goto __pyx_L0;
15267 
15268   /* function exit code */
15269   __pyx_L1_error:;
15270   __Pyx_XDECREF(__pyx_t_1);
15271   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.collapse_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15272   __pyx_r = NULL;
15273   __pyx_L0:;
15274   __Pyx_XGIVEREF(__pyx_r);
15275   __Pyx_RefNannyFinishContext();
15276   return __pyx_r;
15277 }
15278 
15279 /* "statsmodels/tsa/statespace/_representation.pxd":55
15280  *     cdef readonly np.float32_t [::1,:] collapse_design
15281  *     cdef readonly np.float32_t [::1,:] collapse_obs_cov
15282  *     cdef readonly np.float32_t [::1,:] collapse_cholesky             # <<<<<<<<<<<<<<
15283  *     cdef readonly np.float32_t collapse_loglikelihood
15284  *
15285  */
15286 
15287 /* Python wrapper */
15288 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17collapse_cholesky_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17collapse_cholesky_1__get__(PyObject * __pyx_v_self)15289 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17collapse_cholesky_1__get__(PyObject *__pyx_v_self) {
15290   PyObject *__pyx_r = 0;
15291   __Pyx_RefNannyDeclarations
15292   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15293   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17collapse_cholesky___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15294 
15295   /* function exit code */
15296   __Pyx_RefNannyFinishContext();
15297   return __pyx_r;
15298 }
15299 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15300 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15301   PyObject *__pyx_r = NULL;
15302   __Pyx_RefNannyDeclarations
15303   PyObject *__pyx_t_1 = NULL;
15304   int __pyx_lineno = 0;
15305   const char *__pyx_filename = NULL;
15306   int __pyx_clineno = 0;
15307   __Pyx_RefNannySetupContext("__get__", 0);
15308   __Pyx_XDECREF(__pyx_r);
15309   if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 55, __pyx_L1_error)}
15310   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float32_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float32_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error)
15311   __Pyx_GOTREF(__pyx_t_1);
15312   __pyx_r = __pyx_t_1;
15313   __pyx_t_1 = 0;
15314   goto __pyx_L0;
15315 
15316   /* function exit code */
15317   __pyx_L1_error:;
15318   __Pyx_XDECREF(__pyx_t_1);
15319   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.collapse_cholesky.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15320   __pyx_r = NULL;
15321   __pyx_L0:;
15322   __Pyx_XGIVEREF(__pyx_r);
15323   __Pyx_RefNannyFinishContext();
15324   return __pyx_r;
15325 }
15326 
15327 /* "statsmodels/tsa/statespace/_representation.pxd":56
15328  *     cdef readonly np.float32_t [::1,:] collapse_obs_cov
15329  *     cdef readonly np.float32_t [::1,:] collapse_cholesky
15330  *     cdef readonly np.float32_t collapse_loglikelihood             # <<<<<<<<<<<<<<
15331  *
15332  *     # Pointers
15333  */
15334 
15335 /* Python wrapper */
15336 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22collapse_loglikelihood_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22collapse_loglikelihood_1__get__(PyObject * __pyx_v_self)15337 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22collapse_loglikelihood_1__get__(PyObject *__pyx_v_self) {
15338   PyObject *__pyx_r = 0;
15339   __Pyx_RefNannyDeclarations
15340   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15341   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22collapse_loglikelihood___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15342 
15343   /* function exit code */
15344   __Pyx_RefNannyFinishContext();
15345   return __pyx_r;
15346 }
15347 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15348 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15349   PyObject *__pyx_r = NULL;
15350   __Pyx_RefNannyDeclarations
15351   PyObject *__pyx_t_1 = NULL;
15352   int __pyx_lineno = 0;
15353   const char *__pyx_filename = NULL;
15354   int __pyx_clineno = 0;
15355   __Pyx_RefNannySetupContext("__get__", 0);
15356   __Pyx_XDECREF(__pyx_r);
15357   __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->collapse_loglikelihood); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
15358   __Pyx_GOTREF(__pyx_t_1);
15359   __pyx_r = __pyx_t_1;
15360   __pyx_t_1 = 0;
15361   goto __pyx_L0;
15362 
15363   /* function exit code */
15364   __pyx_L1_error:;
15365   __Pyx_XDECREF(__pyx_t_1);
15366   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.collapse_loglikelihood.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15367   __pyx_r = NULL;
15368   __pyx_L0:;
15369   __Pyx_XGIVEREF(__pyx_r);
15370   __Pyx_RefNannyFinishContext();
15371   return __pyx_r;
15372 }
15373 
15374 /* "statsmodels/tsa/statespace/_representation.pxd":73
15375  *
15376  *     # Current location
15377  *     cdef readonly int t             # <<<<<<<<<<<<<<
15378  *     cdef readonly int _previous_t
15379  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
15380  */
15381 
15382 /* Python wrapper */
15383 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1t_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1t_1__get__(PyObject * __pyx_v_self)15384 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1t_1__get__(PyObject *__pyx_v_self) {
15385   PyObject *__pyx_r = 0;
15386   __Pyx_RefNannyDeclarations
15387   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15388   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1t___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15389 
15390   /* function exit code */
15391   __Pyx_RefNannyFinishContext();
15392   return __pyx_r;
15393 }
15394 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15395 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15396   PyObject *__pyx_r = NULL;
15397   __Pyx_RefNannyDeclarations
15398   PyObject *__pyx_t_1 = NULL;
15399   int __pyx_lineno = 0;
15400   const char *__pyx_filename = NULL;
15401   int __pyx_clineno = 0;
15402   __Pyx_RefNannySetupContext("__get__", 0);
15403   __Pyx_XDECREF(__pyx_r);
15404   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 73, __pyx_L1_error)
15405   __Pyx_GOTREF(__pyx_t_1);
15406   __pyx_r = __pyx_t_1;
15407   __pyx_t_1 = 0;
15408   goto __pyx_L0;
15409 
15410   /* function exit code */
15411   __pyx_L1_error:;
15412   __Pyx_XDECREF(__pyx_t_1);
15413   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace.t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15414   __pyx_r = NULL;
15415   __pyx_L0:;
15416   __Pyx_XGIVEREF(__pyx_r);
15417   __Pyx_RefNannyFinishContext();
15418   return __pyx_r;
15419 }
15420 
15421 /* "statsmodels/tsa/statespace/_representation.pxd":74
15422  *     # Current location
15423  *     cdef readonly int t
15424  *     cdef readonly int _previous_t             # <<<<<<<<<<<<<<
15425  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
15426  *     cdef readonly int _nmissing
15427  */
15428 
15429 /* Python wrapper */
15430 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11_previous_t_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11_previous_t_1__get__(PyObject * __pyx_v_self)15431 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11_previous_t_1__get__(PyObject *__pyx_v_self) {
15432   PyObject *__pyx_r = 0;
15433   __Pyx_RefNannyDeclarations
15434   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15435   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11_previous_t___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15436 
15437   /* function exit code */
15438   __Pyx_RefNannyFinishContext();
15439   return __pyx_r;
15440 }
15441 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15442 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15443   PyObject *__pyx_r = NULL;
15444   __Pyx_RefNannyDeclarations
15445   PyObject *__pyx_t_1 = NULL;
15446   int __pyx_lineno = 0;
15447   const char *__pyx_filename = NULL;
15448   int __pyx_clineno = 0;
15449   __Pyx_RefNannySetupContext("__get__", 0);
15450   __Pyx_XDECREF(__pyx_r);
15451   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_previous_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 74, __pyx_L1_error)
15452   __Pyx_GOTREF(__pyx_t_1);
15453   __pyx_r = __pyx_t_1;
15454   __pyx_t_1 = 0;
15455   goto __pyx_L0;
15456 
15457   /* function exit code */
15458   __pyx_L1_error:;
15459   __Pyx_XDECREF(__pyx_t_1);
15460   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._previous_t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15461   __pyx_r = NULL;
15462   __pyx_L0:;
15463   __Pyx_XGIVEREF(__pyx_r);
15464   __Pyx_RefNannyFinishContext();
15465   return __pyx_r;
15466 }
15467 
15468 /* "statsmodels/tsa/statespace/_representation.pxd":75
15469  *     cdef readonly int t
15470  *     cdef readonly int _previous_t
15471  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef             # <<<<<<<<<<<<<<
15472  *     cdef readonly int _nmissing
15473  *
15474  */
15475 
15476 /* Python wrapper */
15477 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8_k_endog_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8_k_endog_1__get__(PyObject * __pyx_v_self)15478 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8_k_endog_1__get__(PyObject *__pyx_v_self) {
15479   PyObject *__pyx_r = 0;
15480   __Pyx_RefNannyDeclarations
15481   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15482   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8_k_endog___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15483 
15484   /* function exit code */
15485   __Pyx_RefNannyFinishContext();
15486   return __pyx_r;
15487 }
15488 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15489 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15490   PyObject *__pyx_r = NULL;
15491   __Pyx_RefNannyDeclarations
15492   PyObject *__pyx_t_1 = NULL;
15493   int __pyx_lineno = 0;
15494   const char *__pyx_filename = NULL;
15495   int __pyx_clineno = 0;
15496   __Pyx_RefNannySetupContext("__get__", 0);
15497   __Pyx_XDECREF(__pyx_r);
15498   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
15499   __Pyx_GOTREF(__pyx_t_1);
15500   __pyx_r = __pyx_t_1;
15501   __pyx_t_1 = 0;
15502   goto __pyx_L0;
15503 
15504   /* function exit code */
15505   __pyx_L1_error:;
15506   __Pyx_XDECREF(__pyx_t_1);
15507   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._k_endog.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15508   __pyx_r = NULL;
15509   __pyx_L0:;
15510   __Pyx_XGIVEREF(__pyx_r);
15511   __Pyx_RefNannyFinishContext();
15512   return __pyx_r;
15513 }
15514 
15515 /* Python wrapper */
15516 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_states_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_states_1__get__(PyObject * __pyx_v_self)15517 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_states_1__get__(PyObject *__pyx_v_self) {
15518   PyObject *__pyx_r = 0;
15519   __Pyx_RefNannyDeclarations
15520   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15521   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_states___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15522 
15523   /* function exit code */
15524   __Pyx_RefNannyFinishContext();
15525   return __pyx_r;
15526 }
15527 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15528 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15529   PyObject *__pyx_r = NULL;
15530   __Pyx_RefNannyDeclarations
15531   PyObject *__pyx_t_1 = NULL;
15532   int __pyx_lineno = 0;
15533   const char *__pyx_filename = NULL;
15534   int __pyx_clineno = 0;
15535   __Pyx_RefNannySetupContext("__get__", 0);
15536   __Pyx_XDECREF(__pyx_r);
15537   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
15538   __Pyx_GOTREF(__pyx_t_1);
15539   __pyx_r = __pyx_t_1;
15540   __pyx_t_1 = 0;
15541   goto __pyx_L0;
15542 
15543   /* function exit code */
15544   __pyx_L1_error:;
15545   __Pyx_XDECREF(__pyx_t_1);
15546   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._k_states.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15547   __pyx_r = NULL;
15548   __pyx_L0:;
15549   __Pyx_XGIVEREF(__pyx_r);
15550   __Pyx_RefNannyFinishContext();
15551   return __pyx_r;
15552 }
15553 
15554 /* Python wrapper */
15555 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_posdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_posdef_1__get__(PyObject * __pyx_v_self)15556 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_posdef_1__get__(PyObject *__pyx_v_self) {
15557   PyObject *__pyx_r = 0;
15558   __Pyx_RefNannyDeclarations
15559   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15560   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_posdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15561 
15562   /* function exit code */
15563   __Pyx_RefNannyFinishContext();
15564   return __pyx_r;
15565 }
15566 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15567 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15568   PyObject *__pyx_r = NULL;
15569   __Pyx_RefNannyDeclarations
15570   PyObject *__pyx_t_1 = NULL;
15571   int __pyx_lineno = 0;
15572   const char *__pyx_filename = NULL;
15573   int __pyx_clineno = 0;
15574   __Pyx_RefNannySetupContext("__get__", 0);
15575   __Pyx_XDECREF(__pyx_r);
15576   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_posdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
15577   __Pyx_GOTREF(__pyx_t_1);
15578   __pyx_r = __pyx_t_1;
15579   __pyx_t_1 = 0;
15580   goto __pyx_L0;
15581 
15582   /* function exit code */
15583   __pyx_L1_error:;
15584   __Pyx_XDECREF(__pyx_t_1);
15585   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._k_posdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15586   __pyx_r = NULL;
15587   __pyx_L0:;
15588   __Pyx_XGIVEREF(__pyx_r);
15589   __Pyx_RefNannyFinishContext();
15590   return __pyx_r;
15591 }
15592 
15593 /* Python wrapper */
15594 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_endog2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_endog2_1__get__(PyObject * __pyx_v_self)15595 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_endog2_1__get__(PyObject *__pyx_v_self) {
15596   PyObject *__pyx_r = 0;
15597   __Pyx_RefNannyDeclarations
15598   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15599   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_endog2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15600 
15601   /* function exit code */
15602   __Pyx_RefNannyFinishContext();
15603   return __pyx_r;
15604 }
15605 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15606 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15607   PyObject *__pyx_r = NULL;
15608   __Pyx_RefNannyDeclarations
15609   PyObject *__pyx_t_1 = NULL;
15610   int __pyx_lineno = 0;
15611   const char *__pyx_filename = NULL;
15612   int __pyx_clineno = 0;
15613   __Pyx_RefNannySetupContext("__get__", 0);
15614   __Pyx_XDECREF(__pyx_r);
15615   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endog2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
15616   __Pyx_GOTREF(__pyx_t_1);
15617   __pyx_r = __pyx_t_1;
15618   __pyx_t_1 = 0;
15619   goto __pyx_L0;
15620 
15621   /* function exit code */
15622   __pyx_L1_error:;
15623   __Pyx_XDECREF(__pyx_t_1);
15624   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._k_endog2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15625   __pyx_r = NULL;
15626   __pyx_L0:;
15627   __Pyx_XGIVEREF(__pyx_r);
15628   __Pyx_RefNannyFinishContext();
15629   return __pyx_r;
15630 }
15631 
15632 /* Python wrapper */
15633 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_states2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_states2_1__get__(PyObject * __pyx_v_self)15634 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_states2_1__get__(PyObject *__pyx_v_self) {
15635   PyObject *__pyx_r = 0;
15636   __Pyx_RefNannyDeclarations
15637   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15638   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_states2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15639 
15640   /* function exit code */
15641   __Pyx_RefNannyFinishContext();
15642   return __pyx_r;
15643 }
15644 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15645 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15646   PyObject *__pyx_r = NULL;
15647   __Pyx_RefNannyDeclarations
15648   PyObject *__pyx_t_1 = NULL;
15649   int __pyx_lineno = 0;
15650   const char *__pyx_filename = NULL;
15651   int __pyx_clineno = 0;
15652   __Pyx_RefNannySetupContext("__get__", 0);
15653   __Pyx_XDECREF(__pyx_r);
15654   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_states2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
15655   __Pyx_GOTREF(__pyx_t_1);
15656   __pyx_r = __pyx_t_1;
15657   __pyx_t_1 = 0;
15658   goto __pyx_L0;
15659 
15660   /* function exit code */
15661   __pyx_L1_error:;
15662   __Pyx_XDECREF(__pyx_t_1);
15663   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._k_states2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15664   __pyx_r = NULL;
15665   __pyx_L0:;
15666   __Pyx_XGIVEREF(__pyx_r);
15667   __Pyx_RefNannyFinishContext();
15668   return __pyx_r;
15669 }
15670 
15671 /* Python wrapper */
15672 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_posdef2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_posdef2_1__get__(PyObject * __pyx_v_self)15673 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_posdef2_1__get__(PyObject *__pyx_v_self) {
15674   PyObject *__pyx_r = 0;
15675   __Pyx_RefNannyDeclarations
15676   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15677   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_posdef2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15678 
15679   /* function exit code */
15680   __Pyx_RefNannyFinishContext();
15681   return __pyx_r;
15682 }
15683 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15684 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15685   PyObject *__pyx_r = NULL;
15686   __Pyx_RefNannyDeclarations
15687   PyObject *__pyx_t_1 = NULL;
15688   int __pyx_lineno = 0;
15689   const char *__pyx_filename = NULL;
15690   int __pyx_clineno = 0;
15691   __Pyx_RefNannySetupContext("__get__", 0);
15692   __Pyx_XDECREF(__pyx_r);
15693   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_posdef2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
15694   __Pyx_GOTREF(__pyx_t_1);
15695   __pyx_r = __pyx_t_1;
15696   __pyx_t_1 = 0;
15697   goto __pyx_L0;
15698 
15699   /* function exit code */
15700   __pyx_L1_error:;
15701   __Pyx_XDECREF(__pyx_t_1);
15702   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._k_posdef2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15703   __pyx_r = NULL;
15704   __pyx_L0:;
15705   __Pyx_XGIVEREF(__pyx_r);
15706   __Pyx_RefNannyFinishContext();
15707   return __pyx_r;
15708 }
15709 
15710 /* Python wrapper */
15711 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14_k_endogstates_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14_k_endogstates_1__get__(PyObject * __pyx_v_self)15712 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14_k_endogstates_1__get__(PyObject *__pyx_v_self) {
15713   PyObject *__pyx_r = 0;
15714   __Pyx_RefNannyDeclarations
15715   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15716   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14_k_endogstates___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15717 
15718   /* function exit code */
15719   __Pyx_RefNannyFinishContext();
15720   return __pyx_r;
15721 }
15722 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15723 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15724   PyObject *__pyx_r = NULL;
15725   __Pyx_RefNannyDeclarations
15726   PyObject *__pyx_t_1 = NULL;
15727   int __pyx_lineno = 0;
15728   const char *__pyx_filename = NULL;
15729   int __pyx_clineno = 0;
15730   __Pyx_RefNannySetupContext("__get__", 0);
15731   __Pyx_XDECREF(__pyx_r);
15732   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endogstates); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
15733   __Pyx_GOTREF(__pyx_t_1);
15734   __pyx_r = __pyx_t_1;
15735   __pyx_t_1 = 0;
15736   goto __pyx_L0;
15737 
15738   /* function exit code */
15739   __pyx_L1_error:;
15740   __Pyx_XDECREF(__pyx_t_1);
15741   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._k_endogstates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15742   __pyx_r = NULL;
15743   __pyx_L0:;
15744   __Pyx_XGIVEREF(__pyx_r);
15745   __Pyx_RefNannyFinishContext();
15746   return __pyx_r;
15747 }
15748 
15749 /* Python wrapper */
15750 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15_k_statesposdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15_k_statesposdef_1__get__(PyObject * __pyx_v_self)15751 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15_k_statesposdef_1__get__(PyObject *__pyx_v_self) {
15752   PyObject *__pyx_r = 0;
15753   __Pyx_RefNannyDeclarations
15754   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15755   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15_k_statesposdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15756 
15757   /* function exit code */
15758   __Pyx_RefNannyFinishContext();
15759   return __pyx_r;
15760 }
15761 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15762 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15763   PyObject *__pyx_r = NULL;
15764   __Pyx_RefNannyDeclarations
15765   PyObject *__pyx_t_1 = NULL;
15766   int __pyx_lineno = 0;
15767   const char *__pyx_filename = NULL;
15768   int __pyx_clineno = 0;
15769   __Pyx_RefNannySetupContext("__get__", 0);
15770   __Pyx_XDECREF(__pyx_r);
15771   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_statesposdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
15772   __Pyx_GOTREF(__pyx_t_1);
15773   __pyx_r = __pyx_t_1;
15774   __pyx_t_1 = 0;
15775   goto __pyx_L0;
15776 
15777   /* function exit code */
15778   __pyx_L1_error:;
15779   __Pyx_XDECREF(__pyx_t_1);
15780   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._k_statesposdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15781   __pyx_r = NULL;
15782   __pyx_L0:;
15783   __Pyx_XGIVEREF(__pyx_r);
15784   __Pyx_RefNannyFinishContext();
15785   return __pyx_r;
15786 }
15787 
15788 /* "statsmodels/tsa/statespace/_representation.pxd":76
15789  *     cdef readonly int _previous_t
15790  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
15791  *     cdef readonly int _nmissing             # <<<<<<<<<<<<<<
15792  *
15793  *     # Functions
15794  */
15795 
15796 /* Python wrapper */
15797 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_nmissing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_nmissing_1__get__(PyObject * __pyx_v_self)15798 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_nmissing_1__get__(PyObject *__pyx_v_self) {
15799   PyObject *__pyx_r = 0;
15800   __Pyx_RefNannyDeclarations
15801   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
15802   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_nmissing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)__pyx_v_self));
15803 
15804   /* function exit code */
15805   __Pyx_RefNannyFinishContext();
15806   return __pyx_r;
15807 }
15808 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace * __pyx_v_self)15809 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *__pyx_v_self) {
15810   PyObject *__pyx_r = NULL;
15811   __Pyx_RefNannyDeclarations
15812   PyObject *__pyx_t_1 = NULL;
15813   int __pyx_lineno = 0;
15814   const char *__pyx_filename = NULL;
15815   int __pyx_clineno = 0;
15816   __Pyx_RefNannySetupContext("__get__", 0);
15817   __Pyx_XDECREF(__pyx_r);
15818   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nmissing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 76, __pyx_L1_error)
15819   __Pyx_GOTREF(__pyx_t_1);
15820   __pyx_r = __pyx_t_1;
15821   __pyx_t_1 = 0;
15822   goto __pyx_L0;
15823 
15824   /* function exit code */
15825   __pyx_L1_error:;
15826   __Pyx_XDECREF(__pyx_t_1);
15827   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.sStatespace._nmissing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15828   __pyx_r = NULL;
15829   __pyx_L0:;
15830   __Pyx_XGIVEREF(__pyx_r);
15831   __Pyx_RefNannyFinishContext();
15832   return __pyx_r;
15833 }
15834 
15835 /* "statsmodels/tsa/statespace/_representation.pyx":989
15836  *
15837  * # ### Selected covariance matrice
15838  * cdef int sselect_cov(int k, int k_posdef,             # <<<<<<<<<<<<<<
15839  *                               np.float32_t * tmp,
15840  *                               np.float32_t * selection,
15841  */
15842 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_sselect_cov(int __pyx_v_k,int __pyx_v_k_posdef,__pyx_t_5numpy_float32_t * __pyx_v_tmp,__pyx_t_5numpy_float32_t * __pyx_v_selection,__pyx_t_5numpy_float32_t * __pyx_v_cov,__pyx_t_5numpy_float32_t * __pyx_v_selected_cov)15843 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_sselect_cov(int __pyx_v_k, int __pyx_v_k_posdef, __pyx_t_5numpy_float32_t *__pyx_v_tmp, __pyx_t_5numpy_float32_t *__pyx_v_selection, __pyx_t_5numpy_float32_t *__pyx_v_cov, __pyx_t_5numpy_float32_t *__pyx_v_selected_cov) {
15844   __pyx_t_5numpy_float32_t __pyx_v_alpha;
15845   __pyx_t_5numpy_float32_t __pyx_v_beta;
15846   int __pyx_r;
15847   __Pyx_RefNannyDeclarations
15848   int __pyx_t_1;
15849   __Pyx_RefNannySetupContext("sselect_cov", 0);
15850 
15851   /* "statsmodels/tsa/statespace/_representation.pyx":995
15852  *                               np.float32_t * selected_cov):
15853  *     cdef:
15854  *         np.float32_t alpha = 1.0             # <<<<<<<<<<<<<<
15855  *         np.float32_t beta = 0.0
15856  *
15857  */
15858   __pyx_v_alpha = 1.0;
15859 
15860   /* "statsmodels/tsa/statespace/_representation.pyx":996
15861  *     cdef:
15862  *         np.float32_t alpha = 1.0
15863  *         np.float32_t beta = 0.0             # <<<<<<<<<<<<<<
15864  *
15865  *     # Only need to do something if there is a covariance matrix
15866  */
15867   __pyx_v_beta = 0.0;
15868 
15869   /* "statsmodels/tsa/statespace/_representation.pyx":1000
15870  *     # Only need to do something if there is a covariance matrix
15871  *     # (i.e k_posdof == 0)
15872  *     if k_posdef > 0:             # <<<<<<<<<<<<<<
15873  *
15874  *         # #### Calculate selected state covariance matrix
15875  */
15876   __pyx_t_1 = ((__pyx_v_k_posdef > 0) != 0);
15877   if (__pyx_t_1) {
15878 
15879     /* "statsmodels/tsa/statespace/_representation.pyx":1016
15880  *         # $\\#_0 = 1.0 * R_t Q_t$
15881  *         # $(m \times r) = (m \times r) (r \times r)$
15882  *         blas.sgemm("N", "N", &k, &k_posdef, &k_posdef,             # <<<<<<<<<<<<<<
15883  *               &alpha, selection, &k,
15884  *                       cov, &k_posdef,
15885  */
15886     __pyx_f_5scipy_6linalg_11cython_blas_sgemm(((char *)"N"), ((char *)"N"), (&__pyx_v_k), (&__pyx_v_k_posdef), (&__pyx_v_k_posdef), (&__pyx_v_alpha), __pyx_v_selection, (&__pyx_v_k), __pyx_v_cov, (&__pyx_v_k_posdef), (&__pyx_v_beta), __pyx_v_tmp, (&__pyx_v_k));
15887 
15888     /* "statsmodels/tsa/statespace/_representation.pyx":1022
15889  *         # $Q_t^* = 1.0 * \\#_0 R_t'$
15890  *         # $(m \times m) = (m \times r) (m \times r)'$
15891  *         blas.sgemm("N", "T", &k, &k, &k_posdef,             # <<<<<<<<<<<<<<
15892  *               &alpha, tmp, &k,
15893  *                       selection, &k,
15894  */
15895     __pyx_f_5scipy_6linalg_11cython_blas_sgemm(((char *)"N"), ((char *)"T"), (&__pyx_v_k), (&__pyx_v_k), (&__pyx_v_k_posdef), (&__pyx_v_alpha), __pyx_v_tmp, (&__pyx_v_k), __pyx_v_selection, (&__pyx_v_k), (&__pyx_v_beta), __pyx_v_selected_cov, (&__pyx_v_k));
15896 
15897     /* "statsmodels/tsa/statespace/_representation.pyx":1000
15898  *     # Only need to do something if there is a covariance matrix
15899  *     # (i.e k_posdof == 0)
15900  *     if k_posdef > 0:             # <<<<<<<<<<<<<<
15901  *
15902  *         # #### Calculate selected state covariance matrix
15903  */
15904   }
15905 
15906   /* "statsmodels/tsa/statespace/_representation.pyx":989
15907  *
15908  * # ### Selected covariance matrice
15909  * cdef int sselect_cov(int k, int k_posdef,             # <<<<<<<<<<<<<<
15910  *                               np.float32_t * tmp,
15911  *                               np.float32_t * selection,
15912  */
15913 
15914   /* function exit code */
15915   __pyx_r = 0;
15916   __Pyx_RefNannyFinishContext();
15917   return __pyx_r;
15918 }
15919 
15920 /* "statsmodels/tsa/statespace/_representation.pyx":1147
15921  *     # ### Initialize state space model
15922  *     # *Note*: The initial state and state covariance matrix must be provided.
15923  *     def __init__(self,             # <<<<<<<<<<<<<<
15924  *                  np.float64_t [::1,:]   obs,
15925  *                  np.float64_t [::1,:,:] design,
15926  */
15927 
15928 /* Python wrapper */
15929 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1__init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)15930 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15931   __Pyx_memviewslice __pyx_v_obs = { 0, 0, { 0 }, { 0 }, { 0 } };
15932   __Pyx_memviewslice __pyx_v_design = { 0, 0, { 0 }, { 0 }, { 0 } };
15933   __Pyx_memviewslice __pyx_v_obs_intercept = { 0, 0, { 0 }, { 0 }, { 0 } };
15934   __Pyx_memviewslice __pyx_v_obs_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
15935   __Pyx_memviewslice __pyx_v_transition = { 0, 0, { 0 }, { 0 }, { 0 } };
15936   __Pyx_memviewslice __pyx_v_state_intercept = { 0, 0, { 0 }, { 0 }, { 0 } };
15937   __Pyx_memviewslice __pyx_v_selection = { 0, 0, { 0 }, { 0 }, { 0 } };
15938   __Pyx_memviewslice __pyx_v_state_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
15939   PyObject *__pyx_v_diagonal_obs_cov = 0;
15940   int __pyx_lineno = 0;
15941   const char *__pyx_filename = NULL;
15942   int __pyx_clineno = 0;
15943   int __pyx_r;
15944   __Pyx_RefNannyDeclarations
15945   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
15946   {
15947     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obs,&__pyx_n_s_design,&__pyx_n_s_obs_intercept,&__pyx_n_s_obs_cov,&__pyx_n_s_transition,&__pyx_n_s_state_intercept,&__pyx_n_s_selection,&__pyx_n_s_state_cov,&__pyx_n_s_diagonal_obs_cov,0};
15948     PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
15949     values[8] = ((PyObject *)__pyx_int_neg_1);
15950     if (unlikely(__pyx_kwds)) {
15951       Py_ssize_t kw_args;
15952       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15953       switch (pos_args) {
15954         case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
15955         CYTHON_FALLTHROUGH;
15956         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
15957         CYTHON_FALLTHROUGH;
15958         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
15959         CYTHON_FALLTHROUGH;
15960         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
15961         CYTHON_FALLTHROUGH;
15962         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
15963         CYTHON_FALLTHROUGH;
15964         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15965         CYTHON_FALLTHROUGH;
15966         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15967         CYTHON_FALLTHROUGH;
15968         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15969         CYTHON_FALLTHROUGH;
15970         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15971         CYTHON_FALLTHROUGH;
15972         case  0: break;
15973         default: goto __pyx_L5_argtuple_error;
15974       }
15975       kw_args = PyDict_Size(__pyx_kwds);
15976       switch (pos_args) {
15977         case  0:
15978         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs)) != 0)) kw_args--;
15979         else goto __pyx_L5_argtuple_error;
15980         CYTHON_FALLTHROUGH;
15981         case  1:
15982         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_design)) != 0)) kw_args--;
15983         else {
15984           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 1); __PYX_ERR(0, 1147, __pyx_L3_error)
15985         }
15986         CYTHON_FALLTHROUGH;
15987         case  2:
15988         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs_intercept)) != 0)) kw_args--;
15989         else {
15990           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 2); __PYX_ERR(0, 1147, __pyx_L3_error)
15991         }
15992         CYTHON_FALLTHROUGH;
15993         case  3:
15994         if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs_cov)) != 0)) kw_args--;
15995         else {
15996           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 3); __PYX_ERR(0, 1147, __pyx_L3_error)
15997         }
15998         CYTHON_FALLTHROUGH;
15999         case  4:
16000         if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transition)) != 0)) kw_args--;
16001         else {
16002           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 4); __PYX_ERR(0, 1147, __pyx_L3_error)
16003         }
16004         CYTHON_FALLTHROUGH;
16005         case  5:
16006         if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_intercept)) != 0)) kw_args--;
16007         else {
16008           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 5); __PYX_ERR(0, 1147, __pyx_L3_error)
16009         }
16010         CYTHON_FALLTHROUGH;
16011         case  6:
16012         if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_selection)) != 0)) kw_args--;
16013         else {
16014           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 6); __PYX_ERR(0, 1147, __pyx_L3_error)
16015         }
16016         CYTHON_FALLTHROUGH;
16017         case  7:
16018         if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_cov)) != 0)) kw_args--;
16019         else {
16020           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 7); __PYX_ERR(0, 1147, __pyx_L3_error)
16021         }
16022         CYTHON_FALLTHROUGH;
16023         case  8:
16024         if (kw_args > 0) {
16025           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_diagonal_obs_cov);
16026           if (value) { values[8] = value; kw_args--; }
16027         }
16028       }
16029       if (unlikely(kw_args > 0)) {
16030         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1147, __pyx_L3_error)
16031       }
16032     } else {
16033       switch (PyTuple_GET_SIZE(__pyx_args)) {
16034         case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
16035         CYTHON_FALLTHROUGH;
16036         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
16037         values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16038         values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16039         values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16040         values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16041         values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16042         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16043         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16044         break;
16045         default: goto __pyx_L5_argtuple_error;
16046       }
16047     }
16048     __pyx_v_obs = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs.memview)) __PYX_ERR(0, 1148, __pyx_L3_error)
16049     __pyx_v_design = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_design.memview)) __PYX_ERR(0, 1149, __pyx_L3_error)
16050     __pyx_v_obs_intercept = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs_intercept.memview)) __PYX_ERR(0, 1150, __pyx_L3_error)
16051     __pyx_v_obs_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs_cov.memview)) __PYX_ERR(0, 1151, __pyx_L3_error)
16052     __pyx_v_transition = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_transition.memview)) __PYX_ERR(0, 1152, __pyx_L3_error)
16053     __pyx_v_state_intercept = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_state_intercept.memview)) __PYX_ERR(0, 1153, __pyx_L3_error)
16054     __pyx_v_selection = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_selection.memview)) __PYX_ERR(0, 1154, __pyx_L3_error)
16055     __pyx_v_state_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(values[7], PyBUF_WRITABLE); if (unlikely(!__pyx_v_state_cov.memview)) __PYX_ERR(0, 1155, __pyx_L3_error)
16056     __pyx_v_diagonal_obs_cov = values[8];
16057   }
16058   goto __pyx_L4_argument_unpacking_done;
16059   __pyx_L5_argtuple_error:;
16060   __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1147, __pyx_L3_error)
16061   __pyx_L3_error:;
16062   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16063   __Pyx_RefNannyFinishContext();
16064   return -1;
16065   __pyx_L4_argument_unpacking_done:;
16066   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace___init__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), __pyx_v_obs, __pyx_v_design, __pyx_v_obs_intercept, __pyx_v_obs_cov, __pyx_v_transition, __pyx_v_state_intercept, __pyx_v_selection, __pyx_v_state_cov, __pyx_v_diagonal_obs_cov);
16067 
16068   /* function exit code */
16069   __Pyx_RefNannyFinishContext();
16070   return __pyx_r;
16071 }
16072 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,__Pyx_memviewslice __pyx_v_obs,__Pyx_memviewslice __pyx_v_design,__Pyx_memviewslice __pyx_v_obs_intercept,__Pyx_memviewslice __pyx_v_obs_cov,__Pyx_memviewslice __pyx_v_transition,__Pyx_memviewslice __pyx_v_state_intercept,__Pyx_memviewslice __pyx_v_selection,__Pyx_memviewslice __pyx_v_state_cov,PyObject * __pyx_v_diagonal_obs_cov)16073 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_obs, __Pyx_memviewslice __pyx_v_design, __Pyx_memviewslice __pyx_v_obs_intercept, __Pyx_memviewslice __pyx_v_obs_cov, __Pyx_memviewslice __pyx_v_transition, __Pyx_memviewslice __pyx_v_state_intercept, __Pyx_memviewslice __pyx_v_selection, __Pyx_memviewslice __pyx_v_state_cov, PyObject *__pyx_v_diagonal_obs_cov) {
16074   npy_intp __pyx_v_dim1[1];
16075   npy_intp __pyx_v_dim2[2];
16076   npy_intp __pyx_v_dim3[3];
16077   int __pyx_r;
16078   __Pyx_RefNannyDeclarations
16079   PyObject *__pyx_t_1 = NULL;
16080   PyObject *__pyx_t_2 = NULL;
16081   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape __pyx_t_3;
16082   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape __pyx_t_4;
16083   int __pyx_t_5;
16084   int __pyx_t_6;
16085   int __pyx_t_7;
16086   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
16087   PyObject *__pyx_t_9 = NULL;
16088   PyObject *__pyx_t_10 = NULL;
16089   PyObject *__pyx_t_11 = NULL;
16090   __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
16091   __Pyx_memviewslice __pyx_t_13 = { 0, 0, { 0 }, { 0 }, { 0 } };
16092   int __pyx_t_14;
16093   int __pyx_t_15;
16094   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
16095   __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
16096   int __pyx_lineno = 0;
16097   const char *__pyx_filename = NULL;
16098   int __pyx_clineno = 0;
16099   __Pyx_RefNannySetupContext("__init__", 0);
16100 
16101   /* "statsmodels/tsa/statespace/_representation.pyx":1169
16102  *         # Python and passed to this constructor, so if they are updated in
16103  *         # Python they will also be updated here.
16104  *         self.obs = obs             # <<<<<<<<<<<<<<
16105  *         self.design = design
16106  *         self.obs_intercept = obs_intercept
16107  */
16108   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs, 0);
16109   __PYX_INC_MEMVIEW(&__pyx_v_obs, 0);
16110   __pyx_v_self->obs = __pyx_v_obs;
16111 
16112   /* "statsmodels/tsa/statespace/_representation.pyx":1170
16113  *         # Python they will also be updated here.
16114  *         self.obs = obs
16115  *         self.design = design             # <<<<<<<<<<<<<<
16116  *         self.obs_intercept = obs_intercept
16117  *         self.obs_cov = obs_cov
16118  */
16119   __PYX_XDEC_MEMVIEW(&__pyx_v_self->design, 0);
16120   __PYX_INC_MEMVIEW(&__pyx_v_design, 0);
16121   __pyx_v_self->design = __pyx_v_design;
16122 
16123   /* "statsmodels/tsa/statespace/_representation.pyx":1171
16124  *         self.obs = obs
16125  *         self.design = design
16126  *         self.obs_intercept = obs_intercept             # <<<<<<<<<<<<<<
16127  *         self.obs_cov = obs_cov
16128  *         self.transition = transition
16129  */
16130   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs_intercept, 0);
16131   __PYX_INC_MEMVIEW(&__pyx_v_obs_intercept, 0);
16132   __pyx_v_self->obs_intercept = __pyx_v_obs_intercept;
16133 
16134   /* "statsmodels/tsa/statespace/_representation.pyx":1172
16135  *         self.design = design
16136  *         self.obs_intercept = obs_intercept
16137  *         self.obs_cov = obs_cov             # <<<<<<<<<<<<<<
16138  *         self.transition = transition
16139  *         self.state_intercept = state_intercept
16140  */
16141   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs_cov, 0);
16142   __PYX_INC_MEMVIEW(&__pyx_v_obs_cov, 0);
16143   __pyx_v_self->obs_cov = __pyx_v_obs_cov;
16144 
16145   /* "statsmodels/tsa/statespace/_representation.pyx":1173
16146  *         self.obs_intercept = obs_intercept
16147  *         self.obs_cov = obs_cov
16148  *         self.transition = transition             # <<<<<<<<<<<<<<
16149  *         self.state_intercept = state_intercept
16150  *         self.selection = selection
16151  */
16152   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transition, 0);
16153   __PYX_INC_MEMVIEW(&__pyx_v_transition, 0);
16154   __pyx_v_self->transition = __pyx_v_transition;
16155 
16156   /* "statsmodels/tsa/statespace/_representation.pyx":1174
16157  *         self.obs_cov = obs_cov
16158  *         self.transition = transition
16159  *         self.state_intercept = state_intercept             # <<<<<<<<<<<<<<
16160  *         self.selection = selection
16161  *         self.state_cov = state_cov
16162  */
16163   __PYX_XDEC_MEMVIEW(&__pyx_v_self->state_intercept, 0);
16164   __PYX_INC_MEMVIEW(&__pyx_v_state_intercept, 0);
16165   __pyx_v_self->state_intercept = __pyx_v_state_intercept;
16166 
16167   /* "statsmodels/tsa/statespace/_representation.pyx":1175
16168  *         self.transition = transition
16169  *         self.state_intercept = state_intercept
16170  *         self.selection = selection             # <<<<<<<<<<<<<<
16171  *         self.state_cov = state_cov
16172  *
16173  */
16174   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selection, 0);
16175   __PYX_INC_MEMVIEW(&__pyx_v_selection, 0);
16176   __pyx_v_self->selection = __pyx_v_selection;
16177 
16178   /* "statsmodels/tsa/statespace/_representation.pyx":1176
16179  *         self.state_intercept = state_intercept
16180  *         self.selection = selection
16181  *         self.state_cov = state_cov             # <<<<<<<<<<<<<<
16182  *
16183  *         # Dimensions
16184  */
16185   __PYX_XDEC_MEMVIEW(&__pyx_v_self->state_cov, 0);
16186   __PYX_INC_MEMVIEW(&__pyx_v_state_cov, 0);
16187   __pyx_v_self->state_cov = __pyx_v_state_cov;
16188 
16189   /* "statsmodels/tsa/statespace/_representation.pyx":1179
16190  *
16191  *         # Dimensions
16192  *         self.k_endog = obs.shape[0]             # <<<<<<<<<<<<<<
16193  *         self.k_states = selection.shape[0]
16194  *         self.k_posdef = selection.shape[1]
16195  */
16196   __pyx_v_self->k_endog = (__pyx_v_obs.shape[0]);
16197 
16198   /* "statsmodels/tsa/statespace/_representation.pyx":1180
16199  *         # Dimensions
16200  *         self.k_endog = obs.shape[0]
16201  *         self.k_states = selection.shape[0]             # <<<<<<<<<<<<<<
16202  *         self.k_posdef = selection.shape[1]
16203  *         self.nobs = obs.shape[1]
16204  */
16205   __pyx_v_self->k_states = (__pyx_v_selection.shape[0]);
16206 
16207   /* "statsmodels/tsa/statespace/_representation.pyx":1181
16208  *         self.k_endog = obs.shape[0]
16209  *         self.k_states = selection.shape[0]
16210  *         self.k_posdef = selection.shape[1]             # <<<<<<<<<<<<<<
16211  *         self.nobs = obs.shape[1]
16212  *
16213  */
16214   __pyx_v_self->k_posdef = (__pyx_v_selection.shape[1]);
16215 
16216   /* "statsmodels/tsa/statespace/_representation.pyx":1182
16217  *         self.k_states = selection.shape[0]
16218  *         self.k_posdef = selection.shape[1]
16219  *         self.nobs = obs.shape[1]             # <<<<<<<<<<<<<<
16220  *
16221  *         # #### Validate matrix dimensions
16222  */
16223   __pyx_v_self->nobs = (__pyx_v_obs.shape[1]);
16224 
16225   /* "statsmodels/tsa/statespace/_representation.pyx":1187
16226  *         #
16227  *         # Make sure that the given state-space matrices have consistent sizes
16228  *         tools.validate_matrix_shape('design', &self.design.shape[0],             # <<<<<<<<<<<<<<
16229  *                               self.k_endog, self.k_states, self.nobs)
16230  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
16231  */
16232   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1187, __pyx_L1_error)}
16233 
16234   /* "statsmodels/tsa/statespace/_representation.pyx":1188
16235  *         # Make sure that the given state-space matrices have consistent sizes
16236  *         tools.validate_matrix_shape('design', &self.design.shape[0],
16237  *                               self.k_endog, self.k_states, self.nobs)             # <<<<<<<<<<<<<<
16238  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
16239  *                               self.k_endog, self.nobs)
16240  */
16241   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
16242   __Pyx_GOTREF(__pyx_t_1);
16243 
16244   /* "statsmodels/tsa/statespace/_representation.pyx":1187
16245  *         #
16246  *         # Make sure that the given state-space matrices have consistent sizes
16247  *         tools.validate_matrix_shape('design', &self.design.shape[0],             # <<<<<<<<<<<<<<
16248  *                               self.k_endog, self.k_states, self.nobs)
16249  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
16250  */
16251   __pyx_t_3.__pyx_n = 1;
16252   __pyx_t_3.nobs = __pyx_t_1;
16253   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_n_u_design, (&(__pyx_v_self->design.shape[0])), __pyx_v_self->k_endog, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error)
16254   __Pyx_GOTREF(__pyx_t_2);
16255   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16256   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16257 
16258   /* "statsmodels/tsa/statespace/_representation.pyx":1189
16259  *         tools.validate_matrix_shape('design', &self.design.shape[0],
16260  *                               self.k_endog, self.k_states, self.nobs)
16261  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],             # <<<<<<<<<<<<<<
16262  *                               self.k_endog, self.nobs)
16263  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
16264  */
16265   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1189, __pyx_L1_error)}
16266 
16267   /* "statsmodels/tsa/statespace/_representation.pyx":1190
16268  *                               self.k_endog, self.k_states, self.nobs)
16269  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
16270  *                               self.k_endog, self.nobs)             # <<<<<<<<<<<<<<
16271  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
16272  *                               self.k_endog, self.k_endog, self.nobs)
16273  */
16274   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error)
16275   __Pyx_GOTREF(__pyx_t_2);
16276 
16277   /* "statsmodels/tsa/statespace/_representation.pyx":1189
16278  *         tools.validate_matrix_shape('design', &self.design.shape[0],
16279  *                               self.k_endog, self.k_states, self.nobs)
16280  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],             # <<<<<<<<<<<<<<
16281  *                               self.k_endog, self.nobs)
16282  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
16283  */
16284   __pyx_t_4.__pyx_n = 1;
16285   __pyx_t_4.nobs = __pyx_t_2;
16286   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_observation_intercept, (&(__pyx_v_self->obs_intercept.shape[0])), __pyx_v_self->k_endog, &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error)
16287   __Pyx_GOTREF(__pyx_t_1);
16288   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16289   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16290 
16291   /* "statsmodels/tsa/statespace/_representation.pyx":1191
16292  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
16293  *                               self.k_endog, self.nobs)
16294  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],             # <<<<<<<<<<<<<<
16295  *                               self.k_endog, self.k_endog, self.nobs)
16296  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
16297  */
16298   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1191, __pyx_L1_error)}
16299 
16300   /* "statsmodels/tsa/statespace/_representation.pyx":1192
16301  *                               self.k_endog, self.nobs)
16302  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
16303  *                               self.k_endog, self.k_endog, self.nobs)             # <<<<<<<<<<<<<<
16304  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
16305  *                               self.k_states, self.k_states, self.nobs)
16306  */
16307   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
16308   __Pyx_GOTREF(__pyx_t_1);
16309 
16310   /* "statsmodels/tsa/statespace/_representation.pyx":1191
16311  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
16312  *                               self.k_endog, self.nobs)
16313  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],             # <<<<<<<<<<<<<<
16314  *                               self.k_endog, self.k_endog, self.nobs)
16315  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
16316  */
16317   __pyx_t_3.__pyx_n = 1;
16318   __pyx_t_3.nobs = __pyx_t_1;
16319   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_observation_covariance_matrix, (&(__pyx_v_self->obs_cov.shape[0])), __pyx_v_self->k_endog, __pyx_v_self->k_endog, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1191, __pyx_L1_error)
16320   __Pyx_GOTREF(__pyx_t_2);
16321   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16322   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16323 
16324   /* "statsmodels/tsa/statespace/_representation.pyx":1193
16325  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
16326  *                               self.k_endog, self.k_endog, self.nobs)
16327  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],             # <<<<<<<<<<<<<<
16328  *                               self.k_states, self.k_states, self.nobs)
16329  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
16330  */
16331   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1193, __pyx_L1_error)}
16332 
16333   /* "statsmodels/tsa/statespace/_representation.pyx":1194
16334  *                               self.k_endog, self.k_endog, self.nobs)
16335  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
16336  *                               self.k_states, self.k_states, self.nobs)             # <<<<<<<<<<<<<<
16337  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
16338  *                               self.k_states, self.nobs)
16339  */
16340   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error)
16341   __Pyx_GOTREF(__pyx_t_2);
16342 
16343   /* "statsmodels/tsa/statespace/_representation.pyx":1193
16344  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
16345  *                               self.k_endog, self.k_endog, self.nobs)
16346  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],             # <<<<<<<<<<<<<<
16347  *                               self.k_states, self.k_states, self.nobs)
16348  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
16349  */
16350   __pyx_t_3.__pyx_n = 1;
16351   __pyx_t_3.nobs = __pyx_t_2;
16352   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_n_u_transition, (&(__pyx_v_self->transition.shape[0])), __pyx_v_self->k_states, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
16353   __Pyx_GOTREF(__pyx_t_1);
16354   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16355   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16356 
16357   /* "statsmodels/tsa/statespace/_representation.pyx":1195
16358  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
16359  *                               self.k_states, self.k_states, self.nobs)
16360  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],             # <<<<<<<<<<<<<<
16361  *                               self.k_states, self.nobs)
16362  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
16363  */
16364   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1195, __pyx_L1_error)}
16365 
16366   /* "statsmodels/tsa/statespace/_representation.pyx":1196
16367  *                               self.k_states, self.k_states, self.nobs)
16368  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
16369  *                               self.k_states, self.nobs)             # <<<<<<<<<<<<<<
16370  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
16371  *                               self.k_posdef, self.k_posdef, self.nobs)
16372  */
16373   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L1_error)
16374   __Pyx_GOTREF(__pyx_t_1);
16375 
16376   /* "statsmodels/tsa/statespace/_representation.pyx":1195
16377  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
16378  *                               self.k_states, self.k_states, self.nobs)
16379  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],             # <<<<<<<<<<<<<<
16380  *                               self.k_states, self.nobs)
16381  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
16382  */
16383   __pyx_t_4.__pyx_n = 1;
16384   __pyx_t_4.nobs = __pyx_t_1;
16385   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_state_intercept_2, (&(__pyx_v_self->state_intercept.shape[0])), __pyx_v_self->k_states, &__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1195, __pyx_L1_error)
16386   __Pyx_GOTREF(__pyx_t_2);
16387   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16388   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16389 
16390   /* "statsmodels/tsa/statespace/_representation.pyx":1197
16391  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
16392  *                               self.k_states, self.nobs)
16393  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],             # <<<<<<<<<<<<<<
16394  *                               self.k_posdef, self.k_posdef, self.nobs)
16395  *
16396  */
16397   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1197, __pyx_L1_error)}
16398 
16399   /* "statsmodels/tsa/statespace/_representation.pyx":1198
16400  *                               self.k_states, self.nobs)
16401  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
16402  *                               self.k_posdef, self.k_posdef, self.nobs)             # <<<<<<<<<<<<<<
16403  *
16404  *         # Check for a time-invariant model
16405  */
16406   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error)
16407   __Pyx_GOTREF(__pyx_t_2);
16408 
16409   /* "statsmodels/tsa/statespace/_representation.pyx":1197
16410  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
16411  *                               self.k_states, self.nobs)
16412  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],             # <<<<<<<<<<<<<<
16413  *                               self.k_posdef, self.k_posdef, self.nobs)
16414  *
16415  */
16416   __pyx_t_3.__pyx_n = 1;
16417   __pyx_t_3.nobs = __pyx_t_2;
16418   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_state_covariance_matrix, (&(__pyx_v_self->state_cov.shape[0])), __pyx_v_self->k_posdef, __pyx_v_self->k_posdef, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
16419   __Pyx_GOTREF(__pyx_t_1);
16420   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16421   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16422 
16423   /* "statsmodels/tsa/statespace/_representation.pyx":1202
16424  *         # Check for a time-invariant model
16425  *         self.time_invariant = (
16426  *             self.design.shape[2] == 1           and             # <<<<<<<<<<<<<<
16427  *             self.obs_intercept.shape[1] == 1    and
16428  *             self.obs_cov.shape[2] == 1          and
16429  */
16430   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1202, __pyx_L1_error)}
16431   __pyx_t_6 = ((__pyx_v_self->design.shape[2]) == 1);
16432   if (__pyx_t_6) {
16433   } else {
16434     __pyx_t_5 = __pyx_t_6;
16435     goto __pyx_L3_bool_binop_done;
16436   }
16437 
16438   /* "statsmodels/tsa/statespace/_representation.pyx":1203
16439  *         self.time_invariant = (
16440  *             self.design.shape[2] == 1           and
16441  *             self.obs_intercept.shape[1] == 1    and             # <<<<<<<<<<<<<<
16442  *             self.obs_cov.shape[2] == 1          and
16443  *             self.transition.shape[2] == 1       and
16444  */
16445   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1203, __pyx_L1_error)}
16446   __pyx_t_6 = ((__pyx_v_self->obs_intercept.shape[1]) == 1);
16447   if (__pyx_t_6) {
16448   } else {
16449     __pyx_t_5 = __pyx_t_6;
16450     goto __pyx_L3_bool_binop_done;
16451   }
16452 
16453   /* "statsmodels/tsa/statespace/_representation.pyx":1204
16454  *             self.design.shape[2] == 1           and
16455  *             self.obs_intercept.shape[1] == 1    and
16456  *             self.obs_cov.shape[2] == 1          and             # <<<<<<<<<<<<<<
16457  *             self.transition.shape[2] == 1       and
16458  *             self.state_intercept.shape[1] == 1  and
16459  */
16460   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1204, __pyx_L1_error)}
16461   __pyx_t_6 = ((__pyx_v_self->obs_cov.shape[2]) == 1);
16462   if (__pyx_t_6) {
16463   } else {
16464     __pyx_t_5 = __pyx_t_6;
16465     goto __pyx_L3_bool_binop_done;
16466   }
16467 
16468   /* "statsmodels/tsa/statespace/_representation.pyx":1205
16469  *             self.obs_intercept.shape[1] == 1    and
16470  *             self.obs_cov.shape[2] == 1          and
16471  *             self.transition.shape[2] == 1       and             # <<<<<<<<<<<<<<
16472  *             self.state_intercept.shape[1] == 1  and
16473  *             self.selection.shape[2] == 1        and
16474  */
16475   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1205, __pyx_L1_error)}
16476   __pyx_t_6 = ((__pyx_v_self->transition.shape[2]) == 1);
16477   if (__pyx_t_6) {
16478   } else {
16479     __pyx_t_5 = __pyx_t_6;
16480     goto __pyx_L3_bool_binop_done;
16481   }
16482 
16483   /* "statsmodels/tsa/statespace/_representation.pyx":1206
16484  *             self.obs_cov.shape[2] == 1          and
16485  *             self.transition.shape[2] == 1       and
16486  *             self.state_intercept.shape[1] == 1  and             # <<<<<<<<<<<<<<
16487  *             self.selection.shape[2] == 1        and
16488  *             self.state_cov.shape[2] == 1
16489  */
16490   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1206, __pyx_L1_error)}
16491   __pyx_t_6 = ((__pyx_v_self->state_intercept.shape[1]) == 1);
16492   if (__pyx_t_6) {
16493   } else {
16494     __pyx_t_5 = __pyx_t_6;
16495     goto __pyx_L3_bool_binop_done;
16496   }
16497 
16498   /* "statsmodels/tsa/statespace/_representation.pyx":1207
16499  *             self.transition.shape[2] == 1       and
16500  *             self.state_intercept.shape[1] == 1  and
16501  *             self.selection.shape[2] == 1        and             # <<<<<<<<<<<<<<
16502  *             self.state_cov.shape[2] == 1
16503  *         )
16504  */
16505   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1207, __pyx_L1_error)}
16506   __pyx_t_6 = ((__pyx_v_self->selection.shape[2]) == 1);
16507   if (__pyx_t_6) {
16508   } else {
16509     __pyx_t_5 = __pyx_t_6;
16510     goto __pyx_L3_bool_binop_done;
16511   }
16512 
16513   /* "statsmodels/tsa/statespace/_representation.pyx":1208
16514  *             self.state_intercept.shape[1] == 1  and
16515  *             self.selection.shape[2] == 1        and
16516  *             self.state_cov.shape[2] == 1             # <<<<<<<<<<<<<<
16517  *         )
16518  *
16519  */
16520   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1208, __pyx_L1_error)}
16521   __pyx_t_6 = ((__pyx_v_self->state_cov.shape[2]) == 1);
16522   __pyx_t_5 = __pyx_t_6;
16523   __pyx_L3_bool_binop_done:;
16524 
16525   /* "statsmodels/tsa/statespace/_representation.pyx":1201
16526  *
16527  *         # Check for a time-invariant model
16528  *         self.time_invariant = (             # <<<<<<<<<<<<<<
16529  *             self.design.shape[2] == 1           and
16530  *             self.obs_intercept.shape[1] == 1    and
16531  */
16532   __pyx_v_self->time_invariant = __pyx_t_5;
16533 
16534   /* "statsmodels/tsa/statespace/_representation.pyx":1212
16535  *
16536  *         # Set the flags for initialization to be false
16537  *         self.initialized = False             # <<<<<<<<<<<<<<
16538  *         self.initialized_diffuse = False
16539  *         self.initialized_stationary = False
16540  */
16541   __pyx_v_self->initialized = 0;
16542 
16543   /* "statsmodels/tsa/statespace/_representation.pyx":1213
16544  *         # Set the flags for initialization to be false
16545  *         self.initialized = False
16546  *         self.initialized_diffuse = False             # <<<<<<<<<<<<<<
16547  *         self.initialized_stationary = False
16548  *
16549  */
16550   __pyx_v_self->initialized_diffuse = 0;
16551 
16552   /* "statsmodels/tsa/statespace/_representation.pyx":1214
16553  *         self.initialized = False
16554  *         self.initialized_diffuse = False
16555  *         self.initialized_stationary = False             # <<<<<<<<<<<<<<
16556  *
16557  *         self.diagonal_obs_cov = diagonal_obs_cov
16558  */
16559   __pyx_v_self->initialized_stationary = 0;
16560 
16561   /* "statsmodels/tsa/statespace/_representation.pyx":1216
16562  *         self.initialized_stationary = False
16563  *
16564  *         self.diagonal_obs_cov = diagonal_obs_cov             # <<<<<<<<<<<<<<
16565  *         self._diagonal_obs_cov = -1
16566  *
16567  */
16568   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_diagonal_obs_cov); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1216, __pyx_L1_error)
16569   __pyx_v_self->diagonal_obs_cov = __pyx_t_5;
16570 
16571   /* "statsmodels/tsa/statespace/_representation.pyx":1217
16572  *
16573  *         self.diagonal_obs_cov = diagonal_obs_cov
16574  *         self._diagonal_obs_cov = -1             # <<<<<<<<<<<<<<
16575  *
16576  *         # Allocate selected state covariance matrix
16577  */
16578   __pyx_v_self->_diagonal_obs_cov = -1;
16579 
16580   /* "statsmodels/tsa/statespace/_representation.pyx":1220
16581  *
16582  *         # Allocate selected state covariance matrix
16583  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;             # <<<<<<<<<<<<<<
16584  *         # (we only allocate memory for time-varying array if necessary)
16585  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
16586  */
16587   __pyx_t_5 = __pyx_v_self->k_states;
16588   (__pyx_v_dim3[0]) = __pyx_t_5;
16589   __pyx_t_5 = __pyx_v_self->k_states;
16590   (__pyx_v_dim3[1]) = __pyx_t_5;
16591   (__pyx_v_dim3[2]) = 1;
16592 
16593   /* "statsmodels/tsa/statespace/_representation.pyx":1222
16594  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;
16595  *         # (we only allocate memory for time-varying array if necessary)
16596  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:             # <<<<<<<<<<<<<<
16597  *             dim3[2] = self.nobs
16598  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_FLOAT64, FORTRAN)
16599  */
16600   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1222, __pyx_L1_error)}
16601   __pyx_t_7 = (((__pyx_v_self->state_cov.shape[2]) > 1) != 0);
16602   if (!__pyx_t_7) {
16603   } else {
16604     __pyx_t_6 = __pyx_t_7;
16605     goto __pyx_L11_bool_binop_done;
16606   }
16607   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1222, __pyx_L1_error)}
16608   __pyx_t_7 = (((__pyx_v_self->selection.shape[2]) > 1) != 0);
16609   __pyx_t_6 = __pyx_t_7;
16610   __pyx_L11_bool_binop_done:;
16611   if (__pyx_t_6) {
16612 
16613     /* "statsmodels/tsa/statespace/_representation.pyx":1223
16614  *         # (we only allocate memory for time-varying array if necessary)
16615  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
16616  *             dim3[2] = self.nobs             # <<<<<<<<<<<<<<
16617  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_FLOAT64, FORTRAN)
16618  *
16619  */
16620     __pyx_t_5 = __pyx_v_self->nobs;
16621     (__pyx_v_dim3[2]) = __pyx_t_5;
16622 
16623     /* "statsmodels/tsa/statespace/_representation.pyx":1222
16624  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;
16625  *         # (we only allocate memory for time-varying array if necessary)
16626  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:             # <<<<<<<<<<<<<<
16627  *             dim3[2] = self.nobs
16628  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_FLOAT64, FORTRAN)
16629  */
16630   }
16631 
16632   /* "statsmodels/tsa/statespace/_representation.pyx":1224
16633  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
16634  *             dim3[2] = self.nobs
16635  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
16636  *
16637  *         # Handle missing data
16638  */
16639   __pyx_t_1 = PyArray_ZEROS(3, __pyx_v_dim3, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
16640   __Pyx_GOTREF(__pyx_t_1);
16641   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1224, __pyx_L1_error)
16642   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16643   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_state_cov, 0);
16644   __pyx_v_self->selected_state_cov = __pyx_t_8;
16645   __pyx_t_8.memview = NULL;
16646   __pyx_t_8.data = NULL;
16647 
16648   /* "statsmodels/tsa/statespace/_representation.pyx":1227
16649  *
16650  *         # Handle missing data
16651  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")             # <<<<<<<<<<<<<<
16652  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)
16653  *         self.has_missing = np.sum(self.nmissing) > 0
16654  */
16655   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
16656   __Pyx_GOTREF(__pyx_t_1);
16657   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
16658   __Pyx_GOTREF(__pyx_t_2);
16659   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16660   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1227, __pyx_L1_error)
16661   __Pyx_GOTREF(__pyx_t_9);
16662   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_isnan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1227, __pyx_L1_error)
16663   __Pyx_GOTREF(__pyx_t_10);
16664   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16665   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_obs, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1227, __pyx_L1_error)
16666   __Pyx_GOTREF(__pyx_t_9);
16667   __pyx_t_11 = NULL;
16668   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
16669     __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
16670     if (likely(__pyx_t_11)) {
16671       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
16672       __Pyx_INCREF(__pyx_t_11);
16673       __Pyx_INCREF(function);
16674       __Pyx_DECREF_SET(__pyx_t_10, function);
16675     }
16676   }
16677   __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9);
16678   __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
16679   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16680   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
16681   __Pyx_GOTREF(__pyx_t_1);
16682   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16683   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1227, __pyx_L1_error)
16684   __Pyx_GOTREF(__pyx_t_10);
16685   __Pyx_GIVEREF(__pyx_t_1);
16686   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
16687   __pyx_t_1 = 0;
16688   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
16689   __Pyx_GOTREF(__pyx_t_1);
16690   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1227, __pyx_L1_error)
16691   __Pyx_GOTREF(__pyx_t_9);
16692   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1227, __pyx_L1_error)
16693   __Pyx_GOTREF(__pyx_t_11);
16694   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16695   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 1227, __pyx_L1_error)
16696   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16697   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1227, __pyx_L1_error)
16698   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1227, __pyx_L1_error)
16699   __Pyx_GOTREF(__pyx_t_11);
16700   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16701   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16702   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16703   __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1227, __pyx_L1_error)
16704   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16705   __PYX_XDEC_MEMVIEW(&__pyx_v_self->missing, 0);
16706   __pyx_v_self->missing = __pyx_t_12;
16707   __pyx_t_12.memview = NULL;
16708   __pyx_t_12.data = NULL;
16709 
16710   /* "statsmodels/tsa/statespace/_representation.pyx":1228
16711  *         # Handle missing data
16712  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")
16713  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)             # <<<<<<<<<<<<<<
16714  *         self.has_missing = np.sum(self.nmissing) > 0
16715  *
16716  */
16717   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1228, __pyx_L1_error)
16718   __Pyx_GOTREF(__pyx_t_11);
16719   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error)
16720   __Pyx_GOTREF(__pyx_t_1);
16721   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16722   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1228, __pyx_L1_error)
16723   __Pyx_GOTREF(__pyx_t_11);
16724   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sum); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1228, __pyx_L1_error)
16725   __Pyx_GOTREF(__pyx_t_10);
16726   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16727   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1228, __pyx_L1_error)}
16728   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1228, __pyx_L1_error)
16729   __Pyx_GOTREF(__pyx_t_11);
16730   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
16731   __Pyx_GOTREF(__pyx_t_2);
16732   __Pyx_GIVEREF(__pyx_t_11);
16733   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
16734   __pyx_t_11 = 0;
16735   __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1228, __pyx_L1_error)
16736   __Pyx_GOTREF(__pyx_t_11);
16737   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1228, __pyx_L1_error)
16738   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1228, __pyx_L1_error)
16739   __Pyx_GOTREF(__pyx_t_9);
16740   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16741   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16742   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16743   __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1228, __pyx_L1_error)
16744   __Pyx_GOTREF(__pyx_t_11);
16745   __Pyx_GIVEREF(__pyx_t_9);
16746   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
16747   __pyx_t_9 = 0;
16748   __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1228, __pyx_L1_error)
16749   __Pyx_GOTREF(__pyx_t_9);
16750   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
16751   __Pyx_GOTREF(__pyx_t_2);
16752   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1228, __pyx_L1_error)
16753   __Pyx_GOTREF(__pyx_t_10);
16754   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16755   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 1228, __pyx_L1_error)
16756   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16757   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1228, __pyx_L1_error)
16758   __Pyx_GOTREF(__pyx_t_10);
16759   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16760   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16761   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16762   __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 1228, __pyx_L1_error)
16763   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16764   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nmissing, 0);
16765   __pyx_v_self->nmissing = __pyx_t_13;
16766   __pyx_t_13.memview = NULL;
16767   __pyx_t_13.data = NULL;
16768 
16769   /* "statsmodels/tsa/statespace/_representation.pyx":1229
16770  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")
16771  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)
16772  *         self.has_missing = np.sum(self.nmissing) > 0             # <<<<<<<<<<<<<<
16773  *
16774  *         # Create the temporary array
16775  */
16776   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1229, __pyx_L1_error)
16777   __Pyx_GOTREF(__pyx_t_9);
16778   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1229, __pyx_L1_error)
16779   __Pyx_GOTREF(__pyx_t_11);
16780   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16781   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1229, __pyx_L1_error)}
16782   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1229, __pyx_L1_error)
16783   __Pyx_GOTREF(__pyx_t_9);
16784   __pyx_t_1 = NULL;
16785   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
16786     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
16787     if (likely(__pyx_t_1)) {
16788       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
16789       __Pyx_INCREF(__pyx_t_1);
16790       __Pyx_INCREF(function);
16791       __Pyx_DECREF_SET(__pyx_t_11, function);
16792     }
16793   }
16794   __pyx_t_10 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_9);
16795   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16796   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16797   if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1229, __pyx_L1_error)
16798   __Pyx_GOTREF(__pyx_t_10);
16799   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16800   __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1229, __pyx_L1_error)
16801   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16802   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1229, __pyx_L1_error)
16803   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16804   __pyx_v_self->has_missing = __pyx_t_5;
16805 
16806   /* "statsmodels/tsa/statespace/_representation.pyx":1233
16807  *         # Create the temporary array
16808  *         # Holds arrays of dimension $(m \times m)$
16809  *         dim2[0] = self.k_states; dim2[1] = max(self.k_states, self.k_posdef);             # <<<<<<<<<<<<<<
16810  *         self.tmp = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
16811  *
16812  */
16813   __pyx_t_5 = __pyx_v_self->k_states;
16814   (__pyx_v_dim2[0]) = __pyx_t_5;
16815   __pyx_t_5 = __pyx_v_self->k_posdef;
16816   __pyx_t_14 = __pyx_v_self->k_states;
16817   if (((__pyx_t_5 > __pyx_t_14) != 0)) {
16818     __pyx_t_15 = __pyx_t_5;
16819   } else {
16820     __pyx_t_15 = __pyx_t_14;
16821   }
16822   (__pyx_v_dim2[1]) = __pyx_t_15;
16823 
16824   /* "statsmodels/tsa/statespace/_representation.pyx":1234
16825  *         # Holds arrays of dimension $(m \times m)$
16826  *         dim2[0] = self.k_states; dim2[1] = max(self.k_states, self.k_posdef);
16827  *         self.tmp = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
16828  *
16829  *         # Arrays for initialization
16830  */
16831   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1234, __pyx_L1_error)
16832   __Pyx_GOTREF(__pyx_t_11);
16833   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1234, __pyx_L1_error)
16834   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16835   __PYX_XDEC_MEMVIEW(&__pyx_v_self->tmp, 0);
16836   __pyx_v_self->tmp = __pyx_t_16;
16837   __pyx_t_16.memview = NULL;
16838   __pyx_t_16.data = NULL;
16839 
16840   /* "statsmodels/tsa/statespace/_representation.pyx":1237
16841  *
16842  *         # Arrays for initialization
16843  *         dim1[0] = self.k_states;             # <<<<<<<<<<<<<<
16844  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16845  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
16846  */
16847   __pyx_t_15 = __pyx_v_self->k_states;
16848   (__pyx_v_dim1[0]) = __pyx_t_15;
16849 
16850   /* "statsmodels/tsa/statespace/_representation.pyx":1238
16851  *         # Arrays for initialization
16852  *         dim1[0] = self.k_states;
16853  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
16854  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
16855  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
16856  */
16857   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1238, __pyx_L1_error)
16858   __Pyx_GOTREF(__pyx_t_11);
16859   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 1238, __pyx_L1_error)
16860   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16861   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
16862   __pyx_v_self->initial_state = __pyx_t_17;
16863   __pyx_t_17.memview = NULL;
16864   __pyx_t_17.data = NULL;
16865 
16866   /* "statsmodels/tsa/statespace/_representation.pyx":1239
16867  *         dim1[0] = self.k_states;
16868  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16869  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
16870  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
16871  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
16872  */
16873   __pyx_t_15 = __pyx_v_self->k_states;
16874   (__pyx_v_dim2[0]) = __pyx_t_15;
16875   __pyx_t_15 = __pyx_v_self->k_states;
16876   (__pyx_v_dim2[1]) = __pyx_t_15;
16877 
16878   /* "statsmodels/tsa/statespace/_representation.pyx":1240
16879  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16880  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
16881  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
16882  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
16883  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
16884  */
16885   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1240, __pyx_L1_error)
16886   __Pyx_GOTREF(__pyx_t_11);
16887   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1240, __pyx_L1_error)
16888   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16889   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
16890   __pyx_v_self->initial_state_cov = __pyx_t_16;
16891   __pyx_t_16.memview = NULL;
16892   __pyx_t_16.data = NULL;
16893 
16894   /* "statsmodels/tsa/statespace/_representation.pyx":1241
16895  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
16896  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
16897  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
16898  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
16899  *
16900  */
16901   __pyx_t_15 = __pyx_v_self->k_states;
16902   (__pyx_v_dim2[0]) = __pyx_t_15;
16903   __pyx_t_15 = __pyx_v_self->k_states;
16904   (__pyx_v_dim2[1]) = __pyx_t_15;
16905 
16906   /* "statsmodels/tsa/statespace/_representation.pyx":1242
16907  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
16908  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
16909  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
16910  *
16911  *         # Arrays for missing data
16912  */
16913   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1242, __pyx_L1_error)
16914   __Pyx_GOTREF(__pyx_t_11);
16915   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1242, __pyx_L1_error)
16916   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16917   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_diffuse_state_cov, 0);
16918   __pyx_v_self->initial_diffuse_state_cov = __pyx_t_16;
16919   __pyx_t_16.memview = NULL;
16920   __pyx_t_16.data = NULL;
16921 
16922   /* "statsmodels/tsa/statespace/_representation.pyx":1245
16923  *
16924  *         # Arrays for missing data
16925  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
16926  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16927  *         dim1[0] = self.k_endog;
16928  */
16929   __pyx_t_15 = __pyx_v_self->k_endog;
16930   (__pyx_v_dim1[0]) = __pyx_t_15;
16931 
16932   /* "statsmodels/tsa/statespace/_representation.pyx":1246
16933  *         # Arrays for missing data
16934  *         dim1[0] = self.k_endog;
16935  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
16936  *         dim1[0] = self.k_endog;
16937  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16938  */
16939   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1246, __pyx_L1_error)
16940   __Pyx_GOTREF(__pyx_t_11);
16941   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 1246, __pyx_L1_error)
16942   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16943   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs, 0);
16944   __pyx_v_self->selected_obs = __pyx_t_17;
16945   __pyx_t_17.memview = NULL;
16946   __pyx_t_17.data = NULL;
16947 
16948   /* "statsmodels/tsa/statespace/_representation.pyx":1247
16949  *         dim1[0] = self.k_endog;
16950  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16951  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
16952  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16953  *         dim1[0] = self.k_endog * self.k_states;
16954  */
16955   __pyx_t_15 = __pyx_v_self->k_endog;
16956   (__pyx_v_dim1[0]) = __pyx_t_15;
16957 
16958   /* "statsmodels/tsa/statespace/_representation.pyx":1248
16959  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16960  *         dim1[0] = self.k_endog;
16961  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
16962  *         dim1[0] = self.k_endog * self.k_states;
16963  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16964  */
16965   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1248, __pyx_L1_error)
16966   __Pyx_GOTREF(__pyx_t_11);
16967   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 1248, __pyx_L1_error)
16968   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16969   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_intercept, 0);
16970   __pyx_v_self->selected_obs_intercept = __pyx_t_17;
16971   __pyx_t_17.memview = NULL;
16972   __pyx_t_17.data = NULL;
16973 
16974   /* "statsmodels/tsa/statespace/_representation.pyx":1249
16975  *         dim1[0] = self.k_endog;
16976  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16977  *         dim1[0] = self.k_endog * self.k_states;             # <<<<<<<<<<<<<<
16978  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16979  *         dim1[0] = self.k_endog**2;
16980  */
16981   (__pyx_v_dim1[0]) = (__pyx_v_self->k_endog * __pyx_v_self->k_states);
16982 
16983   /* "statsmodels/tsa/statespace/_representation.pyx":1250
16984  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16985  *         dim1[0] = self.k_endog * self.k_states;
16986  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
16987  *         dim1[0] = self.k_endog**2;
16988  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
16989  */
16990   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1250, __pyx_L1_error)
16991   __Pyx_GOTREF(__pyx_t_11);
16992   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 1250, __pyx_L1_error)
16993   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
16994   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_design, 0);
16995   __pyx_v_self->selected_design = __pyx_t_17;
16996   __pyx_t_17.memview = NULL;
16997   __pyx_t_17.data = NULL;
16998 
16999   /* "statsmodels/tsa/statespace/_representation.pyx":1251
17000  *         dim1[0] = self.k_endog * self.k_states;
17001  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17002  *         dim1[0] = self.k_endog**2;             # <<<<<<<<<<<<<<
17003  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17004  *
17005  */
17006   (__pyx_v_dim1[0]) = __Pyx_pow_long(((long)__pyx_v_self->k_endog), 2);
17007 
17008   /* "statsmodels/tsa/statespace/_representation.pyx":1252
17009  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17010  *         dim1[0] = self.k_endog**2;
17011  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17012  *
17013  *         # Arrays for transformations
17014  */
17015   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1252, __pyx_L1_error)
17016   __Pyx_GOTREF(__pyx_t_11);
17017   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 1252, __pyx_L1_error)
17018   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17019   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_cov, 0);
17020   __pyx_v_self->selected_obs_cov = __pyx_t_17;
17021   __pyx_t_17.memview = NULL;
17022   __pyx_t_17.data = NULL;
17023 
17024   /* "statsmodels/tsa/statespace/_representation.pyx":1255
17025  *
17026  *         # Arrays for transformations
17027  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;             # <<<<<<<<<<<<<<
17028  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17029  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17030  */
17031   __pyx_t_15 = __pyx_v_self->k_endog;
17032   (__pyx_v_dim2[0]) = __pyx_t_15;
17033   __pyx_t_15 = __pyx_v_self->k_endog;
17034   (__pyx_v_dim2[1]) = __pyx_t_15;
17035 
17036   /* "statsmodels/tsa/statespace/_representation.pyx":1256
17037  *         # Arrays for transformations
17038  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;
17039  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17040  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17041  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
17042  */
17043   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1256, __pyx_L1_error)
17044   __Pyx_GOTREF(__pyx_t_11);
17045   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1256, __pyx_L1_error)
17046   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17047   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_cholesky, 0);
17048   __pyx_v_self->transform_cholesky = __pyx_t_16;
17049   __pyx_t_16.memview = NULL;
17050   __pyx_t_16.data = NULL;
17051 
17052   /* "statsmodels/tsa/statespace/_representation.pyx":1257
17053  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;
17054  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17055  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17056  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
17057  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17058  */
17059   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1257, __pyx_L1_error)
17060   __Pyx_GOTREF(__pyx_t_11);
17061   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1257, __pyx_L1_error)
17062   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17063   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_cov, 0);
17064   __pyx_v_self->transform_obs_cov = __pyx_t_16;
17065   __pyx_t_16.memview = NULL;
17066   __pyx_t_16.data = NULL;
17067 
17068   /* "statsmodels/tsa/statespace/_representation.pyx":1258
17069  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17070  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17071  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
17072  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17073  *         dim1[0] = self.k_endog;
17074  */
17075   __pyx_t_15 = __pyx_v_self->k_endog;
17076   (__pyx_v_dim2[0]) = __pyx_t_15;
17077   __pyx_t_15 = __pyx_v_self->k_states;
17078   (__pyx_v_dim2[1]) = __pyx_t_15;
17079 
17080   /* "statsmodels/tsa/statespace/_representation.pyx":1259
17081  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17082  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
17083  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17084  *         dim1[0] = self.k_endog;
17085  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17086  */
17087   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1259, __pyx_L1_error)
17088   __Pyx_GOTREF(__pyx_t_11);
17089   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1259, __pyx_L1_error)
17090   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17091   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_design, 0);
17092   __pyx_v_self->transform_design = __pyx_t_16;
17093   __pyx_t_16.memview = NULL;
17094   __pyx_t_16.data = NULL;
17095 
17096   /* "statsmodels/tsa/statespace/_representation.pyx":1260
17097  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
17098  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17099  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
17100  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17101  *
17102  */
17103   __pyx_t_15 = __pyx_v_self->k_endog;
17104   (__pyx_v_dim1[0]) = __pyx_t_15;
17105 
17106   /* "statsmodels/tsa/statespace/_representation.pyx":1261
17107  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17108  *         dim1[0] = self.k_endog;
17109  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17110  *
17111  *         dim1[0] = self.k_states;
17112  */
17113   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1261, __pyx_L1_error)
17114   __Pyx_GOTREF(__pyx_t_11);
17115   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 1261, __pyx_L1_error)
17116   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17117   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_intercept, 0);
17118   __pyx_v_self->transform_obs_intercept = __pyx_t_17;
17119   __pyx_t_17.memview = NULL;
17120   __pyx_t_17.data = NULL;
17121 
17122   /* "statsmodels/tsa/statespace/_representation.pyx":1263
17123  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17124  *
17125  *         dim1[0] = self.k_states;             # <<<<<<<<<<<<<<
17126  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17127  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17128  */
17129   __pyx_t_15 = __pyx_v_self->k_states;
17130   (__pyx_v_dim1[0]) = __pyx_t_15;
17131 
17132   /* "statsmodels/tsa/statespace/_representation.pyx":1264
17133  *
17134  *         dim1[0] = self.k_states;
17135  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17136  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17137  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
17138  */
17139   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1264, __pyx_L1_error)
17140   __Pyx_GOTREF(__pyx_t_11);
17141   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 1264, __pyx_L1_error)
17142   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17143   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs, 0);
17144   __pyx_v_self->collapse_obs = __pyx_t_17;
17145   __pyx_t_17.memview = NULL;
17146   __pyx_t_17.data = NULL;
17147 
17148   /* "statsmodels/tsa/statespace/_representation.pyx":1265
17149  *         dim1[0] = self.k_states;
17150  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17151  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17152  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
17153  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17154  */
17155   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1265, __pyx_L1_error)
17156   __Pyx_GOTREF(__pyx_t_11);
17157   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 1265, __pyx_L1_error)
17158   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17159   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_tmp, 0);
17160   __pyx_v_self->collapse_obs_tmp = __pyx_t_17;
17161   __pyx_t_17.memview = NULL;
17162   __pyx_t_17.data = NULL;
17163 
17164   /* "statsmodels/tsa/statespace/_representation.pyx":1266
17165  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17166  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17167  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
17168  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17169  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17170  */
17171   __pyx_t_15 = __pyx_v_self->k_states;
17172   (__pyx_v_dim2[0]) = __pyx_t_15;
17173   __pyx_t_15 = __pyx_v_self->k_states;
17174   (__pyx_v_dim2[1]) = __pyx_t_15;
17175 
17176   /* "statsmodels/tsa/statespace/_representation.pyx":1267
17177  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
17178  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
17179  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17180  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17181  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17182  */
17183   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1267, __pyx_L1_error)
17184   __Pyx_GOTREF(__pyx_t_11);
17185   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1267, __pyx_L1_error)
17186   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17187   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_design, 0);
17188   __pyx_v_self->collapse_design = __pyx_t_16;
17189   __pyx_t_16.memview = NULL;
17190   __pyx_t_16.data = NULL;
17191 
17192   /* "statsmodels/tsa/statespace/_representation.pyx":1268
17193  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
17194  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17195  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17196  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17197  *
17198  */
17199   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1268, __pyx_L1_error)
17200   __Pyx_GOTREF(__pyx_t_11);
17201   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1268, __pyx_L1_error)
17202   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17203   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_cov, 0);
17204   __pyx_v_self->collapse_obs_cov = __pyx_t_16;
17205   __pyx_t_16.memview = NULL;
17206   __pyx_t_16.data = NULL;
17207 
17208   /* "statsmodels/tsa/statespace/_representation.pyx":1269
17209  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17210  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
17211  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
17212  *
17213  *         # Initialize location
17214  */
17215   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1269, __pyx_L1_error)
17216   __Pyx_GOTREF(__pyx_t_11);
17217   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1269, __pyx_L1_error)
17218   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17219   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_cholesky, 0);
17220   __pyx_v_self->collapse_cholesky = __pyx_t_16;
17221   __pyx_t_16.memview = NULL;
17222   __pyx_t_16.data = NULL;
17223 
17224   /* "statsmodels/tsa/statespace/_representation.pyx":1272
17225  *
17226  *         # Initialize location
17227  *         self.t = 0             # <<<<<<<<<<<<<<
17228  *         self._previous_t = 0
17229  *
17230  */
17231   __pyx_v_self->t = 0;
17232 
17233   /* "statsmodels/tsa/statespace/_representation.pyx":1273
17234  *         # Initialize location
17235  *         self.t = 0
17236  *         self._previous_t = 0             # <<<<<<<<<<<<<<
17237  *
17238  *         # Initialize dimensions
17239  */
17240   __pyx_v_self->_previous_t = 0;
17241 
17242   /* "statsmodels/tsa/statespace/_representation.pyx":1276
17243  *
17244  *         # Initialize dimensions
17245  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)             # <<<<<<<<<<<<<<
17246  *
17247  *     def __reduce__(self):
17248  */
17249   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_self->k_endog, __pyx_v_self->k_states, __pyx_v_self->k_posdef);
17250 
17251   /* "statsmodels/tsa/statespace/_representation.pyx":1147
17252  *     # ### Initialize state space model
17253  *     # *Note*: The initial state and state covariance matrix must be provided.
17254  *     def __init__(self,             # <<<<<<<<<<<<<<
17255  *                  np.float64_t [::1,:]   obs,
17256  *                  np.float64_t [::1,:,:] design,
17257  */
17258 
17259   /* function exit code */
17260   __pyx_r = 0;
17261   goto __pyx_L0;
17262   __pyx_L1_error:;
17263   __Pyx_XDECREF(__pyx_t_1);
17264   __Pyx_XDECREF(__pyx_t_2);
17265   __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
17266   __Pyx_XDECREF(__pyx_t_9);
17267   __Pyx_XDECREF(__pyx_t_10);
17268   __Pyx_XDECREF(__pyx_t_11);
17269   __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
17270   __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
17271   __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
17272   __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
17273   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
17274   __pyx_r = -1;
17275   __pyx_L0:;
17276   __PYX_XDEC_MEMVIEW(&__pyx_v_obs, 1);
17277   __PYX_XDEC_MEMVIEW(&__pyx_v_design, 1);
17278   __PYX_XDEC_MEMVIEW(&__pyx_v_obs_intercept, 1);
17279   __PYX_XDEC_MEMVIEW(&__pyx_v_obs_cov, 1);
17280   __PYX_XDEC_MEMVIEW(&__pyx_v_transition, 1);
17281   __PYX_XDEC_MEMVIEW(&__pyx_v_state_intercept, 1);
17282   __PYX_XDEC_MEMVIEW(&__pyx_v_selection, 1);
17283   __PYX_XDEC_MEMVIEW(&__pyx_v_state_cov, 1);
17284   __Pyx_RefNannyFinishContext();
17285   return __pyx_r;
17286 }
17287 
17288 /* "statsmodels/tsa/statespace/_representation.pyx":1278
17289  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)
17290  *
17291  *     def __reduce__(self):             # <<<<<<<<<<<<<<
17292  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
17293  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
17294  */
17295 
17296 /* Python wrapper */
17297 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3__reduce__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)17298 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
17299   PyObject *__pyx_r = 0;
17300   __Pyx_RefNannyDeclarations
17301   __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
17302   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_2__reduce__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
17303 
17304   /* function exit code */
17305   __Pyx_RefNannyFinishContext();
17306   return __pyx_r;
17307 }
17308 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)17309 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
17310   PyObject *__pyx_v_init = NULL;
17311   PyObject *__pyx_v_state = NULL;
17312   PyObject *__pyx_r = NULL;
17313   __Pyx_RefNannyDeclarations
17314   PyObject *__pyx_t_1 = NULL;
17315   PyObject *__pyx_t_2 = NULL;
17316   PyObject *__pyx_t_3 = NULL;
17317   PyObject *__pyx_t_4 = NULL;
17318   PyObject *__pyx_t_5 = NULL;
17319   PyObject *__pyx_t_6 = NULL;
17320   PyObject *__pyx_t_7 = NULL;
17321   PyObject *__pyx_t_8 = NULL;
17322   PyObject *__pyx_t_9 = NULL;
17323   PyObject *__pyx_t_10 = NULL;
17324   PyObject *__pyx_t_11 = NULL;
17325   int __pyx_t_12;
17326   int __pyx_lineno = 0;
17327   const char *__pyx_filename = NULL;
17328   int __pyx_clineno = 0;
17329   __Pyx_RefNannySetupContext("__reduce__", 0);
17330 
17331   /* "statsmodels/tsa/statespace/_representation.pyx":1279
17332  *
17333  *     def __reduce__(self):
17334  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),             # <<<<<<<<<<<<<<
17335  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
17336  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
17337  */
17338   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
17339   __Pyx_GOTREF(__pyx_t_1);
17340   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
17341   __Pyx_GOTREF(__pyx_t_2);
17342   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17343   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1279, __pyx_L1_error)}
17344   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
17345   __Pyx_GOTREF(__pyx_t_1);
17346   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error)
17347   __Pyx_GOTREF(__pyx_t_3);
17348   __Pyx_GIVEREF(__pyx_t_1);
17349   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17350   __pyx_t_1 = 0;
17351   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
17352   __Pyx_GOTREF(__pyx_t_1);
17353   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)
17354   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)
17355   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1279, __pyx_L1_error)
17356   __Pyx_GOTREF(__pyx_t_4);
17357   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17358   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17359   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17360   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
17361   __Pyx_GOTREF(__pyx_t_1);
17362   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error)
17363   __Pyx_GOTREF(__pyx_t_3);
17364   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17365   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1279, __pyx_L1_error)}
17366   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->design, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
17367   __Pyx_GOTREF(__pyx_t_1);
17368   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
17369   __Pyx_GOTREF(__pyx_t_2);
17370   __Pyx_GIVEREF(__pyx_t_1);
17371   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
17372   __pyx_t_1 = 0;
17373   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
17374   __Pyx_GOTREF(__pyx_t_1);
17375   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)
17376   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1279, __pyx_L1_error)
17377   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1279, __pyx_L1_error)
17378   __Pyx_GOTREF(__pyx_t_5);
17379   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17380   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17381   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17382 
17383   /* "statsmodels/tsa/statespace/_representation.pyx":1280
17384  *     def __reduce__(self):
17385  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
17386  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
17387  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
17388  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
17389  */
17390   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
17391   __Pyx_GOTREF(__pyx_t_1);
17392   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error)
17393   __Pyx_GOTREF(__pyx_t_2);
17394   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17395   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1280, __pyx_L1_error)}
17396   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
17397   __Pyx_GOTREF(__pyx_t_1);
17398   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1280, __pyx_L1_error)
17399   __Pyx_GOTREF(__pyx_t_3);
17400   __Pyx_GIVEREF(__pyx_t_1);
17401   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17402   __pyx_t_1 = 0;
17403   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
17404   __Pyx_GOTREF(__pyx_t_1);
17405   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1280, __pyx_L1_error)
17406   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1280, __pyx_L1_error)
17407   __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1280, __pyx_L1_error)
17408   __Pyx_GOTREF(__pyx_t_6);
17409   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17410   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17411   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17412   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
17413   __Pyx_GOTREF(__pyx_t_1);
17414   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1280, __pyx_L1_error)
17415   __Pyx_GOTREF(__pyx_t_3);
17416   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17417   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1280, __pyx_L1_error)}
17418   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
17419   __Pyx_GOTREF(__pyx_t_1);
17420   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error)
17421   __Pyx_GOTREF(__pyx_t_2);
17422   __Pyx_GIVEREF(__pyx_t_1);
17423   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
17424   __pyx_t_1 = 0;
17425   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
17426   __Pyx_GOTREF(__pyx_t_1);
17427   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1280, __pyx_L1_error)
17428   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1280, __pyx_L1_error)
17429   __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1280, __pyx_L1_error)
17430   __Pyx_GOTREF(__pyx_t_7);
17431   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17432   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17433   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17434 
17435   /* "statsmodels/tsa/statespace/_representation.pyx":1281
17436  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
17437  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
17438  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),             # <<<<<<<<<<<<<<
17439  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
17440  *                 self.diagonal_obs_cov)
17441  */
17442   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
17443   __Pyx_GOTREF(__pyx_t_1);
17444   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
17445   __Pyx_GOTREF(__pyx_t_2);
17446   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17447   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1281, __pyx_L1_error)}
17448   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transition, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
17449   __Pyx_GOTREF(__pyx_t_1);
17450   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error)
17451   __Pyx_GOTREF(__pyx_t_3);
17452   __Pyx_GIVEREF(__pyx_t_1);
17453   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17454   __pyx_t_1 = 0;
17455   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
17456   __Pyx_GOTREF(__pyx_t_1);
17457   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
17458   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
17459   __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1281, __pyx_L1_error)
17460   __Pyx_GOTREF(__pyx_t_8);
17461   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17462   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17463   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17464   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
17465   __Pyx_GOTREF(__pyx_t_1);
17466   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1281, __pyx_L1_error)
17467   __Pyx_GOTREF(__pyx_t_3);
17468   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17469   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1281, __pyx_L1_error)}
17470   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
17471   __Pyx_GOTREF(__pyx_t_1);
17472   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
17473   __Pyx_GOTREF(__pyx_t_2);
17474   __Pyx_GIVEREF(__pyx_t_1);
17475   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
17476   __pyx_t_1 = 0;
17477   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
17478   __Pyx_GOTREF(__pyx_t_1);
17479   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
17480   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1281, __pyx_L1_error)
17481   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1281, __pyx_L1_error)
17482   __Pyx_GOTREF(__pyx_t_9);
17483   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17484   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17485   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17486 
17487   /* "statsmodels/tsa/statespace/_representation.pyx":1282
17488  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
17489  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
17490  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
17491  *                 self.diagonal_obs_cov)
17492  *         state = {'initialized': self.initialized,
17493  */
17494   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
17495   __Pyx_GOTREF(__pyx_t_1);
17496   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
17497   __Pyx_GOTREF(__pyx_t_2);
17498   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17499   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1282, __pyx_L1_error)}
17500   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selection, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
17501   __Pyx_GOTREF(__pyx_t_1);
17502   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L1_error)
17503   __Pyx_GOTREF(__pyx_t_3);
17504   __Pyx_GIVEREF(__pyx_t_1);
17505   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17506   __pyx_t_1 = 0;
17507   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
17508   __Pyx_GOTREF(__pyx_t_1);
17509   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1282, __pyx_L1_error)
17510   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1282, __pyx_L1_error)
17511   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1282, __pyx_L1_error)
17512   __Pyx_GOTREF(__pyx_t_10);
17513   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17514   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17515   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17516   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
17517   __Pyx_GOTREF(__pyx_t_1);
17518   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L1_error)
17519   __Pyx_GOTREF(__pyx_t_3);
17520   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17521   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1282, __pyx_L1_error)}
17522   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
17523   __Pyx_GOTREF(__pyx_t_1);
17524   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
17525   __Pyx_GOTREF(__pyx_t_2);
17526   __Pyx_GIVEREF(__pyx_t_1);
17527   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
17528   __pyx_t_1 = 0;
17529   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
17530   __Pyx_GOTREF(__pyx_t_1);
17531   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1282, __pyx_L1_error)
17532   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1282, __pyx_L1_error)
17533   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1282, __pyx_L1_error)
17534   __Pyx_GOTREF(__pyx_t_11);
17535   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17536   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17537   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17538 
17539   /* "statsmodels/tsa/statespace/_representation.pyx":1283
17540  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
17541  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
17542  *                 self.diagonal_obs_cov)             # <<<<<<<<<<<<<<
17543  *         state = {'initialized': self.initialized,
17544  *                  'initialized_diffuse': self.initialized_diffuse,
17545  */
17546   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error)
17547   __Pyx_GOTREF(__pyx_t_1);
17548 
17549   /* "statsmodels/tsa/statespace/_representation.pyx":1279
17550  *
17551  *     def __reduce__(self):
17552  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),             # <<<<<<<<<<<<<<
17553  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
17554  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
17555  */
17556   __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
17557   __Pyx_GOTREF(__pyx_t_2);
17558   __Pyx_GIVEREF(__pyx_t_4);
17559   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
17560   __Pyx_GIVEREF(__pyx_t_5);
17561   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
17562   __Pyx_GIVEREF(__pyx_t_6);
17563   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
17564   __Pyx_GIVEREF(__pyx_t_7);
17565   PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
17566   __Pyx_GIVEREF(__pyx_t_8);
17567   PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_8);
17568   __Pyx_GIVEREF(__pyx_t_9);
17569   PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_9);
17570   __Pyx_GIVEREF(__pyx_t_10);
17571   PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_10);
17572   __Pyx_GIVEREF(__pyx_t_11);
17573   PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_11);
17574   __Pyx_GIVEREF(__pyx_t_1);
17575   PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_t_1);
17576   __pyx_t_4 = 0;
17577   __pyx_t_5 = 0;
17578   __pyx_t_6 = 0;
17579   __pyx_t_7 = 0;
17580   __pyx_t_8 = 0;
17581   __pyx_t_9 = 0;
17582   __pyx_t_10 = 0;
17583   __pyx_t_11 = 0;
17584   __pyx_t_1 = 0;
17585   __pyx_v_init = ((PyObject*)__pyx_t_2);
17586   __pyx_t_2 = 0;
17587 
17588   /* "statsmodels/tsa/statespace/_representation.pyx":1284
17589  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
17590  *                 self.diagonal_obs_cov)
17591  *         state = {'initialized': self.initialized,             # <<<<<<<<<<<<<<
17592  *                  'initialized_diffuse': self.initialized_diffuse,
17593  *                  'initialized_stationary': self.initialized_stationary,
17594  */
17595   __pyx_t_2 = __Pyx_PyDict_NewPresized(27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1284, __pyx_L1_error)
17596   __Pyx_GOTREF(__pyx_t_2);
17597   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error)
17598   __Pyx_GOTREF(__pyx_t_1);
17599   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized, __pyx_t_1) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17600   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17601 
17602   /* "statsmodels/tsa/statespace/_representation.pyx":1285
17603  *                 self.diagonal_obs_cov)
17604  *         state = {'initialized': self.initialized,
17605  *                  'initialized_diffuse': self.initialized_diffuse,             # <<<<<<<<<<<<<<
17606  *                  'initialized_stationary': self.initialized_stationary,
17607  *                  'initial_state': None,
17608  */
17609   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
17610   __Pyx_GOTREF(__pyx_t_1);
17611   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized_diffuse, __pyx_t_1) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17612   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17613 
17614   /* "statsmodels/tsa/statespace/_representation.pyx":1286
17615  *         state = {'initialized': self.initialized,
17616  *                  'initialized_diffuse': self.initialized_diffuse,
17617  *                  'initialized_stationary': self.initialized_stationary,             # <<<<<<<<<<<<<<
17618  *                  'initial_state': None,
17619  *                  'initial_state_cov': None,
17620  */
17621   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error)
17622   __Pyx_GOTREF(__pyx_t_1);
17623   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized_stationary, __pyx_t_1) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17624   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17625 
17626   /* "statsmodels/tsa/statespace/_representation.pyx":1287
17627  *                  'initialized_diffuse': self.initialized_diffuse,
17628  *                  'initialized_stationary': self.initialized_stationary,
17629  *                  'initial_state': None,             # <<<<<<<<<<<<<<
17630  *                  'initial_state_cov': None,
17631  *                  'initial_diffuse_state_cov': None,
17632  */
17633   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_state, Py_None) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17634 
17635   /* "statsmodels/tsa/statespace/_representation.pyx":1288
17636  *                  'initialized_stationary': self.initialized_stationary,
17637  *                  'initial_state': None,
17638  *                  'initial_state_cov': None,             # <<<<<<<<<<<<<<
17639  *                  'initial_diffuse_state_cov': None,
17640  *                  'missing': np.array(self.missing, copy=True, order='F'),
17641  */
17642   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_state_cov, Py_None) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17643 
17644   /* "statsmodels/tsa/statespace/_representation.pyx":1289
17645  *                  'initial_state': None,
17646  *                  'initial_state_cov': None,
17647  *                  'initial_diffuse_state_cov': None,             # <<<<<<<<<<<<<<
17648  *                  'missing': np.array(self.missing, copy=True, order='F'),
17649  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
17650  */
17651   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_diffuse_state_cov, Py_None) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17652 
17653   /* "statsmodels/tsa/statespace/_representation.pyx":1290
17654  *                  'initial_state_cov': None,
17655  *                  'initial_diffuse_state_cov': None,
17656  *                  'missing': np.array(self.missing, copy=True, order='F'),             # <<<<<<<<<<<<<<
17657  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
17658  *                  'has_missing': self.has_missing,
17659  */
17660   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error)
17661   __Pyx_GOTREF(__pyx_t_1);
17662   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1290, __pyx_L1_error)
17663   __Pyx_GOTREF(__pyx_t_11);
17664   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17665   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1290, __pyx_L1_error)}
17666   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error)
17667   __Pyx_GOTREF(__pyx_t_1);
17668   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1290, __pyx_L1_error)
17669   __Pyx_GOTREF(__pyx_t_10);
17670   __Pyx_GIVEREF(__pyx_t_1);
17671   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
17672   __pyx_t_1 = 0;
17673   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error)
17674   __Pyx_GOTREF(__pyx_t_1);
17675   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1290, __pyx_L1_error)
17676   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1290, __pyx_L1_error)
17677   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1290, __pyx_L1_error)
17678   __Pyx_GOTREF(__pyx_t_9);
17679   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17680   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17681   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17682   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_missing, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17683   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17684 
17685   /* "statsmodels/tsa/statespace/_representation.pyx":1291
17686  *                  'initial_diffuse_state_cov': None,
17687  *                  'missing': np.array(self.missing, copy=True, order='F'),
17688  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),             # <<<<<<<<<<<<<<
17689  *                  'has_missing': self.has_missing,
17690  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
17691  */
17692   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1291, __pyx_L1_error)
17693   __Pyx_GOTREF(__pyx_t_9);
17694   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
17695   __Pyx_GOTREF(__pyx_t_1);
17696   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17697   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1291, __pyx_L1_error)}
17698   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1291, __pyx_L1_error)
17699   __Pyx_GOTREF(__pyx_t_9);
17700   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1291, __pyx_L1_error)
17701   __Pyx_GOTREF(__pyx_t_10);
17702   __Pyx_GIVEREF(__pyx_t_9);
17703   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
17704   __pyx_t_9 = 0;
17705   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1291, __pyx_L1_error)
17706   __Pyx_GOTREF(__pyx_t_9);
17707   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1291, __pyx_L1_error)
17708   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1291, __pyx_L1_error)
17709   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1291, __pyx_L1_error)
17710   __Pyx_GOTREF(__pyx_t_11);
17711   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17712   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17713   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17714   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nmissing, __pyx_t_11) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17715   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17716 
17717   /* "statsmodels/tsa/statespace/_representation.pyx":1292
17718  *                  'missing': np.array(self.missing, copy=True, order='F'),
17719  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
17720  *                  'has_missing': self.has_missing,             # <<<<<<<<<<<<<<
17721  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
17722  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
17723  */
17724   __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_self->has_missing); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1292, __pyx_L1_error)
17725   __Pyx_GOTREF(__pyx_t_11);
17726   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_has_missing, __pyx_t_11) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17727   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17728 
17729   /* "statsmodels/tsa/statespace/_representation.pyx":1293
17730  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
17731  *                  'has_missing': self.has_missing,
17732  *                  'tmp': np.array(self.tmp, copy=True, order='F'),             # <<<<<<<<<<<<<<
17733  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
17734  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
17735  */
17736   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1293, __pyx_L1_error)
17737   __Pyx_GOTREF(__pyx_t_11);
17738   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1293, __pyx_L1_error)
17739   __Pyx_GOTREF(__pyx_t_9);
17740   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17741   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1293, __pyx_L1_error)}
17742   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->tmp, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1293, __pyx_L1_error)
17743   __Pyx_GOTREF(__pyx_t_11);
17744   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1293, __pyx_L1_error)
17745   __Pyx_GOTREF(__pyx_t_10);
17746   __Pyx_GIVEREF(__pyx_t_11);
17747   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
17748   __pyx_t_11 = 0;
17749   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1293, __pyx_L1_error)
17750   __Pyx_GOTREF(__pyx_t_11);
17751   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
17752   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
17753   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
17754   __Pyx_GOTREF(__pyx_t_1);
17755   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17756   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17757   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17758   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_tmp, __pyx_t_1) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17759   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17760 
17761   /* "statsmodels/tsa/statespace/_representation.pyx":1294
17762  *                  'has_missing': self.has_missing,
17763  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
17764  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
17765  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
17766  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
17767  */
17768   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
17769   __Pyx_GOTREF(__pyx_t_1);
17770   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1294, __pyx_L1_error)
17771   __Pyx_GOTREF(__pyx_t_11);
17772   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17773   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1294, __pyx_L1_error)}
17774   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
17775   __Pyx_GOTREF(__pyx_t_1);
17776   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1294, __pyx_L1_error)
17777   __Pyx_GOTREF(__pyx_t_10);
17778   __Pyx_GIVEREF(__pyx_t_1);
17779   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
17780   __pyx_t_1 = 0;
17781   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
17782   __Pyx_GOTREF(__pyx_t_1);
17783   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1294, __pyx_L1_error)
17784   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1294, __pyx_L1_error)
17785   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1294, __pyx_L1_error)
17786   __Pyx_GOTREF(__pyx_t_9);
17787   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17788   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17789   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17790   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_state_cov, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17791   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17792 
17793   /* "statsmodels/tsa/statespace/_representation.pyx":1295
17794  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
17795  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
17796  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),             # <<<<<<<<<<<<<<
17797  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
17798  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
17799  */
17800   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1295, __pyx_L1_error)
17801   __Pyx_GOTREF(__pyx_t_9);
17802   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error)
17803   __Pyx_GOTREF(__pyx_t_1);
17804   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17805   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1295, __pyx_L1_error)}
17806   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1295, __pyx_L1_error)
17807   __Pyx_GOTREF(__pyx_t_9);
17808   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1295, __pyx_L1_error)
17809   __Pyx_GOTREF(__pyx_t_10);
17810   __Pyx_GIVEREF(__pyx_t_9);
17811   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
17812   __pyx_t_9 = 0;
17813   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1295, __pyx_L1_error)
17814   __Pyx_GOTREF(__pyx_t_9);
17815   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1295, __pyx_L1_error)
17816   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1295, __pyx_L1_error)
17817   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1295, __pyx_L1_error)
17818   __Pyx_GOTREF(__pyx_t_11);
17819   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17820   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17821   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17822   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs, __pyx_t_11) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17823   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17824 
17825   /* "statsmodels/tsa/statespace/_representation.pyx":1296
17826  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
17827  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
17828  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),             # <<<<<<<<<<<<<<
17829  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
17830  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
17831  */
17832   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1296, __pyx_L1_error)
17833   __Pyx_GOTREF(__pyx_t_11);
17834   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1296, __pyx_L1_error)
17835   __Pyx_GOTREF(__pyx_t_9);
17836   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17837   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1296, __pyx_L1_error)}
17838   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1296, __pyx_L1_error)
17839   __Pyx_GOTREF(__pyx_t_11);
17840   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1296, __pyx_L1_error)
17841   __Pyx_GOTREF(__pyx_t_10);
17842   __Pyx_GIVEREF(__pyx_t_11);
17843   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
17844   __pyx_t_11 = 0;
17845   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1296, __pyx_L1_error)
17846   __Pyx_GOTREF(__pyx_t_11);
17847   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)
17848   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)
17849   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
17850   __Pyx_GOTREF(__pyx_t_1);
17851   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17852   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17853   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17854   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs_intercept, __pyx_t_1) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17855   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17856 
17857   /* "statsmodels/tsa/statespace/_representation.pyx":1297
17858  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
17859  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
17860  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
17861  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
17862  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
17863  */
17864   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error)
17865   __Pyx_GOTREF(__pyx_t_1);
17866   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1297, __pyx_L1_error)
17867   __Pyx_GOTREF(__pyx_t_11);
17868   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17869   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1297, __pyx_L1_error)}
17870   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_design, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error)
17871   __Pyx_GOTREF(__pyx_t_1);
17872   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1297, __pyx_L1_error)
17873   __Pyx_GOTREF(__pyx_t_10);
17874   __Pyx_GIVEREF(__pyx_t_1);
17875   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
17876   __pyx_t_1 = 0;
17877   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error)
17878   __Pyx_GOTREF(__pyx_t_1);
17879   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1297, __pyx_L1_error)
17880   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1297, __pyx_L1_error)
17881   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1297, __pyx_L1_error)
17882   __Pyx_GOTREF(__pyx_t_9);
17883   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17884   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17885   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17886   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_design, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17887   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17888 
17889   /* "statsmodels/tsa/statespace/_representation.pyx":1298
17890  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
17891  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
17892  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
17893  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
17894  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
17895  */
17896   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1298, __pyx_L1_error)
17897   __Pyx_GOTREF(__pyx_t_9);
17898   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
17899   __Pyx_GOTREF(__pyx_t_1);
17900   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17901   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1298, __pyx_L1_error)}
17902   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_cov, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1298, __pyx_L1_error)
17903   __Pyx_GOTREF(__pyx_t_9);
17904   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1298, __pyx_L1_error)
17905   __Pyx_GOTREF(__pyx_t_10);
17906   __Pyx_GIVEREF(__pyx_t_9);
17907   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
17908   __pyx_t_9 = 0;
17909   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1298, __pyx_L1_error)
17910   __Pyx_GOTREF(__pyx_t_9);
17911   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1298, __pyx_L1_error)
17912   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1298, __pyx_L1_error)
17913   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1298, __pyx_L1_error)
17914   __Pyx_GOTREF(__pyx_t_11);
17915   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17916   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17917   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17918   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs_cov, __pyx_t_11) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17919   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17920 
17921   /* "statsmodels/tsa/statespace/_representation.pyx":1299
17922  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
17923  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
17924  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),             # <<<<<<<<<<<<<<
17925  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
17926  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
17927  */
17928   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1299, __pyx_L1_error)
17929   __Pyx_GOTREF(__pyx_t_11);
17930   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1299, __pyx_L1_error)
17931   __Pyx_GOTREF(__pyx_t_9);
17932   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17933   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1299, __pyx_L1_error)}
17934   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->transform_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1299, __pyx_L1_error)
17935   __Pyx_GOTREF(__pyx_t_11);
17936   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1299, __pyx_L1_error)
17937   __Pyx_GOTREF(__pyx_t_10);
17938   __Pyx_GIVEREF(__pyx_t_11);
17939   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
17940   __pyx_t_11 = 0;
17941   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1299, __pyx_L1_error)
17942   __Pyx_GOTREF(__pyx_t_11);
17943   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1299, __pyx_L1_error)
17944   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1299, __pyx_L1_error)
17945   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error)
17946   __Pyx_GOTREF(__pyx_t_1);
17947   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17948   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17949   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17950   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_cholesky, __pyx_t_1) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17951   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17952 
17953   /* "statsmodels/tsa/statespace/_representation.pyx":1300
17954  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
17955  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
17956  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
17957  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
17958  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
17959  */
17960   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
17961   __Pyx_GOTREF(__pyx_t_1);
17962   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1300, __pyx_L1_error)
17963   __Pyx_GOTREF(__pyx_t_11);
17964   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17965   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1300, __pyx_L1_error)}
17966   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
17967   __Pyx_GOTREF(__pyx_t_1);
17968   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1300, __pyx_L1_error)
17969   __Pyx_GOTREF(__pyx_t_10);
17970   __Pyx_GIVEREF(__pyx_t_1);
17971   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
17972   __pyx_t_1 = 0;
17973   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
17974   __Pyx_GOTREF(__pyx_t_1);
17975   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1300, __pyx_L1_error)
17976   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1300, __pyx_L1_error)
17977   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1300, __pyx_L1_error)
17978   __Pyx_GOTREF(__pyx_t_9);
17979   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17980   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17981   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17982   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_obs_cov, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
17983   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17984 
17985   /* "statsmodels/tsa/statespace/_representation.pyx":1301
17986  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
17987  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
17988  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
17989  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
17990  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
17991  */
17992   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1301, __pyx_L1_error)
17993   __Pyx_GOTREF(__pyx_t_9);
17994   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
17995   __Pyx_GOTREF(__pyx_t_1);
17996   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17997   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1301, __pyx_L1_error)}
17998   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->transform_design, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1301, __pyx_L1_error)
17999   __Pyx_GOTREF(__pyx_t_9);
18000   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1301, __pyx_L1_error)
18001   __Pyx_GOTREF(__pyx_t_10);
18002   __Pyx_GIVEREF(__pyx_t_9);
18003   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
18004   __pyx_t_9 = 0;
18005   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1301, __pyx_L1_error)
18006   __Pyx_GOTREF(__pyx_t_9);
18007   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1301, __pyx_L1_error)
18008   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1301, __pyx_L1_error)
18009   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1301, __pyx_L1_error)
18010   __Pyx_GOTREF(__pyx_t_11);
18011   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18012   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18013   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18014   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_design, __pyx_t_11) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18015   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18016 
18017   /* "statsmodels/tsa/statespace/_representation.pyx":1302
18018  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
18019  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
18020  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),             # <<<<<<<<<<<<<<
18021  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
18022  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
18023  */
18024   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1302, __pyx_L1_error)
18025   __Pyx_GOTREF(__pyx_t_11);
18026   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1302, __pyx_L1_error)
18027   __Pyx_GOTREF(__pyx_t_9);
18028   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18029   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1302, __pyx_L1_error)}
18030   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1302, __pyx_L1_error)
18031   __Pyx_GOTREF(__pyx_t_11);
18032   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1302, __pyx_L1_error)
18033   __Pyx_GOTREF(__pyx_t_10);
18034   __Pyx_GIVEREF(__pyx_t_11);
18035   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
18036   __pyx_t_11 = 0;
18037   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1302, __pyx_L1_error)
18038   __Pyx_GOTREF(__pyx_t_11);
18039   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1302, __pyx_L1_error)
18040   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1302, __pyx_L1_error)
18041   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
18042   __Pyx_GOTREF(__pyx_t_1);
18043   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18044   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18045   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18046   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs, __pyx_t_1) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18047   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18048 
18049   /* "statsmodels/tsa/statespace/_representation.pyx":1303
18050  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
18051  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
18052  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),             # <<<<<<<<<<<<<<
18053  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
18054  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
18055  */
18056   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
18057   __Pyx_GOTREF(__pyx_t_1);
18058   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1303, __pyx_L1_error)
18059   __Pyx_GOTREF(__pyx_t_11);
18060   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18061   if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1303, __pyx_L1_error)}
18062   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_tmp, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
18063   __Pyx_GOTREF(__pyx_t_1);
18064   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1303, __pyx_L1_error)
18065   __Pyx_GOTREF(__pyx_t_10);
18066   __Pyx_GIVEREF(__pyx_t_1);
18067   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
18068   __pyx_t_1 = 0;
18069   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
18070   __Pyx_GOTREF(__pyx_t_1);
18071   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1303, __pyx_L1_error)
18072   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1303, __pyx_L1_error)
18073   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1303, __pyx_L1_error)
18074   __Pyx_GOTREF(__pyx_t_9);
18075   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18076   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18077   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18078   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs_tmp, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18079   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18080 
18081   /* "statsmodels/tsa/statespace/_representation.pyx":1304
18082  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
18083  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
18084  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
18085  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
18086  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
18087  */
18088   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1304, __pyx_L1_error)
18089   __Pyx_GOTREF(__pyx_t_9);
18090   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
18091   __Pyx_GOTREF(__pyx_t_1);
18092   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18093   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1304, __pyx_L1_error)}
18094   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_design, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1304, __pyx_L1_error)
18095   __Pyx_GOTREF(__pyx_t_9);
18096   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1304, __pyx_L1_error)
18097   __Pyx_GOTREF(__pyx_t_10);
18098   __Pyx_GIVEREF(__pyx_t_9);
18099   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
18100   __pyx_t_9 = 0;
18101   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1304, __pyx_L1_error)
18102   __Pyx_GOTREF(__pyx_t_9);
18103   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1304, __pyx_L1_error)
18104   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1304, __pyx_L1_error)
18105   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1304, __pyx_L1_error)
18106   __Pyx_GOTREF(__pyx_t_11);
18107   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18108   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18109   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18110   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_design, __pyx_t_11) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18111   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18112 
18113   /* "statsmodels/tsa/statespace/_representation.pyx":1305
18114  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
18115  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
18116  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
18117  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
18118  *                  't': self.t,
18119  */
18120   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1305, __pyx_L1_error)
18121   __Pyx_GOTREF(__pyx_t_11);
18122   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1305, __pyx_L1_error)
18123   __Pyx_GOTREF(__pyx_t_9);
18124   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18125   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1305, __pyx_L1_error)}
18126   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1305, __pyx_L1_error)
18127   __Pyx_GOTREF(__pyx_t_11);
18128   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1305, __pyx_L1_error)
18129   __Pyx_GOTREF(__pyx_t_10);
18130   __Pyx_GIVEREF(__pyx_t_11);
18131   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
18132   __pyx_t_11 = 0;
18133   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1305, __pyx_L1_error)
18134   __Pyx_GOTREF(__pyx_t_11);
18135   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1305, __pyx_L1_error)
18136   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1305, __pyx_L1_error)
18137   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __pyx_L1_error)
18138   __Pyx_GOTREF(__pyx_t_1);
18139   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18140   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18141   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18142   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs_cov, __pyx_t_1) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18143   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18144 
18145   /* "statsmodels/tsa/statespace/_representation.pyx":1306
18146  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
18147  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
18148  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),             # <<<<<<<<<<<<<<
18149  *                  't': self.t,
18150  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
18151  */
18152   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
18153   __Pyx_GOTREF(__pyx_t_1);
18154   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1306, __pyx_L1_error)
18155   __Pyx_GOTREF(__pyx_t_11);
18156   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18157   if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1306, __pyx_L1_error)}
18158   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
18159   __Pyx_GOTREF(__pyx_t_1);
18160   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1306, __pyx_L1_error)
18161   __Pyx_GOTREF(__pyx_t_10);
18162   __Pyx_GIVEREF(__pyx_t_1);
18163   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
18164   __pyx_t_1 = 0;
18165   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
18166   __Pyx_GOTREF(__pyx_t_1);
18167   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
18168   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
18169   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1306, __pyx_L1_error)
18170   __Pyx_GOTREF(__pyx_t_9);
18171   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18172   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18173   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18174   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_cholesky, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18175   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18176 
18177   /* "statsmodels/tsa/statespace/_representation.pyx":1307
18178  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
18179  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
18180  *                  't': self.t,             # <<<<<<<<<<<<<<
18181  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
18182  *                  'companion_transition': self.companion_transition,
18183  */
18184   __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->t); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1307, __pyx_L1_error)
18185   __Pyx_GOTREF(__pyx_t_9);
18186   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_t, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18187   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18188 
18189   /* "statsmodels/tsa/statespace/_representation.pyx":1308
18190  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
18191  *                  't': self.t,
18192  *                  'collapse_loglikelihood': self.collapse_loglikelihood,             # <<<<<<<<<<<<<<
18193  *                  'companion_transition': self.companion_transition,
18194  *                  'transform_determinant': self.transform_determinant,
18195  */
18196   __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->collapse_loglikelihood); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1308, __pyx_L1_error)
18197   __Pyx_GOTREF(__pyx_t_9);
18198   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_loglikelihood, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18199   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18200 
18201   /* "statsmodels/tsa/statespace/_representation.pyx":1309
18202  *                  't': self.t,
18203  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
18204  *                  'companion_transition': self.companion_transition,             # <<<<<<<<<<<<<<
18205  *                  'transform_determinant': self.transform_determinant,
18206  *                  }
18207  */
18208   __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->companion_transition); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1309, __pyx_L1_error)
18209   __Pyx_GOTREF(__pyx_t_9);
18210   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_companion_transition, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18211   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18212 
18213   /* "statsmodels/tsa/statespace/_representation.pyx":1310
18214  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
18215  *                  'companion_transition': self.companion_transition,
18216  *                  'transform_determinant': self.transform_determinant,             # <<<<<<<<<<<<<<
18217  *                  }
18218  *         if self.initialized:
18219  */
18220   __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->transform_determinant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1310, __pyx_L1_error)
18221   __Pyx_GOTREF(__pyx_t_9);
18222   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_determinant, __pyx_t_9) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
18223   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18224   __pyx_v_state = ((PyObject*)__pyx_t_2);
18225   __pyx_t_2 = 0;
18226 
18227   /* "statsmodels/tsa/statespace/_representation.pyx":1312
18228  *                  'transform_determinant': self.transform_determinant,
18229  *                  }
18230  *         if self.initialized:             # <<<<<<<<<<<<<<
18231  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
18232  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
18233  */
18234   __pyx_t_12 = (__pyx_v_self->initialized != 0);
18235   if (__pyx_t_12) {
18236 
18237     /* "statsmodels/tsa/statespace/_representation.pyx":1313
18238  *                  }
18239  *         if self.initialized:
18240  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')             # <<<<<<<<<<<<<<
18241  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
18242  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
18243  */
18244     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
18245     __Pyx_GOTREF(__pyx_t_2);
18246     __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1313, __pyx_L1_error)
18247     __Pyx_GOTREF(__pyx_t_9);
18248     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18249     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1313, __pyx_L1_error)}
18250     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
18251     __Pyx_GOTREF(__pyx_t_2);
18252     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
18253     __Pyx_GOTREF(__pyx_t_1);
18254     __Pyx_GIVEREF(__pyx_t_2);
18255     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
18256     __pyx_t_2 = 0;
18257     __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
18258     __Pyx_GOTREF(__pyx_t_2);
18259     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1313, __pyx_L1_error)
18260     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1313, __pyx_L1_error)
18261     __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1313, __pyx_L1_error)
18262     __Pyx_GOTREF(__pyx_t_10);
18263     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18264     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18265     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18266     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_state, __pyx_t_10) < 0)) __PYX_ERR(0, 1313, __pyx_L1_error)
18267     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18268 
18269     /* "statsmodels/tsa/statespace/_representation.pyx":1314
18270  *         if self.initialized:
18271  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
18272  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')             # <<<<<<<<<<<<<<
18273  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
18274  *         return (self.__class__, init, state)
18275  */
18276     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1314, __pyx_L1_error)
18277     __Pyx_GOTREF(__pyx_t_10);
18278     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
18279     __Pyx_GOTREF(__pyx_t_2);
18280     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18281     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1314, __pyx_L1_error)}
18282     __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1314, __pyx_L1_error)
18283     __Pyx_GOTREF(__pyx_t_10);
18284     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
18285     __Pyx_GOTREF(__pyx_t_1);
18286     __Pyx_GIVEREF(__pyx_t_10);
18287     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
18288     __pyx_t_10 = 0;
18289     __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1314, __pyx_L1_error)
18290     __Pyx_GOTREF(__pyx_t_10);
18291     if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
18292     if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
18293     __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1314, __pyx_L1_error)
18294     __Pyx_GOTREF(__pyx_t_9);
18295     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18296     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18297     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18298     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_state_cov, __pyx_t_9) < 0)) __PYX_ERR(0, 1314, __pyx_L1_error)
18299     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18300 
18301     /* "statsmodels/tsa/statespace/_representation.pyx":1315
18302  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
18303  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
18304  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')             # <<<<<<<<<<<<<<
18305  *         return (self.__class__, init, state)
18306  *
18307  */
18308     __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1315, __pyx_L1_error)
18309     __Pyx_GOTREF(__pyx_t_9);
18310     __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1315, __pyx_L1_error)
18311     __Pyx_GOTREF(__pyx_t_10);
18312     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18313     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1315, __pyx_L1_error)}
18314     __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->initial_diffuse_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1315, __pyx_L1_error)
18315     __Pyx_GOTREF(__pyx_t_9);
18316     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error)
18317     __Pyx_GOTREF(__pyx_t_1);
18318     __Pyx_GIVEREF(__pyx_t_9);
18319     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
18320     __pyx_t_9 = 0;
18321     __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1315, __pyx_L1_error)
18322     __Pyx_GOTREF(__pyx_t_9);
18323     if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 1315, __pyx_L1_error)
18324     if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 1315, __pyx_L1_error)
18325     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error)
18326     __Pyx_GOTREF(__pyx_t_2);
18327     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18328     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18329     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18330     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_diffuse_state_cov, __pyx_t_2) < 0)) __PYX_ERR(0, 1315, __pyx_L1_error)
18331     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18332 
18333     /* "statsmodels/tsa/statespace/_representation.pyx":1312
18334  *                  'transform_determinant': self.transform_determinant,
18335  *                  }
18336  *         if self.initialized:             # <<<<<<<<<<<<<<
18337  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
18338  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
18339  */
18340   }
18341 
18342   /* "statsmodels/tsa/statespace/_representation.pyx":1316
18343  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
18344  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
18345  *         return (self.__class__, init, state)             # <<<<<<<<<<<<<<
18346  *
18347  *     def __setstate__(self, state):
18348  */
18349   __Pyx_XDECREF(__pyx_r);
18350   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error)
18351   __Pyx_GOTREF(__pyx_t_2);
18352   __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1316, __pyx_L1_error)
18353   __Pyx_GOTREF(__pyx_t_9);
18354   __Pyx_GIVEREF(__pyx_t_2);
18355   PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
18356   __Pyx_INCREF(__pyx_v_init);
18357   __Pyx_GIVEREF(__pyx_v_init);
18358   PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_init);
18359   __Pyx_INCREF(__pyx_v_state);
18360   __Pyx_GIVEREF(__pyx_v_state);
18361   PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_state);
18362   __pyx_t_2 = 0;
18363   __pyx_r = __pyx_t_9;
18364   __pyx_t_9 = 0;
18365   goto __pyx_L0;
18366 
18367   /* "statsmodels/tsa/statespace/_representation.pyx":1278
18368  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)
18369  *
18370  *     def __reduce__(self):             # <<<<<<<<<<<<<<
18371  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
18372  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
18373  */
18374 
18375   /* function exit code */
18376   __pyx_L1_error:;
18377   __Pyx_XDECREF(__pyx_t_1);
18378   __Pyx_XDECREF(__pyx_t_2);
18379   __Pyx_XDECREF(__pyx_t_3);
18380   __Pyx_XDECREF(__pyx_t_4);
18381   __Pyx_XDECREF(__pyx_t_5);
18382   __Pyx_XDECREF(__pyx_t_6);
18383   __Pyx_XDECREF(__pyx_t_7);
18384   __Pyx_XDECREF(__pyx_t_8);
18385   __Pyx_XDECREF(__pyx_t_9);
18386   __Pyx_XDECREF(__pyx_t_10);
18387   __Pyx_XDECREF(__pyx_t_11);
18388   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
18389   __pyx_r = NULL;
18390   __pyx_L0:;
18391   __Pyx_XDECREF(__pyx_v_init);
18392   __Pyx_XDECREF(__pyx_v_state);
18393   __Pyx_XGIVEREF(__pyx_r);
18394   __Pyx_RefNannyFinishContext();
18395   return __pyx_r;
18396 }
18397 
18398 /* "statsmodels/tsa/statespace/_representation.pyx":1318
18399  *         return (self.__class__, init, state)
18400  *
18401  *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
18402  *         self.initial_state = state['initial_state']
18403  *         self.initial_state_cov = state['initial_state_cov']
18404  */
18405 
18406 /* Python wrapper */
18407 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_5__setstate__(PyObject * __pyx_v_self,PyObject * __pyx_v_state)18408 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
18409   PyObject *__pyx_r = 0;
18410   __Pyx_RefNannyDeclarations
18411   __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
18412   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4__setstate__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_state));
18413 
18414   /* function exit code */
18415   __Pyx_RefNannyFinishContext();
18416   return __pyx_r;
18417 }
18418 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,PyObject * __pyx_v_state)18419 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_state) {
18420   PyObject *__pyx_r = NULL;
18421   __Pyx_RefNannyDeclarations
18422   PyObject *__pyx_t_1 = NULL;
18423   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
18424   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
18425   int __pyx_t_4;
18426   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
18427   __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
18428   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
18429   __pyx_t_5numpy_float64_t __pyx_t_8;
18430   int __pyx_lineno = 0;
18431   const char *__pyx_filename = NULL;
18432   int __pyx_clineno = 0;
18433   __Pyx_RefNannySetupContext("__setstate__", 0);
18434 
18435   /* "statsmodels/tsa/statespace/_representation.pyx":1319
18436  *
18437  *     def __setstate__(self, state):
18438  *         self.initial_state = state['initial_state']             # <<<<<<<<<<<<<<
18439  *         self.initial_state_cov = state['initial_state_cov']
18440  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
18441  */
18442   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error)
18443   __Pyx_GOTREF(__pyx_t_1);
18444   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1319, __pyx_L1_error)
18445   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18446   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
18447   __pyx_v_self->initial_state = __pyx_t_2;
18448   __pyx_t_2.memview = NULL;
18449   __pyx_t_2.data = NULL;
18450 
18451   /* "statsmodels/tsa/statespace/_representation.pyx":1320
18452  *     def __setstate__(self, state):
18453  *         self.initial_state = state['initial_state']
18454  *         self.initial_state_cov = state['initial_state_cov']             # <<<<<<<<<<<<<<
18455  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
18456  *         self.initialized = state['initialized']
18457  */
18458   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error)
18459   __Pyx_GOTREF(__pyx_t_1);
18460   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1320, __pyx_L1_error)
18461   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18462   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
18463   __pyx_v_self->initial_state_cov = __pyx_t_3;
18464   __pyx_t_3.memview = NULL;
18465   __pyx_t_3.data = NULL;
18466 
18467   /* "statsmodels/tsa/statespace/_representation.pyx":1321
18468  *         self.initial_state = state['initial_state']
18469  *         self.initial_state_cov = state['initial_state_cov']
18470  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']             # <<<<<<<<<<<<<<
18471  *         self.initialized = state['initialized']
18472  *         self.initialized_diffuse = state['initialized_diffuse']
18473  */
18474   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_diffuse_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
18475   __Pyx_GOTREF(__pyx_t_1);
18476   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1321, __pyx_L1_error)
18477   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18478   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_diffuse_state_cov, 0);
18479   __pyx_v_self->initial_diffuse_state_cov = __pyx_t_3;
18480   __pyx_t_3.memview = NULL;
18481   __pyx_t_3.data = NULL;
18482 
18483   /* "statsmodels/tsa/statespace/_representation.pyx":1322
18484  *         self.initial_state_cov = state['initial_state_cov']
18485  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
18486  *         self.initialized = state['initialized']             # <<<<<<<<<<<<<<
18487  *         self.initialized_diffuse = state['initialized_diffuse']
18488  *         self.initialized_stationary = state['initialized_stationary']
18489  */
18490   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error)
18491   __Pyx_GOTREF(__pyx_t_1);
18492   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
18493   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18494   __pyx_v_self->initialized = __pyx_t_4;
18495 
18496   /* "statsmodels/tsa/statespace/_representation.pyx":1323
18497  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
18498  *         self.initialized = state['initialized']
18499  *         self.initialized_diffuse = state['initialized_diffuse']             # <<<<<<<<<<<<<<
18500  *         self.initialized_stationary = state['initialized_stationary']
18501  *         self.selected_state_cov = state['selected_state_cov']
18502  */
18503   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error)
18504   __Pyx_GOTREF(__pyx_t_1);
18505   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L1_error)
18506   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18507   __pyx_v_self->initialized_diffuse = __pyx_t_4;
18508 
18509   /* "statsmodels/tsa/statespace/_representation.pyx":1324
18510  *         self.initialized = state['initialized']
18511  *         self.initialized_diffuse = state['initialized_diffuse']
18512  *         self.initialized_stationary = state['initialized_stationary']             # <<<<<<<<<<<<<<
18513  *         self.selected_state_cov = state['selected_state_cov']
18514  *         self.missing = state['missing']
18515  */
18516   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
18517   __Pyx_GOTREF(__pyx_t_1);
18518   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1324, __pyx_L1_error)
18519   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18520   __pyx_v_self->initialized_stationary = __pyx_t_4;
18521 
18522   /* "statsmodels/tsa/statespace/_representation.pyx":1325
18523  *         self.initialized_diffuse = state['initialized_diffuse']
18524  *         self.initialized_stationary = state['initialized_stationary']
18525  *         self.selected_state_cov = state['selected_state_cov']             # <<<<<<<<<<<<<<
18526  *         self.missing = state['missing']
18527  *         self.nmissing =state['nmissing']
18528  */
18529   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error)
18530   __Pyx_GOTREF(__pyx_t_1);
18531   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1325, __pyx_L1_error)
18532   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18533   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_state_cov, 0);
18534   __pyx_v_self->selected_state_cov = __pyx_t_5;
18535   __pyx_t_5.memview = NULL;
18536   __pyx_t_5.data = NULL;
18537 
18538   /* "statsmodels/tsa/statespace/_representation.pyx":1326
18539  *         self.initialized_stationary = state['initialized_stationary']
18540  *         self.selected_state_cov = state['selected_state_cov']
18541  *         self.missing = state['missing']             # <<<<<<<<<<<<<<
18542  *         self.nmissing =state['nmissing']
18543  *         self.has_missing = state['has_missing']
18544  */
18545   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
18546   __Pyx_GOTREF(__pyx_t_1);
18547   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1326, __pyx_L1_error)
18548   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18549   __PYX_XDEC_MEMVIEW(&__pyx_v_self->missing, 0);
18550   __pyx_v_self->missing = __pyx_t_6;
18551   __pyx_t_6.memview = NULL;
18552   __pyx_t_6.data = NULL;
18553 
18554   /* "statsmodels/tsa/statespace/_representation.pyx":1327
18555  *         self.selected_state_cov = state['selected_state_cov']
18556  *         self.missing = state['missing']
18557  *         self.nmissing =state['nmissing']             # <<<<<<<<<<<<<<
18558  *         self.has_missing = state['has_missing']
18559  *         self.tmp = state['tmp']
18560  */
18561   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_nmissing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
18562   __Pyx_GOTREF(__pyx_t_1);
18563   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1327, __pyx_L1_error)
18564   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18565   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nmissing, 0);
18566   __pyx_v_self->nmissing = __pyx_t_7;
18567   __pyx_t_7.memview = NULL;
18568   __pyx_t_7.data = NULL;
18569 
18570   /* "statsmodels/tsa/statespace/_representation.pyx":1328
18571  *         self.missing = state['missing']
18572  *         self.nmissing =state['nmissing']
18573  *         self.has_missing = state['has_missing']             # <<<<<<<<<<<<<<
18574  *         self.tmp = state['tmp']
18575  *         self.selected_obs  = state['selected_obs']
18576  */
18577   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_has_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
18578   __Pyx_GOTREF(__pyx_t_1);
18579   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1328, __pyx_L1_error)
18580   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18581   __pyx_v_self->has_missing = __pyx_t_4;
18582 
18583   /* "statsmodels/tsa/statespace/_representation.pyx":1329
18584  *         self.nmissing =state['nmissing']
18585  *         self.has_missing = state['has_missing']
18586  *         self.tmp = state['tmp']             # <<<<<<<<<<<<<<
18587  *         self.selected_obs  = state['selected_obs']
18588  *         self.selected_obs_intercept  = state['selected_obs_intercept']
18589  */
18590   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
18591   __Pyx_GOTREF(__pyx_t_1);
18592   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1329, __pyx_L1_error)
18593   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18594   __PYX_XDEC_MEMVIEW(&__pyx_v_self->tmp, 0);
18595   __pyx_v_self->tmp = __pyx_t_3;
18596   __pyx_t_3.memview = NULL;
18597   __pyx_t_3.data = NULL;
18598 
18599   /* "statsmodels/tsa/statespace/_representation.pyx":1330
18600  *         self.has_missing = state['has_missing']
18601  *         self.tmp = state['tmp']
18602  *         self.selected_obs  = state['selected_obs']             # <<<<<<<<<<<<<<
18603  *         self.selected_obs_intercept  = state['selected_obs_intercept']
18604  *         self.selected_design  = state['selected_design']
18605  */
18606   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error)
18607   __Pyx_GOTREF(__pyx_t_1);
18608   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1330, __pyx_L1_error)
18609   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18610   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs, 0);
18611   __pyx_v_self->selected_obs = __pyx_t_2;
18612   __pyx_t_2.memview = NULL;
18613   __pyx_t_2.data = NULL;
18614 
18615   /* "statsmodels/tsa/statespace/_representation.pyx":1331
18616  *         self.tmp = state['tmp']
18617  *         self.selected_obs  = state['selected_obs']
18618  *         self.selected_obs_intercept  = state['selected_obs_intercept']             # <<<<<<<<<<<<<<
18619  *         self.selected_design  = state['selected_design']
18620  *         self.selected_obs_cov  =state['selected_obs_cov']
18621  */
18622   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs_intercept); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error)
18623   __Pyx_GOTREF(__pyx_t_1);
18624   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1331, __pyx_L1_error)
18625   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18626   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_intercept, 0);
18627   __pyx_v_self->selected_obs_intercept = __pyx_t_2;
18628   __pyx_t_2.memview = NULL;
18629   __pyx_t_2.data = NULL;
18630 
18631   /* "statsmodels/tsa/statespace/_representation.pyx":1332
18632  *         self.selected_obs  = state['selected_obs']
18633  *         self.selected_obs_intercept  = state['selected_obs_intercept']
18634  *         self.selected_design  = state['selected_design']             # <<<<<<<<<<<<<<
18635  *         self.selected_obs_cov  =state['selected_obs_cov']
18636  *         self.transform_cholesky  = state['transform_cholesky']
18637  */
18638   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
18639   __Pyx_GOTREF(__pyx_t_1);
18640   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1332, __pyx_L1_error)
18641   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18642   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_design, 0);
18643   __pyx_v_self->selected_design = __pyx_t_2;
18644   __pyx_t_2.memview = NULL;
18645   __pyx_t_2.data = NULL;
18646 
18647   /* "statsmodels/tsa/statespace/_representation.pyx":1333
18648  *         self.selected_obs_intercept  = state['selected_obs_intercept']
18649  *         self.selected_design  = state['selected_design']
18650  *         self.selected_obs_cov  =state['selected_obs_cov']             # <<<<<<<<<<<<<<
18651  *         self.transform_cholesky  = state['transform_cholesky']
18652  *         self.transform_obs_cov  = state['transform_obs_cov']
18653  */
18654   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error)
18655   __Pyx_GOTREF(__pyx_t_1);
18656   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1333, __pyx_L1_error)
18657   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18658   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_cov, 0);
18659   __pyx_v_self->selected_obs_cov = __pyx_t_2;
18660   __pyx_t_2.memview = NULL;
18661   __pyx_t_2.data = NULL;
18662 
18663   /* "statsmodels/tsa/statespace/_representation.pyx":1334
18664  *         self.selected_design  = state['selected_design']
18665  *         self.selected_obs_cov  =state['selected_obs_cov']
18666  *         self.transform_cholesky  = state['transform_cholesky']             # <<<<<<<<<<<<<<
18667  *         self.transform_obs_cov  = state['transform_obs_cov']
18668  *         self.transform_design = state['transform_design']
18669  */
18670   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_cholesky); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
18671   __Pyx_GOTREF(__pyx_t_1);
18672   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1334, __pyx_L1_error)
18673   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18674   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_cholesky, 0);
18675   __pyx_v_self->transform_cholesky = __pyx_t_3;
18676   __pyx_t_3.memview = NULL;
18677   __pyx_t_3.data = NULL;
18678 
18679   /* "statsmodels/tsa/statespace/_representation.pyx":1335
18680  *         self.selected_obs_cov  =state['selected_obs_cov']
18681  *         self.transform_cholesky  = state['transform_cholesky']
18682  *         self.transform_obs_cov  = state['transform_obs_cov']             # <<<<<<<<<<<<<<
18683  *         self.transform_design = state['transform_design']
18684  *         self.collapse_obs = state['collapse_obs']
18685  */
18686   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
18687   __Pyx_GOTREF(__pyx_t_1);
18688   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1335, __pyx_L1_error)
18689   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18690   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_cov, 0);
18691   __pyx_v_self->transform_obs_cov = __pyx_t_3;
18692   __pyx_t_3.memview = NULL;
18693   __pyx_t_3.data = NULL;
18694 
18695   /* "statsmodels/tsa/statespace/_representation.pyx":1336
18696  *         self.transform_cholesky  = state['transform_cholesky']
18697  *         self.transform_obs_cov  = state['transform_obs_cov']
18698  *         self.transform_design = state['transform_design']             # <<<<<<<<<<<<<<
18699  *         self.collapse_obs = state['collapse_obs']
18700  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
18701  */
18702   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error)
18703   __Pyx_GOTREF(__pyx_t_1);
18704   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1336, __pyx_L1_error)
18705   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18706   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_design, 0);
18707   __pyx_v_self->transform_design = __pyx_t_3;
18708   __pyx_t_3.memview = NULL;
18709   __pyx_t_3.data = NULL;
18710 
18711   /* "statsmodels/tsa/statespace/_representation.pyx":1337
18712  *         self.transform_obs_cov  = state['transform_obs_cov']
18713  *         self.transform_design = state['transform_design']
18714  *         self.collapse_obs = state['collapse_obs']             # <<<<<<<<<<<<<<
18715  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
18716  *         self.collapse_design = state['collapse_design']
18717  */
18718   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error)
18719   __Pyx_GOTREF(__pyx_t_1);
18720   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1337, __pyx_L1_error)
18721   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18722   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs, 0);
18723   __pyx_v_self->collapse_obs = __pyx_t_2;
18724   __pyx_t_2.memview = NULL;
18725   __pyx_t_2.data = NULL;
18726 
18727   /* "statsmodels/tsa/statespace/_representation.pyx":1338
18728  *         self.transform_design = state['transform_design']
18729  *         self.collapse_obs = state['collapse_obs']
18730  *         self.collapse_obs_tmp = state['collapse_obs_tmp']             # <<<<<<<<<<<<<<
18731  *         self.collapse_design = state['collapse_design']
18732  *         self.collapse_obs_cov = state['collapse_obs_cov']
18733  */
18734   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error)
18735   __Pyx_GOTREF(__pyx_t_1);
18736   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 1338, __pyx_L1_error)
18737   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18738   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_tmp, 0);
18739   __pyx_v_self->collapse_obs_tmp = __pyx_t_2;
18740   __pyx_t_2.memview = NULL;
18741   __pyx_t_2.data = NULL;
18742 
18743   /* "statsmodels/tsa/statespace/_representation.pyx":1339
18744  *         self.collapse_obs = state['collapse_obs']
18745  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
18746  *         self.collapse_design = state['collapse_design']             # <<<<<<<<<<<<<<
18747  *         self.collapse_obs_cov = state['collapse_obs_cov']
18748  *         self.collapse_cholesky = state['collapse_cholesky']
18749  */
18750   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __pyx_L1_error)
18751   __Pyx_GOTREF(__pyx_t_1);
18752   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1339, __pyx_L1_error)
18753   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18754   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_design, 0);
18755   __pyx_v_self->collapse_design = __pyx_t_3;
18756   __pyx_t_3.memview = NULL;
18757   __pyx_t_3.data = NULL;
18758 
18759   /* "statsmodels/tsa/statespace/_representation.pyx":1340
18760  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
18761  *         self.collapse_design = state['collapse_design']
18762  *         self.collapse_obs_cov = state['collapse_obs_cov']             # <<<<<<<<<<<<<<
18763  *         self.collapse_cholesky = state['collapse_cholesky']
18764  *         self.t = state['t']
18765  */
18766   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __pyx_L1_error)
18767   __Pyx_GOTREF(__pyx_t_1);
18768   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1340, __pyx_L1_error)
18769   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18770   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_cov, 0);
18771   __pyx_v_self->collapse_obs_cov = __pyx_t_3;
18772   __pyx_t_3.memview = NULL;
18773   __pyx_t_3.data = NULL;
18774 
18775   /* "statsmodels/tsa/statespace/_representation.pyx":1341
18776  *         self.collapse_design = state['collapse_design']
18777  *         self.collapse_obs_cov = state['collapse_obs_cov']
18778  *         self.collapse_cholesky = state['collapse_cholesky']             # <<<<<<<<<<<<<<
18779  *         self.t = state['t']
18780  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
18781  */
18782   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_cholesky); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
18783   __Pyx_GOTREF(__pyx_t_1);
18784   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1341, __pyx_L1_error)
18785   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18786   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_cholesky, 0);
18787   __pyx_v_self->collapse_cholesky = __pyx_t_3;
18788   __pyx_t_3.memview = NULL;
18789   __pyx_t_3.data = NULL;
18790 
18791   /* "statsmodels/tsa/statespace/_representation.pyx":1342
18792  *         self.collapse_obs_cov = state['collapse_obs_cov']
18793  *         self.collapse_cholesky = state['collapse_cholesky']
18794  *         self.t = state['t']             # <<<<<<<<<<<<<<
18795  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
18796  *         self.companion_transition = state['companion_transition']
18797  */
18798   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
18799   __Pyx_GOTREF(__pyx_t_1);
18800   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1342, __pyx_L1_error)
18801   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18802   __pyx_v_self->t = __pyx_t_4;
18803 
18804   /* "statsmodels/tsa/statespace/_representation.pyx":1343
18805  *         self.collapse_cholesky = state['collapse_cholesky']
18806  *         self.t = state['t']
18807  *         self.collapse_loglikelihood = state['collapse_loglikelihood']             # <<<<<<<<<<<<<<
18808  *         self.companion_transition = state['companion_transition']
18809  *         self.transform_determinant = state['transform_determinant']
18810  */
18811   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_loglikelihood); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
18812   __Pyx_GOTREF(__pyx_t_1);
18813   __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1343, __pyx_L1_error)
18814   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18815   __pyx_v_self->collapse_loglikelihood = __pyx_t_8;
18816 
18817   /* "statsmodels/tsa/statespace/_representation.pyx":1344
18818  *         self.t = state['t']
18819  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
18820  *         self.companion_transition = state['companion_transition']             # <<<<<<<<<<<<<<
18821  *         self.transform_determinant = state['transform_determinant']
18822  *
18823  */
18824   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_companion_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
18825   __Pyx_GOTREF(__pyx_t_1);
18826   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1344, __pyx_L1_error)
18827   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18828   __pyx_v_self->companion_transition = __pyx_t_4;
18829 
18830   /* "statsmodels/tsa/statespace/_representation.pyx":1345
18831  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
18832  *         self.companion_transition = state['companion_transition']
18833  *         self.transform_determinant = state['transform_determinant']             # <<<<<<<<<<<<<<
18834  *
18835  *     def initialize(self, init, offset=0, complex_step=False, clear=True):
18836  */
18837   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_determinant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
18838   __Pyx_GOTREF(__pyx_t_1);
18839   __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_8 == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1345, __pyx_L1_error)
18840   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18841   __pyx_v_self->transform_determinant = __pyx_t_8;
18842 
18843   /* "statsmodels/tsa/statespace/_representation.pyx":1318
18844  *         return (self.__class__, init, state)
18845  *
18846  *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
18847  *         self.initial_state = state['initial_state']
18848  *         self.initial_state_cov = state['initial_state_cov']
18849  */
18850 
18851   /* function exit code */
18852   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18853   goto __pyx_L0;
18854   __pyx_L1_error:;
18855   __Pyx_XDECREF(__pyx_t_1);
18856   __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
18857   __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
18858   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
18859   __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
18860   __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
18861   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
18862   __pyx_r = NULL;
18863   __pyx_L0:;
18864   __Pyx_XGIVEREF(__pyx_r);
18865   __Pyx_RefNannyFinishContext();
18866   return __pyx_r;
18867 }
18868 
18869 /* "statsmodels/tsa/statespace/_representation.pyx":1347
18870  *         self.transform_determinant = state['transform_determinant']
18871  *
18872  *     def initialize(self, init, offset=0, complex_step=False, clear=True):             # <<<<<<<<<<<<<<
18873  *         cdef dInitialization _init
18874  *         # Clear initial arrays
18875  */
18876 
18877 /* Python wrapper */
18878 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7initialize(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)18879 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18880   PyObject *__pyx_v_init = 0;
18881   PyObject *__pyx_v_offset = 0;
18882   PyObject *__pyx_v_complex_step = 0;
18883   PyObject *__pyx_v_clear = 0;
18884   int __pyx_lineno = 0;
18885   const char *__pyx_filename = NULL;
18886   int __pyx_clineno = 0;
18887   PyObject *__pyx_r = 0;
18888   __Pyx_RefNannyDeclarations
18889   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
18890   {
18891     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init,&__pyx_n_s_offset,&__pyx_n_s_complex_step,&__pyx_n_s_clear,0};
18892     PyObject* values[4] = {0,0,0,0};
18893     values[1] = ((PyObject *)__pyx_int_0);
18894     values[2] = ((PyObject *)Py_False);
18895     values[3] = ((PyObject *)Py_True);
18896     if (unlikely(__pyx_kwds)) {
18897       Py_ssize_t kw_args;
18898       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18899       switch (pos_args) {
18900         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18901         CYTHON_FALLTHROUGH;
18902         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18903         CYTHON_FALLTHROUGH;
18904         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18905         CYTHON_FALLTHROUGH;
18906         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18907         CYTHON_FALLTHROUGH;
18908         case  0: break;
18909         default: goto __pyx_L5_argtuple_error;
18910       }
18911       kw_args = PyDict_Size(__pyx_kwds);
18912       switch (pos_args) {
18913         case  0:
18914         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init)) != 0)) kw_args--;
18915         else goto __pyx_L5_argtuple_error;
18916         CYTHON_FALLTHROUGH;
18917         case  1:
18918         if (kw_args > 0) {
18919           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset);
18920           if (value) { values[1] = value; kw_args--; }
18921         }
18922         CYTHON_FALLTHROUGH;
18923         case  2:
18924         if (kw_args > 0) {
18925           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complex_step);
18926           if (value) { values[2] = value; kw_args--; }
18927         }
18928         CYTHON_FALLTHROUGH;
18929         case  3:
18930         if (kw_args > 0) {
18931           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_clear);
18932           if (value) { values[3] = value; kw_args--; }
18933         }
18934       }
18935       if (unlikely(kw_args > 0)) {
18936         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize") < 0)) __PYX_ERR(0, 1347, __pyx_L3_error)
18937       }
18938     } else {
18939       switch (PyTuple_GET_SIZE(__pyx_args)) {
18940         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
18941         CYTHON_FALLTHROUGH;
18942         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18943         CYTHON_FALLTHROUGH;
18944         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18945         CYTHON_FALLTHROUGH;
18946         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18947         break;
18948         default: goto __pyx_L5_argtuple_error;
18949       }
18950     }
18951     __pyx_v_init = values[0];
18952     __pyx_v_offset = values[1];
18953     __pyx_v_complex_step = values[2];
18954     __pyx_v_clear = values[3];
18955   }
18956   goto __pyx_L4_argument_unpacking_done;
18957   __pyx_L5_argtuple_error:;
18958   __Pyx_RaiseArgtupleInvalid("initialize", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1347, __pyx_L3_error)
18959   __pyx_L3_error:;
18960   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
18961   __Pyx_RefNannyFinishContext();
18962   return NULL;
18963   __pyx_L4_argument_unpacking_done:;
18964   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6initialize(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), __pyx_v_init, __pyx_v_offset, __pyx_v_complex_step, __pyx_v_clear);
18965 
18966   /* function exit code */
18967   __Pyx_RefNannyFinishContext();
18968   return __pyx_r;
18969 }
18970 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,PyObject * __pyx_v_init,PyObject * __pyx_v_offset,PyObject * __pyx_v_complex_step,PyObject * __pyx_v_clear)18971 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_init, PyObject *__pyx_v_offset, PyObject *__pyx_v_complex_step, PyObject *__pyx_v_clear) {
18972   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *__pyx_v__init = 0;
18973   PyObject *__pyx_v_block_index = NULL;
18974   PyObject *__pyx_v_block_init = NULL;
18975   PyObject *__pyx_r = NULL;
18976   __Pyx_RefNannyDeclarations
18977   int __pyx_t_1;
18978   PyObject *__pyx_t_2 = NULL;
18979   int __pyx_t_3;
18980   PyObject *__pyx_t_4 = NULL;
18981   PyObject *__pyx_t_5 = NULL;
18982   int __pyx_t_6;
18983   int __pyx_t_7;
18984   int __pyx_t_8;
18985   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15dInitialization_initialize __pyx_t_9;
18986   Py_ssize_t __pyx_t_10;
18987   Py_ssize_t __pyx_t_11;
18988   PyObject *__pyx_t_12 = NULL;
18989   PyObject *__pyx_t_13 = NULL;
18990   PyObject *__pyx_t_14 = NULL;
18991   int __pyx_lineno = 0;
18992   const char *__pyx_filename = NULL;
18993   int __pyx_clineno = 0;
18994   __Pyx_RefNannySetupContext("initialize", 0);
18995 
18996   /* "statsmodels/tsa/statespace/_representation.pyx":1350
18997  *         cdef dInitialization _init
18998  *         # Clear initial arrays
18999  *         if clear:             # <<<<<<<<<<<<<<
19000  *             self.initial_state[:] = 0
19001  *             self.initial_diffuse_state_cov[:] = 0
19002  */
19003   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clear); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1350, __pyx_L1_error)
19004   if (__pyx_t_1) {
19005 
19006     /* "statsmodels/tsa/statespace/_representation.pyx":1351
19007  *         # Clear initial arrays
19008  *         if clear:
19009  *             self.initial_state[:] = 0             # <<<<<<<<<<<<<<
19010  *             self.initial_diffuse_state_cov[:] = 0
19011  *             self.initial_state_cov[:] = 0
19012  */
19013     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1351, __pyx_L1_error)}
19014     {
19015         __pyx_t_5numpy_float64_t __pyx_temp_scalar = 0.0;
19016         {
19017             Py_ssize_t __pyx_temp_extent_0 = __pyx_v_self->initial_state.shape[0];
19018             Py_ssize_t __pyx_temp_stride_0 = __pyx_v_self->initial_state.strides[0];
19019             char *__pyx_temp_pointer_0;
19020             Py_ssize_t __pyx_temp_idx_0;
19021             __pyx_temp_pointer_0 = __pyx_v_self->initial_state.data;
19022             for (__pyx_temp_idx_0 = 0; __pyx_temp_idx_0 < __pyx_temp_extent_0; __pyx_temp_idx_0++) {
19023               *((__pyx_t_5numpy_float64_t *) __pyx_temp_pointer_0) = __pyx_temp_scalar;
19024               __pyx_temp_pointer_0 += __pyx_temp_stride_0;
19025             }
19026         }
19027     }
19028 
19029     /* "statsmodels/tsa/statespace/_representation.pyx":1352
19030  *         if clear:
19031  *             self.initial_state[:] = 0
19032  *             self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
19033  *             self.initial_state_cov[:] = 0
19034  *
19035  */
19036     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1352, __pyx_L1_error)}
19037     {
19038         __pyx_t_5numpy_float64_t __pyx_temp_scalar = 0.0;
19039         {
19040             Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
19041             Py_ssize_t __pyx_temp_idx;
19042             __pyx_t_5numpy_float64_t *__pyx_temp_pointer = (__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_diffuse_state_cov.data;
19043             for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
19044               *((__pyx_t_5numpy_float64_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
19045               __pyx_temp_pointer += 1;
19046             }
19047         }
19048     }
19049 
19050     /* "statsmodels/tsa/statespace/_representation.pyx":1353
19051  *             self.initial_state[:] = 0
19052  *             self.initial_diffuse_state_cov[:] = 0
19053  *             self.initial_state_cov[:] = 0             # <<<<<<<<<<<<<<
19054  *
19055  *         # If using global initialization, compute the actual elements and
19056  */
19057     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1353, __pyx_L1_error)}
19058     {
19059         __pyx_t_5numpy_float64_t __pyx_temp_scalar = 0.0;
19060         {
19061             Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_state_cov.shape[0] * __pyx_v_self->initial_state_cov.shape[1];
19062             Py_ssize_t __pyx_temp_idx;
19063             __pyx_t_5numpy_float64_t *__pyx_temp_pointer = (__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_state_cov.data;
19064             for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
19065               *((__pyx_t_5numpy_float64_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
19066               __pyx_temp_pointer += 1;
19067             }
19068         }
19069     }
19070 
19071     /* "statsmodels/tsa/statespace/_representation.pyx":1350
19072  *         cdef dInitialization _init
19073  *         # Clear initial arrays
19074  *         if clear:             # <<<<<<<<<<<<<<
19075  *             self.initial_state[:] = 0
19076  *             self.initial_diffuse_state_cov[:] = 0
19077  */
19078   }
19079 
19080   /* "statsmodels/tsa/statespace/_representation.pyx":1357
19081  *         # If using global initialization, compute the actual elements and
19082  *         # return them
19083  *         self.initialized_diffuse = False             # <<<<<<<<<<<<<<
19084  *         self.initialized_stationary = False
19085  *         if init.initialization_type is not None:
19086  */
19087   __pyx_v_self->initialized_diffuse = 0;
19088 
19089   /* "statsmodels/tsa/statespace/_representation.pyx":1358
19090  *         # return them
19091  *         self.initialized_diffuse = False
19092  *         self.initialized_stationary = False             # <<<<<<<<<<<<<<
19093  *         if init.initialization_type is not None:
19094  *             init._initialize_initialization(prefix='d')
19095  */
19096   __pyx_v_self->initialized_stationary = 0;
19097 
19098   /* "statsmodels/tsa/statespace/_representation.pyx":1359
19099  *         self.initialized_diffuse = False
19100  *         self.initialized_stationary = False
19101  *         if init.initialization_type is not None:             # <<<<<<<<<<<<<<
19102  *             init._initialize_initialization(prefix='d')
19103  *             _init = init._initializations['d']
19104  */
19105   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error)
19106   __Pyx_GOTREF(__pyx_t_2);
19107   __pyx_t_1 = (__pyx_t_2 != Py_None);
19108   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19109   __pyx_t_3 = (__pyx_t_1 != 0);
19110   if (__pyx_t_3) {
19111 
19112     /* "statsmodels/tsa/statespace/_representation.pyx":1360
19113  *         self.initialized_stationary = False
19114  *         if init.initialization_type is not None:
19115  *             init._initialize_initialization(prefix='d')             # <<<<<<<<<<<<<<
19116  *             _init = init._initializations['d']
19117  *             _init.initialize(init.initialization_type, offset, self,
19118  */
19119     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialize_initialization); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error)
19120     __Pyx_GOTREF(__pyx_t_2);
19121     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1360, __pyx_L1_error)
19122     __Pyx_GOTREF(__pyx_t_4);
19123     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_prefix, __pyx_n_u_d) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
19124     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1360, __pyx_L1_error)
19125     __Pyx_GOTREF(__pyx_t_5);
19126     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19127     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19128     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19129 
19130     /* "statsmodels/tsa/statespace/_representation.pyx":1361
19131  *         if init.initialization_type is not None:
19132  *             init._initialize_initialization(prefix='d')
19133  *             _init = init._initializations['d']             # <<<<<<<<<<<<<<
19134  *             _init.initialize(init.initialization_type, offset, self,
19135  *                              self.initial_state,
19136  */
19137     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initializations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L1_error)
19138     __Pyx_GOTREF(__pyx_t_5);
19139     __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1361, __pyx_L1_error)
19140     __Pyx_GOTREF(__pyx_t_4);
19141     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19142     if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_dInitialization))))) __PYX_ERR(0, 1361, __pyx_L1_error)
19143     __pyx_v__init = ((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *)__pyx_t_4);
19144     __pyx_t_4 = 0;
19145 
19146     /* "statsmodels/tsa/statespace/_representation.pyx":1362
19147  *             init._initialize_initialization(prefix='d')
19148  *             _init = init._initializations['d']
19149  *             _init.initialize(init.initialization_type, offset, self,             # <<<<<<<<<<<<<<
19150  *                              self.initial_state,
19151  *                              self.initial_diffuse_state_cov,
19152  */
19153     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1362, __pyx_L1_error)
19154     __Pyx_GOTREF(__pyx_t_4);
19155     __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_offset); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1362, __pyx_L1_error)
19156 
19157     /* "statsmodels/tsa/statespace/_representation.pyx":1363
19158  *             _init = init._initializations['d']
19159  *             _init.initialize(init.initialization_type, offset, self,
19160  *                              self.initial_state,             # <<<<<<<<<<<<<<
19161  *                              self.initial_diffuse_state_cov,
19162  *                              self.initial_state_cov, complex_step)
19163  */
19164     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1363, __pyx_L1_error)}
19165 
19166     /* "statsmodels/tsa/statespace/_representation.pyx":1364
19167  *             _init.initialize(init.initialization_type, offset, self,
19168  *                              self.initial_state,
19169  *                              self.initial_diffuse_state_cov,             # <<<<<<<<<<<<<<
19170  *                              self.initial_state_cov, complex_step)
19171  *             if init.initialization_type == 'diffuse':
19172  */
19173     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1364, __pyx_L1_error)}
19174 
19175     /* "statsmodels/tsa/statespace/_representation.pyx":1365
19176  *                              self.initial_state,
19177  *                              self.initial_diffuse_state_cov,
19178  *                              self.initial_state_cov, complex_step)             # <<<<<<<<<<<<<<
19179  *             if init.initialization_type == 'diffuse':
19180  *                 self.initialized_diffuse = True
19181  */
19182     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1365, __pyx_L1_error)}
19183     __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_complex_step); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1365, __pyx_L1_error)
19184 
19185     /* "statsmodels/tsa/statespace/_representation.pyx":1362
19186  *             init._initialize_initialization(prefix='d')
19187  *             _init = init._initializations['d']
19188  *             _init.initialize(init.initialization_type, offset, self,             # <<<<<<<<<<<<<<
19189  *                              self.initial_state,
19190  *                              self.initial_diffuse_state_cov,
19191  */
19192     __pyx_t_9.__pyx_n = 1;
19193     __pyx_t_9.complex_step = __pyx_t_7;
19194     __pyx_t_8 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_dInitialization *)__pyx_v__init->__pyx_vtab)->initialize(__pyx_v__init, __pyx_t_4, __pyx_t_6, __pyx_v_self, __pyx_v_self->initial_state, __pyx_v_self->initial_diffuse_state_cov, __pyx_v_self->initial_state_cov, 0, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)1))) __PYX_ERR(0, 1362, __pyx_L1_error)
19195     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19196 
19197     /* "statsmodels/tsa/statespace/_representation.pyx":1366
19198  *                              self.initial_diffuse_state_cov,
19199  *                              self.initial_state_cov, complex_step)
19200  *             if init.initialization_type == 'diffuse':             # <<<<<<<<<<<<<<
19201  *                 self.initialized_diffuse = True
19202  *             if init.initialization_type == 'stationary':
19203  */
19204     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1366, __pyx_L1_error)
19205     __Pyx_GOTREF(__pyx_t_4);
19206     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_diffuse, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1366, __pyx_L1_error)
19207     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19208     if (__pyx_t_3) {
19209 
19210       /* "statsmodels/tsa/statespace/_representation.pyx":1367
19211  *                              self.initial_state_cov, complex_step)
19212  *             if init.initialization_type == 'diffuse':
19213  *                 self.initialized_diffuse = True             # <<<<<<<<<<<<<<
19214  *             if init.initialization_type == 'stationary':
19215  *                 self.initialized_stationary = True
19216  */
19217       __pyx_v_self->initialized_diffuse = 1;
19218 
19219       /* "statsmodels/tsa/statespace/_representation.pyx":1366
19220  *                              self.initial_diffuse_state_cov,
19221  *                              self.initial_state_cov, complex_step)
19222  *             if init.initialization_type == 'diffuse':             # <<<<<<<<<<<<<<
19223  *                 self.initialized_diffuse = True
19224  *             if init.initialization_type == 'stationary':
19225  */
19226     }
19227 
19228     /* "statsmodels/tsa/statespace/_representation.pyx":1368
19229  *             if init.initialization_type == 'diffuse':
19230  *                 self.initialized_diffuse = True
19231  *             if init.initialization_type == 'stationary':             # <<<<<<<<<<<<<<
19232  *                 self.initialized_stationary = True
19233  *         # Otherwise, if using blocks, initialize each of the blocks
19234  */
19235     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L1_error)
19236     __Pyx_GOTREF(__pyx_t_4);
19237     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_stationary, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1368, __pyx_L1_error)
19238     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19239     if (__pyx_t_3) {
19240 
19241       /* "statsmodels/tsa/statespace/_representation.pyx":1369
19242  *                 self.initialized_diffuse = True
19243  *             if init.initialization_type == 'stationary':
19244  *                 self.initialized_stationary = True             # <<<<<<<<<<<<<<
19245  *         # Otherwise, if using blocks, initialize each of the blocks
19246  *         else:
19247  */
19248       __pyx_v_self->initialized_stationary = 1;
19249 
19250       /* "statsmodels/tsa/statespace/_representation.pyx":1368
19251  *             if init.initialization_type == 'diffuse':
19252  *                 self.initialized_diffuse = True
19253  *             if init.initialization_type == 'stationary':             # <<<<<<<<<<<<<<
19254  *                 self.initialized_stationary = True
19255  *         # Otherwise, if using blocks, initialize each of the blocks
19256  */
19257     }
19258 
19259     /* "statsmodels/tsa/statespace/_representation.pyx":1359
19260  *         self.initialized_diffuse = False
19261  *         self.initialized_stationary = False
19262  *         if init.initialization_type is not None:             # <<<<<<<<<<<<<<
19263  *             init._initialize_initialization(prefix='d')
19264  *             _init = init._initializations['d']
19265  */
19266     goto __pyx_L4;
19267   }
19268 
19269   /* "statsmodels/tsa/statespace/_representation.pyx":1372
19270  *         # Otherwise, if using blocks, initialize each of the blocks
19271  *         else:
19272  *             for block_index, block_init in init.blocks.items():             # <<<<<<<<<<<<<<
19273  *                 self.initialize(block_init, offset=offset + block_index[0],
19274  *                                 complex_step=complex_step, clear=False)
19275  */
19276   /*else*/ {
19277     __pyx_t_10 = 0;
19278     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_blocks); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1372, __pyx_L1_error)
19279     __Pyx_GOTREF(__pyx_t_5);
19280     if (unlikely(__pyx_t_5 == Py_None)) {
19281       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
19282       __PYX_ERR(0, 1372, __pyx_L1_error)
19283     }
19284     __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_items, (&__pyx_t_11), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error)
19285     __Pyx_GOTREF(__pyx_t_2);
19286     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19287     __Pyx_XDECREF(__pyx_t_4);
19288     __pyx_t_4 = __pyx_t_2;
19289     __pyx_t_2 = 0;
19290     while (1) {
19291       __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_11, &__pyx_t_10, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_8);
19292       if (unlikely(__pyx_t_7 == 0)) break;
19293       if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1372, __pyx_L1_error)
19294       __Pyx_GOTREF(__pyx_t_2);
19295       __Pyx_GOTREF(__pyx_t_5);
19296       __Pyx_XDECREF_SET(__pyx_v_block_index, __pyx_t_2);
19297       __pyx_t_2 = 0;
19298       __Pyx_XDECREF_SET(__pyx_v_block_init, __pyx_t_5);
19299       __pyx_t_5 = 0;
19300 
19301       /* "statsmodels/tsa/statespace/_representation.pyx":1373
19302  *         else:
19303  *             for block_index, block_init in init.blocks.items():
19304  *                 self.initialize(block_init, offset=offset + block_index[0],             # <<<<<<<<<<<<<<
19305  *                                 complex_step=complex_step, clear=False)
19306  *
19307  */
19308       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_initialize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
19309       __Pyx_GOTREF(__pyx_t_5);
19310       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
19311       __Pyx_GOTREF(__pyx_t_2);
19312       __Pyx_INCREF(__pyx_v_block_init);
19313       __Pyx_GIVEREF(__pyx_v_block_init);
19314       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_block_init);
19315       __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1373, __pyx_L1_error)
19316       __Pyx_GOTREF(__pyx_t_12);
19317       __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_block_index, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1373, __pyx_L1_error)
19318       __Pyx_GOTREF(__pyx_t_13);
19319       __pyx_t_14 = PyNumber_Add(__pyx_v_offset, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1373, __pyx_L1_error)
19320       __Pyx_GOTREF(__pyx_t_14);
19321       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
19322       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_offset, __pyx_t_14) < 0) __PYX_ERR(0, 1373, __pyx_L1_error)
19323       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19324 
19325       /* "statsmodels/tsa/statespace/_representation.pyx":1374
19326  *             for block_index, block_init in init.blocks.items():
19327  *                 self.initialize(block_init, offset=offset + block_index[0],
19328  *                                 complex_step=complex_step, clear=False)             # <<<<<<<<<<<<<<
19329  *
19330  *         if not self.initialized:
19331  */
19332       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_complex_step, __pyx_v_complex_step) < 0) __PYX_ERR(0, 1373, __pyx_L1_error)
19333       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_clear, Py_False) < 0) __PYX_ERR(0, 1373, __pyx_L1_error)
19334 
19335       /* "statsmodels/tsa/statespace/_representation.pyx":1373
19336  *         else:
19337  *             for block_index, block_init in init.blocks.items():
19338  *                 self.initialize(block_init, offset=offset + block_index[0],             # <<<<<<<<<<<<<<
19339  *                                 complex_step=complex_step, clear=False)
19340  *
19341  */
19342       __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1373, __pyx_L1_error)
19343       __Pyx_GOTREF(__pyx_t_14);
19344       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19345       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19346       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
19347       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
19348     }
19349     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19350   }
19351   __pyx_L4:;
19352 
19353   /* "statsmodels/tsa/statespace/_representation.pyx":1376
19354  *                                 complex_step=complex_step, clear=False)
19355  *
19356  *         if not self.initialized:             # <<<<<<<<<<<<<<
19357  *             self.initialized = True
19358  *
19359  */
19360   __pyx_t_3 = ((!(__pyx_v_self->initialized != 0)) != 0);
19361   if (__pyx_t_3) {
19362 
19363     /* "statsmodels/tsa/statespace/_representation.pyx":1377
19364  *
19365  *         if not self.initialized:
19366  *             self.initialized = True             # <<<<<<<<<<<<<<
19367  *
19368  *     # ## Initialize: known values
19369  */
19370     __pyx_v_self->initialized = 1;
19371 
19372     /* "statsmodels/tsa/statespace/_representation.pyx":1376
19373  *                                 complex_step=complex_step, clear=False)
19374  *
19375  *         if not self.initialized:             # <<<<<<<<<<<<<<
19376  *             self.initialized = True
19377  *
19378  */
19379   }
19380 
19381   /* "statsmodels/tsa/statespace/_representation.pyx":1347
19382  *         self.transform_determinant = state['transform_determinant']
19383  *
19384  *     def initialize(self, init, offset=0, complex_step=False, clear=True):             # <<<<<<<<<<<<<<
19385  *         cdef dInitialization _init
19386  *         # Clear initial arrays
19387  */
19388 
19389   /* function exit code */
19390   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19391   goto __pyx_L0;
19392   __pyx_L1_error:;
19393   __Pyx_XDECREF(__pyx_t_2);
19394   __Pyx_XDECREF(__pyx_t_4);
19395   __Pyx_XDECREF(__pyx_t_5);
19396   __Pyx_XDECREF(__pyx_t_12);
19397   __Pyx_XDECREF(__pyx_t_13);
19398   __Pyx_XDECREF(__pyx_t_14);
19399   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
19400   __pyx_r = NULL;
19401   __pyx_L0:;
19402   __Pyx_XDECREF((PyObject *)__pyx_v__init);
19403   __Pyx_XDECREF(__pyx_v_block_index);
19404   __Pyx_XDECREF(__pyx_v_block_init);
19405   __Pyx_XGIVEREF(__pyx_r);
19406   __Pyx_RefNannyFinishContext();
19407   return __pyx_r;
19408 }
19409 
19410 /* "statsmodels/tsa/statespace/_representation.pyx":1384
19411  *     # certainty or else as filled with parameters from a maximum likelihood
19412  *     # estimation run.
19413  *     def initialize_known(self, np.float64_t [:] initial_state, np.float64_t [::1,:] initial_state_cov):             # <<<<<<<<<<<<<<
19414  *         """
19415  *         initialize_known(initial_state, initial_state_cov)
19416  */
19417 
19418 /* Python wrapper */
19419 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9initialize_known(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19420 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8initialize_known[] = "\n        initialize_known(initial_state, initial_state_cov)\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9initialize_known(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)19421 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9initialize_known(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19422   __Pyx_memviewslice __pyx_v_initial_state = { 0, 0, { 0 }, { 0 }, { 0 } };
19423   __Pyx_memviewslice __pyx_v_initial_state_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
19424   int __pyx_lineno = 0;
19425   const char *__pyx_filename = NULL;
19426   int __pyx_clineno = 0;
19427   PyObject *__pyx_r = 0;
19428   __Pyx_RefNannyDeclarations
19429   __Pyx_RefNannySetupContext("initialize_known (wrapper)", 0);
19430   {
19431     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_initial_state,&__pyx_n_s_initial_state_cov,0};
19432     PyObject* values[2] = {0,0};
19433     if (unlikely(__pyx_kwds)) {
19434       Py_ssize_t kw_args;
19435       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19436       switch (pos_args) {
19437         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19438         CYTHON_FALLTHROUGH;
19439         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19440         CYTHON_FALLTHROUGH;
19441         case  0: break;
19442         default: goto __pyx_L5_argtuple_error;
19443       }
19444       kw_args = PyDict_Size(__pyx_kwds);
19445       switch (pos_args) {
19446         case  0:
19447         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial_state)) != 0)) kw_args--;
19448         else goto __pyx_L5_argtuple_error;
19449         CYTHON_FALLTHROUGH;
19450         case  1:
19451         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial_state_cov)) != 0)) kw_args--;
19452         else {
19453           __Pyx_RaiseArgtupleInvalid("initialize_known", 1, 2, 2, 1); __PYX_ERR(0, 1384, __pyx_L3_error)
19454         }
19455       }
19456       if (unlikely(kw_args > 0)) {
19457         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_known") < 0)) __PYX_ERR(0, 1384, __pyx_L3_error)
19458       }
19459     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
19460       goto __pyx_L5_argtuple_error;
19461     } else {
19462       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19463       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19464     }
19465     __pyx_v_initial_state = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_initial_state.memview)) __PYX_ERR(0, 1384, __pyx_L3_error)
19466     __pyx_v_initial_state_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_initial_state_cov.memview)) __PYX_ERR(0, 1384, __pyx_L3_error)
19467   }
19468   goto __pyx_L4_argument_unpacking_done;
19469   __pyx_L5_argtuple_error:;
19470   __Pyx_RaiseArgtupleInvalid("initialize_known", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1384, __pyx_L3_error)
19471   __pyx_L3_error:;
19472   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialize_known", __pyx_clineno, __pyx_lineno, __pyx_filename);
19473   __Pyx_RefNannyFinishContext();
19474   return NULL;
19475   __pyx_L4_argument_unpacking_done:;
19476   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8initialize_known(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), __pyx_v_initial_state, __pyx_v_initial_state_cov);
19477 
19478   /* function exit code */
19479   __Pyx_RefNannyFinishContext();
19480   return __pyx_r;
19481 }
19482 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,__Pyx_memviewslice __pyx_v_initial_state,__Pyx_memviewslice __pyx_v_initial_state_cov)19483 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_initial_state, __Pyx_memviewslice __pyx_v_initial_state_cov) {
19484   PyObject *__pyx_r = NULL;
19485   __Pyx_RefNannyDeclarations
19486   PyObject *__pyx_t_1 = NULL;
19487   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape __pyx_t_2;
19488   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape __pyx_t_3;
19489   int __pyx_lineno = 0;
19490   const char *__pyx_filename = NULL;
19491   int __pyx_clineno = 0;
19492   __Pyx_RefNannySetupContext("initialize_known", 0);
19493 
19494   /* "statsmodels/tsa/statespace/_representation.pyx":1388
19495  *         initialize_known(initial_state, initial_state_cov)
19496  *         """
19497  *         tools.validate_vector_shape('initial state', &initial_state.shape[0], self.k_states, None)             # <<<<<<<<<<<<<<
19498  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)
19499  *
19500  */
19501   __pyx_t_2.__pyx_n = 1;
19502   __pyx_t_2.nobs = Py_None;
19503   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_initial_state_2, (&(__pyx_v_initial_state.shape[0])), __pyx_v_self->k_states, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
19504   __Pyx_GOTREF(__pyx_t_1);
19505   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19506 
19507   /* "statsmodels/tsa/statespace/_representation.pyx":1389
19508  *         """
19509  *         tools.validate_vector_shape('initial state', &initial_state.shape[0], self.k_states, None)
19510  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)             # <<<<<<<<<<<<<<
19511  *
19512  *         self.initial_state = initial_state
19513  */
19514   __pyx_t_3.__pyx_n = 1;
19515   __pyx_t_3.nobs = Py_None;
19516   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_initial_state_covariance, (&(__pyx_v_initial_state_cov.shape[0])), __pyx_v_self->k_states, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __pyx_L1_error)
19517   __Pyx_GOTREF(__pyx_t_1);
19518   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19519 
19520   /* "statsmodels/tsa/statespace/_representation.pyx":1391
19521  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)
19522  *
19523  *         self.initial_state = initial_state             # <<<<<<<<<<<<<<
19524  *         self.initial_state_cov = initial_state_cov
19525  *         self.initial_diffuse_state_cov[:] = 0
19526  */
19527   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
19528   __PYX_INC_MEMVIEW(&__pyx_v_initial_state, 0);
19529   __pyx_v_self->initial_state = __pyx_v_initial_state;
19530 
19531   /* "statsmodels/tsa/statespace/_representation.pyx":1392
19532  *
19533  *         self.initial_state = initial_state
19534  *         self.initial_state_cov = initial_state_cov             # <<<<<<<<<<<<<<
19535  *         self.initial_diffuse_state_cov[:] = 0
19536  *
19537  */
19538   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
19539   __PYX_INC_MEMVIEW(&__pyx_v_initial_state_cov, 0);
19540   __pyx_v_self->initial_state_cov = __pyx_v_initial_state_cov;
19541 
19542   /* "statsmodels/tsa/statespace/_representation.pyx":1393
19543  *         self.initial_state = initial_state
19544  *         self.initial_state_cov = initial_state_cov
19545  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
19546  *
19547  *         self.initialized = True
19548  */
19549   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1393, __pyx_L1_error)}
19550   {
19551       __pyx_t_5numpy_float64_t __pyx_temp_scalar = 0.0;
19552       {
19553           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
19554           Py_ssize_t __pyx_temp_idx;
19555           __pyx_t_5numpy_float64_t *__pyx_temp_pointer = (__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_diffuse_state_cov.data;
19556           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
19557             *((__pyx_t_5numpy_float64_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
19558             __pyx_temp_pointer += 1;
19559           }
19560       }
19561   }
19562 
19563   /* "statsmodels/tsa/statespace/_representation.pyx":1395
19564  *         self.initial_diffuse_state_cov[:] = 0
19565  *
19566  *         self.initialized = True             # <<<<<<<<<<<<<<
19567  *
19568  *     # ## Initialize: approximate diffuse priors
19569  */
19570   __pyx_v_self->initialized = 1;
19571 
19572   /* "statsmodels/tsa/statespace/_representation.pyx":1384
19573  *     # certainty or else as filled with parameters from a maximum likelihood
19574  *     # estimation run.
19575  *     def initialize_known(self, np.float64_t [:] initial_state, np.float64_t [::1,:] initial_state_cov):             # <<<<<<<<<<<<<<
19576  *         """
19577  *         initialize_known(initial_state, initial_state_cov)
19578  */
19579 
19580   /* function exit code */
19581   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19582   goto __pyx_L0;
19583   __pyx_L1_error:;
19584   __Pyx_XDECREF(__pyx_t_1);
19585   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialize_known", __pyx_clineno, __pyx_lineno, __pyx_filename);
19586   __pyx_r = NULL;
19587   __pyx_L0:;
19588   __PYX_XDEC_MEMVIEW(&__pyx_v_initial_state, 1);
19589   __PYX_XDEC_MEMVIEW(&__pyx_v_initial_state_cov, 1);
19590   __Pyx_XGIVEREF(__pyx_r);
19591   __Pyx_RefNannyFinishContext();
19592   return __pyx_r;
19593 }
19594 
19595 /* "statsmodels/tsa/statespace/_representation.pyx":1404
19596  *     #
19597  *     # *Note:* see Durbin and Koopman section 5.6.1
19598  *     def initialize_approximate_diffuse(self, np.float64_t variance=1e2):             # <<<<<<<<<<<<<<
19599  *         """
19600  *         initialize_approximate_diffuse(variance=1e2)
19601  */
19602 
19603 /* Python wrapper */
19604 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialize_approximate_diffuse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19605 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10initialize_approximate_diffuse[] = "\n        initialize_approximate_diffuse(variance=1e2)\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialize_approximate_diffuse(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)19606 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialize_approximate_diffuse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19607   __pyx_t_5numpy_float64_t __pyx_v_variance;
19608   int __pyx_lineno = 0;
19609   const char *__pyx_filename = NULL;
19610   int __pyx_clineno = 0;
19611   PyObject *__pyx_r = 0;
19612   __Pyx_RefNannyDeclarations
19613   __Pyx_RefNannySetupContext("initialize_approximate_diffuse (wrapper)", 0);
19614   {
19615     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variance,0};
19616     PyObject* values[1] = {0};
19617     if (unlikely(__pyx_kwds)) {
19618       Py_ssize_t kw_args;
19619       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19620       switch (pos_args) {
19621         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19622         CYTHON_FALLTHROUGH;
19623         case  0: break;
19624         default: goto __pyx_L5_argtuple_error;
19625       }
19626       kw_args = PyDict_Size(__pyx_kwds);
19627       switch (pos_args) {
19628         case  0:
19629         if (kw_args > 0) {
19630           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variance);
19631           if (value) { values[0] = value; kw_args--; }
19632         }
19633       }
19634       if (unlikely(kw_args > 0)) {
19635         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_approximate_diffuse") < 0)) __PYX_ERR(0, 1404, __pyx_L3_error)
19636       }
19637     } else {
19638       switch (PyTuple_GET_SIZE(__pyx_args)) {
19639         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19640         CYTHON_FALLTHROUGH;
19641         case  0: break;
19642         default: goto __pyx_L5_argtuple_error;
19643       }
19644     }
19645     if (values[0]) {
19646       __pyx_v_variance = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_variance == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1404, __pyx_L3_error)
19647     } else {
19648       __pyx_v_variance = ((__pyx_t_5numpy_float64_t)1e2);
19649     }
19650   }
19651   goto __pyx_L4_argument_unpacking_done;
19652   __pyx_L5_argtuple_error:;
19653   __Pyx_RaiseArgtupleInvalid("initialize_approximate_diffuse", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1404, __pyx_L3_error)
19654   __pyx_L3_error:;
19655   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialize_approximate_diffuse", __pyx_clineno, __pyx_lineno, __pyx_filename);
19656   __Pyx_RefNannyFinishContext();
19657   return NULL;
19658   __pyx_L4_argument_unpacking_done:;
19659   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10initialize_approximate_diffuse(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), __pyx_v_variance);
19660 
19661   /* function exit code */
19662   __Pyx_RefNannyFinishContext();
19663   return __pyx_r;
19664 }
19665 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,__pyx_t_5numpy_float64_t __pyx_v_variance)19666 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_variance) {
19667   npy_intp __pyx_v_dim[1];
19668   PyObject *__pyx_r = NULL;
19669   __Pyx_RefNannyDeclarations
19670   int __pyx_t_1;
19671   PyObject *__pyx_t_2 = NULL;
19672   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
19673   PyObject *__pyx_t_4 = NULL;
19674   PyObject *__pyx_t_5 = NULL;
19675   PyObject *__pyx_t_6 = NULL;
19676   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
19677   int __pyx_lineno = 0;
19678   const char *__pyx_filename = NULL;
19679   int __pyx_clineno = 0;
19680   __Pyx_RefNannySetupContext("initialize_approximate_diffuse", 0);
19681 
19682   /* "statsmodels/tsa/statespace/_representation.pyx":1409
19683  *         """
19684  *         cdef np.npy_intp dim[1]
19685  *         dim[0] = self.k_states             # <<<<<<<<<<<<<<
19686  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_FLOAT64, FORTRAN)
19687  *         self.initial_state_cov = np.eye(self.k_states, dtype=float).T * variance
19688  */
19689   __pyx_t_1 = __pyx_v_self->k_states;
19690   (__pyx_v_dim[0]) = __pyx_t_1;
19691 
19692   /* "statsmodels/tsa/statespace/_representation.pyx":1410
19693  *         cdef np.npy_intp dim[1]
19694  *         dim[0] = self.k_states
19695  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
19696  *         self.initial_state_cov = np.eye(self.k_states, dtype=float).T * variance
19697  *         self.initial_diffuse_state_cov[:] = 0
19698  */
19699   __pyx_t_2 = PyArray_ZEROS(1, __pyx_v_dim, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1410, __pyx_L1_error)
19700   __Pyx_GOTREF(__pyx_t_2);
19701   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1410, __pyx_L1_error)
19702   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19703   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
19704   __pyx_v_self->initial_state = __pyx_t_3;
19705   __pyx_t_3.memview = NULL;
19706   __pyx_t_3.data = NULL;
19707 
19708   /* "statsmodels/tsa/statespace/_representation.pyx":1411
19709  *         dim[0] = self.k_states
19710  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_FLOAT64, FORTRAN)
19711  *         self.initial_state_cov = np.eye(self.k_states, dtype=float).T * variance             # <<<<<<<<<<<<<<
19712  *         self.initial_diffuse_state_cov[:] = 0
19713  *
19714  */
19715   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error)
19716   __Pyx_GOTREF(__pyx_t_2);
19717   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_eye); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error)
19718   __Pyx_GOTREF(__pyx_t_4);
19719   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19720   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->k_states); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error)
19721   __Pyx_GOTREF(__pyx_t_2);
19722   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error)
19723   __Pyx_GOTREF(__pyx_t_5);
19724   __Pyx_GIVEREF(__pyx_t_2);
19725   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
19726   __pyx_t_2 = 0;
19727   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error)
19728   __Pyx_GOTREF(__pyx_t_2);
19729   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1411, __pyx_L1_error)
19730   __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error)
19731   __Pyx_GOTREF(__pyx_t_6);
19732   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19733   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19734   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19735   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error)
19736   __Pyx_GOTREF(__pyx_t_2);
19737   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19738   __pyx_t_6 = PyFloat_FromDouble(__pyx_v_variance); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error)
19739   __Pyx_GOTREF(__pyx_t_6);
19740   __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error)
19741   __Pyx_GOTREF(__pyx_t_5);
19742   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19743   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19744   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1411, __pyx_L1_error)
19745   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19746   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
19747   __pyx_v_self->initial_state_cov = __pyx_t_7;
19748   __pyx_t_7.memview = NULL;
19749   __pyx_t_7.data = NULL;
19750 
19751   /* "statsmodels/tsa/statespace/_representation.pyx":1412
19752  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_FLOAT64, FORTRAN)
19753  *         self.initial_state_cov = np.eye(self.k_states, dtype=float).T * variance
19754  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
19755  *
19756  *         self.initialized = True
19757  */
19758   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1412, __pyx_L1_error)}
19759   {
19760       __pyx_t_5numpy_float64_t __pyx_temp_scalar = 0.0;
19761       {
19762           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
19763           Py_ssize_t __pyx_temp_idx;
19764           __pyx_t_5numpy_float64_t *__pyx_temp_pointer = (__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_diffuse_state_cov.data;
19765           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
19766             *((__pyx_t_5numpy_float64_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
19767             __pyx_temp_pointer += 1;
19768           }
19769       }
19770   }
19771 
19772   /* "statsmodels/tsa/statespace/_representation.pyx":1414
19773  *         self.initial_diffuse_state_cov[:] = 0
19774  *
19775  *         self.initialized = True             # <<<<<<<<<<<<<<
19776  *
19777  *     # ## Initialize: stationary process
19778  */
19779   __pyx_v_self->initialized = 1;
19780 
19781   /* "statsmodels/tsa/statespace/_representation.pyx":1404
19782  *     #
19783  *     # *Note:* see Durbin and Koopman section 5.6.1
19784  *     def initialize_approximate_diffuse(self, np.float64_t variance=1e2):             # <<<<<<<<<<<<<<
19785  *         """
19786  *         initialize_approximate_diffuse(variance=1e2)
19787  */
19788 
19789   /* function exit code */
19790   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19791   goto __pyx_L0;
19792   __pyx_L1_error:;
19793   __Pyx_XDECREF(__pyx_t_2);
19794   __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
19795   __Pyx_XDECREF(__pyx_t_4);
19796   __Pyx_XDECREF(__pyx_t_5);
19797   __Pyx_XDECREF(__pyx_t_6);
19798   __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
19799   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialize_approximate_diffuse", __pyx_clineno, __pyx_lineno, __pyx_filename);
19800   __pyx_r = NULL;
19801   __pyx_L0:;
19802   __Pyx_XGIVEREF(__pyx_r);
19803   __Pyx_RefNannyFinishContext();
19804   return __pyx_r;
19805 }
19806 
19807 /* "statsmodels/tsa/statespace/_representation.pyx":1418
19808  *     # ## Initialize: stationary process
19809  *     # *Note:* see Durbin and Koopman section 5.6.2
19810  *     def initialize_stationary(self, complex_step=False):             # <<<<<<<<<<<<<<
19811  *         """
19812  *         initialize_stationary()
19813  */
19814 
19815 /* Python wrapper */
19816 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initialize_stationary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19817 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12initialize_stationary[] = "\n        initialize_stationary()\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initialize_stationary(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)19818 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initialize_stationary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19819   PyObject *__pyx_v_complex_step = 0;
19820   int __pyx_lineno = 0;
19821   const char *__pyx_filename = NULL;
19822   int __pyx_clineno = 0;
19823   PyObject *__pyx_r = 0;
19824   __Pyx_RefNannyDeclarations
19825   __Pyx_RefNannySetupContext("initialize_stationary (wrapper)", 0);
19826   {
19827     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_complex_step,0};
19828     PyObject* values[1] = {0};
19829     values[0] = ((PyObject *)Py_False);
19830     if (unlikely(__pyx_kwds)) {
19831       Py_ssize_t kw_args;
19832       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19833       switch (pos_args) {
19834         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19835         CYTHON_FALLTHROUGH;
19836         case  0: break;
19837         default: goto __pyx_L5_argtuple_error;
19838       }
19839       kw_args = PyDict_Size(__pyx_kwds);
19840       switch (pos_args) {
19841         case  0:
19842         if (kw_args > 0) {
19843           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complex_step);
19844           if (value) { values[0] = value; kw_args--; }
19845         }
19846       }
19847       if (unlikely(kw_args > 0)) {
19848         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_stationary") < 0)) __PYX_ERR(0, 1418, __pyx_L3_error)
19849       }
19850     } else {
19851       switch (PyTuple_GET_SIZE(__pyx_args)) {
19852         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19853         CYTHON_FALLTHROUGH;
19854         case  0: break;
19855         default: goto __pyx_L5_argtuple_error;
19856       }
19857     }
19858     __pyx_v_complex_step = values[0];
19859   }
19860   goto __pyx_L4_argument_unpacking_done;
19861   __pyx_L5_argtuple_error:;
19862   __Pyx_RaiseArgtupleInvalid("initialize_stationary", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1418, __pyx_L3_error)
19863   __pyx_L3_error:;
19864   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialize_stationary", __pyx_clineno, __pyx_lineno, __pyx_filename);
19865   __Pyx_RefNannyFinishContext();
19866   return NULL;
19867   __pyx_L4_argument_unpacking_done:;
19868   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12initialize_stationary(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), __pyx_v_complex_step);
19869 
19870   /* function exit code */
19871   __Pyx_RefNannyFinishContext();
19872   return __pyx_r;
19873 }
19874 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,PyObject * __pyx_v_complex_step)19875 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_complex_step) {
19876   npy_intp __pyx_v_dim1[1];
19877   npy_intp __pyx_v_dim2[2];
19878   int __pyx_v_i;
19879   int __pyx_v_info;
19880   int __pyx_v_inc;
19881   int __pyx_v_k_states2;
19882   __pyx_t_5numpy_float64_t __pyx_v_asum;
19883   __pyx_t_5numpy_float64_t __pyx_v_tol;
19884   __pyx_t_5numpy_float64_t __pyx_v_scalar;
19885   __Pyx_memviewslice __pyx_v_ipiv = { 0, 0, { 0 }, { 0 }, { 0 } };
19886   PyObject *__pyx_r = NULL;
19887   __Pyx_RefNannyDeclarations
19888   Py_ssize_t __pyx_t_1;
19889   Py_ssize_t __pyx_t_2;
19890   Py_ssize_t __pyx_t_3;
19891   Py_ssize_t __pyx_t_4;
19892   Py_ssize_t __pyx_t_5;
19893   Py_ssize_t __pyx_t_6;
19894   Py_ssize_t __pyx_t_7;
19895   Py_ssize_t __pyx_t_8;
19896   Py_ssize_t __pyx_t_9;
19897   Py_ssize_t __pyx_t_10;
19898   Py_ssize_t __pyx_t_11;
19899   int __pyx_t_12;
19900   PyObject *__pyx_t_13 = NULL;
19901   __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } };
19902   int __pyx_t_15;
19903   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
19904   int __pyx_t_17;
19905   int __pyx_t_18;
19906   __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } };
19907   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__dsolve_discrete_lyapunov __pyx_t_20;
19908   int __pyx_lineno = 0;
19909   const char *__pyx_filename = NULL;
19910   int __pyx_clineno = 0;
19911   __Pyx_RefNannySetupContext("initialize_stationary", 0);
19912 
19913   /* "statsmodels/tsa/statespace/_representation.pyx":1424
19914  *         cdef np.npy_intp dim1[1]
19915  *         cdef np.npy_intp dim2[2]
19916  *         cdef int i, info, inc = 1             # <<<<<<<<<<<<<<
19917  *         cdef int k_states2 = self.k_states**2
19918  *         cdef np.float64_t asum, tol = 1e-9
19919  */
19920   __pyx_v_inc = 1;
19921 
19922   /* "statsmodels/tsa/statespace/_representation.pyx":1425
19923  *         cdef np.npy_intp dim2[2]
19924  *         cdef int i, info, inc = 1
19925  *         cdef int k_states2 = self.k_states**2             # <<<<<<<<<<<<<<
19926  *         cdef np.float64_t asum, tol = 1e-9
19927  *         cdef np.float64_t scalar
19928  */
19929   __pyx_v_k_states2 = __Pyx_pow_long(((long)__pyx_v_self->k_states), 2);
19930 
19931   /* "statsmodels/tsa/statespace/_representation.pyx":1426
19932  *         cdef int i, info, inc = 1
19933  *         cdef int k_states2 = self.k_states**2
19934  *         cdef np.float64_t asum, tol = 1e-9             # <<<<<<<<<<<<<<
19935  *         cdef np.float64_t scalar
19936  *         cdef int [::1,:] ipiv
19937  */
19938   __pyx_v_tol = 1e-9;
19939 
19940   /* "statsmodels/tsa/statespace/_representation.pyx":1432
19941  *         # Create selected state covariance matrix
19942  *         dselect_cov(self.k_states, self.k_posdef,
19943  *                                    &self.tmp[0,0],             # <<<<<<<<<<<<<<
19944  *                                    &self.selection[0,0,0],
19945  *                                    &self.state_cov[0,0,0],
19946  */
19947   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1432, __pyx_L1_error)}
19948   __pyx_t_1 = 0;
19949   __pyx_t_2 = 0;
19950 
19951   /* "statsmodels/tsa/statespace/_representation.pyx":1433
19952  *         dselect_cov(self.k_states, self.k_posdef,
19953  *                                    &self.tmp[0,0],
19954  *                                    &self.selection[0,0,0],             # <<<<<<<<<<<<<<
19955  *                                    &self.state_cov[0,0,0],
19956  *                                    &self.selected_state_cov[0,0,0])
19957  */
19958   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1433, __pyx_L1_error)}
19959   __pyx_t_3 = 0;
19960   __pyx_t_4 = 0;
19961   __pyx_t_5 = 0;
19962 
19963   /* "statsmodels/tsa/statespace/_representation.pyx":1434
19964  *                                    &self.tmp[0,0],
19965  *                                    &self.selection[0,0,0],
19966  *                                    &self.state_cov[0,0,0],             # <<<<<<<<<<<<<<
19967  *                                    &self.selected_state_cov[0,0,0])
19968  *
19969  */
19970   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1434, __pyx_L1_error)}
19971   __pyx_t_6 = 0;
19972   __pyx_t_7 = 0;
19973   __pyx_t_8 = 0;
19974 
19975   /* "statsmodels/tsa/statespace/_representation.pyx":1435
19976  *                                    &self.selection[0,0,0],
19977  *                                    &self.state_cov[0,0,0],
19978  *                                    &self.selected_state_cov[0,0,0])             # <<<<<<<<<<<<<<
19979  *
19980  *         # Initial state mean
19981  */
19982   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1435, __pyx_L1_error)}
19983   __pyx_t_9 = 0;
19984   __pyx_t_10 = 0;
19985   __pyx_t_11 = 0;
19986 
19987   /* "statsmodels/tsa/statespace/_representation.pyx":1431
19988  *
19989  *         # Create selected state covariance matrix
19990  *         dselect_cov(self.k_states, self.k_posdef,             # <<<<<<<<<<<<<<
19991  *                                    &self.tmp[0,0],
19992  *                                    &self.selection[0,0,0],
19993  */
19994   (void)(__pyx_f_11statsmodels_3tsa_10statespace_15_representation_dselect_cov(__pyx_v_self->k_states, __pyx_v_self->k_posdef, (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_1)) ) + __pyx_t_2 * __pyx_v_self->tmp.strides[1]) )))), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->selection.data) + __pyx_t_3)) ) + __pyx_t_4 * __pyx_v_self->selection.strides[1]) ) + __pyx_t_5 * __pyx_v_self->selection.strides[2]) )))), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->state_cov.data) + __pyx_t_6)) ) + __pyx_t_7 * __pyx_v_self->state_cov.strides[1]) ) + __pyx_t_8 * __pyx_v_self->state_cov.strides[2]) )))), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->selected_state_cov.data) + __pyx_t_9)) ) + __pyx_t_10 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_11 * __pyx_v_self->selected_state_cov.strides[2]) ))))));
19995 
19996   /* "statsmodels/tsa/statespace/_representation.pyx":1438
19997  *
19998  *         # Initial state mean
19999  *         asum = blas.dasum(&self.k_states, &self.state_intercept[0, 0], &inc)             # <<<<<<<<<<<<<<
20000  *
20001  *         dim1[0] = self.k_states
20002  */
20003   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1438, __pyx_L1_error)}
20004   __pyx_t_11 = 0;
20005   __pyx_t_10 = 0;
20006   __pyx_v_asum = __pyx_f_5scipy_6linalg_11cython_blas_dasum((&__pyx_v_self->k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->state_intercept.data) + __pyx_t_11)) ) + __pyx_t_10 * __pyx_v_self->state_intercept.strides[1]) )))), (&__pyx_v_inc));
20007 
20008   /* "statsmodels/tsa/statespace/_representation.pyx":1440
20009  *         asum = blas.dasum(&self.k_states, &self.state_intercept[0, 0], &inc)
20010  *
20011  *         dim1[0] = self.k_states             # <<<<<<<<<<<<<<
20012  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
20013  *         if asum > tol:
20014  */
20015   __pyx_t_12 = __pyx_v_self->k_states;
20016   (__pyx_v_dim1[0]) = __pyx_t_12;
20017 
20018   /* "statsmodels/tsa/statespace/_representation.pyx":1441
20019  *
20020  *         dim1[0] = self.k_states
20021  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
20022  *         if asum > tol:
20023  *             dim2[0] = self.k_states
20024  */
20025   __pyx_t_13 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1441, __pyx_L1_error)
20026   __Pyx_GOTREF(__pyx_t_13);
20027   __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 1441, __pyx_L1_error)
20028   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
20029   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
20030   __pyx_v_self->initial_state = __pyx_t_14;
20031   __pyx_t_14.memview = NULL;
20032   __pyx_t_14.data = NULL;
20033 
20034   /* "statsmodels/tsa/statespace/_representation.pyx":1442
20035  *         dim1[0] = self.k_states
20036  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
20037  *         if asum > tol:             # <<<<<<<<<<<<<<
20038  *             dim2[0] = self.k_states
20039  *             dim2[1] = self.k_states
20040  */
20041   __pyx_t_15 = ((__pyx_v_asum > __pyx_v_tol) != 0);
20042   if (__pyx_t_15) {
20043 
20044     /* "statsmodels/tsa/statespace/_representation.pyx":1443
20045  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
20046  *         if asum > tol:
20047  *             dim2[0] = self.k_states             # <<<<<<<<<<<<<<
20048  *             dim2[1] = self.k_states
20049  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)
20050  */
20051     __pyx_t_12 = __pyx_v_self->k_states;
20052     (__pyx_v_dim2[0]) = __pyx_t_12;
20053 
20054     /* "statsmodels/tsa/statespace/_representation.pyx":1444
20055  *         if asum > tol:
20056  *             dim2[0] = self.k_states
20057  *             dim2[1] = self.k_states             # <<<<<<<<<<<<<<
20058  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)
20059  *
20060  */
20061     __pyx_t_12 = __pyx_v_self->k_states;
20062     (__pyx_v_dim2[1]) = __pyx_t_12;
20063 
20064     /* "statsmodels/tsa/statespace/_representation.pyx":1445
20065  *             dim2[0] = self.k_states
20066  *             dim2[1] = self.k_states
20067  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)             # <<<<<<<<<<<<<<
20068  *
20069  *             # I - T
20070  */
20071     __pyx_t_13 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_INT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1445, __pyx_L1_error)
20072     __Pyx_GOTREF(__pyx_t_13);
20073     __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 1445, __pyx_L1_error)
20074     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
20075     __pyx_v_ipiv = __pyx_t_16;
20076     __pyx_t_16.memview = NULL;
20077     __pyx_t_16.data = NULL;
20078 
20079     /* "statsmodels/tsa/statespace/_representation.pyx":1448
20080  *
20081  *             # I - T
20082  *             blas.dcopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
20083  *                                             &self.tmp[0,0], &inc)
20084  *             scalar = -1.0
20085  */
20086     if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1448, __pyx_L1_error)}
20087     __pyx_t_10 = 0;
20088     __pyx_t_11 = 0;
20089     __pyx_t_9 = 0;
20090 
20091     /* "statsmodels/tsa/statespace/_representation.pyx":1449
20092  *             # I - T
20093  *             blas.dcopy(&k_states2, &self.transition[0,0,0], &inc,
20094  *                                             &self.tmp[0,0], &inc)             # <<<<<<<<<<<<<<
20095  *             scalar = -1.0
20096  *             blas.dscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
20097  */
20098     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1449, __pyx_L1_error)}
20099     __pyx_t_8 = 0;
20100     __pyx_t_7 = 0;
20101 
20102     /* "statsmodels/tsa/statespace/_representation.pyx":1448
20103  *
20104  *             # I - T
20105  *             blas.dcopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
20106  *                                             &self.tmp[0,0], &inc)
20107  *             scalar = -1.0
20108  */
20109     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_k_states2), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transition.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_9 * __pyx_v_self->transition.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
20110 
20111     /* "statsmodels/tsa/statespace/_representation.pyx":1450
20112  *             blas.dcopy(&k_states2, &self.transition[0,0,0], &inc,
20113  *                                             &self.tmp[0,0], &inc)
20114  *             scalar = -1.0             # <<<<<<<<<<<<<<
20115  *             blas.dscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
20116  *             for i in range(self.k_states):
20117  */
20118     __pyx_v_scalar = -1.0;
20119 
20120     /* "statsmodels/tsa/statespace/_representation.pyx":1451
20121  *                                             &self.tmp[0,0], &inc)
20122  *             scalar = -1.0
20123  *             blas.dscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)             # <<<<<<<<<<<<<<
20124  *             for i in range(self.k_states):
20125  *                 self.tmp[i, i] = self.tmp[i, i] + 1
20126  */
20127     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1451, __pyx_L1_error)}
20128     __pyx_t_7 = 0;
20129     __pyx_t_8 = 0;
20130     __pyx_f_5scipy_6linalg_11cython_blas_dscal((&__pyx_v_k_states2), (&__pyx_v_scalar), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
20131 
20132     /* "statsmodels/tsa/statespace/_representation.pyx":1452
20133  *             scalar = -1.0
20134  *             blas.dscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
20135  *             for i in range(self.k_states):             # <<<<<<<<<<<<<<
20136  *                 self.tmp[i, i] = self.tmp[i, i] + 1
20137  *
20138  */
20139     __pyx_t_12 = __pyx_v_self->k_states;
20140     __pyx_t_17 = __pyx_t_12;
20141     for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
20142       __pyx_v_i = __pyx_t_18;
20143 
20144       /* "statsmodels/tsa/statespace/_representation.pyx":1453
20145  *             blas.dscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
20146  *             for i in range(self.k_states):
20147  *                 self.tmp[i, i] = self.tmp[i, i] + 1             # <<<<<<<<<<<<<<
20148  *
20149  *             # c
20150  */
20151       if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1453, __pyx_L1_error)}
20152       __pyx_t_8 = __pyx_v_i;
20153       __pyx_t_7 = __pyx_v_i;
20154       if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1453, __pyx_L1_error)}
20155       __pyx_t_9 = __pyx_v_i;
20156       __pyx_t_11 = __pyx_v_i;
20157       *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_9)) ) + __pyx_t_11 * __pyx_v_self->tmp.strides[1]) )) = ((*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) ))) + 1.0);
20158     }
20159 
20160     /* "statsmodels/tsa/statespace/_representation.pyx":1456
20161  *
20162  *             # c
20163  *             blas.dcopy(&self.k_states, &self.state_intercept[0,0], &inc,             # <<<<<<<<<<<<<<
20164  *                                                 &self.initial_state[0], &inc)
20165  *
20166  */
20167     if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1456, __pyx_L1_error)}
20168     __pyx_t_7 = 0;
20169     __pyx_t_8 = 0;
20170 
20171     /* "statsmodels/tsa/statespace/_representation.pyx":1457
20172  *             # c
20173  *             blas.dcopy(&self.k_states, &self.state_intercept[0,0], &inc,
20174  *                                                 &self.initial_state[0], &inc)             # <<<<<<<<<<<<<<
20175  *
20176  *             # Solve (I - T) x = c
20177  */
20178     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1457, __pyx_L1_error)}
20179     __pyx_t_11 = 0;
20180 
20181     /* "statsmodels/tsa/statespace/_representation.pyx":1456
20182  *
20183  *             # c
20184  *             blas.dcopy(&self.k_states, &self.state_intercept[0,0], &inc,             # <<<<<<<<<<<<<<
20185  *                                                 &self.initial_state[0], &inc)
20186  *
20187  */
20188     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->state_intercept.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->state_intercept.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_11 * __pyx_v_self->initial_state.strides[0]) )))), (&__pyx_v_inc));
20189 
20190     /* "statsmodels/tsa/statespace/_representation.pyx":1460
20191  *
20192  *             # Solve (I - T) x = c
20193  *             lapack.dgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
20194  *                                    &ipiv[0, 0], &info)
20195  *             lapack.dgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
20196  */
20197     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1460, __pyx_L1_error)}
20198     __pyx_t_11 = 0;
20199     __pyx_t_8 = 0;
20200 
20201     /* "statsmodels/tsa/statespace/_representation.pyx":1461
20202  *             # Solve (I - T) x = c
20203  *             lapack.dgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
20204  *                                    &ipiv[0, 0], &info)             # <<<<<<<<<<<<<<
20205  *             lapack.dgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
20206  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
20207  */
20208     __pyx_t_7 = 0;
20209     __pyx_t_9 = 0;
20210 
20211     /* "statsmodels/tsa/statespace/_representation.pyx":1460
20212  *
20213  *             # Solve (I - T) x = c
20214  *             lapack.dgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
20215  *                                    &ipiv[0, 0], &info)
20216  *             lapack.dgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
20217  */
20218     __pyx_f_5scipy_6linalg_13cython_lapack_dgetrf((&__pyx_v_self->k_states), (&__pyx_v_self->k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_11)) ) + __pyx_t_8 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_self->k_states), (&(*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_ipiv.data) + __pyx_t_7)) ) + __pyx_t_9 * __pyx_v_ipiv.strides[1]) )))), (&__pyx_v_info));
20219 
20220     /* "statsmodels/tsa/statespace/_representation.pyx":1462
20221  *             lapack.dgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
20222  *                                    &ipiv[0, 0], &info)
20223  *             lapack.dgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
20224  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
20225  *
20226  */
20227     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1462, __pyx_L1_error)}
20228     __pyx_t_9 = 0;
20229     __pyx_t_7 = 0;
20230 
20231     /* "statsmodels/tsa/statespace/_representation.pyx":1463
20232  *                                    &ipiv[0, 0], &info)
20233  *             lapack.dgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
20234  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)             # <<<<<<<<<<<<<<
20235  *
20236  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
20237  */
20238     __pyx_t_8 = 0;
20239     __pyx_t_11 = 0;
20240     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1463, __pyx_L1_error)}
20241     __pyx_t_10 = 0;
20242 
20243     /* "statsmodels/tsa/statespace/_representation.pyx":1462
20244  *             lapack.dgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
20245  *                                    &ipiv[0, 0], &info)
20246  *             lapack.dgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
20247  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
20248  *
20249  */
20250     __pyx_f_5scipy_6linalg_13cython_lapack_dgetrs(((char *)"N"), (&__pyx_v_self->k_states), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_9)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_self->k_states), (&(*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_ipiv.data) + __pyx_t_8)) ) + __pyx_t_11 * __pyx_v_ipiv.strides[1]) )))), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_10 * __pyx_v_self->initial_state.strides[0]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
20251 
20252     /* "statsmodels/tsa/statespace/_representation.pyx":1442
20253  *         dim1[0] = self.k_states
20254  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_FLOAT64, FORTRAN)
20255  *         if asum > tol:             # <<<<<<<<<<<<<<
20256  *             dim2[0] = self.k_states
20257  *             dim2[1] = self.k_states
20258  */
20259   }
20260 
20261   /* "statsmodels/tsa/statespace/_representation.pyx":1465
20262  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
20263  *
20264  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
20265  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)
20266  *
20267  */
20268   __pyx_t_12 = __pyx_v_self->k_states;
20269   (__pyx_v_dim2[0]) = __pyx_t_12;
20270   __pyx_t_12 = __pyx_v_self->k_states;
20271   (__pyx_v_dim2[1]) = __pyx_t_12;
20272 
20273   /* "statsmodels/tsa/statespace/_representation.pyx":1466
20274  *
20275  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
20276  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_FLOAT64, FORTRAN)             # <<<<<<<<<<<<<<
20277  *
20278  *         # Create a copy of the transition matrix (to avoid overwriting it)
20279  */
20280   __pyx_t_13 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_FLOAT64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1466, __pyx_L1_error)
20281   __Pyx_GOTREF(__pyx_t_13);
20282   __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 1466, __pyx_L1_error)
20283   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
20284   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
20285   __pyx_v_self->initial_state_cov = __pyx_t_19;
20286   __pyx_t_19.memview = NULL;
20287   __pyx_t_19.data = NULL;
20288 
20289   /* "statsmodels/tsa/statespace/_representation.pyx":1469
20290  *
20291  *         # Create a copy of the transition matrix (to avoid overwriting it)
20292  *         blas.dcopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
20293  *                                    &self.tmp[0,0], &inc)
20294  *
20295  */
20296   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1469, __pyx_L1_error)}
20297   __pyx_t_10 = 0;
20298   __pyx_t_11 = 0;
20299   __pyx_t_8 = 0;
20300 
20301   /* "statsmodels/tsa/statespace/_representation.pyx":1470
20302  *         # Create a copy of the transition matrix (to avoid overwriting it)
20303  *         blas.dcopy(&k_states2, &self.transition[0,0,0], &inc,
20304  *                                    &self.tmp[0,0], &inc)             # <<<<<<<<<<<<<<
20305  *
20306  *         # Copy the selected state covariance to the initial state covariance
20307  */
20308   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1470, __pyx_L1_error)}
20309   __pyx_t_7 = 0;
20310   __pyx_t_9 = 0;
20311 
20312   /* "statsmodels/tsa/statespace/_representation.pyx":1469
20313  *
20314  *         # Create a copy of the transition matrix (to avoid overwriting it)
20315  *         blas.dcopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
20316  *                                    &self.tmp[0,0], &inc)
20317  *
20318  */
20319   __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_k_states2), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transition.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_8 * __pyx_v_self->transition.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_7)) ) + __pyx_t_9 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
20320 
20321   /* "statsmodels/tsa/statespace/_representation.pyx":1474
20322  *         # Copy the selected state covariance to the initial state covariance
20323  *         # (it will be overwritten with the appropriate matrix)
20324  *         blas.dcopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,             # <<<<<<<<<<<<<<
20325  *                                    &self.initial_state_cov[0,0], &inc)
20326  *
20327  */
20328   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1474, __pyx_L1_error)}
20329   __pyx_t_9 = 0;
20330   __pyx_t_7 = 0;
20331   __pyx_t_8 = 0;
20332 
20333   /* "statsmodels/tsa/statespace/_representation.pyx":1475
20334  *         # (it will be overwritten with the appropriate matrix)
20335  *         blas.dcopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,
20336  *                                    &self.initial_state_cov[0,0], &inc)             # <<<<<<<<<<<<<<
20337  *
20338  *         # Solve the discrete Lyapunov equation to the get initial state
20339  */
20340   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1475, __pyx_L1_error)}
20341   __pyx_t_11 = 0;
20342   __pyx_t_10 = 0;
20343 
20344   /* "statsmodels/tsa/statespace/_representation.pyx":1474
20345  *         # Copy the selected state covariance to the initial state covariance
20346  *         # (it will be overwritten with the appropriate matrix)
20347  *         blas.dcopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,             # <<<<<<<<<<<<<<
20348  *                                    &self.initial_state_cov[0,0], &inc)
20349  *
20350  */
20351   __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_k_states2), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->selected_state_cov.data) + __pyx_t_9)) ) + __pyx_t_7 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_8 * __pyx_v_self->selected_state_cov.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_state_cov.data) + __pyx_t_11)) ) + __pyx_t_10 * __pyx_v_self->initial_state_cov.strides[1]) )))), (&__pyx_v_inc));
20352 
20353   /* "statsmodels/tsa/statespace/_representation.pyx":1479
20354  *         # Solve the discrete Lyapunov equation to the get initial state
20355  *         # covariance matrix
20356  *         tools._dsolve_discrete_lyapunov(&self.tmp[0,0], &self.initial_state_cov[0,0], self.k_states, complex_step)             # <<<<<<<<<<<<<<
20357  *
20358  *         self.initial_diffuse_state_cov[:] = 0
20359  */
20360   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1479, __pyx_L1_error)}
20361   __pyx_t_10 = 0;
20362   __pyx_t_11 = 0;
20363   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1479, __pyx_L1_error)}
20364   __pyx_t_8 = 0;
20365   __pyx_t_7 = 0;
20366   __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_complex_step); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1479, __pyx_L1_error)
20367   __pyx_t_20.__pyx_n = 1;
20368   __pyx_t_20.complex_step = __pyx_t_12;
20369   __pyx_f_11statsmodels_3tsa_10statespace_6_tools__dsolve_discrete_lyapunov((&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->tmp.strides[1]) )))), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_state_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->initial_state_cov.strides[1]) )))), __pyx_v_self->k_states, &__pyx_t_20); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1479, __pyx_L1_error)
20370 
20371   /* "statsmodels/tsa/statespace/_representation.pyx":1481
20372  *         tools._dsolve_discrete_lyapunov(&self.tmp[0,0], &self.initial_state_cov[0,0], self.k_states, complex_step)
20373  *
20374  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
20375  *
20376  *         self.initialized = True
20377  */
20378   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1481, __pyx_L1_error)}
20379   {
20380       __pyx_t_5numpy_float64_t __pyx_temp_scalar = 0.0;
20381       {
20382           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
20383           Py_ssize_t __pyx_temp_idx;
20384           __pyx_t_5numpy_float64_t *__pyx_temp_pointer = (__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_diffuse_state_cov.data;
20385           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
20386             *((__pyx_t_5numpy_float64_t *) __pyx_temp_pointer) = __pyx_temp_scalar;
20387             __pyx_temp_pointer += 1;
20388           }
20389       }
20390   }
20391 
20392   /* "statsmodels/tsa/statespace/_representation.pyx":1483
20393  *         self.initial_diffuse_state_cov[:] = 0
20394  *
20395  *         self.initialized = True             # <<<<<<<<<<<<<<
20396  *
20397  *     def __iter__(self):
20398  */
20399   __pyx_v_self->initialized = 1;
20400 
20401   /* "statsmodels/tsa/statespace/_representation.pyx":1418
20402  *     # ## Initialize: stationary process
20403  *     # *Note:* see Durbin and Koopman section 5.6.2
20404  *     def initialize_stationary(self, complex_step=False):             # <<<<<<<<<<<<<<
20405  *         """
20406  *         initialize_stationary()
20407  */
20408 
20409   /* function exit code */
20410   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20411   goto __pyx_L0;
20412   __pyx_L1_error:;
20413   __Pyx_XDECREF(__pyx_t_13);
20414   __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
20415   __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
20416   __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
20417   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialize_stationary", __pyx_clineno, __pyx_lineno, __pyx_filename);
20418   __pyx_r = NULL;
20419   __pyx_L0:;
20420   __PYX_XDEC_MEMVIEW(&__pyx_v_ipiv, 1);
20421   __Pyx_XGIVEREF(__pyx_r);
20422   __Pyx_RefNannyFinishContext();
20423   return __pyx_r;
20424 }
20425 
20426 /* "statsmodels/tsa/statespace/_representation.pyx":1485
20427  *         self.initialized = True
20428  *
20429  *     def __iter__(self):             # <<<<<<<<<<<<<<
20430  *         return self
20431  *
20432  */
20433 
20434 /* Python wrapper */
20435 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15__iter__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15__iter__(PyObject * __pyx_v_self)20436 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15__iter__(PyObject *__pyx_v_self) {
20437   PyObject *__pyx_r = 0;
20438   __Pyx_RefNannyDeclarations
20439   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
20440   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14__iter__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
20441 
20442   /* function exit code */
20443   __Pyx_RefNannyFinishContext();
20444   return __pyx_r;
20445 }
20446 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)20447 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
20448   PyObject *__pyx_r = NULL;
20449   __Pyx_RefNannyDeclarations
20450   __Pyx_RefNannySetupContext("__iter__", 0);
20451 
20452   /* "statsmodels/tsa/statespace/_representation.pyx":1486
20453  *
20454  *     def __iter__(self):
20455  *         return self             # <<<<<<<<<<<<<<
20456  *
20457  *     def __next__(self):
20458  */
20459   __Pyx_XDECREF(__pyx_r);
20460   __Pyx_INCREF(((PyObject *)__pyx_v_self));
20461   __pyx_r = ((PyObject *)__pyx_v_self);
20462   goto __pyx_L0;
20463 
20464   /* "statsmodels/tsa/statespace/_representation.pyx":1485
20465  *         self.initialized = True
20466  *
20467  *     def __iter__(self):             # <<<<<<<<<<<<<<
20468  *         return self
20469  *
20470  */
20471 
20472   /* function exit code */
20473   __pyx_L0:;
20474   __Pyx_XGIVEREF(__pyx_r);
20475   __Pyx_RefNannyFinishContext();
20476   return __pyx_r;
20477 }
20478 
20479 /* "statsmodels/tsa/statespace/_representation.pyx":1488
20480  *         return self
20481  *
20482  *     def __next__(self):             # <<<<<<<<<<<<<<
20483  *         """
20484  *         Advance to the next location
20485  */
20486 
20487 /* Python wrapper */
20488 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17__next__(PyObject *__pyx_v_self); /*proto*/
20489 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__[] = "\n        Advance to the next location\n        ";
20490 #if CYTHON_COMPILING_IN_CPYTHON
20491 struct wrapperbase __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__;
20492 #endif
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17__next__(PyObject * __pyx_v_self)20493 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17__next__(PyObject *__pyx_v_self) {
20494   PyObject *__pyx_r = 0;
20495   __Pyx_RefNannyDeclarations
20496   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
20497   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
20498 
20499   /* function exit code */
20500   __Pyx_RefNannyFinishContext();
20501   return __pyx_r;
20502 }
20503 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)20504 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
20505   PyObject *__pyx_r = NULL;
20506   __Pyx_RefNannyDeclarations
20507   int __pyx_t_1;
20508   PyObject *__pyx_t_2 = NULL;
20509   int __pyx_lineno = 0;
20510   const char *__pyx_filename = NULL;
20511   int __pyx_clineno = 0;
20512   __Pyx_RefNannySetupContext("__next__", 0);
20513 
20514   /* "statsmodels/tsa/statespace/_representation.pyx":1492
20515  *         Advance to the next location
20516  *         """
20517  *         if self.t >= self.nobs:             # <<<<<<<<<<<<<<
20518  *             raise StopIteration
20519  *         else:
20520  */
20521   __pyx_t_1 = ((__pyx_v_self->t >= __pyx_v_self->nobs) != 0);
20522   if (unlikely(__pyx_t_1)) {
20523 
20524     /* "statsmodels/tsa/statespace/_representation.pyx":1493
20525  *         """
20526  *         if self.t >= self.nobs:
20527  *             raise StopIteration             # <<<<<<<<<<<<<<
20528  *         else:
20529  *             self.seek(self.t+1, 0, 0)
20530  */
20531     __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
20532     __PYX_ERR(0, 1493, __pyx_L1_error)
20533 
20534     /* "statsmodels/tsa/statespace/_representation.pyx":1492
20535  *         Advance to the next location
20536  *         """
20537  *         if self.t >= self.nobs:             # <<<<<<<<<<<<<<
20538  *             raise StopIteration
20539  *         else:
20540  */
20541   }
20542 
20543   /* "statsmodels/tsa/statespace/_representation.pyx":1495
20544  *             raise StopIteration
20545  *         else:
20546  *             self.seek(self.t+1, 0, 0)             # <<<<<<<<<<<<<<
20547  *
20548  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):
20549  */
20550   /*else*/ {
20551     __pyx_t_2 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->seek(__pyx_v_self, (__pyx_v_self->t + 1), 0, 0, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
20552     __Pyx_GOTREF(__pyx_t_2);
20553     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20554   }
20555 
20556   /* "statsmodels/tsa/statespace/_representation.pyx":1488
20557  *         return self
20558  *
20559  *     def __next__(self):             # <<<<<<<<<<<<<<
20560  *         """
20561  *         Advance to the next location
20562  */
20563 
20564   /* function exit code */
20565   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20566   goto __pyx_L0;
20567   __pyx_L1_error:;
20568   __Pyx_XDECREF(__pyx_t_2);
20569   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20570   __pyx_r = NULL;
20571   __pyx_L0:;
20572   __Pyx_XGIVEREF(__pyx_r);
20573   __Pyx_RefNannyFinishContext();
20574   return __pyx_r;
20575 }
20576 
20577 /* "statsmodels/tsa/statespace/_representation.pyx":1497
20578  *             self.seek(self.t+1, 0, 0)
20579  *
20580  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):             # <<<<<<<<<<<<<<
20581  *         self._previous_t = self.t
20582  *
20583  */
20584 
20585 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,int __pyx_skip_dispatch,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek * __pyx_optional_args)20586 static PyObject *__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek *__pyx_optional_args) {
20587   unsigned int __pyx_v_reset = ((unsigned int)0);
20588   int __pyx_v_k_endog;
20589   int __pyx_v_design_t;
20590   int __pyx_v_obs_intercept_t;
20591   int __pyx_v_obs_cov_t;
20592   int __pyx_v_transition_t;
20593   int __pyx_v_state_intercept_t;
20594   int __pyx_v_selection_t;
20595   int __pyx_v_state_cov_t;
20596   PyObject *__pyx_r = NULL;
20597   __Pyx_RefNannyDeclarations
20598   PyObject *__pyx_t_1 = NULL;
20599   PyObject *__pyx_t_2 = NULL;
20600   PyObject *__pyx_t_3 = NULL;
20601   PyObject *__pyx_t_4 = NULL;
20602   PyObject *__pyx_t_5 = NULL;
20603   PyObject *__pyx_t_6 = NULL;
20604   PyObject *__pyx_t_7 = NULL;
20605   PyObject *__pyx_t_8 = NULL;
20606   int __pyx_t_9;
20607   PyObject *__pyx_t_10 = NULL;
20608   int __pyx_t_11;
20609   Py_ssize_t __pyx_t_12;
20610   size_t __pyx_t_13;
20611   Py_ssize_t __pyx_t_14;
20612   Py_ssize_t __pyx_t_15;
20613   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform __pyx_t_16;
20614   int __pyx_lineno = 0;
20615   const char *__pyx_filename = NULL;
20616   int __pyx_clineno = 0;
20617   __Pyx_RefNannySetupContext("seek", 0);
20618   if (__pyx_optional_args) {
20619     if (__pyx_optional_args->__pyx_n > 0) {
20620       __pyx_v_reset = __pyx_optional_args->reset;
20621     }
20622   }
20623   /* Check if called by wrapper */
20624   if (unlikely(__pyx_skip_dispatch)) ;
20625   /* Check if overridden in Python */
20626   else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
20627     #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
20628     static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
20629     if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
20630       PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
20631       #endif
20632       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
20633       __Pyx_GOTREF(__pyx_t_1);
20634       if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19seek)) {
20635         __Pyx_XDECREF(__pyx_r);
20636         __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error)
20637         __Pyx_GOTREF(__pyx_t_3);
20638         __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_transform_diagonalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
20639         __Pyx_GOTREF(__pyx_t_4);
20640         __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_transform_generalized_collapse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1497, __pyx_L1_error)
20641         __Pyx_GOTREF(__pyx_t_5);
20642         __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_reset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1497, __pyx_L1_error)
20643         __Pyx_GOTREF(__pyx_t_6);
20644         __Pyx_INCREF(__pyx_t_1);
20645         __pyx_t_7 = __pyx_t_1; __pyx_t_8 = NULL;
20646         __pyx_t_9 = 0;
20647         if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
20648           __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
20649           if (likely(__pyx_t_8)) {
20650             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
20651             __Pyx_INCREF(__pyx_t_8);
20652             __Pyx_INCREF(function);
20653             __Pyx_DECREF_SET(__pyx_t_7, function);
20654             __pyx_t_9 = 1;
20655           }
20656         }
20657         #if CYTHON_FAST_PYCALL
20658         if (PyFunction_Check(__pyx_t_7)) {
20659           PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
20660           __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __pyx_L1_error)
20661           __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
20662           __Pyx_GOTREF(__pyx_t_2);
20663           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20664           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20665           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20666           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20667         } else
20668         #endif
20669         #if CYTHON_FAST_PYCCALL
20670         if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
20671           PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
20672           __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __pyx_L1_error)
20673           __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
20674           __Pyx_GOTREF(__pyx_t_2);
20675           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20676           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20677           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20678           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20679         } else
20680         #endif
20681         {
20682           __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1497, __pyx_L1_error)
20683           __Pyx_GOTREF(__pyx_t_10);
20684           if (__pyx_t_8) {
20685             __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
20686           }
20687           __Pyx_GIVEREF(__pyx_t_3);
20688           PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
20689           __Pyx_GIVEREF(__pyx_t_4);
20690           PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
20691           __Pyx_GIVEREF(__pyx_t_5);
20692           PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
20693           __Pyx_GIVEREF(__pyx_t_6);
20694           PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
20695           __pyx_t_3 = 0;
20696           __pyx_t_4 = 0;
20697           __pyx_t_5 = 0;
20698           __pyx_t_6 = 0;
20699           __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __pyx_L1_error)
20700           __Pyx_GOTREF(__pyx_t_2);
20701           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
20702         }
20703         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20704         __pyx_r = __pyx_t_2;
20705         __pyx_t_2 = 0;
20706         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20707         goto __pyx_L0;
20708       }
20709       #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
20710       __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
20711       __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
20712       if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
20713         __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
20714       }
20715       #endif
20716       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20717       #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
20718     }
20719     #endif
20720   }
20721 
20722   /* "statsmodels/tsa/statespace/_representation.pyx":1498
20723  *
20724  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):
20725  *         self._previous_t = self.t             # <<<<<<<<<<<<<<
20726  *
20727  *         # Set the global time indicator, if valid
20728  */
20729   __pyx_t_9 = __pyx_v_self->t;
20730   __pyx_v_self->_previous_t = __pyx_t_9;
20731 
20732   /* "statsmodels/tsa/statespace/_representation.pyx":1501
20733  *
20734  *         # Set the global time indicator, if valid
20735  *         if t >= self.nobs:             # <<<<<<<<<<<<<<
20736  *             raise IndexError("Observation index out of range")
20737  *         self.t = t
20738  */
20739   __pyx_t_11 = ((__pyx_v_t >= __pyx_v_self->nobs) != 0);
20740   if (unlikely(__pyx_t_11)) {
20741 
20742     /* "statsmodels/tsa/statespace/_representation.pyx":1502
20743  *         # Set the global time indicator, if valid
20744  *         if t >= self.nobs:
20745  *             raise IndexError("Observation index out of range")             # <<<<<<<<<<<<<<
20746  *         self.t = t
20747  *
20748  */
20749     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error)
20750     __Pyx_GOTREF(__pyx_t_1);
20751     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
20752     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20753     __PYX_ERR(0, 1502, __pyx_L1_error)
20754 
20755     /* "statsmodels/tsa/statespace/_representation.pyx":1501
20756  *
20757  *         # Set the global time indicator, if valid
20758  *         if t >= self.nobs:             # <<<<<<<<<<<<<<
20759  *             raise IndexError("Observation index out of range")
20760  *         self.t = t
20761  */
20762   }
20763 
20764   /* "statsmodels/tsa/statespace/_representation.pyx":1503
20765  *         if t >= self.nobs:
20766  *             raise IndexError("Observation index out of range")
20767  *         self.t = t             # <<<<<<<<<<<<<<
20768  *
20769  *         # Indices for possibly time-varying arrays
20770  */
20771   __pyx_v_self->t = __pyx_v_t;
20772 
20773   /* "statsmodels/tsa/statespace/_representation.pyx":1508
20774  *         cdef:
20775  *             int k_endog
20776  *             int design_t = 0             # <<<<<<<<<<<<<<
20777  *             int obs_intercept_t = 0
20778  *             int obs_cov_t = 0
20779  */
20780   __pyx_v_design_t = 0;
20781 
20782   /* "statsmodels/tsa/statespace/_representation.pyx":1509
20783  *             int k_endog
20784  *             int design_t = 0
20785  *             int obs_intercept_t = 0             # <<<<<<<<<<<<<<
20786  *             int obs_cov_t = 0
20787  *             int transition_t = 0
20788  */
20789   __pyx_v_obs_intercept_t = 0;
20790 
20791   /* "statsmodels/tsa/statespace/_representation.pyx":1510
20792  *             int design_t = 0
20793  *             int obs_intercept_t = 0
20794  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
20795  *             int transition_t = 0
20796  *             int state_intercept_t = 0
20797  */
20798   __pyx_v_obs_cov_t = 0;
20799 
20800   /* "statsmodels/tsa/statespace/_representation.pyx":1511
20801  *             int obs_intercept_t = 0
20802  *             int obs_cov_t = 0
20803  *             int transition_t = 0             # <<<<<<<<<<<<<<
20804  *             int state_intercept_t = 0
20805  *             int selection_t = 0
20806  */
20807   __pyx_v_transition_t = 0;
20808 
20809   /* "statsmodels/tsa/statespace/_representation.pyx":1512
20810  *             int obs_cov_t = 0
20811  *             int transition_t = 0
20812  *             int state_intercept_t = 0             # <<<<<<<<<<<<<<
20813  *             int selection_t = 0
20814  *             int state_cov_t = 0
20815  */
20816   __pyx_v_state_intercept_t = 0;
20817 
20818   /* "statsmodels/tsa/statespace/_representation.pyx":1513
20819  *             int transition_t = 0
20820  *             int state_intercept_t = 0
20821  *             int selection_t = 0             # <<<<<<<<<<<<<<
20822  *             int state_cov_t = 0
20823  *
20824  */
20825   __pyx_v_selection_t = 0;
20826 
20827   /* "statsmodels/tsa/statespace/_representation.pyx":1514
20828  *             int state_intercept_t = 0
20829  *             int selection_t = 0
20830  *             int state_cov_t = 0             # <<<<<<<<<<<<<<
20831  *
20832  *         # Get indices for possibly time-varying arrays
20833  */
20834   __pyx_v_state_cov_t = 0;
20835 
20836   /* "statsmodels/tsa/statespace/_representation.pyx":1517
20837  *
20838  *         # Get indices for possibly time-varying arrays
20839  *         if not self.time_invariant:             # <<<<<<<<<<<<<<
20840  *             if self.design.shape[2] > 1:             design_t = t
20841  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
20842  */
20843   __pyx_t_11 = ((!(__pyx_v_self->time_invariant != 0)) != 0);
20844   if (__pyx_t_11) {
20845 
20846     /* "statsmodels/tsa/statespace/_representation.pyx":1518
20847  *         # Get indices for possibly time-varying arrays
20848  *         if not self.time_invariant:
20849  *             if self.design.shape[2] > 1:             design_t = t             # <<<<<<<<<<<<<<
20850  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
20851  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
20852  */
20853     if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1518, __pyx_L1_error)}
20854     __pyx_t_11 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
20855     if (__pyx_t_11) {
20856       __pyx_v_design_t = __pyx_v_t;
20857     }
20858 
20859     /* "statsmodels/tsa/statespace/_representation.pyx":1519
20860  *         if not self.time_invariant:
20861  *             if self.design.shape[2] > 1:             design_t = t
20862  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t             # <<<<<<<<<<<<<<
20863  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
20864  *             if self.transition.shape[2] > 1:         transition_t = t
20865  */
20866     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1519, __pyx_L1_error)}
20867     __pyx_t_11 = (((__pyx_v_self->obs_intercept.shape[1]) > 1) != 0);
20868     if (__pyx_t_11) {
20869       __pyx_v_obs_intercept_t = __pyx_v_t;
20870     }
20871 
20872     /* "statsmodels/tsa/statespace/_representation.pyx":1520
20873  *             if self.design.shape[2] > 1:             design_t = t
20874  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
20875  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t             # <<<<<<<<<<<<<<
20876  *             if self.transition.shape[2] > 1:         transition_t = t
20877  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
20878  */
20879     if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1520, __pyx_L1_error)}
20880     __pyx_t_11 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
20881     if (__pyx_t_11) {
20882       __pyx_v_obs_cov_t = __pyx_v_t;
20883     }
20884 
20885     /* "statsmodels/tsa/statespace/_representation.pyx":1521
20886  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
20887  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
20888  *             if self.transition.shape[2] > 1:         transition_t = t             # <<<<<<<<<<<<<<
20889  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
20890  *             if self.selection.shape[2] > 1:          selection_t = t
20891  */
20892     if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1521, __pyx_L1_error)}
20893     __pyx_t_11 = (((__pyx_v_self->transition.shape[2]) > 1) != 0);
20894     if (__pyx_t_11) {
20895       __pyx_v_transition_t = __pyx_v_t;
20896     }
20897 
20898     /* "statsmodels/tsa/statespace/_representation.pyx":1522
20899  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
20900  *             if self.transition.shape[2] > 1:         transition_t = t
20901  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t             # <<<<<<<<<<<<<<
20902  *             if self.selection.shape[2] > 1:          selection_t = t
20903  *             if self.state_cov.shape[2] > 1:          state_cov_t = t
20904  */
20905     if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1522, __pyx_L1_error)}
20906     __pyx_t_11 = (((__pyx_v_self->state_intercept.shape[1]) > 1) != 0);
20907     if (__pyx_t_11) {
20908       __pyx_v_state_intercept_t = __pyx_v_t;
20909     }
20910 
20911     /* "statsmodels/tsa/statespace/_representation.pyx":1523
20912  *             if self.transition.shape[2] > 1:         transition_t = t
20913  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
20914  *             if self.selection.shape[2] > 1:          selection_t = t             # <<<<<<<<<<<<<<
20915  *             if self.state_cov.shape[2] > 1:          state_cov_t = t
20916  *
20917  */
20918     if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1523, __pyx_L1_error)}
20919     __pyx_t_11 = (((__pyx_v_self->selection.shape[2]) > 1) != 0);
20920     if (__pyx_t_11) {
20921       __pyx_v_selection_t = __pyx_v_t;
20922     }
20923 
20924     /* "statsmodels/tsa/statespace/_representation.pyx":1524
20925  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
20926  *             if self.selection.shape[2] > 1:          selection_t = t
20927  *             if self.state_cov.shape[2] > 1:          state_cov_t = t             # <<<<<<<<<<<<<<
20928  *
20929  *         # Initialize object-level pointers to statespace arrays
20930  */
20931     if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1524, __pyx_L1_error)}
20932     __pyx_t_11 = (((__pyx_v_self->state_cov.shape[2]) > 1) != 0);
20933     if (__pyx_t_11) {
20934       __pyx_v_state_cov_t = __pyx_v_t;
20935     }
20936 
20937     /* "statsmodels/tsa/statespace/_representation.pyx":1517
20938  *
20939  *         # Get indices for possibly time-varying arrays
20940  *         if not self.time_invariant:             # <<<<<<<<<<<<<<
20941  *             if self.design.shape[2] > 1:             design_t = t
20942  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
20943  */
20944   }
20945 
20946   /* "statsmodels/tsa/statespace/_representation.pyx":1527
20947  *
20948  *         # Initialize object-level pointers to statespace arrays
20949  *         self._obs = &self.obs[0, t]             # <<<<<<<<<<<<<<
20950  *         self._design = &self.design[0, 0, design_t]
20951  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
20952  */
20953   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1527, __pyx_L1_error)}
20954   __pyx_t_12 = 0;
20955   __pyx_t_13 = __pyx_v_t;
20956   __pyx_v_self->_obs = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->obs.data) + __pyx_t_12)) ) + __pyx_t_13 * __pyx_v_self->obs.strides[1]) ))));
20957 
20958   /* "statsmodels/tsa/statespace/_representation.pyx":1528
20959  *         # Initialize object-level pointers to statespace arrays
20960  *         self._obs = &self.obs[0, t]
20961  *         self._design = &self.design[0, 0, design_t]             # <<<<<<<<<<<<<<
20962  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
20963  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
20964  */
20965   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1528, __pyx_L1_error)}
20966   __pyx_t_12 = 0;
20967   __pyx_t_14 = 0;
20968   __pyx_t_15 = __pyx_v_design_t;
20969   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->design.data) + __pyx_t_12)) ) + __pyx_t_14 * __pyx_v_self->design.strides[1]) ) + __pyx_t_15 * __pyx_v_self->design.strides[2]) ))));
20970 
20971   /* "statsmodels/tsa/statespace/_representation.pyx":1529
20972  *         self._obs = &self.obs[0, t]
20973  *         self._design = &self.design[0, 0, design_t]
20974  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]             # <<<<<<<<<<<<<<
20975  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
20976  *         self._transition = &self.transition[0, 0, transition_t]
20977  */
20978   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1529, __pyx_L1_error)}
20979   __pyx_t_15 = 0;
20980   __pyx_t_14 = __pyx_v_obs_intercept_t;
20981   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->obs_intercept.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->obs_intercept.strides[1]) ))));
20982 
20983   /* "statsmodels/tsa/statespace/_representation.pyx":1530
20984  *         self._design = &self.design[0, 0, design_t]
20985  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
20986  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]             # <<<<<<<<<<<<<<
20987  *         self._transition = &self.transition[0, 0, transition_t]
20988  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
20989  */
20990   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1530, __pyx_L1_error)}
20991   __pyx_t_14 = 0;
20992   __pyx_t_15 = 0;
20993   __pyx_t_12 = __pyx_v_obs_cov_t;
20994   __pyx_v_self->_obs_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->obs_cov.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->obs_cov.strides[1]) ) + __pyx_t_12 * __pyx_v_self->obs_cov.strides[2]) ))));
20995 
20996   /* "statsmodels/tsa/statespace/_representation.pyx":1531
20997  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
20998  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
20999  *         self._transition = &self.transition[0, 0, transition_t]             # <<<<<<<<<<<<<<
21000  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
21001  *         self._selection = &self.selection[0, 0, selection_t]
21002  */
21003   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1531, __pyx_L1_error)}
21004   __pyx_t_12 = 0;
21005   __pyx_t_15 = 0;
21006   __pyx_t_14 = __pyx_v_transition_t;
21007   __pyx_v_self->_transition = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transition.data) + __pyx_t_12)) ) + __pyx_t_15 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_14 * __pyx_v_self->transition.strides[2]) ))));
21008 
21009   /* "statsmodels/tsa/statespace/_representation.pyx":1532
21010  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
21011  *         self._transition = &self.transition[0, 0, transition_t]
21012  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]             # <<<<<<<<<<<<<<
21013  *         self._selection = &self.selection[0, 0, selection_t]
21014  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]
21015  */
21016   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1532, __pyx_L1_error)}
21017   __pyx_t_14 = 0;
21018   __pyx_t_15 = __pyx_v_state_intercept_t;
21019   __pyx_v_self->_state_intercept = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->state_intercept.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->state_intercept.strides[1]) ))));
21020 
21021   /* "statsmodels/tsa/statespace/_representation.pyx":1533
21022  *         self._transition = &self.transition[0, 0, transition_t]
21023  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
21024  *         self._selection = &self.selection[0, 0, selection_t]             # <<<<<<<<<<<<<<
21025  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]
21026  *
21027  */
21028   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1533, __pyx_L1_error)}
21029   __pyx_t_15 = 0;
21030   __pyx_t_14 = 0;
21031   __pyx_t_12 = __pyx_v_selection_t;
21032   __pyx_v_self->_selection = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->selection.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->selection.strides[1]) ) + __pyx_t_12 * __pyx_v_self->selection.strides[2]) ))));
21033 
21034   /* "statsmodels/tsa/statespace/_representation.pyx":1534
21035  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
21036  *         self._selection = &self.selection[0, 0, selection_t]
21037  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]             # <<<<<<<<<<<<<<
21038  *
21039  *         # Initialize object-level pointers to initialization
21040  */
21041   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1534, __pyx_L1_error)}
21042   __pyx_t_12 = 0;
21043   __pyx_t_14 = 0;
21044   __pyx_t_15 = __pyx_v_state_cov_t;
21045   __pyx_v_self->_state_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->state_cov.data) + __pyx_t_12)) ) + __pyx_t_14 * __pyx_v_self->state_cov.strides[1]) ) + __pyx_t_15 * __pyx_v_self->state_cov.strides[2]) ))));
21046 
21047   /* "statsmodels/tsa/statespace/_representation.pyx":1537
21048  *
21049  *         # Initialize object-level pointers to initialization
21050  *         if not self.initialized:             # <<<<<<<<<<<<<<
21051  *             raise RuntimeError("Statespace model not initialized.")
21052  *         self._initial_state = &self.initial_state[0]
21053  */
21054   __pyx_t_11 = ((!(__pyx_v_self->initialized != 0)) != 0);
21055   if (unlikely(__pyx_t_11)) {
21056 
21057     /* "statsmodels/tsa/statespace/_representation.pyx":1538
21058  *         # Initialize object-level pointers to initialization
21059  *         if not self.initialized:
21060  *             raise RuntimeError("Statespace model not initialized.")             # <<<<<<<<<<<<<<
21061  *         self._initial_state = &self.initial_state[0]
21062  *         self._initial_state_cov = &self.initial_state_cov[0,0]
21063  */
21064     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
21065     __Pyx_GOTREF(__pyx_t_1);
21066     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
21067     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21068     __PYX_ERR(0, 1538, __pyx_L1_error)
21069 
21070     /* "statsmodels/tsa/statespace/_representation.pyx":1537
21071  *
21072  *         # Initialize object-level pointers to initialization
21073  *         if not self.initialized:             # <<<<<<<<<<<<<<
21074  *             raise RuntimeError("Statespace model not initialized.")
21075  *         self._initial_state = &self.initial_state[0]
21076  */
21077   }
21078 
21079   /* "statsmodels/tsa/statespace/_representation.pyx":1539
21080  *         if not self.initialized:
21081  *             raise RuntimeError("Statespace model not initialized.")
21082  *         self._initial_state = &self.initial_state[0]             # <<<<<<<<<<<<<<
21083  *         self._initial_state_cov = &self.initial_state_cov[0,0]
21084  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]
21085  */
21086   if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1539, __pyx_L1_error)}
21087   __pyx_t_15 = 0;
21088   __pyx_v_self->_initial_state = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_15 * __pyx_v_self->initial_state.strides[0]) ))));
21089 
21090   /* "statsmodels/tsa/statespace/_representation.pyx":1540
21091  *             raise RuntimeError("Statespace model not initialized.")
21092  *         self._initial_state = &self.initial_state[0]
21093  *         self._initial_state_cov = &self.initial_state_cov[0,0]             # <<<<<<<<<<<<<<
21094  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]
21095  *
21096  */
21097   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1540, __pyx_L1_error)}
21098   __pyx_t_15 = 0;
21099   __pyx_t_14 = 0;
21100   __pyx_v_self->_initial_state_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_state_cov.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->initial_state_cov.strides[1]) ))));
21101 
21102   /* "statsmodels/tsa/statespace/_representation.pyx":1541
21103  *         self._initial_state = &self.initial_state[0]
21104  *         self._initial_state_cov = &self.initial_state_cov[0,0]
21105  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]             # <<<<<<<<<<<<<<
21106  *
21107  *         # Create the selected state covariance matrix
21108  */
21109   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1541, __pyx_L1_error)}
21110   __pyx_t_14 = 0;
21111   __pyx_t_15 = 0;
21112   __pyx_v_self->_initial_diffuse_state_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->initial_diffuse_state_cov.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->initial_diffuse_state_cov.strides[1]) ))));
21113 
21114   /* "statsmodels/tsa/statespace/_representation.pyx":1544
21115  *
21116  *         # Create the selected state covariance matrix
21117  *         self.select_state_cov(t)             # <<<<<<<<<<<<<<
21118  *
21119  *         # Handle missing data
21120  */
21121   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->select_state_cov(__pyx_v_self, __pyx_v_t);
21122 
21123   /* "statsmodels/tsa/statespace/_representation.pyx":1548
21124  *         # Handle missing data
21125  *         # Note: this modifies object pointers and _* dimensions
21126  *         k_endog = self.select_missing(t)             # <<<<<<<<<<<<<<
21127  *
21128  *         # Set dimensions
21129  */
21130   __pyx_v_k_endog = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->select_missing(__pyx_v_self, __pyx_v_t);
21131 
21132   /* "statsmodels/tsa/statespace/_representation.pyx":1551
21133  *
21134  *         # Set dimensions
21135  *         self.set_dimensions(k_endog, self.k_states, self.k_posdef)             # <<<<<<<<<<<<<<
21136  *
21137  *         # Handle transformations
21138  */
21139   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_k_endog, __pyx_v_self->k_states, __pyx_v_self->k_posdef);
21140 
21141   /* "statsmodels/tsa/statespace/_representation.pyx":1554
21142  *
21143  *         # Handle transformations
21144  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)             # <<<<<<<<<<<<<<
21145  *
21146  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
21147  */
21148   __pyx_t_16.__pyx_n = 1;
21149   __pyx_t_16.reset = __pyx_v_reset;
21150   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->transform(__pyx_v_self, __pyx_v_t, __pyx_v_self->_previous_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, &__pyx_t_16); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1554, __pyx_L1_error)
21151 
21152   /* "statsmodels/tsa/statespace/_representation.pyx":1497
21153  *             self.seek(self.t+1, 0, 0)
21154  *
21155  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):             # <<<<<<<<<<<<<<
21156  *         self._previous_t = self.t
21157  *
21158  */
21159 
21160   /* function exit code */
21161   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21162   goto __pyx_L0;
21163   __pyx_L1_error:;
21164   __Pyx_XDECREF(__pyx_t_1);
21165   __Pyx_XDECREF(__pyx_t_2);
21166   __Pyx_XDECREF(__pyx_t_3);
21167   __Pyx_XDECREF(__pyx_t_4);
21168   __Pyx_XDECREF(__pyx_t_5);
21169   __Pyx_XDECREF(__pyx_t_6);
21170   __Pyx_XDECREF(__pyx_t_7);
21171   __Pyx_XDECREF(__pyx_t_8);
21172   __Pyx_XDECREF(__pyx_t_10);
21173   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
21174   __pyx_r = 0;
21175   __pyx_L0:;
21176   __Pyx_XGIVEREF(__pyx_r);
21177   __Pyx_RefNannyFinishContext();
21178   return __pyx_r;
21179 }
21180 
21181 /* Python wrapper */
21182 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19seek(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)21183 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21184   unsigned int __pyx_v_t;
21185   unsigned int __pyx_v_transform_diagonalize;
21186   unsigned int __pyx_v_transform_generalized_collapse;
21187   unsigned int __pyx_v_reset;
21188   int __pyx_lineno = 0;
21189   const char *__pyx_filename = NULL;
21190   int __pyx_clineno = 0;
21191   PyObject *__pyx_r = 0;
21192   __Pyx_RefNannyDeclarations
21193   __Pyx_RefNannySetupContext("seek (wrapper)", 0);
21194   {
21195     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_transform_diagonalize,&__pyx_n_s_transform_generalized_collapse,&__pyx_n_s_reset,0};
21196     PyObject* values[4] = {0,0,0,0};
21197     if (unlikely(__pyx_kwds)) {
21198       Py_ssize_t kw_args;
21199       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21200       switch (pos_args) {
21201         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21202         CYTHON_FALLTHROUGH;
21203         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21204         CYTHON_FALLTHROUGH;
21205         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21206         CYTHON_FALLTHROUGH;
21207         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21208         CYTHON_FALLTHROUGH;
21209         case  0: break;
21210         default: goto __pyx_L5_argtuple_error;
21211       }
21212       kw_args = PyDict_Size(__pyx_kwds);
21213       switch (pos_args) {
21214         case  0:
21215         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
21216         else goto __pyx_L5_argtuple_error;
21217         CYTHON_FALLTHROUGH;
21218         case  1:
21219         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_diagonalize)) != 0)) kw_args--;
21220         else {
21221           __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, 1); __PYX_ERR(0, 1497, __pyx_L3_error)
21222         }
21223         CYTHON_FALLTHROUGH;
21224         case  2:
21225         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_generalized_collapse)) != 0)) kw_args--;
21226         else {
21227           __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, 2); __PYX_ERR(0, 1497, __pyx_L3_error)
21228         }
21229         CYTHON_FALLTHROUGH;
21230         case  3:
21231         if (kw_args > 0) {
21232           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
21233           if (value) { values[3] = value; kw_args--; }
21234         }
21235       }
21236       if (unlikely(kw_args > 0)) {
21237         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) __PYX_ERR(0, 1497, __pyx_L3_error)
21238       }
21239     } else {
21240       switch (PyTuple_GET_SIZE(__pyx_args)) {
21241         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21242         CYTHON_FALLTHROUGH;
21243         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21244         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21245         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21246         break;
21247         default: goto __pyx_L5_argtuple_error;
21248       }
21249     }
21250     __pyx_v_t = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_t == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L3_error)
21251     __pyx_v_transform_diagonalize = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_transform_diagonalize == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L3_error)
21252     __pyx_v_transform_generalized_collapse = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_transform_generalized_collapse == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L3_error)
21253     if (values[3]) {
21254       __pyx_v_reset = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_reset == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L3_error)
21255     } else {
21256       __pyx_v_reset = ((unsigned int)0);
21257     }
21258   }
21259   goto __pyx_L4_argument_unpacking_done;
21260   __pyx_L5_argtuple_error:;
21261   __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1497, __pyx_L3_error)
21262   __pyx_L3_error:;
21263   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
21264   __Pyx_RefNannyFinishContext();
21265   return NULL;
21266   __pyx_L4_argument_unpacking_done:;
21267   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18seek(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), __pyx_v_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, __pyx_v_reset);
21268 
21269   /* function exit code */
21270   __Pyx_RefNannyFinishContext();
21271   return __pyx_r;
21272 }
21273 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,unsigned int __pyx_v_reset)21274 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, unsigned int __pyx_v_reset) {
21275   PyObject *__pyx_r = NULL;
21276   __Pyx_RefNannyDeclarations
21277   PyObject *__pyx_t_1 = NULL;
21278   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek __pyx_t_2;
21279   int __pyx_lineno = 0;
21280   const char *__pyx_filename = NULL;
21281   int __pyx_clineno = 0;
21282   __Pyx_RefNannySetupContext("seek", 0);
21283   __Pyx_XDECREF(__pyx_r);
21284   __pyx_t_2.__pyx_n = 1;
21285   __pyx_t_2.reset = __pyx_v_reset;
21286   __pyx_t_1 = __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_dStatespace->seek(__pyx_v_self, __pyx_v_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
21287   __Pyx_GOTREF(__pyx_t_1);
21288   __pyx_r = __pyx_t_1;
21289   __pyx_t_1 = 0;
21290   goto __pyx_L0;
21291 
21292   /* function exit code */
21293   __pyx_L1_error:;
21294   __Pyx_XDECREF(__pyx_t_1);
21295   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
21296   __pyx_r = NULL;
21297   __pyx_L0:;
21298   __Pyx_XGIVEREF(__pyx_r);
21299   __Pyx_RefNannyFinishContext();
21300   return __pyx_r;
21301 }
21302 
21303 /* "statsmodels/tsa/statespace/_representation.pyx":1556
21304  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)
21305  *
21306  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):             # <<<<<<<<<<<<<<
21307  *         self._k_endog = k_endog
21308  *         self._k_states = k_states
21309  */
21310 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_k_endog,unsigned int __pyx_v_k_states,unsigned int __pyx_v_k_posdef)21311 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_k_endog, unsigned int __pyx_v_k_states, unsigned int __pyx_v_k_posdef) {
21312   __Pyx_RefNannyDeclarations
21313   __Pyx_RefNannySetupContext("set_dimensions", 0);
21314 
21315   /* "statsmodels/tsa/statespace/_representation.pyx":1557
21316  *
21317  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
21318  *         self._k_endog = k_endog             # <<<<<<<<<<<<<<
21319  *         self._k_states = k_states
21320  *         self._k_posdef = k_posdef
21321  */
21322   __pyx_v_self->_k_endog = __pyx_v_k_endog;
21323 
21324   /* "statsmodels/tsa/statespace/_representation.pyx":1558
21325  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
21326  *         self._k_endog = k_endog
21327  *         self._k_states = k_states             # <<<<<<<<<<<<<<
21328  *         self._k_posdef = k_posdef
21329  *         self._k_endog2 = k_endog**2
21330  */
21331   __pyx_v_self->_k_states = __pyx_v_k_states;
21332 
21333   /* "statsmodels/tsa/statespace/_representation.pyx":1559
21334  *         self._k_endog = k_endog
21335  *         self._k_states = k_states
21336  *         self._k_posdef = k_posdef             # <<<<<<<<<<<<<<
21337  *         self._k_endog2 = k_endog**2
21338  *         self._k_states2 = k_states**2
21339  */
21340   __pyx_v_self->_k_posdef = __pyx_v_k_posdef;
21341 
21342   /* "statsmodels/tsa/statespace/_representation.pyx":1560
21343  *         self._k_states = k_states
21344  *         self._k_posdef = k_posdef
21345  *         self._k_endog2 = k_endog**2             # <<<<<<<<<<<<<<
21346  *         self._k_states2 = k_states**2
21347  *         self._k_posdef2 = k_posdef**2
21348  */
21349   __pyx_v_self->_k_endog2 = __Pyx_pow_long(((long)__pyx_v_k_endog), 2);
21350 
21351   /* "statsmodels/tsa/statespace/_representation.pyx":1561
21352  *         self._k_posdef = k_posdef
21353  *         self._k_endog2 = k_endog**2
21354  *         self._k_states2 = k_states**2             # <<<<<<<<<<<<<<
21355  *         self._k_posdef2 = k_posdef**2
21356  *         self._k_endogstates = k_endog * k_states
21357  */
21358   __pyx_v_self->_k_states2 = __Pyx_pow_long(((long)__pyx_v_k_states), 2);
21359 
21360   /* "statsmodels/tsa/statespace/_representation.pyx":1562
21361  *         self._k_endog2 = k_endog**2
21362  *         self._k_states2 = k_states**2
21363  *         self._k_posdef2 = k_posdef**2             # <<<<<<<<<<<<<<
21364  *         self._k_endogstates = k_endog * k_states
21365  *         self._k_statesposdef = k_states * k_posdef
21366  */
21367   __pyx_v_self->_k_posdef2 = __Pyx_pow_long(((long)__pyx_v_k_posdef), 2);
21368 
21369   /* "statsmodels/tsa/statespace/_representation.pyx":1563
21370  *         self._k_states2 = k_states**2
21371  *         self._k_posdef2 = k_posdef**2
21372  *         self._k_endogstates = k_endog * k_states             # <<<<<<<<<<<<<<
21373  *         self._k_statesposdef = k_states * k_posdef
21374  *
21375  */
21376   __pyx_v_self->_k_endogstates = (__pyx_v_k_endog * __pyx_v_k_states);
21377 
21378   /* "statsmodels/tsa/statespace/_representation.pyx":1564
21379  *         self._k_posdef2 = k_posdef**2
21380  *         self._k_endogstates = k_endog * k_states
21381  *         self._k_statesposdef = k_states * k_posdef             # <<<<<<<<<<<<<<
21382  *
21383  *     cdef void select_state_cov(self, unsigned int t):
21384  */
21385   __pyx_v_self->_k_statesposdef = (__pyx_v_k_states * __pyx_v_k_posdef);
21386 
21387   /* "statsmodels/tsa/statespace/_representation.pyx":1556
21388  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)
21389  *
21390  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):             # <<<<<<<<<<<<<<
21391  *         self._k_endog = k_endog
21392  *         self._k_states = k_states
21393  */
21394 
21395   /* function exit code */
21396   __Pyx_RefNannyFinishContext();
21397 }
21398 
21399 /* "statsmodels/tsa/statespace/_representation.pyx":1566
21400  *         self._k_statesposdef = k_states * k_posdef
21401  *
21402  *     cdef void select_state_cov(self, unsigned int t):             # <<<<<<<<<<<<<<
21403  *         cdef int selected_state_cov_t = 0
21404  *
21405  */
21406 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_t)21407 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
21408   int __pyx_v_selected_state_cov_t;
21409   __Pyx_RefNannyDeclarations
21410   int __pyx_t_1;
21411   int __pyx_t_2;
21412   Py_ssize_t __pyx_t_3;
21413   Py_ssize_t __pyx_t_4;
21414   Py_ssize_t __pyx_t_5;
21415   int __pyx_lineno = 0;
21416   const char *__pyx_filename = NULL;
21417   int __pyx_clineno = 0;
21418   __Pyx_RefNannySetupContext("select_state_cov", 0);
21419 
21420   /* "statsmodels/tsa/statespace/_representation.pyx":1567
21421  *
21422  *     cdef void select_state_cov(self, unsigned int t):
21423  *         cdef int selected_state_cov_t = 0             # <<<<<<<<<<<<<<
21424  *
21425  *         # ### Get selected state covariance matrix
21426  */
21427   __pyx_v_selected_state_cov_t = 0;
21428 
21429   /* "statsmodels/tsa/statespace/_representation.pyx":1570
21430  *
21431  *         # ### Get selected state covariance matrix
21432  *         if t == 0 or self.selected_state_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
21433  *             selected_state_cov_t = t
21434  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
21435  */
21436   __pyx_t_2 = ((__pyx_v_t == 0) != 0);
21437   if (!__pyx_t_2) {
21438   } else {
21439     __pyx_t_1 = __pyx_t_2;
21440     goto __pyx_L4_bool_binop_done;
21441   }
21442   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1570, __pyx_L1_error)}
21443   __pyx_t_2 = (((__pyx_v_self->selected_state_cov.shape[2]) > 1) != 0);
21444   __pyx_t_1 = __pyx_t_2;
21445   __pyx_L4_bool_binop_done:;
21446   if (__pyx_t_1) {
21447 
21448     /* "statsmodels/tsa/statespace/_representation.pyx":1571
21449  *         # ### Get selected state covariance matrix
21450  *         if t == 0 or self.selected_state_cov.shape[2] > 1:
21451  *             selected_state_cov_t = t             # <<<<<<<<<<<<<<
21452  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
21453  *
21454  */
21455     __pyx_v_selected_state_cov_t = __pyx_v_t;
21456 
21457     /* "statsmodels/tsa/statespace/_representation.pyx":1572
21458  *         if t == 0 or self.selected_state_cov.shape[2] > 1:
21459  *             selected_state_cov_t = t
21460  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]             # <<<<<<<<<<<<<<
21461  *
21462  *             dselect_cov(self.k_states, self.k_posdef,
21463  */
21464     if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1572, __pyx_L1_error)}
21465     __pyx_t_3 = 0;
21466     __pyx_t_4 = 0;
21467     __pyx_t_5 = __pyx_v_selected_state_cov_t;
21468     __pyx_v_self->_selected_state_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->selected_state_cov.data) + __pyx_t_3)) ) + __pyx_t_4 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_5 * __pyx_v_self->selected_state_cov.strides[2]) ))));
21469 
21470     /* "statsmodels/tsa/statespace/_representation.pyx":1575
21471  *
21472  *             dselect_cov(self.k_states, self.k_posdef,
21473  *                                        &self.tmp[0,0],             # <<<<<<<<<<<<<<
21474  *                                        self._selection,
21475  *                                        self._state_cov,
21476  */
21477     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1575, __pyx_L1_error)}
21478     __pyx_t_5 = 0;
21479     __pyx_t_4 = 0;
21480 
21481     /* "statsmodels/tsa/statespace/_representation.pyx":1574
21482  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
21483  *
21484  *             dselect_cov(self.k_states, self.k_posdef,             # <<<<<<<<<<<<<<
21485  *                                        &self.tmp[0,0],
21486  *                                        self._selection,
21487  */
21488     (void)(__pyx_f_11statsmodels_3tsa_10statespace_15_representation_dselect_cov(__pyx_v_self->k_states, __pyx_v_self->k_posdef, (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->tmp.data) + __pyx_t_5)) ) + __pyx_t_4 * __pyx_v_self->tmp.strides[1]) )))), __pyx_v_self->_selection, __pyx_v_self->_state_cov, __pyx_v_self->_selected_state_cov));
21489 
21490     /* "statsmodels/tsa/statespace/_representation.pyx":1570
21491  *
21492  *         # ### Get selected state covariance matrix
21493  *         if t == 0 or self.selected_state_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
21494  *             selected_state_cov_t = t
21495  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
21496  */
21497     goto __pyx_L3;
21498   }
21499 
21500   /* "statsmodels/tsa/statespace/_representation.pyx":1580
21501  *                                        self._selected_state_cov)
21502  *         else:
21503  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]             # <<<<<<<<<<<<<<
21504  *
21505  *     cdef int select_missing(self, unsigned int t):
21506  */
21507   /*else*/ {
21508     if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1580, __pyx_L1_error)}
21509     __pyx_t_4 = 0;
21510     __pyx_t_5 = 0;
21511     __pyx_t_3 = 0;
21512     __pyx_v_self->_selected_state_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->selected_state_cov.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_3 * __pyx_v_self->selected_state_cov.strides[2]) ))));
21513   }
21514   __pyx_L3:;
21515 
21516   /* "statsmodels/tsa/statespace/_representation.pyx":1566
21517  *         self._k_statesposdef = k_states * k_posdef
21518  *
21519  *     cdef void select_state_cov(self, unsigned int t):             # <<<<<<<<<<<<<<
21520  *         cdef int selected_state_cov_t = 0
21521  *
21522  */
21523 
21524   /* function exit code */
21525   goto __pyx_L0;
21526   __pyx_L1_error:;
21527   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.dStatespace.select_state_cov", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
21528   __pyx_L0:;
21529   __Pyx_RefNannyFinishContext();
21530 }
21531 
21532 /* "statsmodels/tsa/statespace/_representation.pyx":1582
21533  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]
21534  *
21535  *     cdef int select_missing(self, unsigned int t):             # <<<<<<<<<<<<<<
21536  *         # Note: this assumes that object pointers are already initialized
21537  *         # Note: this assumes that transform_... will be done *later*
21538  */
21539 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_t)21540 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
21541   int __pyx_v_k_endog;
21542   int __pyx_r;
21543   __Pyx_RefNannyDeclarations
21544   int __pyx_t_1;
21545   size_t __pyx_t_2;
21546   int __pyx_t_3;
21547   int __pyx_lineno = 0;
21548   const char *__pyx_filename = NULL;
21549   int __pyx_clineno = 0;
21550   __Pyx_RefNannySetupContext("select_missing", 0);
21551 
21552   /* "statsmodels/tsa/statespace/_representation.pyx":1585
21553  *         # Note: this assumes that object pointers are already initialized
21554  *         # Note: this assumes that transform_... will be done *later*
21555  *         cdef int k_endog = self.k_endog             # <<<<<<<<<<<<<<
21556  *
21557  *         # Set the current iteration nmissing
21558  */
21559   __pyx_t_1 = __pyx_v_self->k_endog;
21560   __pyx_v_k_endog = __pyx_t_1;
21561 
21562   /* "statsmodels/tsa/statespace/_representation.pyx":1588
21563  *
21564  *         # Set the current iteration nmissing
21565  *         self._nmissing = self.nmissing[t]             # <<<<<<<<<<<<<<
21566  *
21567  *         # ### Perform missing selections
21568  */
21569   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1588, __pyx_L1_error)}
21570   __pyx_t_2 = __pyx_v_t;
21571   __pyx_v_self->_nmissing = (*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_2 * __pyx_v_self->nmissing.strides[0]) )));
21572 
21573   /* "statsmodels/tsa/statespace/_representation.pyx":1605
21574  *         # forecasting), we actually set do not change the dimension, but we set
21575  *         # the design matrix to the zeros array.
21576  *         if self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
21577  *             self._select_missing_entire_obs(t)
21578  *         elif self._nmissing > 0:
21579  */
21580   __pyx_t_3 = ((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0);
21581   if (__pyx_t_3) {
21582 
21583     /* "statsmodels/tsa/statespace/_representation.pyx":1606
21584  *         # the design matrix to the zeros array.
21585  *         if self._nmissing == self.k_endog:
21586  *             self._select_missing_entire_obs(t)             # <<<<<<<<<<<<<<
21587  *         elif self._nmissing > 0:
21588  *             self._select_missing_partial_obs(t)
21589  */
21590     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->_select_missing_entire_obs(__pyx_v_self, __pyx_v_t);
21591 
21592     /* "statsmodels/tsa/statespace/_representation.pyx":1605
21593  *         # forecasting), we actually set do not change the dimension, but we set
21594  *         # the design matrix to the zeros array.
21595  *         if self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
21596  *             self._select_missing_entire_obs(t)
21597  *         elif self._nmissing > 0:
21598  */
21599     goto __pyx_L3;
21600   }
21601 
21602   /* "statsmodels/tsa/statespace/_representation.pyx":1607
21603  *         if self._nmissing == self.k_endog:
21604  *             self._select_missing_entire_obs(t)
21605  *         elif self._nmissing > 0:             # <<<<<<<<<<<<<<
21606  *             self._select_missing_partial_obs(t)
21607  *             k_endog = self.k_endog - self._nmissing
21608  */
21609   __pyx_t_3 = ((__pyx_v_self->_nmissing > 0) != 0);
21610   if (__pyx_t_3) {
21611 
21612     /* "statsmodels/tsa/statespace/_representation.pyx":1608
21613  *             self._select_missing_entire_obs(t)
21614  *         elif self._nmissing > 0:
21615  *             self._select_missing_partial_obs(t)             # <<<<<<<<<<<<<<
21616  *             k_endog = self.k_endog - self._nmissing
21617  *
21618  */
21619     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->_select_missing_partial_obs(__pyx_v_self, __pyx_v_t);
21620 
21621     /* "statsmodels/tsa/statespace/_representation.pyx":1609
21622  *         elif self._nmissing > 0:
21623  *             self._select_missing_partial_obs(t)
21624  *             k_endog = self.k_endog - self._nmissing             # <<<<<<<<<<<<<<
21625  *
21626  *         # Return the number of non-missing endogenous variables
21627  */
21628     __pyx_v_k_endog = (__pyx_v_self->k_endog - __pyx_v_self->_nmissing);
21629 
21630     /* "statsmodels/tsa/statespace/_representation.pyx":1607
21631  *         if self._nmissing == self.k_endog:
21632  *             self._select_missing_entire_obs(t)
21633  *         elif self._nmissing > 0:             # <<<<<<<<<<<<<<
21634  *             self._select_missing_partial_obs(t)
21635  *             k_endog = self.k_endog - self._nmissing
21636  */
21637   }
21638   __pyx_L3:;
21639 
21640   /* "statsmodels/tsa/statespace/_representation.pyx":1612
21641  *
21642  *         # Return the number of non-missing endogenous variables
21643  *         return k_endog             # <<<<<<<<<<<<<<
21644  *
21645  *     cdef void _select_missing_entire_obs(self, unsigned int t):
21646  */
21647   __pyx_r = __pyx_v_k_endog;
21648   goto __pyx_L0;
21649 
21650   /* "statsmodels/tsa/statespace/_representation.pyx":1582
21651  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]
21652  *
21653  *     cdef int select_missing(self, unsigned int t):             # <<<<<<<<<<<<<<
21654  *         # Note: this assumes that object pointers are already initialized
21655  *         # Note: this assumes that transform_... will be done *later*
21656  */
21657 
21658   /* function exit code */
21659   __pyx_L1_error:;
21660   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.dStatespace.select_missing", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
21661   __pyx_r = 0;
21662   __pyx_L0:;
21663   __Pyx_RefNannyFinishContext();
21664   return __pyx_r;
21665 }
21666 
21667 /* "statsmodels/tsa/statespace/_representation.pyx":1614
21668  *         return k_endog
21669  *
21670  *     cdef void _select_missing_entire_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
21671  *         cdef:
21672  *             int i, j
21673  */
21674 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,CYTHON_UNUSED unsigned int __pyx_v_t)21675 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_t) {
21676   int __pyx_v_i;
21677   int __pyx_v_j;
21678   __Pyx_RefNannyDeclarations
21679   int __pyx_t_1;
21680   int __pyx_t_2;
21681   int __pyx_t_3;
21682   int __pyx_t_4;
21683   int __pyx_t_5;
21684   int __pyx_t_6;
21685   Py_ssize_t __pyx_t_7;
21686   int __pyx_lineno = 0;
21687   const char *__pyx_filename = NULL;
21688   int __pyx_clineno = 0;
21689   __Pyx_RefNannySetupContext("_select_missing_entire_obs", 0);
21690 
21691   /* "statsmodels/tsa/statespace/_representation.pyx":1619
21692  *
21693  *         # Design matrix is set to zeros
21694  *         for i in range(self.k_states):             # <<<<<<<<<<<<<<
21695  *             for j in range(self.k_endog):
21696  *                 self.selected_design[j + i*self.k_endog] = 0.0
21697  */
21698   __pyx_t_1 = __pyx_v_self->k_states;
21699   __pyx_t_2 = __pyx_t_1;
21700   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
21701     __pyx_v_i = __pyx_t_3;
21702 
21703     /* "statsmodels/tsa/statespace/_representation.pyx":1620
21704  *         # Design matrix is set to zeros
21705  *         for i in range(self.k_states):
21706  *             for j in range(self.k_endog):             # <<<<<<<<<<<<<<
21707  *                 self.selected_design[j + i*self.k_endog] = 0.0
21708  *         self._design = &self.selected_design[0]
21709  */
21710     __pyx_t_4 = __pyx_v_self->k_endog;
21711     __pyx_t_5 = __pyx_t_4;
21712     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
21713       __pyx_v_j = __pyx_t_6;
21714 
21715       /* "statsmodels/tsa/statespace/_representation.pyx":1621
21716  *         for i in range(self.k_states):
21717  *             for j in range(self.k_endog):
21718  *                 self.selected_design[j + i*self.k_endog] = 0.0             # <<<<<<<<<<<<<<
21719  *         self._design = &self.selected_design[0]
21720  *
21721  */
21722       if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1621, __pyx_L1_error)}
21723       __pyx_t_7 = (__pyx_v_j + (__pyx_v_i * __pyx_v_self->k_endog));
21724       *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_7 * __pyx_v_self->selected_design.strides[0]) )) = 0.0;
21725     }
21726   }
21727 
21728   /* "statsmodels/tsa/statespace/_representation.pyx":1622
21729  *             for j in range(self.k_endog):
21730  *                 self.selected_design[j + i*self.k_endog] = 0.0
21731  *         self._design = &self.selected_design[0]             # <<<<<<<<<<<<<<
21732  *
21733  *     cdef void _select_missing_partial_obs(self, unsigned int t):
21734  */
21735   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1622, __pyx_L1_error)}
21736   __pyx_t_7 = 0;
21737   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_7 * __pyx_v_self->selected_design.strides[0]) ))));
21738 
21739   /* "statsmodels/tsa/statespace/_representation.pyx":1614
21740  *         return k_endog
21741  *
21742  *     cdef void _select_missing_entire_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
21743  *         cdef:
21744  *             int i, j
21745  */
21746 
21747   /* function exit code */
21748   goto __pyx_L0;
21749   __pyx_L1_error:;
21750   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.dStatespace._select_missing_entire_obs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
21751   __pyx_L0:;
21752   __Pyx_RefNannyFinishContext();
21753 }
21754 
21755 /* "statsmodels/tsa/statespace/_representation.pyx":1624
21756  *         self._design = &self.selected_design[0]
21757  *
21758  *     cdef void _select_missing_partial_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
21759  *         cdef:
21760  *             int i, j, k, l
21761  */
21762 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_t)21763 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
21764   int __pyx_v_i;
21765   int __pyx_v_j;
21766   int __pyx_v_k;
21767   int __pyx_v_l;
21768   CYTHON_UNUSED int __pyx_v_inc;
21769   CYTHON_UNUSED int __pyx_v_design_t;
21770   CYTHON_UNUSED int __pyx_v_obs_cov_t;
21771   int __pyx_v_k_endog;
21772   __Pyx_RefNannyDeclarations
21773   int __pyx_t_1;
21774   int __pyx_t_2;
21775   int __pyx_t_3;
21776   Py_ssize_t __pyx_t_4;
21777   size_t __pyx_t_5;
21778   int __pyx_t_6;
21779   int __pyx_t_7;
21780   int __pyx_t_8;
21781   int __pyx_t_9;
21782   int __pyx_lineno = 0;
21783   const char *__pyx_filename = NULL;
21784   int __pyx_clineno = 0;
21785   __Pyx_RefNannySetupContext("_select_missing_partial_obs", 0);
21786 
21787   /* "statsmodels/tsa/statespace/_representation.pyx":1627
21788  *         cdef:
21789  *             int i, j, k, l
21790  *             int inc = 1             # <<<<<<<<<<<<<<
21791  *             int design_t = 0
21792  *             int obs_cov_t = 0
21793  */
21794   __pyx_v_inc = 1;
21795 
21796   /* "statsmodels/tsa/statespace/_representation.pyx":1628
21797  *             int i, j, k, l
21798  *             int inc = 1
21799  *             int design_t = 0             # <<<<<<<<<<<<<<
21800  *             int obs_cov_t = 0
21801  *             int k_endog = self.k_endog - self._nmissing
21802  */
21803   __pyx_v_design_t = 0;
21804 
21805   /* "statsmodels/tsa/statespace/_representation.pyx":1629
21806  *             int inc = 1
21807  *             int design_t = 0
21808  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
21809  *             int k_endog = self.k_endog - self._nmissing
21810  *
21811  */
21812   __pyx_v_obs_cov_t = 0;
21813 
21814   /* "statsmodels/tsa/statespace/_representation.pyx":1630
21815  *             int design_t = 0
21816  *             int obs_cov_t = 0
21817  *             int k_endog = self.k_endog - self._nmissing             # <<<<<<<<<<<<<<
21818  *
21819  *         k = 0
21820  */
21821   __pyx_v_k_endog = (__pyx_v_self->k_endog - __pyx_v_self->_nmissing);
21822 
21823   /* "statsmodels/tsa/statespace/_representation.pyx":1632
21824  *             int k_endog = self.k_endog - self._nmissing
21825  *
21826  *         k = 0             # <<<<<<<<<<<<<<
21827  *         for i in range(self.k_endog):
21828  *             if not self.missing[i, t]:
21829  */
21830   __pyx_v_k = 0;
21831 
21832   /* "statsmodels/tsa/statespace/_representation.pyx":1633
21833  *
21834  *         k = 0
21835  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
21836  *             if not self.missing[i, t]:
21837  *
21838  */
21839   __pyx_t_1 = __pyx_v_self->k_endog;
21840   __pyx_t_2 = __pyx_t_1;
21841   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
21842     __pyx_v_i = __pyx_t_3;
21843 
21844     /* "statsmodels/tsa/statespace/_representation.pyx":1634
21845  *         k = 0
21846  *         for i in range(self.k_endog):
21847  *             if not self.missing[i, t]:             # <<<<<<<<<<<<<<
21848  *
21849  *                 self.selected_obs[k] = self._obs[i]
21850  */
21851     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1634, __pyx_L1_error)}
21852     __pyx_t_4 = __pyx_v_i;
21853     __pyx_t_5 = __pyx_v_t;
21854     __pyx_t_6 = ((!((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->missing.strides[1]) ))) != 0)) != 0);
21855     if (__pyx_t_6) {
21856 
21857       /* "statsmodels/tsa/statespace/_representation.pyx":1636
21858  *             if not self.missing[i, t]:
21859  *
21860  *                 self.selected_obs[k] = self._obs[i]             # <<<<<<<<<<<<<<
21861  *                 self.selected_obs_intercept[k] = self._obs_intercept[i]
21862  *
21863  */
21864       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1636, __pyx_L1_error)}
21865       __pyx_t_4 = __pyx_v_k;
21866       *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_4 * __pyx_v_self->selected_obs.strides[0]) )) = (__pyx_v_self->_obs[__pyx_v_i]);
21867 
21868       /* "statsmodels/tsa/statespace/_representation.pyx":1637
21869  *
21870  *                 self.selected_obs[k] = self._obs[i]
21871  *                 self.selected_obs_intercept[k] = self._obs_intercept[i]             # <<<<<<<<<<<<<<
21872  *
21873  *                 # i is rows, k is rows
21874  */
21875       if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1637, __pyx_L1_error)}
21876       __pyx_t_4 = __pyx_v_k;
21877       *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs_intercept.data + __pyx_t_4 * __pyx_v_self->selected_obs_intercept.strides[0]) )) = (__pyx_v_self->_obs_intercept[__pyx_v_i]);
21878 
21879       /* "statsmodels/tsa/statespace/_representation.pyx":1642
21880  *                 blas.dcopy(&self.k_states,
21881  *                       &self._design[i], &self.k_endog,
21882  *                       &self.selected_design[k], &k_endog)             # <<<<<<<<<<<<<<
21883  *
21884  *                 # i, k is columns, j, l is rows
21885  */
21886       if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1642, __pyx_L1_error)}
21887       __pyx_t_4 = __pyx_v_k;
21888 
21889       /* "statsmodels/tsa/statespace/_representation.pyx":1640
21890  *
21891  *                 # i is rows, k is rows
21892  *                 blas.dcopy(&self.k_states,             # <<<<<<<<<<<<<<
21893  *                       &self._design[i], &self.k_endog,
21894  *                       &self.selected_design[k], &k_endog)
21895  */
21896       __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->k_states), (&(__pyx_v_self->_design[__pyx_v_i])), (&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_4 * __pyx_v_self->selected_design.strides[0]) )))), (&__pyx_v_k_endog));
21897 
21898       /* "statsmodels/tsa/statespace/_representation.pyx":1645
21899  *
21900  *                 # i, k is columns, j, l is rows
21901  *                 l = 0             # <<<<<<<<<<<<<<
21902  *                 for j in range(self.k_endog):
21903  *                     if not self.missing[j, t]:
21904  */
21905       __pyx_v_l = 0;
21906 
21907       /* "statsmodels/tsa/statespace/_representation.pyx":1646
21908  *                 # i, k is columns, j, l is rows
21909  *                 l = 0
21910  *                 for j in range(self.k_endog):             # <<<<<<<<<<<<<<
21911  *                     if not self.missing[j, t]:
21912  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
21913  */
21914       __pyx_t_7 = __pyx_v_self->k_endog;
21915       __pyx_t_8 = __pyx_t_7;
21916       for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
21917         __pyx_v_j = __pyx_t_9;
21918 
21919         /* "statsmodels/tsa/statespace/_representation.pyx":1647
21920  *                 l = 0
21921  *                 for j in range(self.k_endog):
21922  *                     if not self.missing[j, t]:             # <<<<<<<<<<<<<<
21923  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
21924  *                         l += 1
21925  */
21926         if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1647, __pyx_L1_error)}
21927         __pyx_t_4 = __pyx_v_j;
21928         __pyx_t_5 = __pyx_v_t;
21929         __pyx_t_6 = ((!((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->missing.strides[1]) ))) != 0)) != 0);
21930         if (__pyx_t_6) {
21931 
21932           /* "statsmodels/tsa/statespace/_representation.pyx":1648
21933  *                 for j in range(self.k_endog):
21934  *                     if not self.missing[j, t]:
21935  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]             # <<<<<<<<<<<<<<
21936  *                         l += 1
21937  *                 k += 1
21938  */
21939           if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1648, __pyx_L1_error)}
21940           __pyx_t_4 = (__pyx_v_l + (__pyx_v_k * __pyx_v_k_endog));
21941           *((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs_cov.data + __pyx_t_4 * __pyx_v_self->selected_obs_cov.strides[0]) )) = (__pyx_v_self->_obs_cov[(__pyx_v_j + (__pyx_v_i * __pyx_v_self->k_endog))]);
21942 
21943           /* "statsmodels/tsa/statespace/_representation.pyx":1649
21944  *                     if not self.missing[j, t]:
21945  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
21946  *                         l += 1             # <<<<<<<<<<<<<<
21947  *                 k += 1
21948  *         self._obs = &self.selected_obs[0]
21949  */
21950           __pyx_v_l = (__pyx_v_l + 1);
21951 
21952           /* "statsmodels/tsa/statespace/_representation.pyx":1647
21953  *                 l = 0
21954  *                 for j in range(self.k_endog):
21955  *                     if not self.missing[j, t]:             # <<<<<<<<<<<<<<
21956  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
21957  *                         l += 1
21958  */
21959         }
21960       }
21961 
21962       /* "statsmodels/tsa/statespace/_representation.pyx":1650
21963  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
21964  *                         l += 1
21965  *                 k += 1             # <<<<<<<<<<<<<<
21966  *         self._obs = &self.selected_obs[0]
21967  *         self._obs_intercept = &self.selected_obs_intercept[0]
21968  */
21969       __pyx_v_k = (__pyx_v_k + 1);
21970 
21971       /* "statsmodels/tsa/statespace/_representation.pyx":1634
21972  *         k = 0
21973  *         for i in range(self.k_endog):
21974  *             if not self.missing[i, t]:             # <<<<<<<<<<<<<<
21975  *
21976  *                 self.selected_obs[k] = self._obs[i]
21977  */
21978     }
21979   }
21980 
21981   /* "statsmodels/tsa/statespace/_representation.pyx":1651
21982  *                         l += 1
21983  *                 k += 1
21984  *         self._obs = &self.selected_obs[0]             # <<<<<<<<<<<<<<
21985  *         self._obs_intercept = &self.selected_obs_intercept[0]
21986  *         self._design = &self.selected_design[0]
21987  */
21988   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1651, __pyx_L1_error)}
21989   __pyx_t_4 = 0;
21990   __pyx_v_self->_obs = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_4 * __pyx_v_self->selected_obs.strides[0]) ))));
21991 
21992   /* "statsmodels/tsa/statespace/_representation.pyx":1652
21993  *                 k += 1
21994  *         self._obs = &self.selected_obs[0]
21995  *         self._obs_intercept = &self.selected_obs_intercept[0]             # <<<<<<<<<<<<<<
21996  *         self._design = &self.selected_design[0]
21997  *         self._obs_cov = &self.selected_obs_cov[0]
21998  */
21999   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1652, __pyx_L1_error)}
22000   __pyx_t_4 = 0;
22001   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs_intercept.data + __pyx_t_4 * __pyx_v_self->selected_obs_intercept.strides[0]) ))));
22002 
22003   /* "statsmodels/tsa/statespace/_representation.pyx":1653
22004  *         self._obs = &self.selected_obs[0]
22005  *         self._obs_intercept = &self.selected_obs_intercept[0]
22006  *         self._design = &self.selected_design[0]             # <<<<<<<<<<<<<<
22007  *         self._obs_cov = &self.selected_obs_cov[0]
22008  *
22009  */
22010   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1653, __pyx_L1_error)}
22011   __pyx_t_4 = 0;
22012   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_4 * __pyx_v_self->selected_design.strides[0]) ))));
22013 
22014   /* "statsmodels/tsa/statespace/_representation.pyx":1654
22015  *         self._obs_intercept = &self.selected_obs_intercept[0]
22016  *         self._design = &self.selected_design[0]
22017  *         self._obs_cov = &self.selected_obs_cov[0]             # <<<<<<<<<<<<<<
22018  *
22019  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:
22020  */
22021   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1654, __pyx_L1_error)}
22022   __pyx_t_4 = 0;
22023   __pyx_v_self->_obs_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs_cov.data + __pyx_t_4 * __pyx_v_self->selected_obs_cov.strides[0]) ))));
22024 
22025   /* "statsmodels/tsa/statespace/_representation.pyx":1624
22026  *         self._design = &self.selected_design[0]
22027  *
22028  *     cdef void _select_missing_partial_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
22029  *         cdef:
22030  *             int i, j, k, l
22031  */
22032 
22033   /* function exit code */
22034   goto __pyx_L0;
22035   __pyx_L1_error:;
22036   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.dStatespace._select_missing_partial_obs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
22037   __pyx_L0:;
22038   __Pyx_RefNannyFinishContext();
22039 }
22040 
22041 /* "statsmodels/tsa/statespace/_representation.pyx":1656
22042  *         self._obs_cov = &self.selected_obs_cov[0]
22043  *
22044  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
22045  *         # Reset the collapsed loglikelihood
22046  *         self.collapse_loglikelihood = 0
22047  */
22048 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform * __pyx_optional_args)22049 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform *__pyx_optional_args) {
22050   unsigned int __pyx_v_reset = ((unsigned int)0);
22051   int __pyx_v_k_endog;
22052   __Pyx_RefNannyDeclarations
22053   int __pyx_t_1;
22054   int __pyx_t_2;
22055   int __pyx_t_3;
22056   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse __pyx_t_4;
22057   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize __pyx_t_5;
22058   int __pyx_lineno = 0;
22059   const char *__pyx_filename = NULL;
22060   int __pyx_clineno = 0;
22061   __Pyx_RefNannySetupContext("transform", 0);
22062   if (__pyx_optional_args) {
22063     if (__pyx_optional_args->__pyx_n > 0) {
22064       __pyx_v_reset = __pyx_optional_args->reset;
22065     }
22066   }
22067 
22068   /* "statsmodels/tsa/statespace/_representation.pyx":1658
22069  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:
22070  *         # Reset the collapsed loglikelihood
22071  *         self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
22072  *
22073  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:
22074  */
22075   __pyx_v_self->collapse_loglikelihood = 0.0;
22076 
22077   /* "statsmodels/tsa/statespace/_representation.pyx":1660
22078  *         self.collapse_loglikelihood = 0
22079  *
22080  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:             # <<<<<<<<<<<<<<
22081  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
22082  *             # Reset dimensions
22083  */
22084   __pyx_t_2 = (__pyx_v_transform_generalized_collapse != 0);
22085   if (__pyx_t_2) {
22086   } else {
22087     __pyx_t_1 = __pyx_t_2;
22088     goto __pyx_L4_bool_binop_done;
22089   }
22090   __pyx_t_2 = ((!((__pyx_v_self->_k_endog <= __pyx_v_self->_k_states) != 0)) != 0);
22091   __pyx_t_1 = __pyx_t_2;
22092   __pyx_L4_bool_binop_done:;
22093   if (__pyx_t_1) {
22094 
22095     /* "statsmodels/tsa/statespace/_representation.pyx":1661
22096  *
22097  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:
22098  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)             # <<<<<<<<<<<<<<
22099  *             # Reset dimensions
22100  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
22101  */
22102     __pyx_t_4.__pyx_n = 1;
22103     __pyx_t_4.reset = __pyx_v_reset;
22104     __pyx_t_3 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->transform_generalized_collapse(__pyx_v_self, __pyx_v_t, __pyx_v_previous_t, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1661, __pyx_L1_error)
22105     __pyx_v_k_endog = __pyx_t_3;
22106 
22107     /* "statsmodels/tsa/statespace/_representation.pyx":1663
22108  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
22109  *             # Reset dimensions
22110  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)             # <<<<<<<<<<<<<<
22111  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):
22112  *             self.transform_diagonalize(t, previous_t, reset)
22113  */
22114     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_k_endog, __pyx_v_self->_k_states, __pyx_v_self->_k_posdef);
22115 
22116     /* "statsmodels/tsa/statespace/_representation.pyx":1660
22117  *         self.collapse_loglikelihood = 0
22118  *
22119  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:             # <<<<<<<<<<<<<<
22120  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
22121  *             # Reset dimensions
22122  */
22123     goto __pyx_L3;
22124   }
22125 
22126   /* "statsmodels/tsa/statespace/_representation.pyx":1664
22127  *             # Reset dimensions
22128  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
22129  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):             # <<<<<<<<<<<<<<
22130  *             self.transform_diagonalize(t, previous_t, reset)
22131  *
22132  */
22133   __pyx_t_2 = (__pyx_v_transform_diagonalize != 0);
22134   if (__pyx_t_2) {
22135   } else {
22136     __pyx_t_1 = __pyx_t_2;
22137     goto __pyx_L6_bool_binop_done;
22138   }
22139   __pyx_t_2 = ((!((__pyx_v_self->diagonal_obs_cov == 1) != 0)) != 0);
22140   __pyx_t_1 = __pyx_t_2;
22141   __pyx_L6_bool_binop_done:;
22142   if (__pyx_t_1) {
22143 
22144     /* "statsmodels/tsa/statespace/_representation.pyx":1665
22145  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
22146  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):
22147  *             self.transform_diagonalize(t, previous_t, reset)             # <<<<<<<<<<<<<<
22148  *
22149  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:
22150  */
22151     __pyx_t_5.__pyx_n = 1;
22152     __pyx_t_5.reset = __pyx_v_reset;
22153     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self->__pyx_vtab)->transform_diagonalize(__pyx_v_self, __pyx_v_t, __pyx_v_previous_t, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1665, __pyx_L1_error)
22154 
22155     /* "statsmodels/tsa/statespace/_representation.pyx":1664
22156  *             # Reset dimensions
22157  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
22158  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):             # <<<<<<<<<<<<<<
22159  *             self.transform_diagonalize(t, previous_t, reset)
22160  *
22161  */
22162   }
22163   __pyx_L3:;
22164 
22165   /* "statsmodels/tsa/statespace/_representation.pyx":1656
22166  *         self._obs_cov = &self.selected_obs_cov[0]
22167  *
22168  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
22169  *         # Reset the collapsed loglikelihood
22170  *         self.collapse_loglikelihood = 0
22171  */
22172 
22173   /* function exit code */
22174   goto __pyx_L0;
22175   __pyx_L1_error:;
22176   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
22177   __pyx_L0:;
22178   __Pyx_RefNannyFinishContext();
22179 }
22180 
22181 /* "statsmodels/tsa/statespace/_representation.pyx":1667
22182  *             self.transform_diagonalize(t, previous_t, reset)
22183  *
22184  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
22185  *         # Note: this assumes that initialize_object_pointers has *already* been done
22186  *         # Note: this assumes that select_missing has *already* been done
22187  */
22188 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize * __pyx_optional_args)22189 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize *__pyx_optional_args) {
22190   unsigned int __pyx_v_reset = ((unsigned int)0);
22191   int __pyx_v_i;
22192   int __pyx_v_j;
22193   int __pyx_v_inc;
22194   int __pyx_v_obs_cov_t;
22195   int __pyx_v_info;
22196   int __pyx_v_reset_missing;
22197   int __pyx_v_diagonal_obs_cov;
22198   __pyx_t_5numpy_float64_t *__pyx_v__transform_obs_cov;
22199   __pyx_t_5numpy_float64_t *__pyx_v__transform_cholesky;
22200   __Pyx_RefNannyDeclarations
22201   Py_ssize_t __pyx_t_1;
22202   Py_ssize_t __pyx_t_2;
22203   int __pyx_t_3;
22204   size_t __pyx_t_4;
22205   int __pyx_t_5;
22206   int __pyx_t_6;
22207   int __pyx_t_7;
22208   size_t __pyx_t_8;
22209   int __pyx_t_9;
22210   int __pyx_t_10;
22211   int __pyx_t_11;
22212   int __pyx_t_12;
22213   Py_ssize_t __pyx_t_13;
22214   PyObject *__pyx_t_14 = NULL;
22215   PyObject *__pyx_t_15 = NULL;
22216   PyObject *__pyx_t_16 = NULL;
22217   PyObject *__pyx_t_17 = NULL;
22218   int __pyx_lineno = 0;
22219   const char *__pyx_filename = NULL;
22220   int __pyx_clineno = 0;
22221   __Pyx_RefNannySetupContext("transform_diagonalize", 0);
22222   if (__pyx_optional_args) {
22223     if (__pyx_optional_args->__pyx_n > 0) {
22224       __pyx_v_reset = __pyx_optional_args->reset;
22225     }
22226   }
22227 
22228   /* "statsmodels/tsa/statespace/_representation.pyx":1673
22229  *         # TODO need to also transform observation intercept
22230  *         cdef:
22231  *             int i, j, inc=1             # <<<<<<<<<<<<<<
22232  *             int obs_cov_t = 0
22233  *             int info
22234  */
22235   __pyx_v_inc = 1;
22236 
22237   /* "statsmodels/tsa/statespace/_representation.pyx":1674
22238  *         cdef:
22239  *             int i, j, inc=1
22240  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
22241  *             int info
22242  *             int reset_missing
22243  */
22244   __pyx_v_obs_cov_t = 0;
22245 
22246   /* "statsmodels/tsa/statespace/_representation.pyx":1678
22247  *             int reset_missing
22248  *             int diagonal_obs_cov
22249  *             np.float64_t * _transform_obs_cov = &self.transform_obs_cov[0, 0]             # <<<<<<<<<<<<<<
22250  *             np.float64_t * _transform_cholesky = &self.transform_cholesky[0, 0]
22251  *
22252  */
22253   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1678, __pyx_L1_error)}
22254   __pyx_t_1 = 0;
22255   __pyx_t_2 = 0;
22256   __pyx_v__transform_obs_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_obs_cov.data) + __pyx_t_1)) ) + __pyx_t_2 * __pyx_v_self->transform_obs_cov.strides[1]) ))));
22257 
22258   /* "statsmodels/tsa/statespace/_representation.pyx":1679
22259  *             int diagonal_obs_cov
22260  *             np.float64_t * _transform_obs_cov = &self.transform_obs_cov[0, 0]
22261  *             np.float64_t * _transform_cholesky = &self.transform_cholesky[0, 0]             # <<<<<<<<<<<<<<
22262  *
22263  *         if self.obs_cov.shape[2] > 1:
22264  */
22265   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1679, __pyx_L1_error)}
22266   __pyx_t_2 = 0;
22267   __pyx_t_1 = 0;
22268   __pyx_v__transform_cholesky = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_2)) ) + __pyx_t_1 * __pyx_v_self->transform_cholesky.strides[1]) ))));
22269 
22270   /* "statsmodels/tsa/statespace/_representation.pyx":1681
22271  *             np.float64_t * _transform_cholesky = &self.transform_cholesky[0, 0]
22272  *
22273  *         if self.obs_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
22274  *             obs_cov_t = t
22275  *
22276  */
22277   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1681, __pyx_L1_error)}
22278   __pyx_t_3 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
22279   if (__pyx_t_3) {
22280 
22281     /* "statsmodels/tsa/statespace/_representation.pyx":1682
22282  *
22283  *         if self.obs_cov.shape[2] > 1:
22284  *             obs_cov_t = t             # <<<<<<<<<<<<<<
22285  *
22286  *         # Handle missing data
22287  */
22288     __pyx_v_obs_cov_t = __pyx_v_t;
22289 
22290     /* "statsmodels/tsa/statespace/_representation.pyx":1681
22291  *             np.float64_t * _transform_cholesky = &self.transform_cholesky[0, 0]
22292  *
22293  *         if self.obs_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
22294  *             obs_cov_t = t
22295  *
22296  */
22297   }
22298 
22299   /* "statsmodels/tsa/statespace/_representation.pyx":1685
22300  *
22301  *         # Handle missing data
22302  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
22303  *             return
22304  *         reset_missing = 0
22305  */
22306   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1685, __pyx_L1_error)}
22307   __pyx_t_4 = __pyx_v_t;
22308   __pyx_t_3 = (((*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_4 * __pyx_v_self->nmissing.strides[0]) ))) == __pyx_v_self->k_endog) != 0);
22309   if (__pyx_t_3) {
22310 
22311     /* "statsmodels/tsa/statespace/_representation.pyx":1686
22312  *         # Handle missing data
22313  *         if self.nmissing[t] == self.k_endog:
22314  *             return             # <<<<<<<<<<<<<<
22315  *         reset_missing = 0
22316  *         for i in range(self.k_endog):
22317  */
22318     goto __pyx_L0;
22319 
22320     /* "statsmodels/tsa/statespace/_representation.pyx":1685
22321  *
22322  *         # Handle missing data
22323  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
22324  *             return
22325  *         reset_missing = 0
22326  */
22327   }
22328 
22329   /* "statsmodels/tsa/statespace/_representation.pyx":1687
22330  *         if self.nmissing[t] == self.k_endog:
22331  *             return
22332  *         reset_missing = 0             # <<<<<<<<<<<<<<
22333  *         for i in range(self.k_endog):
22334  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
22335  */
22336   __pyx_v_reset_missing = 0;
22337 
22338   /* "statsmodels/tsa/statespace/_representation.pyx":1688
22339  *             return
22340  *         reset_missing = 0
22341  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
22342  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
22343  *
22344  */
22345   __pyx_t_5 = __pyx_v_self->k_endog;
22346   __pyx_t_6 = __pyx_t_5;
22347   for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
22348     __pyx_v_i = __pyx_t_7;
22349 
22350     /* "statsmodels/tsa/statespace/_representation.pyx":1689
22351  *         reset_missing = 0
22352  *         for i in range(self.k_endog):
22353  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])             # <<<<<<<<<<<<<<
22354  *
22355  *         # If the flag for a diagonal covariancem matrix is not set globally in
22356  */
22357     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1689, __pyx_L1_error)}
22358     __pyx_t_1 = __pyx_v_i;
22359     __pyx_t_4 = __pyx_v_t;
22360     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1689, __pyx_L1_error)}
22361     __pyx_t_2 = __pyx_v_i;
22362     __pyx_t_8 = __pyx_v_previous_t;
22363     __pyx_v_reset_missing = (__pyx_v_reset_missing + (!(((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_1)) ) + __pyx_t_4 * __pyx_v_self->missing.strides[1]) ))) == (*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_2)) ) + __pyx_t_8 * __pyx_v_self->missing.strides[1]) )))) != 0)));
22364   }
22365 
22366   /* "statsmodels/tsa/statespace/_representation.pyx":1693
22367  *         # If the flag for a diagonal covariancem matrix is not set globally in
22368  *         # the model one way or the other, then we need to check
22369  *         diagonal_obs_cov = self.diagonal_obs_cov             # <<<<<<<<<<<<<<
22370  *         if diagonal_obs_cov == -1:
22371  *             # We don't need to check for a diagonal covariance matrix each t,
22372  */
22373   __pyx_t_5 = __pyx_v_self->diagonal_obs_cov;
22374   __pyx_v_diagonal_obs_cov = __pyx_t_5;
22375 
22376   /* "statsmodels/tsa/statespace/_representation.pyx":1694
22377  *         # the model one way or the other, then we need to check
22378  *         diagonal_obs_cov = self.diagonal_obs_cov
22379  *         if diagonal_obs_cov == -1:             # <<<<<<<<<<<<<<
22380  *             # We don't need to check for a diagonal covariance matrix each t,
22381  *             # except in the following cases:
22382  */
22383   __pyx_t_3 = ((__pyx_v_diagonal_obs_cov == -1L) != 0);
22384   if (__pyx_t_3) {
22385 
22386     /* "statsmodels/tsa/statespace/_representation.pyx":1697
22387  *             # We don't need to check for a diagonal covariance matrix each t,
22388  *             # except in the following cases:
22389  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
22390  *                 diagonal_obs_cov = 1
22391  *                 for i in range(self.k_endog):
22392  */
22393     __pyx_t_9 = ((__pyx_v_self->_diagonal_obs_cov == -1L) != 0);
22394     if (!__pyx_t_9) {
22395     } else {
22396       __pyx_t_3 = __pyx_t_9;
22397       goto __pyx_L9_bool_binop_done;
22398     }
22399     __pyx_t_9 = ((__pyx_v_t == 0) != 0);
22400     if (!__pyx_t_9) {
22401     } else {
22402       __pyx_t_3 = __pyx_t_9;
22403       goto __pyx_L9_bool_binop_done;
22404     }
22405     if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1697, __pyx_L1_error)}
22406     __pyx_t_9 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
22407     if (!__pyx_t_9) {
22408     } else {
22409       __pyx_t_3 = __pyx_t_9;
22410       goto __pyx_L9_bool_binop_done;
22411     }
22412     __pyx_t_9 = (__pyx_v_reset_missing != 0);
22413     if (!__pyx_t_9) {
22414     } else {
22415       __pyx_t_3 = __pyx_t_9;
22416       goto __pyx_L9_bool_binop_done;
22417     }
22418     __pyx_t_9 = (__pyx_v_reset != 0);
22419     __pyx_t_3 = __pyx_t_9;
22420     __pyx_L9_bool_binop_done:;
22421     if (__pyx_t_3) {
22422 
22423       /* "statsmodels/tsa/statespace/_representation.pyx":1698
22424  *             # except in the following cases:
22425  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
22426  *                 diagonal_obs_cov = 1             # <<<<<<<<<<<<<<
22427  *                 for i in range(self.k_endog):
22428  *                     for j in range(self.k_endog):
22429  */
22430       __pyx_v_diagonal_obs_cov = 1;
22431 
22432       /* "statsmodels/tsa/statespace/_representation.pyx":1699
22433  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
22434  *                 diagonal_obs_cov = 1
22435  *                 for i in range(self.k_endog):             # <<<<<<<<<<<<<<
22436  *                     for j in range(self.k_endog):
22437  *                         if i == j:
22438  */
22439       __pyx_t_5 = __pyx_v_self->k_endog;
22440       __pyx_t_6 = __pyx_t_5;
22441       for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
22442         __pyx_v_i = __pyx_t_7;
22443 
22444         /* "statsmodels/tsa/statespace/_representation.pyx":1700
22445  *                 diagonal_obs_cov = 1
22446  *                 for i in range(self.k_endog):
22447  *                     for j in range(self.k_endog):             # <<<<<<<<<<<<<<
22448  *                         if i == j:
22449  *                             continue
22450  */
22451         __pyx_t_10 = __pyx_v_self->k_endog;
22452         __pyx_t_11 = __pyx_t_10;
22453         for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
22454           __pyx_v_j = __pyx_t_12;
22455 
22456           /* "statsmodels/tsa/statespace/_representation.pyx":1701
22457  *                 for i in range(self.k_endog):
22458  *                     for j in range(self.k_endog):
22459  *                         if i == j:             # <<<<<<<<<<<<<<
22460  *                             continue
22461  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
22462  */
22463           __pyx_t_3 = ((__pyx_v_i == __pyx_v_j) != 0);
22464           if (__pyx_t_3) {
22465 
22466             /* "statsmodels/tsa/statespace/_representation.pyx":1702
22467  *                     for j in range(self.k_endog):
22468  *                         if i == j:
22469  *                             continue             # <<<<<<<<<<<<<<
22470  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
22471  *                             diagonal_obs_cov = 0
22472  */
22473             goto __pyx_L16_continue;
22474 
22475             /* "statsmodels/tsa/statespace/_representation.pyx":1701
22476  *                 for i in range(self.k_endog):
22477  *                     for j in range(self.k_endog):
22478  *                         if i == j:             # <<<<<<<<<<<<<<
22479  *                             continue
22480  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
22481  */
22482           }
22483 
22484           /* "statsmodels/tsa/statespace/_representation.pyx":1703
22485  *                         if i == j:
22486  *                             continue
22487  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):             # <<<<<<<<<<<<<<
22488  *                             diagonal_obs_cov = 0
22489  *                             break
22490  */
22491           if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1703, __pyx_L1_error)}
22492           __pyx_t_2 = __pyx_v_i;
22493           __pyx_t_1 = __pyx_v_j;
22494           __pyx_t_13 = __pyx_v_obs_cov_t;
22495           __pyx_t_3 = ((!((fabs((*((__pyx_t_5numpy_float64_t *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->obs_cov.data) + __pyx_t_2)) ) + __pyx_t_1 * __pyx_v_self->obs_cov.strides[1]) ) + __pyx_t_13 * __pyx_v_self->obs_cov.strides[2]) )))) < 1e-9) != 0)) != 0);
22496           if (__pyx_t_3) {
22497 
22498             /* "statsmodels/tsa/statespace/_representation.pyx":1704
22499  *                             continue
22500  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
22501  *                             diagonal_obs_cov = 0             # <<<<<<<<<<<<<<
22502  *                             break
22503  *             # Otherwise, we use whatever value was produced last period
22504  */
22505             __pyx_v_diagonal_obs_cov = 0;
22506 
22507             /* "statsmodels/tsa/statespace/_representation.pyx":1705
22508  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
22509  *                             diagonal_obs_cov = 0
22510  *                             break             # <<<<<<<<<<<<<<
22511  *             # Otherwise, we use whatever value was produced last period
22512  *             else:
22513  */
22514             goto __pyx_L17_break;
22515 
22516             /* "statsmodels/tsa/statespace/_representation.pyx":1703
22517  *                         if i == j:
22518  *                             continue
22519  *                         if not (dabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):             # <<<<<<<<<<<<<<
22520  *                             diagonal_obs_cov = 0
22521  *                             break
22522  */
22523           }
22524           __pyx_L16_continue:;
22525         }
22526         __pyx_L17_break:;
22527       }
22528 
22529       /* "statsmodels/tsa/statespace/_representation.pyx":1697
22530  *             # We don't need to check for a diagonal covariance matrix each t,
22531  *             # except in the following cases:
22532  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
22533  *                 diagonal_obs_cov = 1
22534  *                 for i in range(self.k_endog):
22535  */
22536       goto __pyx_L8;
22537     }
22538 
22539     /* "statsmodels/tsa/statespace/_representation.pyx":1708
22540  *             # Otherwise, we use whatever value was produced last period
22541  *             else:
22542  *                 diagonal_obs_cov = self._diagonal_obs_cov             # <<<<<<<<<<<<<<
22543  *         self._diagonal_obs_cov = diagonal_obs_cov
22544  *         if diagonal_obs_cov == 1:
22545  */
22546     /*else*/ {
22547       __pyx_t_5 = __pyx_v_self->_diagonal_obs_cov;
22548       __pyx_v_diagonal_obs_cov = __pyx_t_5;
22549     }
22550     __pyx_L8:;
22551 
22552     /* "statsmodels/tsa/statespace/_representation.pyx":1694
22553  *         # the model one way or the other, then we need to check
22554  *         diagonal_obs_cov = self.diagonal_obs_cov
22555  *         if diagonal_obs_cov == -1:             # <<<<<<<<<<<<<<
22556  *             # We don't need to check for a diagonal covariance matrix each t,
22557  *             # except in the following cases:
22558  */
22559   }
22560 
22561   /* "statsmodels/tsa/statespace/_representation.pyx":1709
22562  *             else:
22563  *                 diagonal_obs_cov = self._diagonal_obs_cov
22564  *         self._diagonal_obs_cov = diagonal_obs_cov             # <<<<<<<<<<<<<<
22565  *         if diagonal_obs_cov == 1:
22566  *             return
22567  */
22568   __pyx_v_self->_diagonal_obs_cov = __pyx_v_diagonal_obs_cov;
22569 
22570   /* "statsmodels/tsa/statespace/_representation.pyx":1710
22571  *                 diagonal_obs_cov = self._diagonal_obs_cov
22572  *         self._diagonal_obs_cov = diagonal_obs_cov
22573  *         if diagonal_obs_cov == 1:             # <<<<<<<<<<<<<<
22574  *             return
22575  *
22576  */
22577   __pyx_t_3 = ((__pyx_v_diagonal_obs_cov == 1) != 0);
22578   if (__pyx_t_3) {
22579 
22580     /* "statsmodels/tsa/statespace/_representation.pyx":1711
22581  *         self._diagonal_obs_cov = diagonal_obs_cov
22582  *         if diagonal_obs_cov == 1:
22583  *             return             # <<<<<<<<<<<<<<
22584  *
22585  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
22586  */
22587     goto __pyx_L0;
22588 
22589     /* "statsmodels/tsa/statespace/_representation.pyx":1710
22590  *                 diagonal_obs_cov = self._diagonal_obs_cov
22591  *         self._diagonal_obs_cov = diagonal_obs_cov
22592  *         if diagonal_obs_cov == 1:             # <<<<<<<<<<<<<<
22593  *             return
22594  *
22595  */
22596   }
22597 
22598   /* "statsmodels/tsa/statespace/_representation.pyx":1715
22599  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
22600  *         # decomposition of *self._obs_cov
22601  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
22602  *             # LDL decomposition
22603  *             blas.dcopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
22604  */
22605   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
22606   if (!__pyx_t_9) {
22607   } else {
22608     __pyx_t_3 = __pyx_t_9;
22609     goto __pyx_L22_bool_binop_done;
22610   }
22611   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1715, __pyx_L1_error)}
22612   __pyx_t_9 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
22613   if (!__pyx_t_9) {
22614   } else {
22615     __pyx_t_3 = __pyx_t_9;
22616     goto __pyx_L22_bool_binop_done;
22617   }
22618   __pyx_t_9 = (__pyx_v_reset_missing != 0);
22619   if (!__pyx_t_9) {
22620   } else {
22621     __pyx_t_3 = __pyx_t_9;
22622     goto __pyx_L22_bool_binop_done;
22623   }
22624   __pyx_t_9 = (__pyx_v_reset != 0);
22625   __pyx_t_3 = __pyx_t_9;
22626   __pyx_L22_bool_binop_done:;
22627   if (__pyx_t_3) {
22628 
22629     /* "statsmodels/tsa/statespace/_representation.pyx":1717
22630  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
22631  *             # LDL decomposition
22632  *             blas.dcopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)             # <<<<<<<<<<<<<<
22633  *             info = tools._dldl(_transform_cholesky, self._k_endog)
22634  *
22635  */
22636     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->_k_endog2), __pyx_v_self->_obs_cov, (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_inc));
22637 
22638     /* "statsmodels/tsa/statespace/_representation.pyx":1718
22639  *             # LDL decomposition
22640  *             blas.dcopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
22641  *             info = tools._dldl(_transform_cholesky, self._k_endog)             # <<<<<<<<<<<<<<
22642  *
22643  *             # Check for errors
22644  */
22645     __pyx_t_5 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools__dldl(__pyx_v__transform_cholesky, __pyx_v_self->_k_endog); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1718, __pyx_L1_error)
22646     __pyx_v_info = __pyx_t_5;
22647 
22648     /* "statsmodels/tsa/statespace/_representation.pyx":1721
22649  *
22650  *             # Check for errors
22651  *             if info > 0:             # <<<<<<<<<<<<<<
22652  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
22653  *             elif info < 0:
22654  */
22655     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
22656     if (__pyx_t_3) {
22657 
22658       /* "statsmodels/tsa/statespace/_representation.pyx":1722
22659  *             # Check for errors
22660  *             if info > 0:
22661  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)             # <<<<<<<<<<<<<<
22662  *             elif info < 0:
22663  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
22664  */
22665       __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_warnings); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1722, __pyx_L1_error)
22666       __Pyx_GOTREF(__pyx_t_15);
22667       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_warn); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1722, __pyx_L1_error)
22668       __Pyx_GOTREF(__pyx_t_16);
22669       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22670       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1722, __pyx_L1_error)
22671       __Pyx_GOTREF(__pyx_t_15);
22672       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Positive_semi_definite_observati, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1722, __pyx_L1_error)
22673       __Pyx_GOTREF(__pyx_t_17);
22674       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22675       __pyx_t_15 = NULL;
22676       if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
22677         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
22678         if (likely(__pyx_t_15)) {
22679           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
22680           __Pyx_INCREF(__pyx_t_15);
22681           __Pyx_INCREF(function);
22682           __Pyx_DECREF_SET(__pyx_t_16, function);
22683         }
22684       }
22685       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
22686       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
22687       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
22688       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1722, __pyx_L1_error)
22689       __Pyx_GOTREF(__pyx_t_14);
22690       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22691       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
22692 
22693       /* "statsmodels/tsa/statespace/_representation.pyx":1721
22694  *
22695  *             # Check for errors
22696  *             if info > 0:             # <<<<<<<<<<<<<<
22697  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
22698  *             elif info < 0:
22699  */
22700       goto __pyx_L26;
22701     }
22702 
22703     /* "statsmodels/tsa/statespace/_representation.pyx":1723
22704  *             if info > 0:
22705  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
22706  *             elif info < 0:             # <<<<<<<<<<<<<<
22707  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
22708  *
22709  */
22710     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
22711     if (unlikely(__pyx_t_3)) {
22712 
22713       /* "statsmodels/tsa/statespace/_representation.pyx":1724
22714  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
22715  *             elif info < 0:
22716  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
22717  *
22718  *             # Currently both L and D are stored in transform_cholesky
22719  */
22720       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1724, __pyx_L1_error)
22721       __Pyx_GOTREF(__pyx_t_16);
22722       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1724, __pyx_L1_error)
22723       __Pyx_GOTREF(__pyx_t_17);
22724       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22725       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1724, __pyx_L1_error)
22726       __Pyx_GOTREF(__pyx_t_16);
22727       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
22728       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1724, __pyx_L1_error)
22729       __Pyx_GOTREF(__pyx_t_17);
22730       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_LDL_factorizati, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1724, __pyx_L1_error)
22731       __Pyx_GOTREF(__pyx_t_15);
22732       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
22733       __pyx_t_17 = NULL;
22734       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
22735         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
22736         if (likely(__pyx_t_17)) {
22737           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
22738           __Pyx_INCREF(__pyx_t_17);
22739           __Pyx_INCREF(function);
22740           __Pyx_DECREF_SET(__pyx_t_16, function);
22741         }
22742       }
22743       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
22744       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
22745       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22746       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1724, __pyx_L1_error)
22747       __Pyx_GOTREF(__pyx_t_14);
22748       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22749       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
22750       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
22751       __PYX_ERR(0, 1724, __pyx_L1_error)
22752 
22753       /* "statsmodels/tsa/statespace/_representation.pyx":1723
22754  *             if info > 0:
22755  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
22756  *             elif info < 0:             # <<<<<<<<<<<<<<
22757  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
22758  *
22759  */
22760     }
22761     __pyx_L26:;
22762 
22763     /* "statsmodels/tsa/statespace/_representation.pyx":1727
22764  *
22765  *             # Currently both L and D are stored in transform_cholesky
22766  *             for i in range(self._k_endog): # i is rows             # <<<<<<<<<<<<<<
22767  *                 for j in range(self._k_endog): # j is columns
22768  *                     # Diagonal elements come from the diagonal
22769  */
22770     __pyx_t_5 = __pyx_v_self->_k_endog;
22771     __pyx_t_6 = __pyx_t_5;
22772     for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
22773       __pyx_v_i = __pyx_t_7;
22774 
22775       /* "statsmodels/tsa/statespace/_representation.pyx":1728
22776  *             # Currently both L and D are stored in transform_cholesky
22777  *             for i in range(self._k_endog): # i is rows
22778  *                 for j in range(self._k_endog): # j is columns             # <<<<<<<<<<<<<<
22779  *                     # Diagonal elements come from the diagonal
22780  *                     if i == j:
22781  */
22782       __pyx_t_10 = __pyx_v_self->_k_endog;
22783       __pyx_t_11 = __pyx_t_10;
22784       for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
22785         __pyx_v_j = __pyx_t_12;
22786 
22787         /* "statsmodels/tsa/statespace/_representation.pyx":1730
22788  *                 for j in range(self._k_endog): # j is columns
22789  *                     # Diagonal elements come from the diagonal
22790  *                     if i == j:             # <<<<<<<<<<<<<<
22791  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]
22792  *                     # Other elements are zero
22793  */
22794         __pyx_t_3 = ((__pyx_v_i == __pyx_v_j) != 0);
22795         if (__pyx_t_3) {
22796 
22797           /* "statsmodels/tsa/statespace/_representation.pyx":1731
22798  *                     # Diagonal elements come from the diagonal
22799  *                     if i == j:
22800  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]             # <<<<<<<<<<<<<<
22801  *                     # Other elements are zero
22802  *                     else:
22803  */
22804           (__pyx_v__transform_obs_cov[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]) = (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]);
22805 
22806           /* "statsmodels/tsa/statespace/_representation.pyx":1730
22807  *                 for j in range(self._k_endog): # j is columns
22808  *                     # Diagonal elements come from the diagonal
22809  *                     if i == j:             # <<<<<<<<<<<<<<
22810  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]
22811  *                     # Other elements are zero
22812  */
22813           goto __pyx_L31;
22814         }
22815 
22816         /* "statsmodels/tsa/statespace/_representation.pyx":1734
22817  *                     # Other elements are zero
22818  *                     else:
22819  *                         _transform_obs_cov[i + j * self._k_endog] = 0             # <<<<<<<<<<<<<<
22820  *
22821  *                     # Zero out the upper triangle of the cholesky
22822  */
22823         /*else*/ {
22824           (__pyx_v__transform_obs_cov[(__pyx_v_i + (__pyx_v_j * __pyx_v_self->_k_endog))]) = 0.0;
22825         }
22826         __pyx_L31:;
22827 
22828         /* "statsmodels/tsa/statespace/_representation.pyx":1737
22829  *
22830  *                     # Zero out the upper triangle of the cholesky
22831  *                     if j > i:             # <<<<<<<<<<<<<<
22832  *                         _transform_cholesky[i + j * self._k_endog] = 0
22833  *
22834  */
22835         __pyx_t_3 = ((__pyx_v_j > __pyx_v_i) != 0);
22836         if (__pyx_t_3) {
22837 
22838           /* "statsmodels/tsa/statespace/_representation.pyx":1738
22839  *                     # Zero out the upper triangle of the cholesky
22840  *                     if j > i:
22841  *                         _transform_cholesky[i + j * self._k_endog] = 0             # <<<<<<<<<<<<<<
22842  *
22843  *                 # Convert from L to C simply by setting the diagonal elements to ones
22844  */
22845           (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_j * __pyx_v_self->_k_endog))]) = 0.0;
22846 
22847           /* "statsmodels/tsa/statespace/_representation.pyx":1737
22848  *
22849  *                     # Zero out the upper triangle of the cholesky
22850  *                     if j > i:             # <<<<<<<<<<<<<<
22851  *                         _transform_cholesky[i + j * self._k_endog] = 0
22852  *
22853  */
22854         }
22855       }
22856 
22857       /* "statsmodels/tsa/statespace/_representation.pyx":1741
22858  *
22859  *                 # Convert from L to C simply by setting the diagonal elements to ones
22860  *                 _transform_cholesky[i + i * self._k_endog] = 1             # <<<<<<<<<<<<<<
22861  *
22862  *         # Solve for y_t^*
22863  */
22864       (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]) = 1.0;
22865     }
22866 
22867     /* "statsmodels/tsa/statespace/_representation.pyx":1715
22868  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
22869  *         # decomposition of *self._obs_cov
22870  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
22871  *             # LDL decomposition
22872  *             blas.dcopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
22873  */
22874   }
22875 
22876   /* "statsmodels/tsa/statespace/_representation.pyx":1746
22877  *         # (unless this is a completely missing observation)
22878  *         # TODO: note that this can cause problems if this function is run twice
22879  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
22880  *             # If we have some missing elements, selected_obs is already populated
22881  *             if self._nmissing == 0:
22882  */
22883   __pyx_t_3 = ((!((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0)) != 0);
22884   if (__pyx_t_3) {
22885 
22886     /* "statsmodels/tsa/statespace/_representation.pyx":1748
22887  *         if not self._nmissing == self.k_endog:
22888  *             # If we have some missing elements, selected_obs is already populated
22889  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
22890  *                 blas.dcopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
22891  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,
22892  */
22893     __pyx_t_3 = ((__pyx_v_self->_nmissing == 0) != 0);
22894     if (__pyx_t_3) {
22895 
22896       /* "statsmodels/tsa/statespace/_representation.pyx":1749
22897  *             # If we have some missing elements, selected_obs is already populated
22898  *             if self._nmissing == 0:
22899  *                 blas.dcopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
22900  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,
22901  *                         _transform_cholesky, &self.k_endog,
22902  */
22903       if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1749, __pyx_L1_error)}
22904       __pyx_t_13 = 0;
22905       __pyx_t_8 = __pyx_v_t;
22906       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1749, __pyx_L1_error)}
22907       __pyx_t_1 = 0;
22908       __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->obs.data) + __pyx_t_13)) ) + __pyx_t_8 * __pyx_v_self->obs.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
22909 
22910       /* "statsmodels/tsa/statespace/_representation.pyx":1748
22911  *         if not self._nmissing == self.k_endog:
22912  *             # If we have some missing elements, selected_obs is already populated
22913  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
22914  *                 blas.dcopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
22915  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,
22916  */
22917     }
22918 
22919     /* "statsmodels/tsa/statespace/_representation.pyx":1752
22920  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,
22921  *                         _transform_cholesky, &self.k_endog,
22922  *                         &self.selected_obs[0], &self._k_endog, &info)             # <<<<<<<<<<<<<<
22923  *
22924  *             # Check for errors
22925  */
22926     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1752, __pyx_L1_error)}
22927     __pyx_t_1 = 0;
22928 
22929     /* "statsmodels/tsa/statespace/_representation.pyx":1750
22930  *             if self._nmissing == 0:
22931  *                 blas.dcopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
22932  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
22933  *                         _transform_cholesky, &self.k_endog,
22934  *                         &self.selected_obs[0], &self._k_endog, &info)
22935  */
22936     __pyx_f_5scipy_6linalg_13cython_lapack_dtrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
22937 
22938     /* "statsmodels/tsa/statespace/_representation.pyx":1755
22939  *
22940  *             # Check for errors
22941  *             if info > 0:             # <<<<<<<<<<<<<<
22942  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
22943  *             elif info < 0:
22944  */
22945     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
22946     if (unlikely(__pyx_t_3)) {
22947 
22948       /* "statsmodels/tsa/statespace/_representation.pyx":1756
22949  *             # Check for errors
22950  *             if info > 0:
22951  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
22952  *             elif info < 0:
22953  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
22954  */
22955       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1756, __pyx_L1_error)
22956       __Pyx_GOTREF(__pyx_t_16);
22957       __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1756, __pyx_L1_error)
22958       __Pyx_GOTREF(__pyx_t_15);
22959       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22960       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1756, __pyx_L1_error)
22961       __Pyx_GOTREF(__pyx_t_16);
22962       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22963       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1756, __pyx_L1_error)
22964       __Pyx_GOTREF(__pyx_t_15);
22965       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Singular_factorization_of_observ, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1756, __pyx_L1_error)
22966       __Pyx_GOTREF(__pyx_t_17);
22967       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
22968       __pyx_t_15 = NULL;
22969       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
22970         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
22971         if (likely(__pyx_t_15)) {
22972           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
22973           __Pyx_INCREF(__pyx_t_15);
22974           __Pyx_INCREF(function);
22975           __Pyx_DECREF_SET(__pyx_t_16, function);
22976         }
22977       }
22978       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
22979       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
22980       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
22981       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1756, __pyx_L1_error)
22982       __Pyx_GOTREF(__pyx_t_14);
22983       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
22984       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
22985       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
22986       __PYX_ERR(0, 1756, __pyx_L1_error)
22987 
22988       /* "statsmodels/tsa/statespace/_representation.pyx":1755
22989  *
22990  *             # Check for errors
22991  *             if info > 0:             # <<<<<<<<<<<<<<
22992  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
22993  *             elif info < 0:
22994  */
22995     }
22996 
22997     /* "statsmodels/tsa/statespace/_representation.pyx":1757
22998  *             if info > 0:
22999  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
23000  *             elif info < 0:             # <<<<<<<<<<<<<<
23001  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
23002  *
23003  */
23004     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
23005     if (unlikely(__pyx_t_3)) {
23006 
23007       /* "statsmodels/tsa/statespace/_representation.pyx":1758
23008  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
23009  *             elif info < 0:
23010  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
23011  *
23012  *             # Setup the pointer
23013  */
23014       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1758, __pyx_L1_error)
23015       __Pyx_GOTREF(__pyx_t_16);
23016       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1758, __pyx_L1_error)
23017       __Pyx_GOTREF(__pyx_t_17);
23018       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23019       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1758, __pyx_L1_error)
23020       __Pyx_GOTREF(__pyx_t_16);
23021       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23022       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1758, __pyx_L1_error)
23023       __Pyx_GOTREF(__pyx_t_17);
23024       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1758, __pyx_L1_error)
23025       __Pyx_GOTREF(__pyx_t_15);
23026       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23027       __pyx_t_17 = NULL;
23028       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
23029         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
23030         if (likely(__pyx_t_17)) {
23031           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
23032           __Pyx_INCREF(__pyx_t_17);
23033           __Pyx_INCREF(function);
23034           __Pyx_DECREF_SET(__pyx_t_16, function);
23035         }
23036       }
23037       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
23038       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
23039       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23040       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1758, __pyx_L1_error)
23041       __Pyx_GOTREF(__pyx_t_14);
23042       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23043       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
23044       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23045       __PYX_ERR(0, 1758, __pyx_L1_error)
23046 
23047       /* "statsmodels/tsa/statespace/_representation.pyx":1757
23048  *             if info > 0:
23049  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
23050  *             elif info < 0:             # <<<<<<<<<<<<<<
23051  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
23052  *
23053  */
23054     }
23055 
23056     /* "statsmodels/tsa/statespace/_representation.pyx":1761
23057  *
23058  *             # Setup the pointer
23059  *             self._obs = &self.selected_obs[0]             # <<<<<<<<<<<<<<
23060  *
23061  *         # Solve for d_t^*, if necessary
23062  */
23063     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1761, __pyx_L1_error)}
23064     __pyx_t_1 = 0;
23065     __pyx_v_self->_obs = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) ))));
23066 
23067     /* "statsmodels/tsa/statespace/_representation.pyx":1746
23068  *         # (unless this is a completely missing observation)
23069  *         # TODO: note that this can cause problems if this function is run twice
23070  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
23071  *             # If we have some missing elements, selected_obs is already populated
23072  *             if self._nmissing == 0:
23073  */
23074   }
23075 
23076   /* "statsmodels/tsa/statespace/_representation.pyx":1764
23077  *
23078  *         # Solve for d_t^*, if necessary
23079  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
23080  *             blas.dcopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
23081  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,
23082  */
23083   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
23084   if (!__pyx_t_9) {
23085   } else {
23086     __pyx_t_3 = __pyx_t_9;
23087     goto __pyx_L37_bool_binop_done;
23088   }
23089   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1764, __pyx_L1_error)}
23090   __pyx_t_9 = (((__pyx_v_self->obs_intercept.shape[1]) > 1) != 0);
23091   if (!__pyx_t_9) {
23092   } else {
23093     __pyx_t_3 = __pyx_t_9;
23094     goto __pyx_L37_bool_binop_done;
23095   }
23096   __pyx_t_9 = (__pyx_v_reset_missing != 0);
23097   if (!__pyx_t_9) {
23098   } else {
23099     __pyx_t_3 = __pyx_t_9;
23100     goto __pyx_L37_bool_binop_done;
23101   }
23102   __pyx_t_9 = (__pyx_v_reset != 0);
23103   __pyx_t_3 = __pyx_t_9;
23104   __pyx_L37_bool_binop_done:;
23105   if (__pyx_t_3) {
23106 
23107     /* "statsmodels/tsa/statespace/_representation.pyx":1765
23108  *         # Solve for d_t^*, if necessary
23109  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:
23110  *             blas.dcopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)             # <<<<<<<<<<<<<<
23111  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,
23112  *                         _transform_cholesky, &self.k_endog,
23113  */
23114     if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1765, __pyx_L1_error)}
23115     __pyx_t_1 = 0;
23116     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->_k_endog), __pyx_v_self->_obs_intercept, (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) )))), (&__pyx_v_inc));
23117 
23118     /* "statsmodels/tsa/statespace/_representation.pyx":1768
23119  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,
23120  *                         _transform_cholesky, &self.k_endog,
23121  *                         &self.transform_obs_intercept[0], &self._k_endog,             # <<<<<<<<<<<<<<
23122  *                         &info)
23123  *
23124  */
23125     if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1768, __pyx_L1_error)}
23126     __pyx_t_1 = 0;
23127 
23128     /* "statsmodels/tsa/statespace/_representation.pyx":1766
23129  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:
23130  *             blas.dcopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
23131  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
23132  *                         _transform_cholesky, &self.k_endog,
23133  *                         &self.transform_obs_intercept[0], &self._k_endog,
23134  */
23135     __pyx_f_5scipy_6linalg_13cython_lapack_dtrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
23136 
23137     /* "statsmodels/tsa/statespace/_representation.pyx":1764
23138  *
23139  *         # Solve for d_t^*, if necessary
23140  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
23141  *             blas.dcopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
23142  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &inc,
23143  */
23144   }
23145 
23146   /* "statsmodels/tsa/statespace/_representation.pyx":1772
23147  *
23148  *         # Solve for Z_t^*, if necessary
23149  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
23150  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
23151  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &self._k_states,
23152  */
23153   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
23154   if (!__pyx_t_9) {
23155   } else {
23156     __pyx_t_3 = __pyx_t_9;
23157     goto __pyx_L42_bool_binop_done;
23158   }
23159   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1772, __pyx_L1_error)}
23160   __pyx_t_9 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
23161   if (!__pyx_t_9) {
23162   } else {
23163     __pyx_t_3 = __pyx_t_9;
23164     goto __pyx_L42_bool_binop_done;
23165   }
23166   __pyx_t_9 = (__pyx_v_reset_missing != 0);
23167   if (!__pyx_t_9) {
23168   } else {
23169     __pyx_t_3 = __pyx_t_9;
23170     goto __pyx_L42_bool_binop_done;
23171   }
23172   __pyx_t_9 = (__pyx_v_reset != 0);
23173   __pyx_t_3 = __pyx_t_9;
23174   __pyx_L42_bool_binop_done:;
23175   if (__pyx_t_3) {
23176 
23177     /* "statsmodels/tsa/statespace/_representation.pyx":1773
23178  *         # Solve for Z_t^*, if necessary
23179  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:
23180  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)             # <<<<<<<<<<<<<<
23181  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &self._k_states,
23182  *                         _transform_cholesky, &self.k_endog,
23183  */
23184     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1773, __pyx_L1_error)}
23185     __pyx_t_1 = 0;
23186     __pyx_t_13 = 0;
23187     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->_k_endogstates), __pyx_v_self->_design, (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_design.data) + __pyx_t_1)) ) + __pyx_t_13 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_inc));
23188 
23189     /* "statsmodels/tsa/statespace/_representation.pyx":1776
23190  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &self._k_states,
23191  *                         _transform_cholesky, &self.k_endog,
23192  *                         &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
23193  *                         &info)
23194  *
23195  */
23196     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1776, __pyx_L1_error)}
23197     __pyx_t_13 = 0;
23198     __pyx_t_1 = 0;
23199 
23200     /* "statsmodels/tsa/statespace/_representation.pyx":1774
23201  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:
23202  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
23203  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &self._k_states,             # <<<<<<<<<<<<<<
23204  *                         _transform_cholesky, &self.k_endog,
23205  *                         &self.transform_design[0,0], &self._k_endog,
23206  */
23207     __pyx_f_5scipy_6linalg_13cython_lapack_dtrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_self->_k_states), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_design.data) + __pyx_t_13)) ) + __pyx_t_1 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
23208 
23209     /* "statsmodels/tsa/statespace/_representation.pyx":1780
23210  *
23211  *             # Check for errors
23212  *             if info > 0:             # <<<<<<<<<<<<<<
23213  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
23214  *             elif info < 0:
23215  */
23216     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
23217     if (unlikely(__pyx_t_3)) {
23218 
23219       /* "statsmodels/tsa/statespace/_representation.pyx":1781
23220  *             # Check for errors
23221  *             if info > 0:
23222  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
23223  *             elif info < 0:
23224  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
23225  */
23226       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1781, __pyx_L1_error)
23227       __Pyx_GOTREF(__pyx_t_16);
23228       __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1781, __pyx_L1_error)
23229       __Pyx_GOTREF(__pyx_t_15);
23230       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23231       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1781, __pyx_L1_error)
23232       __Pyx_GOTREF(__pyx_t_16);
23233       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23234       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1781, __pyx_L1_error)
23235       __Pyx_GOTREF(__pyx_t_15);
23236       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Singular_factorization_of_observ, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1781, __pyx_L1_error)
23237       __Pyx_GOTREF(__pyx_t_17);
23238       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23239       __pyx_t_15 = NULL;
23240       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
23241         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
23242         if (likely(__pyx_t_15)) {
23243           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
23244           __Pyx_INCREF(__pyx_t_15);
23245           __Pyx_INCREF(function);
23246           __Pyx_DECREF_SET(__pyx_t_16, function);
23247         }
23248       }
23249       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
23250       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
23251       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23252       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1781, __pyx_L1_error)
23253       __Pyx_GOTREF(__pyx_t_14);
23254       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23255       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
23256       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23257       __PYX_ERR(0, 1781, __pyx_L1_error)
23258 
23259       /* "statsmodels/tsa/statespace/_representation.pyx":1780
23260  *
23261  *             # Check for errors
23262  *             if info > 0:             # <<<<<<<<<<<<<<
23263  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
23264  *             elif info < 0:
23265  */
23266     }
23267 
23268     /* "statsmodels/tsa/statespace/_representation.pyx":1782
23269  *             if info > 0:
23270  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
23271  *             elif info < 0:             # <<<<<<<<<<<<<<
23272  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
23273  *
23274  */
23275     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
23276     if (unlikely(__pyx_t_3)) {
23277 
23278       /* "statsmodels/tsa/statespace/_representation.pyx":1783
23279  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
23280  *             elif info < 0:
23281  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
23282  *
23283  *         # Setup final pointers
23284  */
23285       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1783, __pyx_L1_error)
23286       __Pyx_GOTREF(__pyx_t_16);
23287       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1783, __pyx_L1_error)
23288       __Pyx_GOTREF(__pyx_t_17);
23289       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23290       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1783, __pyx_L1_error)
23291       __Pyx_GOTREF(__pyx_t_16);
23292       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23293       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1783, __pyx_L1_error)
23294       __Pyx_GOTREF(__pyx_t_17);
23295       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1783, __pyx_L1_error)
23296       __Pyx_GOTREF(__pyx_t_15);
23297       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
23298       __pyx_t_17 = NULL;
23299       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
23300         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
23301         if (likely(__pyx_t_17)) {
23302           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
23303           __Pyx_INCREF(__pyx_t_17);
23304           __Pyx_INCREF(function);
23305           __Pyx_DECREF_SET(__pyx_t_16, function);
23306         }
23307       }
23308       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
23309       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
23310       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
23311       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1783, __pyx_L1_error)
23312       __Pyx_GOTREF(__pyx_t_14);
23313       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
23314       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
23315       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
23316       __PYX_ERR(0, 1783, __pyx_L1_error)
23317 
23318       /* "statsmodels/tsa/statespace/_representation.pyx":1782
23319  *             if info > 0:
23320  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
23321  *             elif info < 0:             # <<<<<<<<<<<<<<
23322  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
23323  *
23324  */
23325     }
23326 
23327     /* "statsmodels/tsa/statespace/_representation.pyx":1772
23328  *
23329  *         # Solve for Z_t^*, if necessary
23330  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
23331  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
23332  *             lapack.dtrtrs("L", "N", "U", &self._k_endog, &self._k_states,
23333  */
23334   }
23335 
23336   /* "statsmodels/tsa/statespace/_representation.pyx":1786
23337  *
23338  *         # Setup final pointers
23339  *         self._design = &self.transform_design[0,0]             # <<<<<<<<<<<<<<
23340  *         self._obs_cov = &self.transform_obs_cov[0,0]
23341  *         self._obs_intercept = &self.transform_obs_intercept[0]
23342  */
23343   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1786, __pyx_L1_error)}
23344   __pyx_t_1 = 0;
23345   __pyx_t_13 = 0;
23346   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_design.data) + __pyx_t_1)) ) + __pyx_t_13 * __pyx_v_self->transform_design.strides[1]) ))));
23347 
23348   /* "statsmodels/tsa/statespace/_representation.pyx":1787
23349  *         # Setup final pointers
23350  *         self._design = &self.transform_design[0,0]
23351  *         self._obs_cov = &self.transform_obs_cov[0,0]             # <<<<<<<<<<<<<<
23352  *         self._obs_intercept = &self.transform_obs_intercept[0]
23353  *
23354  */
23355   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1787, __pyx_L1_error)}
23356   __pyx_t_13 = 0;
23357   __pyx_t_1 = 0;
23358   __pyx_v_self->_obs_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_obs_cov.data) + __pyx_t_13)) ) + __pyx_t_1 * __pyx_v_self->transform_obs_cov.strides[1]) ))));
23359 
23360   /* "statsmodels/tsa/statespace/_representation.pyx":1788
23361  *         self._design = &self.transform_design[0,0]
23362  *         self._obs_cov = &self.transform_obs_cov[0,0]
23363  *         self._obs_intercept = &self.transform_obs_intercept[0]             # <<<<<<<<<<<<<<
23364  *
23365  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:
23366  */
23367   if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1788, __pyx_L1_error)}
23368   __pyx_t_1 = 0;
23369   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) ))));
23370 
23371   /* "statsmodels/tsa/statespace/_representation.pyx":1667
23372  *             self.transform_diagonalize(t, previous_t, reset)
23373  *
23374  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
23375  *         # Note: this assumes that initialize_object_pointers has *already* been done
23376  *         # Note: this assumes that select_missing has *already* been done
23377  */
23378 
23379   /* function exit code */
23380   goto __pyx_L0;
23381   __pyx_L1_error:;
23382   __Pyx_XDECREF(__pyx_t_14);
23383   __Pyx_XDECREF(__pyx_t_15);
23384   __Pyx_XDECREF(__pyx_t_16);
23385   __Pyx_XDECREF(__pyx_t_17);
23386   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transform_diagonalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
23387   __pyx_L0:;
23388   __Pyx_RefNannyFinishContext();
23389 }
23390 
23391 /* "statsmodels/tsa/statespace/_representation.pyx":1790
23392  *         self._obs_intercept = &self.transform_obs_intercept[0]
23393  *
23394  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:             # <<<<<<<<<<<<<<
23395  *         # Note: this assumes that initialize_object_pointers has *already* been done
23396  *         # Note: this assumes that select_missing has *already* been done
23397  */
23398 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse * __pyx_optional_args)23399 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse *__pyx_optional_args) {
23400   unsigned int __pyx_v_reset = ((unsigned int)1);
23401   int __pyx_v_i;
23402   int __pyx_v_j;
23403   int __pyx_v_k;
23404   int __pyx_v_l;
23405   int __pyx_v_inc;
23406   int __pyx_v_info;
23407   int __pyx_v_reset_missing;
23408   __pyx_t_5numpy_float64_t __pyx_v_alpha;
23409   __pyx_t_5numpy_float64_t __pyx_v_beta;
23410   __pyx_t_5numpy_float64_t __pyx_v_gamma;
23411   int __pyx_v_k_states;
23412   CYTHON_UNUSED int __pyx_v_k_states2;
23413   CYTHON_UNUSED int __pyx_v_k_endogstates;
23414   int __pyx_r;
23415   __Pyx_RefNannyDeclarations
23416   int __pyx_t_1;
23417   int __pyx_t_2;
23418   PyObject *__pyx_t_3 = NULL;
23419   size_t __pyx_t_4;
23420   int __pyx_t_5;
23421   int __pyx_t_6;
23422   Py_ssize_t __pyx_t_7;
23423   Py_ssize_t __pyx_t_8;
23424   size_t __pyx_t_9;
23425   PyObject *__pyx_t_10 = NULL;
23426   PyObject *__pyx_t_11 = NULL;
23427   PyObject *__pyx_t_12 = NULL;
23428   int __pyx_t_13;
23429   int __pyx_t_14;
23430   Py_ssize_t __pyx_t_15;
23431   Py_ssize_t __pyx_t_16;
23432   int __pyx_lineno = 0;
23433   const char *__pyx_filename = NULL;
23434   int __pyx_clineno = 0;
23435   __Pyx_RefNannySetupContext("transform_generalized_collapse", 0);
23436   if (__pyx_optional_args) {
23437     if (__pyx_optional_args->__pyx_n > 0) {
23438       __pyx_v_reset = __pyx_optional_args->reset;
23439     }
23440   }
23441 
23442   /* "statsmodels/tsa/statespace/_representation.pyx":1795
23443  *         # TODO need unit tests, especially for the missing case
23444  *         cdef:
23445  *             int i, j, k, l, inc=1             # <<<<<<<<<<<<<<
23446  *             int obs_cov_t, design_t
23447  *             int info
23448  */
23449   __pyx_v_inc = 1;
23450 
23451   /* "statsmodels/tsa/statespace/_representation.pyx":1799
23452  *             int info
23453  *             int reset_missing
23454  *             np.float64_t alpha = 1.0             # <<<<<<<<<<<<<<
23455  *             np.float64_t beta = 0.0
23456  *             np.float64_t gamma = -1.0
23457  */
23458   __pyx_v_alpha = 1.0;
23459 
23460   /* "statsmodels/tsa/statespace/_representation.pyx":1800
23461  *             int reset_missing
23462  *             np.float64_t alpha = 1.0
23463  *             np.float64_t beta = 0.0             # <<<<<<<<<<<<<<
23464  *             np.float64_t gamma = -1.0
23465  *             int k_states = self._k_states
23466  */
23467   __pyx_v_beta = 0.0;
23468 
23469   /* "statsmodels/tsa/statespace/_representation.pyx":1801
23470  *             np.float64_t alpha = 1.0
23471  *             np.float64_t beta = 0.0
23472  *             np.float64_t gamma = -1.0             # <<<<<<<<<<<<<<
23473  *             int k_states = self._k_states
23474  *             int k_states2 = self._k_states2
23475  */
23476   __pyx_v_gamma = -1.0;
23477 
23478   /* "statsmodels/tsa/statespace/_representation.pyx":1802
23479  *             np.float64_t beta = 0.0
23480  *             np.float64_t gamma = -1.0
23481  *             int k_states = self._k_states             # <<<<<<<<<<<<<<
23482  *             int k_states2 = self._k_states2
23483  *             int k_endogstates = self._k_endogstates
23484  */
23485   __pyx_t_1 = __pyx_v_self->_k_states;
23486   __pyx_v_k_states = __pyx_t_1;
23487 
23488   /* "statsmodels/tsa/statespace/_representation.pyx":1803
23489  *             np.float64_t gamma = -1.0
23490  *             int k_states = self._k_states
23491  *             int k_states2 = self._k_states2             # <<<<<<<<<<<<<<
23492  *             int k_endogstates = self._k_endogstates
23493  *
23494  */
23495   __pyx_t_1 = __pyx_v_self->_k_states2;
23496   __pyx_v_k_states2 = __pyx_t_1;
23497 
23498   /* "statsmodels/tsa/statespace/_representation.pyx":1804
23499  *             int k_states = self._k_states
23500  *             int k_states2 = self._k_states2
23501  *             int k_endogstates = self._k_endogstates             # <<<<<<<<<<<<<<
23502  *
23503  *         # $y_t^* = \bar A^* y_t = C_t Z_t' H_t^{-1} y_t$
23504  */
23505   __pyx_t_1 = __pyx_v_self->_k_endogstates;
23506   __pyx_v_k_endogstates = __pyx_t_1;
23507 
23508   /* "statsmodels/tsa/statespace/_representation.pyx":1811
23509  *
23510  *         # Make sure we have enough observations to perform collapse
23511  *         if self.k_endog < self.k_states:             # <<<<<<<<<<<<<<
23512  *             raise RuntimeError('Cannot collapse observation vector it the'
23513  *                                ' state dimension is larger than the dimension'
23514  */
23515   __pyx_t_2 = ((__pyx_v_self->k_endog < __pyx_v_self->k_states) != 0);
23516   if (unlikely(__pyx_t_2)) {
23517 
23518     /* "statsmodels/tsa/statespace/_representation.pyx":1812
23519  *         # Make sure we have enough observations to perform collapse
23520  *         if self.k_endog < self.k_states:
23521  *             raise RuntimeError('Cannot collapse observation vector it the'             # <<<<<<<<<<<<<<
23522  *                                ' state dimension is larger than the dimension'
23523  *                                ' of the observation vector.')
23524  */
23525     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1812, __pyx_L1_error)
23526     __Pyx_GOTREF(__pyx_t_3);
23527     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
23528     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23529     __PYX_ERR(0, 1812, __pyx_L1_error)
23530 
23531     /* "statsmodels/tsa/statespace/_representation.pyx":1811
23532  *
23533  *         # Make sure we have enough observations to perform collapse
23534  *         if self.k_endog < self.k_states:             # <<<<<<<<<<<<<<
23535  *             raise RuntimeError('Cannot collapse observation vector it the'
23536  *                                ' state dimension is larger than the dimension'
23537  */
23538   }
23539 
23540   /* "statsmodels/tsa/statespace/_representation.pyx":1818
23541  *         # Adjust for a VAR transition (i.e. design = [#, 0], where the zeros
23542  *         # correspond to all states except the first k_posdef states)
23543  *         if self.subset_design:             # <<<<<<<<<<<<<<
23544  *             k_states = self._k_posdef
23545  *             k_states2 = self._k_posdef2
23546  */
23547   __pyx_t_2 = (__pyx_v_self->subset_design != 0);
23548   if (__pyx_t_2) {
23549 
23550     /* "statsmodels/tsa/statespace/_representation.pyx":1819
23551  *         # correspond to all states except the first k_posdef states)
23552  *         if self.subset_design:
23553  *             k_states = self._k_posdef             # <<<<<<<<<<<<<<
23554  *             k_states2 = self._k_posdef2
23555  *             k_endogstates = self._k_endog * self._k_posdef
23556  */
23557     __pyx_t_1 = __pyx_v_self->_k_posdef;
23558     __pyx_v_k_states = __pyx_t_1;
23559 
23560     /* "statsmodels/tsa/statespace/_representation.pyx":1820
23561  *         if self.subset_design:
23562  *             k_states = self._k_posdef
23563  *             k_states2 = self._k_posdef2             # <<<<<<<<<<<<<<
23564  *             k_endogstates = self._k_endog * self._k_posdef
23565  *
23566  */
23567     __pyx_t_1 = __pyx_v_self->_k_posdef2;
23568     __pyx_v_k_states2 = __pyx_t_1;
23569 
23570     /* "statsmodels/tsa/statespace/_representation.pyx":1821
23571  *             k_states = self._k_posdef
23572  *             k_states2 = self._k_posdef2
23573  *             k_endogstates = self._k_endog * self._k_posdef             # <<<<<<<<<<<<<<
23574  *
23575  *         # Handle missing data
23576  */
23577     __pyx_v_k_endogstates = (__pyx_v_self->_k_endog * __pyx_v_self->_k_posdef);
23578 
23579     /* "statsmodels/tsa/statespace/_representation.pyx":1818
23580  *         # Adjust for a VAR transition (i.e. design = [#, 0], where the zeros
23581  *         # correspond to all states except the first k_posdef states)
23582  *         if self.subset_design:             # <<<<<<<<<<<<<<
23583  *             k_states = self._k_posdef
23584  *             k_states2 = self._k_posdef2
23585  */
23586   }
23587 
23588   /* "statsmodels/tsa/statespace/_representation.pyx":1824
23589  *
23590  *         # Handle missing data
23591  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
23592  *             return self.k_states
23593  *         reset_missing = 0
23594  */
23595   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1824, __pyx_L1_error)}
23596   __pyx_t_4 = __pyx_v_t;
23597   __pyx_t_2 = (((*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_4 * __pyx_v_self->nmissing.strides[0]) ))) == __pyx_v_self->k_endog) != 0);
23598   if (__pyx_t_2) {
23599 
23600     /* "statsmodels/tsa/statespace/_representation.pyx":1825
23601  *         # Handle missing data
23602  *         if self.nmissing[t] == self.k_endog:
23603  *             return self.k_states             # <<<<<<<<<<<<<<
23604  *         reset_missing = 0
23605  *         for i in range(self.k_endog):
23606  */
23607     __pyx_r = __pyx_v_self->k_states;
23608     goto __pyx_L0;
23609 
23610     /* "statsmodels/tsa/statespace/_representation.pyx":1824
23611  *
23612  *         # Handle missing data
23613  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
23614  *             return self.k_states
23615  *         reset_missing = 0
23616  */
23617   }
23618 
23619   /* "statsmodels/tsa/statespace/_representation.pyx":1826
23620  *         if self.nmissing[t] == self.k_endog:
23621  *             return self.k_states
23622  *         reset_missing = 0             # <<<<<<<<<<<<<<
23623  *         for i in range(self.k_endog):
23624  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
23625  */
23626   __pyx_v_reset_missing = 0;
23627 
23628   /* "statsmodels/tsa/statespace/_representation.pyx":1827
23629  *             return self.k_states
23630  *         reset_missing = 0
23631  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
23632  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
23633  *
23634  */
23635   __pyx_t_1 = __pyx_v_self->k_endog;
23636   __pyx_t_5 = __pyx_t_1;
23637   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
23638     __pyx_v_i = __pyx_t_6;
23639 
23640     /* "statsmodels/tsa/statespace/_representation.pyx":1828
23641  *         reset_missing = 0
23642  *         for i in range(self.k_endog):
23643  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])             # <<<<<<<<<<<<<<
23644  *
23645  *         # Initialize the transformation
23646  */
23647     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1828, __pyx_L1_error)}
23648     __pyx_t_7 = __pyx_v_i;
23649     __pyx_t_4 = __pyx_v_t;
23650     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1828, __pyx_L1_error)}
23651     __pyx_t_8 = __pyx_v_i;
23652     __pyx_t_9 = __pyx_v_previous_t;
23653     __pyx_v_reset_missing = (__pyx_v_reset_missing + (!(((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_7)) ) + __pyx_t_4 * __pyx_v_self->missing.strides[1]) ))) == (*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_8)) ) + __pyx_t_9 * __pyx_v_self->missing.strides[1]) )))) != 0)));
23654   }
23655 
23656   /* "statsmodels/tsa/statespace/_representation.pyx":1831
23657  *
23658  *         # Initialize the transformation
23659  *         if self.collapse_obs_cov[0,0] == 0:             # <<<<<<<<<<<<<<
23660  *             # Set H_t^* to identity
23661  *             for i in range(k_states):
23662  */
23663   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1831, __pyx_L1_error)}
23664   __pyx_t_8 = 0;
23665   __pyx_t_7 = 0;
23666   __pyx_t_2 = (((*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_obs_cov.strides[1]) ))) == 0.0) != 0);
23667   if (__pyx_t_2) {
23668 
23669     /* "statsmodels/tsa/statespace/_representation.pyx":1833
23670  *         if self.collapse_obs_cov[0,0] == 0:
23671  *             # Set H_t^* to identity
23672  *             for i in range(k_states):             # <<<<<<<<<<<<<<
23673  *                 self.collapse_obs_cov[i,i] = 1
23674  *
23675  */
23676     __pyx_t_1 = __pyx_v_k_states;
23677     __pyx_t_5 = __pyx_t_1;
23678     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
23679       __pyx_v_i = __pyx_t_6;
23680 
23681       /* "statsmodels/tsa/statespace/_representation.pyx":1834
23682  *             # Set H_t^* to identity
23683  *             for i in range(k_states):
23684  *                 self.collapse_obs_cov[i,i] = 1             # <<<<<<<<<<<<<<
23685  *
23686  *             # Make sure we do not have an observation intercept
23687  */
23688       if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1834, __pyx_L1_error)}
23689       __pyx_t_7 = __pyx_v_i;
23690       __pyx_t_8 = __pyx_v_i;
23691       *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_obs_cov.strides[1]) )) = 1.0;
23692     }
23693 
23694     /* "statsmodels/tsa/statespace/_representation.pyx":1837
23695  *
23696  *             # Make sure we do not have an observation intercept
23697  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:             # <<<<<<<<<<<<<<
23698  *                 raise RuntimeError('The observation collapse transformation'
23699  *                                    ' does not currently support an observation'
23700  */
23701     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1837, __pyx_L1_error)
23702     __Pyx_GOTREF(__pyx_t_10);
23703     __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1837, __pyx_L1_error)
23704     __Pyx_GOTREF(__pyx_t_11);
23705     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23706     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1837, __pyx_L1_error)}
23707     __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1837, __pyx_L1_error)
23708     __Pyx_GOTREF(__pyx_t_10);
23709     __pyx_t_12 = NULL;
23710     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
23711       __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
23712       if (likely(__pyx_t_12)) {
23713         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
23714         __Pyx_INCREF(__pyx_t_12);
23715         __Pyx_INCREF(function);
23716         __Pyx_DECREF_SET(__pyx_t_11, function);
23717       }
23718     }
23719     __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10);
23720     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
23721     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23722     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1837, __pyx_L1_error)
23723     __Pyx_GOTREF(__pyx_t_3);
23724     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23725     __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1837, __pyx_L1_error)
23726     __Pyx_GOTREF(__pyx_t_11);
23727     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23728     __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 1837, __pyx_L1_error)
23729     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23730     __pyx_t_14 = ((!__pyx_t_13) != 0);
23731     if (!__pyx_t_14) {
23732     } else {
23733       __pyx_t_2 = __pyx_t_14;
23734       goto __pyx_L12_bool_binop_done;
23735     }
23736     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1837, __pyx_L1_error)}
23737     __pyx_t_14 = (((__pyx_v_self->obs_intercept.shape[2]) > 1) != 0);
23738     __pyx_t_2 = __pyx_t_14;
23739     __pyx_L12_bool_binop_done:;
23740     if (unlikely(__pyx_t_2)) {
23741 
23742       /* "statsmodels/tsa/statespace/_representation.pyx":1838
23743  *             # Make sure we do not have an observation intercept
23744  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:
23745  *                 raise RuntimeError('The observation collapse transformation'             # <<<<<<<<<<<<<<
23746  *                                    ' does not currently support an observation'
23747  *                                    ' intercept.')
23748  */
23749       __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1838, __pyx_L1_error)
23750       __Pyx_GOTREF(__pyx_t_11);
23751       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
23752       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23753       __PYX_ERR(0, 1838, __pyx_L1_error)
23754 
23755       /* "statsmodels/tsa/statespace/_representation.pyx":1837
23756  *
23757  *             # Make sure we do not have an observation intercept
23758  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:             # <<<<<<<<<<<<<<
23759  *                 raise RuntimeError('The observation collapse transformation'
23760  *                                    ' does not currently support an observation'
23761  */
23762     }
23763 
23764     /* "statsmodels/tsa/statespace/_representation.pyx":1831
23765  *
23766  *         # Initialize the transformation
23767  *         if self.collapse_obs_cov[0,0] == 0:             # <<<<<<<<<<<<<<
23768  *             # Set H_t^* to identity
23769  *             for i in range(k_states):
23770  */
23771   }
23772 
23773   /* "statsmodels/tsa/statespace/_representation.pyx":1843
23774  *
23775  *         # Perform the Cholesky decomposition of H_t, if necessary
23776  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
23777  *             # Cholesky decomposition: $H = L L'$
23778  *             blas.dcopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
23779  */
23780   __pyx_t_14 = ((__pyx_v_t == 0) != 0);
23781   if (!__pyx_t_14) {
23782   } else {
23783     __pyx_t_2 = __pyx_t_14;
23784     goto __pyx_L15_bool_binop_done;
23785   }
23786   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1843, __pyx_L1_error)}
23787   __pyx_t_14 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
23788   if (!__pyx_t_14) {
23789   } else {
23790     __pyx_t_2 = __pyx_t_14;
23791     goto __pyx_L15_bool_binop_done;
23792   }
23793   __pyx_t_14 = (__pyx_v_reset_missing != 0);
23794   if (!__pyx_t_14) {
23795   } else {
23796     __pyx_t_2 = __pyx_t_14;
23797     goto __pyx_L15_bool_binop_done;
23798   }
23799   __pyx_t_14 = (__pyx_v_reset != 0);
23800   __pyx_t_2 = __pyx_t_14;
23801   __pyx_L15_bool_binop_done:;
23802   if (__pyx_t_2) {
23803 
23804     /* "statsmodels/tsa/statespace/_representation.pyx":1845
23805  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
23806  *             # Cholesky decomposition: $H = L L'$
23807  *             blas.dcopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)             # <<<<<<<<<<<<<<
23808  *             lapack.dpotrf("L", &self._k_endog, &self.transform_cholesky[0,0], &self._k_endog, &info)
23809  *
23810  */
23811     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1845, __pyx_L1_error)}
23812     __pyx_t_8 = 0;
23813     __pyx_t_7 = 0;
23814     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->_k_endog2), __pyx_v_self->_obs_cov, (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_inc));
23815 
23816     /* "statsmodels/tsa/statespace/_representation.pyx":1846
23817  *             # Cholesky decomposition: $H = L L'$
23818  *             blas.dcopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
23819  *             lapack.dpotrf("L", &self._k_endog, &self.transform_cholesky[0,0], &self._k_endog, &info)             # <<<<<<<<<<<<<<
23820  *
23821  *             # Check for errors
23822  */
23823     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1846, __pyx_L1_error)}
23824     __pyx_t_7 = 0;
23825     __pyx_t_8 = 0;
23826     __pyx_f_5scipy_6linalg_13cython_lapack_dpotrf(((char *)"L"), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
23827 
23828     /* "statsmodels/tsa/statespace/_representation.pyx":1849
23829  *
23830  *             # Check for errors
23831  *             if info > 0:             # <<<<<<<<<<<<<<
23832  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
23833  *             elif info < 0:
23834  */
23835     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
23836     if (unlikely(__pyx_t_2)) {
23837 
23838       /* "statsmodels/tsa/statespace/_representation.pyx":1850
23839  *             # Check for errors
23840  *             if info > 0:
23841  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
23842  *             elif info < 0:
23843  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
23844  */
23845       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1850, __pyx_L1_error)
23846       __Pyx_GOTREF(__pyx_t_3);
23847       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1850, __pyx_L1_error)
23848       __Pyx_GOTREF(__pyx_t_10);
23849       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23850       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1850, __pyx_L1_error)
23851       __Pyx_GOTREF(__pyx_t_3);
23852       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23853       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1850, __pyx_L1_error)
23854       __Pyx_GOTREF(__pyx_t_10);
23855       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_observatio, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1850, __pyx_L1_error)
23856       __Pyx_GOTREF(__pyx_t_12);
23857       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23858       __pyx_t_10 = NULL;
23859       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
23860         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
23861         if (likely(__pyx_t_10)) {
23862           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
23863           __Pyx_INCREF(__pyx_t_10);
23864           __Pyx_INCREF(function);
23865           __Pyx_DECREF_SET(__pyx_t_3, function);
23866         }
23867       }
23868       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
23869       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
23870       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23871       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1850, __pyx_L1_error)
23872       __Pyx_GOTREF(__pyx_t_11);
23873       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23874       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
23875       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23876       __PYX_ERR(0, 1850, __pyx_L1_error)
23877 
23878       /* "statsmodels/tsa/statespace/_representation.pyx":1849
23879  *
23880  *             # Check for errors
23881  *             if info > 0:             # <<<<<<<<<<<<<<
23882  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
23883  *             elif info < 0:
23884  */
23885     }
23886 
23887     /* "statsmodels/tsa/statespace/_representation.pyx":1851
23888  *             if info > 0:
23889  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
23890  *             elif info < 0:             # <<<<<<<<<<<<<<
23891  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
23892  *
23893  */
23894     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
23895     if (unlikely(__pyx_t_2)) {
23896 
23897       /* "statsmodels/tsa/statespace/_representation.pyx":1852
23898  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
23899  *             elif info < 0:
23900  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
23901  *
23902  *             # Calculate the determinant (just the squared product of the
23903  */
23904       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1852, __pyx_L1_error)
23905       __Pyx_GOTREF(__pyx_t_3);
23906       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1852, __pyx_L1_error)
23907       __Pyx_GOTREF(__pyx_t_12);
23908       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23909       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1852, __pyx_L1_error)
23910       __Pyx_GOTREF(__pyx_t_3);
23911       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23912       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1852, __pyx_L1_error)
23913       __Pyx_GOTREF(__pyx_t_12);
23914       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_observation_cov, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1852, __pyx_L1_error)
23915       __Pyx_GOTREF(__pyx_t_10);
23916       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
23917       __pyx_t_12 = NULL;
23918       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
23919         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
23920         if (likely(__pyx_t_12)) {
23921           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
23922           __Pyx_INCREF(__pyx_t_12);
23923           __Pyx_INCREF(function);
23924           __Pyx_DECREF_SET(__pyx_t_3, function);
23925         }
23926       }
23927       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
23928       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
23929       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
23930       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1852, __pyx_L1_error)
23931       __Pyx_GOTREF(__pyx_t_11);
23932       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23933       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
23934       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
23935       __PYX_ERR(0, 1852, __pyx_L1_error)
23936 
23937       /* "statsmodels/tsa/statespace/_representation.pyx":1851
23938  *             if info > 0:
23939  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
23940  *             elif info < 0:             # <<<<<<<<<<<<<<
23941  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
23942  *
23943  */
23944     }
23945 
23946     /* "statsmodels/tsa/statespace/_representation.pyx":1856
23947  *             # Calculate the determinant (just the squared product of the
23948  *             # diagonals, in the Cholesky decomposition case)
23949  *             self.transform_determinant = 0.             # <<<<<<<<<<<<<<
23950  *             for i in range(self._k_endog):
23951  *                 j = i * (self._k_endog + 1)
23952  */
23953     __pyx_v_self->transform_determinant = 0.;
23954 
23955     /* "statsmodels/tsa/statespace/_representation.pyx":1857
23956  *             # diagonals, in the Cholesky decomposition case)
23957  *             self.transform_determinant = 0.
23958  *             for i in range(self._k_endog):             # <<<<<<<<<<<<<<
23959  *                 j = i * (self._k_endog + 1)
23960  *                 k = j % self.k_endog
23961  */
23962     __pyx_t_1 = __pyx_v_self->_k_endog;
23963     __pyx_t_5 = __pyx_t_1;
23964     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
23965       __pyx_v_i = __pyx_t_6;
23966 
23967       /* "statsmodels/tsa/statespace/_representation.pyx":1858
23968  *             self.transform_determinant = 0.
23969  *             for i in range(self._k_endog):
23970  *                 j = i * (self._k_endog + 1)             # <<<<<<<<<<<<<<
23971  *                 k = j % self.k_endog
23972  *                 l = j // self.k_endog
23973  */
23974       __pyx_v_j = (__pyx_v_i * (__pyx_v_self->_k_endog + 1));
23975 
23976       /* "statsmodels/tsa/statespace/_representation.pyx":1859
23977  *             for i in range(self._k_endog):
23978  *                 j = i * (self._k_endog + 1)
23979  *                 k = j % self.k_endog             # <<<<<<<<<<<<<<
23980  *                 l = j // self.k_endog
23981  *                 if not self.transform_cholesky[k, l] == 0:
23982  */
23983       if (unlikely(__pyx_v_self->k_endog == 0)) {
23984         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
23985         __PYX_ERR(0, 1859, __pyx_L1_error)
23986       }
23987       __pyx_v_k = __Pyx_mod_int(__pyx_v_j, __pyx_v_self->k_endog);
23988 
23989       /* "statsmodels/tsa/statespace/_representation.pyx":1860
23990  *                 j = i * (self._k_endog + 1)
23991  *                 k = j % self.k_endog
23992  *                 l = j // self.k_endog             # <<<<<<<<<<<<<<
23993  *                 if not self.transform_cholesky[k, l] == 0:
23994  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])
23995  */
23996       if (unlikely(__pyx_v_self->k_endog == 0)) {
23997         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
23998         __PYX_ERR(0, 1860, __pyx_L1_error)
23999       }
24000       else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_self->k_endog == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_j))) {
24001         PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
24002         __PYX_ERR(0, 1860, __pyx_L1_error)
24003       }
24004       __pyx_v_l = __Pyx_div_int(__pyx_v_j, __pyx_v_self->k_endog);
24005 
24006       /* "statsmodels/tsa/statespace/_representation.pyx":1861
24007  *                 k = j % self.k_endog
24008  *                 l = j // self.k_endog
24009  *                 if not self.transform_cholesky[k, l] == 0:             # <<<<<<<<<<<<<<
24010  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])
24011  *             self.transform_determinant = 2 * self.transform_determinant
24012  */
24013       if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1861, __pyx_L1_error)}
24014       __pyx_t_8 = __pyx_v_k;
24015       __pyx_t_7 = __pyx_v_l;
24016       __pyx_t_2 = ((!(((*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_cholesky.strides[1]) ))) == 0.0) != 0)) != 0);
24017       if (__pyx_t_2) {
24018 
24019         /* "statsmodels/tsa/statespace/_representation.pyx":1862
24020  *                 l = j // self.k_endog
24021  *                 if not self.transform_cholesky[k, l] == 0:
24022  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])             # <<<<<<<<<<<<<<
24023  *             self.transform_determinant = 2 * self.transform_determinant
24024  *
24025  */
24026         if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1862, __pyx_L1_error)}
24027         __pyx_t_7 = __pyx_v_k;
24028         __pyx_t_8 = __pyx_v_l;
24029         __pyx_v_self->transform_determinant = (__pyx_v_self->transform_determinant + log((*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))));
24030 
24031         /* "statsmodels/tsa/statespace/_representation.pyx":1861
24032  *                 k = j % self.k_endog
24033  *                 l = j // self.k_endog
24034  *                 if not self.transform_cholesky[k, l] == 0:             # <<<<<<<<<<<<<<
24035  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])
24036  *             self.transform_determinant = 2 * self.transform_determinant
24037  */
24038       }
24039     }
24040 
24041     /* "statsmodels/tsa/statespace/_representation.pyx":1863
24042  *                 if not self.transform_cholesky[k, l] == 0:
24043  *                     self.transform_determinant = self.transform_determinant + dlog(self.transform_cholesky[k, l])
24044  *             self.transform_determinant = 2 * self.transform_determinant             # <<<<<<<<<<<<<<
24045  *
24046  *         # Get $Z_t \equiv C^{-1}$, if necessary
24047  */
24048     __pyx_v_self->transform_determinant = (2.0 * __pyx_v_self->transform_determinant);
24049 
24050     /* "statsmodels/tsa/statespace/_representation.pyx":1843
24051  *
24052  *         # Perform the Cholesky decomposition of H_t, if necessary
24053  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
24054  *             # Cholesky decomposition: $H = L L'$
24055  *             blas.dcopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
24056  */
24057   }
24058 
24059   /* "statsmodels/tsa/statespace/_representation.pyx":1866
24060  *
24061  *         # Get $Z_t \equiv C^{-1}$, if necessary
24062  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
24063  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
24064  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
24065  */
24066   __pyx_t_14 = ((__pyx_v_t == 0) != 0);
24067   if (!__pyx_t_14) {
24068   } else {
24069     __pyx_t_2 = __pyx_t_14;
24070     goto __pyx_L24_bool_binop_done;
24071   }
24072   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1866, __pyx_L1_error)}
24073   __pyx_t_14 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
24074   if (!__pyx_t_14) {
24075   } else {
24076     __pyx_t_2 = __pyx_t_14;
24077     goto __pyx_L24_bool_binop_done;
24078   }
24079   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1866, __pyx_L1_error)}
24080   __pyx_t_14 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
24081   if (!__pyx_t_14) {
24082   } else {
24083     __pyx_t_2 = __pyx_t_14;
24084     goto __pyx_L24_bool_binop_done;
24085   }
24086   __pyx_t_14 = (__pyx_v_reset_missing != 0);
24087   if (!__pyx_t_14) {
24088   } else {
24089     __pyx_t_2 = __pyx_t_14;
24090     goto __pyx_L24_bool_binop_done;
24091   }
24092   __pyx_t_14 = (__pyx_v_reset != 0);
24093   __pyx_t_2 = __pyx_t_14;
24094   __pyx_L24_bool_binop_done:;
24095   if (__pyx_t_2) {
24096 
24097     /* "statsmodels/tsa/statespace/_representation.pyx":1868
24098  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:
24099  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
24100  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)             # <<<<<<<<<<<<<<
24101  *             lapack.dpotrs("L", &self._k_endog, &k_states,
24102  *                             &self.transform_cholesky[0,0], &self._k_endog,
24103  */
24104     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1868, __pyx_L1_error)}
24105     __pyx_t_8 = 0;
24106     __pyx_t_7 = 0;
24107     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->_k_endogstates), __pyx_v_self->_design, (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_design.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_inc));
24108 
24109     /* "statsmodels/tsa/statespace/_representation.pyx":1870
24110  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
24111  *             lapack.dpotrs("L", &self._k_endog, &k_states,
24112  *                             &self.transform_cholesky[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
24113  *                             &self.transform_design[0,0], &self._k_endog,
24114  *                             &info)
24115  */
24116     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1870, __pyx_L1_error)}
24117     __pyx_t_7 = 0;
24118     __pyx_t_8 = 0;
24119 
24120     /* "statsmodels/tsa/statespace/_representation.pyx":1871
24121  *             lapack.dpotrs("L", &self._k_endog, &k_states,
24122  *                             &self.transform_cholesky[0,0], &self._k_endog,
24123  *                             &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
24124  *                             &info)
24125  *
24126  */
24127     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1871, __pyx_L1_error)}
24128     __pyx_t_15 = 0;
24129     __pyx_t_16 = 0;
24130 
24131     /* "statsmodels/tsa/statespace/_representation.pyx":1869
24132  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
24133  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
24134  *             lapack.dpotrs("L", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
24135  *                             &self.transform_cholesky[0,0], &self._k_endog,
24136  *                             &self.transform_design[0,0], &self._k_endog,
24137  */
24138     __pyx_f_5scipy_6linalg_13cython_lapack_dpotrs(((char *)"L"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
24139 
24140     /* "statsmodels/tsa/statespace/_representation.pyx":1875
24141  *
24142  *             # Check for errors
24143  *             if not info == 0:             # <<<<<<<<<<<<<<
24144  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)
24145  *
24146  */
24147     __pyx_t_2 = ((!((__pyx_v_info == 0) != 0)) != 0);
24148     if (unlikely(__pyx_t_2)) {
24149 
24150       /* "statsmodels/tsa/statespace/_representation.pyx":1876
24151  *             # Check for errors
24152  *             if not info == 0:
24153  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
24154  *
24155  *             # Calculate $(H_t^{-1} Z_t)' Z_t$
24156  */
24157       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error)
24158       __Pyx_GOTREF(__pyx_t_3);
24159       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1876, __pyx_L1_error)
24160       __Pyx_GOTREF(__pyx_t_10);
24161       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24162       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error)
24163       __Pyx_GOTREF(__pyx_t_3);
24164       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24165       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1876, __pyx_L1_error)
24166       __Pyx_GOTREF(__pyx_t_10);
24167       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_calculation_of, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1876, __pyx_L1_error)
24168       __Pyx_GOTREF(__pyx_t_12);
24169       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24170       __pyx_t_10 = NULL;
24171       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
24172         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
24173         if (likely(__pyx_t_10)) {
24174           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24175           __Pyx_INCREF(__pyx_t_10);
24176           __Pyx_INCREF(function);
24177           __Pyx_DECREF_SET(__pyx_t_3, function);
24178         }
24179       }
24180       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
24181       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24182       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24183       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1876, __pyx_L1_error)
24184       __Pyx_GOTREF(__pyx_t_11);
24185       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24186       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
24187       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
24188       __PYX_ERR(0, 1876, __pyx_L1_error)
24189 
24190       /* "statsmodels/tsa/statespace/_representation.pyx":1875
24191  *
24192  *             # Check for errors
24193  *             if not info == 0:             # <<<<<<<<<<<<<<
24194  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)
24195  *
24196  */
24197     }
24198 
24199     /* "statsmodels/tsa/statespace/_representation.pyx":1882
24200  *             blas.dgemm("T", "N", &k_states, &k_states, &self._k_endog,
24201  *                    &alpha, self._design, &self._k_endog,
24202  *                            &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
24203  *                    &beta, &self.collapse_cholesky[0,0], &self._k_states)
24204  *
24205  */
24206     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1882, __pyx_L1_error)}
24207     __pyx_t_16 = 0;
24208     __pyx_t_15 = 0;
24209 
24210     /* "statsmodels/tsa/statespace/_representation.pyx":1883
24211  *                    &alpha, self._design, &self._k_endog,
24212  *                            &self.transform_design[0,0], &self._k_endog,
24213  *                    &beta, &self.collapse_cholesky[0,0], &self._k_states)             # <<<<<<<<<<<<<<
24214  *
24215  *             # Calculate $(Z_t' H_t^{-1} Z_t)^{-1}$ via Cholesky inversion
24216  */
24217     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1883, __pyx_L1_error)}
24218     __pyx_t_8 = 0;
24219     __pyx_t_7 = 0;
24220 
24221     /* "statsmodels/tsa/statespace/_representation.pyx":1880
24222  *             # Calculate $(H_t^{-1} Z_t)' Z_t$
24223  *             # $(m \times m) = (m \times p) (p \times p) (p \times m)$
24224  *             blas.dgemm("T", "N", &k_states, &k_states, &self._k_endog,             # <<<<<<<<<<<<<<
24225  *                    &alpha, self._design, &self._k_endog,
24226  *                            &self.transform_design[0,0], &self._k_endog,
24227  */
24228     __pyx_f_5scipy_6linalg_11cython_blas_dgemm(((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&__pyx_v_k_states), (&__pyx_v_self->_k_endog), (&__pyx_v_alpha), __pyx_v_self->_design, (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_design.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_beta), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states));
24229 
24230     /* "statsmodels/tsa/statespace/_representation.pyx":1886
24231  *
24232  *             # Calculate $(Z_t' H_t^{-1} Z_t)^{-1}$ via Cholesky inversion
24233  *             lapack.dpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
24234  *             # Check for errors
24235  *             if info > 0:
24236  */
24237     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1886, __pyx_L1_error)}
24238     __pyx_t_7 = 0;
24239     __pyx_t_8 = 0;
24240     __pyx_f_5scipy_6linalg_13cython_lapack_dpotrf(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
24241 
24242     /* "statsmodels/tsa/statespace/_representation.pyx":1888
24243  *             lapack.dpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
24244  *             # Check for errors
24245  *             if info > 0:             # <<<<<<<<<<<<<<
24246  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
24247  *             elif info < 0:
24248  */
24249     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
24250     if (unlikely(__pyx_t_2)) {
24251 
24252       /* "statsmodels/tsa/statespace/_representation.pyx":1889
24253  *             # Check for errors
24254  *             if info > 0:
24255  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
24256  *             elif info < 0:
24257  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
24258  */
24259       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __pyx_L1_error)
24260       __Pyx_GOTREF(__pyx_t_3);
24261       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1889, __pyx_L1_error)
24262       __Pyx_GOTREF(__pyx_t_12);
24263       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24264       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __pyx_L1_error)
24265       __Pyx_GOTREF(__pyx_t_3);
24266       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24267       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1889, __pyx_L1_error)
24268       __Pyx_GOTREF(__pyx_t_12);
24269       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_ZHZ_matrix, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1889, __pyx_L1_error)
24270       __Pyx_GOTREF(__pyx_t_10);
24271       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24272       __pyx_t_12 = NULL;
24273       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
24274         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
24275         if (likely(__pyx_t_12)) {
24276           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24277           __Pyx_INCREF(__pyx_t_12);
24278           __Pyx_INCREF(function);
24279           __Pyx_DECREF_SET(__pyx_t_3, function);
24280         }
24281       }
24282       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
24283       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
24284       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24285       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1889, __pyx_L1_error)
24286       __Pyx_GOTREF(__pyx_t_11);
24287       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24288       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
24289       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
24290       __PYX_ERR(0, 1889, __pyx_L1_error)
24291 
24292       /* "statsmodels/tsa/statespace/_representation.pyx":1888
24293  *             lapack.dpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
24294  *             # Check for errors
24295  *             if info > 0:             # <<<<<<<<<<<<<<
24296  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
24297  *             elif info < 0:
24298  */
24299     }
24300 
24301     /* "statsmodels/tsa/statespace/_representation.pyx":1890
24302  *             if info > 0:
24303  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
24304  *             elif info < 0:             # <<<<<<<<<<<<<<
24305  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
24306  *             lapack.dpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
24307  */
24308     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
24309     if (unlikely(__pyx_t_2)) {
24310 
24311       /* "statsmodels/tsa/statespace/_representation.pyx":1891
24312  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
24313  *             elif info < 0:
24314  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
24315  *             lapack.dpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
24316  *
24317  */
24318       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1891, __pyx_L1_error)
24319       __Pyx_GOTREF(__pyx_t_3);
24320       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1891, __pyx_L1_error)
24321       __Pyx_GOTREF(__pyx_t_10);
24322       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24323       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1891, __pyx_L1_error)
24324       __Pyx_GOTREF(__pyx_t_3);
24325       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24326       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1891, __pyx_L1_error)
24327       __Pyx_GOTREF(__pyx_t_10);
24328       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_ZHZ_matrix_enco, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1891, __pyx_L1_error)
24329       __Pyx_GOTREF(__pyx_t_12);
24330       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24331       __pyx_t_10 = NULL;
24332       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
24333         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
24334         if (likely(__pyx_t_10)) {
24335           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24336           __Pyx_INCREF(__pyx_t_10);
24337           __Pyx_INCREF(function);
24338           __Pyx_DECREF_SET(__pyx_t_3, function);
24339         }
24340       }
24341       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
24342       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24343       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24344       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1891, __pyx_L1_error)
24345       __Pyx_GOTREF(__pyx_t_11);
24346       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24347       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
24348       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
24349       __PYX_ERR(0, 1891, __pyx_L1_error)
24350 
24351       /* "statsmodels/tsa/statespace/_representation.pyx":1890
24352  *             if info > 0:
24353  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
24354  *             elif info < 0:             # <<<<<<<<<<<<<<
24355  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
24356  *             lapack.dpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
24357  */
24358     }
24359 
24360     /* "statsmodels/tsa/statespace/_representation.pyx":1892
24361  *             elif info < 0:
24362  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
24363  *             lapack.dpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
24364  *
24365  *             # Calculate $C_t$ (the upper triangular cholesky decomposition of $(Z_t' H_t^{-1} Z_t)^{-1}$)
24366  */
24367     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1892, __pyx_L1_error)}
24368     __pyx_t_8 = 0;
24369     __pyx_t_7 = 0;
24370     __pyx_f_5scipy_6linalg_13cython_lapack_dpotri(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
24371 
24372     /* "statsmodels/tsa/statespace/_representation.pyx":1895
24373  *
24374  *             # Calculate $C_t$ (the upper triangular cholesky decomposition of $(Z_t' H_t^{-1} Z_t)^{-1}$)
24375  *             lapack.dpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
24376  *
24377  *             # Check for errors
24378  */
24379     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1895, __pyx_L1_error)}
24380     __pyx_t_7 = 0;
24381     __pyx_t_8 = 0;
24382     __pyx_f_5scipy_6linalg_13cython_lapack_dpotrf(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
24383 
24384     /* "statsmodels/tsa/statespace/_representation.pyx":1898
24385  *
24386  *             # Check for errors
24387  *             if info > 0:             # <<<<<<<<<<<<<<
24388  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
24389  *             elif info < 0:
24390  */
24391     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
24392     if (unlikely(__pyx_t_2)) {
24393 
24394       /* "statsmodels/tsa/statespace/_representation.pyx":1899
24395  *             # Check for errors
24396  *             if info > 0:
24397  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
24398  *             elif info < 0:
24399  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
24400  */
24401       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1899, __pyx_L1_error)
24402       __Pyx_GOTREF(__pyx_t_3);
24403       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1899, __pyx_L1_error)
24404       __Pyx_GOTREF(__pyx_t_12);
24405       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24406       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1899, __pyx_L1_error)
24407       __Pyx_GOTREF(__pyx_t_3);
24408       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24409       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1899, __pyx_L1_error)
24410       __Pyx_GOTREF(__pyx_t_12);
24411       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_C_matrix_e, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1899, __pyx_L1_error)
24412       __Pyx_GOTREF(__pyx_t_10);
24413       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24414       __pyx_t_12 = NULL;
24415       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
24416         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
24417         if (likely(__pyx_t_12)) {
24418           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24419           __Pyx_INCREF(__pyx_t_12);
24420           __Pyx_INCREF(function);
24421           __Pyx_DECREF_SET(__pyx_t_3, function);
24422         }
24423       }
24424       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
24425       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
24426       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24427       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1899, __pyx_L1_error)
24428       __Pyx_GOTREF(__pyx_t_11);
24429       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24430       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
24431       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
24432       __PYX_ERR(0, 1899, __pyx_L1_error)
24433 
24434       /* "statsmodels/tsa/statespace/_representation.pyx":1898
24435  *
24436  *             # Check for errors
24437  *             if info > 0:             # <<<<<<<<<<<<<<
24438  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
24439  *             elif info < 0:
24440  */
24441     }
24442 
24443     /* "statsmodels/tsa/statespace/_representation.pyx":1900
24444  *             if info > 0:
24445  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
24446  *             elif info < 0:             # <<<<<<<<<<<<<<
24447  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
24448  *
24449  */
24450     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
24451     if (unlikely(__pyx_t_2)) {
24452 
24453       /* "statsmodels/tsa/statespace/_representation.pyx":1901
24454  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
24455  *             elif info < 0:
24456  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
24457  *
24458  *             # Calculate $C_t'^{-1} \equiv Z_t$
24459  */
24460       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1901, __pyx_L1_error)
24461       __Pyx_GOTREF(__pyx_t_3);
24462       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1901, __pyx_L1_error)
24463       __Pyx_GOTREF(__pyx_t_10);
24464       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24465       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1901, __pyx_L1_error)
24466       __Pyx_GOTREF(__pyx_t_3);
24467       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24468       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1901, __pyx_L1_error)
24469       __Pyx_GOTREF(__pyx_t_10);
24470       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_C_matrix_encoun, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1901, __pyx_L1_error)
24471       __Pyx_GOTREF(__pyx_t_12);
24472       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
24473       __pyx_t_10 = NULL;
24474       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
24475         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
24476         if (likely(__pyx_t_10)) {
24477           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
24478           __Pyx_INCREF(__pyx_t_10);
24479           __Pyx_INCREF(function);
24480           __Pyx_DECREF_SET(__pyx_t_3, function);
24481         }
24482       }
24483       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
24484       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
24485       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
24486       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1901, __pyx_L1_error)
24487       __Pyx_GOTREF(__pyx_t_11);
24488       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24489       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
24490       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
24491       __PYX_ERR(0, 1901, __pyx_L1_error)
24492 
24493       /* "statsmodels/tsa/statespace/_representation.pyx":1900
24494  *             if info > 0:
24495  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
24496  *             elif info < 0:             # <<<<<<<<<<<<<<
24497  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
24498  *
24499  */
24500     }
24501 
24502     /* "statsmodels/tsa/statespace/_representation.pyx":1906
24503  *             # Do so by solving the system: $C_t' x = I$
24504  *             # (Recall that collapse_obs_cov is an identity matrix)
24505  *             blas.dcopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)             # <<<<<<<<<<<<<<
24506  *             lapack.dtrtrs("U", "T", "N", &k_states, &k_states,
24507  *                         &self.collapse_cholesky[0,0], &self._k_states,
24508  */
24509     if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1906, __pyx_L1_error)}
24510     __pyx_t_8 = 0;
24511     __pyx_t_7 = 0;
24512     if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1906, __pyx_L1_error)}
24513     __pyx_t_15 = 0;
24514     __pyx_t_16 = 0;
24515     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->_k_states2), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_obs_cov.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->collapse_design.strides[1]) )))), (&__pyx_v_inc));
24516 
24517     /* "statsmodels/tsa/statespace/_representation.pyx":1908
24518  *             blas.dcopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)
24519  *             lapack.dtrtrs("U", "T", "N", &k_states, &k_states,
24520  *                         &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
24521  *                         &self.collapse_design[0,0], &self._k_states,
24522  *                         &info)
24523  */
24524     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1908, __pyx_L1_error)}
24525     __pyx_t_16 = 0;
24526     __pyx_t_15 = 0;
24527 
24528     /* "statsmodels/tsa/statespace/_representation.pyx":1909
24529  *             lapack.dtrtrs("U", "T", "N", &k_states, &k_states,
24530  *                         &self.collapse_cholesky[0,0], &self._k_states,
24531  *                         &self.collapse_design[0,0], &self._k_states,             # <<<<<<<<<<<<<<
24532  *                         &info)
24533  *
24534  */
24535     if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1909, __pyx_L1_error)}
24536     __pyx_t_7 = 0;
24537     __pyx_t_8 = 0;
24538 
24539     /* "statsmodels/tsa/statespace/_representation.pyx":1907
24540  *             # (Recall that collapse_obs_cov is an identity matrix)
24541  *             blas.dcopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)
24542  *             lapack.dtrtrs("U", "T", "N", &k_states, &k_states,             # <<<<<<<<<<<<<<
24543  *                         &self.collapse_cholesky[0,0], &self._k_states,
24544  *                         &self.collapse_design[0,0], &self._k_states,
24545  */
24546     __pyx_f_5scipy_6linalg_13cython_lapack_dtrtrs(((char *)"U"), ((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_design.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_design.strides[1]) )))), (&__pyx_v_self->_k_states), (&__pyx_v_info));
24547 
24548     /* "statsmodels/tsa/statespace/_representation.pyx":1866
24549  *
24550  *         # Get $Z_t \equiv C^{-1}$, if necessary
24551  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
24552  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
24553  *             blas.dcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
24554  */
24555   }
24556 
24557   /* "statsmodels/tsa/statespace/_representation.pyx":1914
24558  *         # Calculate $\bar y_t^* = \bar A_t^* y_t = C_t Z_t' H_t^{-1} y_t$
24559  *         # (unless this is a completely missing observation)
24560  *         self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
24561  *         if not self._nmissing == self.k_endog:
24562  *             # If we have some missing elements, selected_obs is already populated
24563  */
24564   __pyx_v_self->collapse_loglikelihood = 0.0;
24565 
24566   /* "statsmodels/tsa/statespace/_representation.pyx":1915
24567  *         # (unless this is a completely missing observation)
24568  *         self.collapse_loglikelihood = 0
24569  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
24570  *             # If we have some missing elements, selected_obs is already populated
24571  *             if self._nmissing == 0:
24572  */
24573   __pyx_t_2 = ((!((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0)) != 0);
24574   if (__pyx_t_2) {
24575 
24576     /* "statsmodels/tsa/statespace/_representation.pyx":1917
24577  *         if not self._nmissing == self.k_endog:
24578  *             # If we have some missing elements, selected_obs is already populated
24579  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
24580  *                 blas.dcopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
24581  *             # $\\# = Z_t' H_t^{-1} y_t$
24582  */
24583     __pyx_t_2 = ((__pyx_v_self->_nmissing == 0) != 0);
24584     if (__pyx_t_2) {
24585 
24586       /* "statsmodels/tsa/statespace/_representation.pyx":1918
24587  *             # If we have some missing elements, selected_obs is already populated
24588  *             if self._nmissing == 0:
24589  *                 blas.dcopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
24590  *             # $\\# = Z_t' H_t^{-1} y_t$
24591  *             blas.dgemv("T", &self._k_endog, &k_states,
24592  */
24593       if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1918, __pyx_L1_error)}
24594       __pyx_t_8 = 0;
24595       __pyx_t_9 = __pyx_v_t;
24596       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1918, __pyx_L1_error)}
24597       __pyx_t_7 = 0;
24598       __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_self->k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->obs.data) + __pyx_t_8)) ) + __pyx_t_9 * __pyx_v_self->obs.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_7 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
24599 
24600       /* "statsmodels/tsa/statespace/_representation.pyx":1917
24601  *         if not self._nmissing == self.k_endog:
24602  *             # If we have some missing elements, selected_obs is already populated
24603  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
24604  *                 blas.dcopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
24605  *             # $\\# = Z_t' H_t^{-1} y_t$
24606  */
24607     }
24608 
24609     /* "statsmodels/tsa/statespace/_representation.pyx":1921
24610  *             # $\\# = Z_t' H_t^{-1} y_t$
24611  *             blas.dgemv("T", &self._k_endog, &k_states,
24612  *                   &alpha, &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
24613  *                           &self.selected_obs[0], &inc,
24614  *                   &beta, &self.collapse_obs[0], &inc)
24615  */
24616     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1921, __pyx_L1_error)}
24617     __pyx_t_7 = 0;
24618     __pyx_t_8 = 0;
24619 
24620     /* "statsmodels/tsa/statespace/_representation.pyx":1922
24621  *             blas.dgemv("T", &self._k_endog, &k_states,
24622  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
24623  *                           &self.selected_obs[0], &inc,             # <<<<<<<<<<<<<<
24624  *                   &beta, &self.collapse_obs[0], &inc)
24625  *             # $y_t^* = C_t \\#$
24626  */
24627     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1922, __pyx_L1_error)}
24628     __pyx_t_15 = 0;
24629 
24630     /* "statsmodels/tsa/statespace/_representation.pyx":1923
24631  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
24632  *                           &self.selected_obs[0], &inc,
24633  *                   &beta, &self.collapse_obs[0], &inc)             # <<<<<<<<<<<<<<
24634  *             # $y_t^* = C_t \\#$
24635  *             blas.dtrmv("U", "N", "N", &k_states,
24636  */
24637     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1923, __pyx_L1_error)}
24638     __pyx_t_16 = 0;
24639 
24640     /* "statsmodels/tsa/statespace/_representation.pyx":1920
24641  *                 blas.dcopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
24642  *             # $\\# = Z_t' H_t^{-1} y_t$
24643  *             blas.dgemv("T", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
24644  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
24645  *                           &self.selected_obs[0], &inc,
24646  */
24647     __pyx_f_5scipy_6linalg_11cython_blas_dgemv(((char *)"T"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&__pyx_v_alpha), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_design.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc), (&__pyx_v_beta), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_16 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc));
24648 
24649     /* "statsmodels/tsa/statespace/_representation.pyx":1926
24650  *             # $y_t^* = C_t \\#$
24651  *             blas.dtrmv("U", "N", "N", &k_states,
24652  *                                 &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
24653  *                                 &self.collapse_obs[0], &inc)
24654  *
24655  */
24656     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1926, __pyx_L1_error)}
24657     __pyx_t_16 = 0;
24658     __pyx_t_15 = 0;
24659 
24660     /* "statsmodels/tsa/statespace/_representation.pyx":1927
24661  *             blas.dtrmv("U", "N", "N", &k_states,
24662  *                                 &self.collapse_cholesky[0,0], &self._k_states,
24663  *                                 &self.collapse_obs[0], &inc)             # <<<<<<<<<<<<<<
24664  *
24665  *             # Get residuals for loglikelihood calculation
24666  */
24667     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1927, __pyx_L1_error)}
24668     __pyx_t_8 = 0;
24669 
24670     /* "statsmodels/tsa/statespace/_representation.pyx":1925
24671  *                   &beta, &self.collapse_obs[0], &inc)
24672  *             # $y_t^* = C_t \\#$
24673  *             blas.dtrmv("U", "N", "N", &k_states,             # <<<<<<<<<<<<<<
24674  *                                 &self.collapse_cholesky[0,0], &self._k_states,
24675  *                                 &self.collapse_obs[0], &inc)
24676  */
24677     __pyx_f_5scipy_6linalg_11cython_blas_dtrmv(((char *)"U"), ((char *)"N"), ((char *)"N"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_8 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc));
24678 
24679     /* "statsmodels/tsa/statespace/_representation.pyx":1939
24680  *
24681  *             # $ \\# = C_t' y_t^*$
24682  *             blas.dcopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)             # <<<<<<<<<<<<<<
24683  *             blas.dtrmv("U", "T", "N", &k_states,
24684  *                                 &self.collapse_cholesky[0,0], &self._k_states,
24685  */
24686     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1939, __pyx_L1_error)}
24687     __pyx_t_8 = 0;
24688     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1939, __pyx_L1_error)}
24689     __pyx_t_15 = 0;
24690     __pyx_f_5scipy_6linalg_11cython_blas_dcopy((&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_8 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_15 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc));
24691 
24692     /* "statsmodels/tsa/statespace/_representation.pyx":1941
24693  *             blas.dcopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)
24694  *             blas.dtrmv("U", "T", "N", &k_states,
24695  *                                 &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
24696  *                                 &self.collapse_obs_tmp[0], &inc)
24697  *
24698  */
24699     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1941, __pyx_L1_error)}
24700     __pyx_t_15 = 0;
24701     __pyx_t_8 = 0;
24702 
24703     /* "statsmodels/tsa/statespace/_representation.pyx":1942
24704  *             blas.dtrmv("U", "T", "N", &k_states,
24705  *                                 &self.collapse_cholesky[0,0], &self._k_states,
24706  *                                 &self.collapse_obs_tmp[0], &inc)             # <<<<<<<<<<<<<<
24707  *
24708  *             # $e_t = - Z_t C_t' y_t^* + y_t$
24709  */
24710     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1942, __pyx_L1_error)}
24711     __pyx_t_16 = 0;
24712 
24713     /* "statsmodels/tsa/statespace/_representation.pyx":1940
24714  *             # $ \\# = C_t' y_t^*$
24715  *             blas.dcopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)
24716  *             blas.dtrmv("U", "T", "N", &k_states,             # <<<<<<<<<<<<<<
24717  *                                 &self.collapse_cholesky[0,0], &self._k_states,
24718  *                                 &self.collapse_obs_tmp[0], &inc)
24719  */
24720     __pyx_f_5scipy_6linalg_11cython_blas_dtrmv(((char *)"U"), ((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_15)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_16 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc));
24721 
24722     /* "statsmodels/tsa/statespace/_representation.pyx":1947
24723  *             blas.dgemv("N", &self._k_endog, &k_states,
24724  *                   &gamma, self._design, &self._k_endog,
24725  *                           &self.collapse_obs_tmp[0], &inc,             # <<<<<<<<<<<<<<
24726  *                   &alpha, &self.selected_obs[0], &inc)
24727  *
24728  */
24729     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1947, __pyx_L1_error)}
24730     __pyx_t_16 = 0;
24731 
24732     /* "statsmodels/tsa/statespace/_representation.pyx":1948
24733  *                   &gamma, self._design, &self._k_endog,
24734  *                           &self.collapse_obs_tmp[0], &inc,
24735  *                   &alpha, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
24736  *
24737  *             # Calculate e_t' H_t^{-1} e_t via Cholesky solver
24738  */
24739     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1948, __pyx_L1_error)}
24740     __pyx_t_8 = 0;
24741 
24742     /* "statsmodels/tsa/statespace/_representation.pyx":1945
24743  *
24744  *             # $e_t = - Z_t C_t' y_t^* + y_t$
24745  *             blas.dgemv("N", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
24746  *                   &gamma, self._design, &self._k_endog,
24747  *                           &self.collapse_obs_tmp[0], &inc,
24748  */
24749     __pyx_f_5scipy_6linalg_11cython_blas_dgemv(((char *)"N"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&__pyx_v_gamma), __pyx_v_self->_design, (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_16 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc), (&__pyx_v_alpha), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_8 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
24750 
24751     /* "statsmodels/tsa/statespace/_representation.pyx":1956
24752  *             # solve of $L x = e_t$  where L is lower triangular
24753  *             lapack.dtrtrs("L", "N", "N", &self._k_endog, &inc,
24754  *                         &self.transform_cholesky[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
24755  *                         &self.selected_obs[0], &self._k_endog,
24756  *                         &info)
24757  */
24758     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1956, __pyx_L1_error)}
24759     __pyx_t_8 = 0;
24760     __pyx_t_16 = 0;
24761 
24762     /* "statsmodels/tsa/statespace/_representation.pyx":1957
24763  *             lapack.dtrtrs("L", "N", "N", &self._k_endog, &inc,
24764  *                         &self.transform_cholesky[0,0], &self._k_endog,
24765  *                         &self.selected_obs[0], &self._k_endog,             # <<<<<<<<<<<<<<
24766  *                         &info)
24767  *
24768  */
24769     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1957, __pyx_L1_error)}
24770     __pyx_t_15 = 0;
24771 
24772     /* "statsmodels/tsa/statespace/_representation.pyx":1955
24773  *             # We have $L$ in `transform_cholesky`, so we want to do a linear
24774  *             # solve of $L x = e_t$  where L is lower triangular
24775  *             lapack.dtrtrs("L", "N", "N", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
24776  *                         &self.transform_cholesky[0,0], &self._k_endog,
24777  *                         &self.selected_obs[0], &self._k_endog,
24778  */
24779     __pyx_f_5scipy_6linalg_13cython_lapack_dtrtrs(((char *)"L"), ((char *)"N"), ((char *)"N"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_16 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
24780 
24781     /* "statsmodels/tsa/statespace/_representation.pyx":1963
24782  *
24783  *             # $e_t' H_t^{-1} e_t = (L^{-1} e_t)' L^{-1} e_t = \sum_i e_{i,t}**2$
24784  *             self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
24785  *             for i in range(self._k_endog):
24786  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2
24787  */
24788     __pyx_v_self->collapse_loglikelihood = 0.0;
24789 
24790     /* "statsmodels/tsa/statespace/_representation.pyx":1964
24791  *             # $e_t' H_t^{-1} e_t = (L^{-1} e_t)' L^{-1} e_t = \sum_i e_{i,t}**2$
24792  *             self.collapse_loglikelihood = 0
24793  *             for i in range(self._k_endog):             # <<<<<<<<<<<<<<
24794  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2
24795  *
24796  */
24797     __pyx_t_1 = __pyx_v_self->_k_endog;
24798     __pyx_t_5 = __pyx_t_1;
24799     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
24800       __pyx_v_i = __pyx_t_6;
24801 
24802       /* "statsmodels/tsa/statespace/_representation.pyx":1965
24803  *             self.collapse_loglikelihood = 0
24804  *             for i in range(self._k_endog):
24805  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2             # <<<<<<<<<<<<<<
24806  *
24807  *             # (p-m) log( 2*pi) + log( |H_t| )
24808  */
24809       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1965, __pyx_L1_error)}
24810       __pyx_t_15 = __pyx_v_i;
24811       __pyx_v_self->collapse_loglikelihood = (__pyx_v_self->collapse_loglikelihood + pow((*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) ))), 2.0));
24812     }
24813 
24814     /* "statsmodels/tsa/statespace/_representation.pyx":1968
24815  *
24816  *             # (p-m) log( 2*pi) + log( |H_t| )
24817  *             self.collapse_loglikelihood = (             # <<<<<<<<<<<<<<
24818  *                 self.collapse_loglikelihood +
24819  *                 (self._k_endog - k_states)*dlog(2*NPY_PI) +
24820  */
24821     __pyx_v_self->collapse_loglikelihood = ((__pyx_v_self->collapse_loglikelihood + ((__pyx_v_self->_k_endog - __pyx_v_k_states) * log((2.0 * NPY_PI)))) + __pyx_v_self->transform_determinant);
24822 
24823     /* "statsmodels/tsa/statespace/_representation.pyx":1975
24824  *
24825  *             # -0.5 * ...
24826  *             self.collapse_loglikelihood = -0.5 * self.collapse_loglikelihood             # <<<<<<<<<<<<<<
24827  *
24828  *         # Set pointers
24829  */
24830     __pyx_v_self->collapse_loglikelihood = (-0.5 * __pyx_v_self->collapse_loglikelihood);
24831 
24832     /* "statsmodels/tsa/statespace/_representation.pyx":1915
24833  *         # (unless this is a completely missing observation)
24834  *         self.collapse_loglikelihood = 0
24835  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
24836  *             # If we have some missing elements, selected_obs is already populated
24837  *             if self._nmissing == 0:
24838  */
24839   }
24840 
24841   /* "statsmodels/tsa/statespace/_representation.pyx":1978
24842  *
24843  *         # Set pointers
24844  *         self._obs = &self.collapse_obs[0]             # <<<<<<<<<<<<<<
24845  *         self._design = &self.collapse_design[0,0]
24846  *         self._obs_cov = &self.collapse_obs_cov[0,0]
24847  */
24848   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1978, __pyx_L1_error)}
24849   __pyx_t_15 = 0;
24850   __pyx_v_self->_obs = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_15 * __pyx_v_self->collapse_obs.strides[0]) ))));
24851 
24852   /* "statsmodels/tsa/statespace/_representation.pyx":1979
24853  *         # Set pointers
24854  *         self._obs = &self.collapse_obs[0]
24855  *         self._design = &self.collapse_design[0,0]             # <<<<<<<<<<<<<<
24856  *         self._obs_cov = &self.collapse_obs_cov[0,0]
24857  *
24858  */
24859   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1979, __pyx_L1_error)}
24860   __pyx_t_15 = 0;
24861   __pyx_t_16 = 0;
24862   __pyx_v_self->_design = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->collapse_design.strides[1]) ))));
24863 
24864   /* "statsmodels/tsa/statespace/_representation.pyx":1980
24865  *         self._obs = &self.collapse_obs[0]
24866  *         self._design = &self.collapse_design[0,0]
24867  *         self._obs_cov = &self.collapse_obs_cov[0,0]             # <<<<<<<<<<<<<<
24868  *
24869  *         # TODO can I replace this with k_states? I think I should be able to
24870  */
24871   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 1980, __pyx_L1_error)}
24872   __pyx_t_16 = 0;
24873   __pyx_t_15 = 0;
24874   __pyx_v_self->_obs_cov = (&(*((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_5numpy_float64_t *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_obs_cov.strides[1]) ))));
24875 
24876   /* "statsmodels/tsa/statespace/_representation.pyx":1983
24877  *
24878  *         # TODO can I replace this with k_states? I think I should be able to
24879  *         return self._k_states             # <<<<<<<<<<<<<<
24880  *
24881  * # ### Selected covariance matrice
24882  */
24883   __pyx_r = __pyx_v_self->_k_states;
24884   goto __pyx_L0;
24885 
24886   /* "statsmodels/tsa/statespace/_representation.pyx":1790
24887  *         self._obs_intercept = &self.transform_obs_intercept[0]
24888  *
24889  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:             # <<<<<<<<<<<<<<
24890  *         # Note: this assumes that initialize_object_pointers has *already* been done
24891  *         # Note: this assumes that select_missing has *already* been done
24892  */
24893 
24894   /* function exit code */
24895   __pyx_L1_error:;
24896   __Pyx_XDECREF(__pyx_t_3);
24897   __Pyx_XDECREF(__pyx_t_10);
24898   __Pyx_XDECREF(__pyx_t_11);
24899   __Pyx_XDECREF(__pyx_t_12);
24900   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transform_generalized_collapse", __pyx_clineno, __pyx_lineno, __pyx_filename);
24901   __pyx_r = 0;
24902   __pyx_L0:;
24903   __Pyx_RefNannyFinishContext();
24904   return __pyx_r;
24905 }
24906 
24907 /* "statsmodels/tsa/statespace/_representation.pxd":92
24908  * cdef class dStatespace(object):
24909  *     # Statespace dimensions
24910  *     cdef readonly int nobs, k_endog, k_states, k_posdef             # <<<<<<<<<<<<<<
24911  *
24912  *     # Statespace representation matrices
24913  */
24914 
24915 /* Python wrapper */
24916 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4nobs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4nobs_1__get__(PyObject * __pyx_v_self)24917 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4nobs_1__get__(PyObject *__pyx_v_self) {
24918   PyObject *__pyx_r = 0;
24919   __Pyx_RefNannyDeclarations
24920   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24921   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4nobs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
24922 
24923   /* function exit code */
24924   __Pyx_RefNannyFinishContext();
24925   return __pyx_r;
24926 }
24927 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)24928 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
24929   PyObject *__pyx_r = NULL;
24930   __Pyx_RefNannyDeclarations
24931   PyObject *__pyx_t_1 = NULL;
24932   int __pyx_lineno = 0;
24933   const char *__pyx_filename = NULL;
24934   int __pyx_clineno = 0;
24935   __Pyx_RefNannySetupContext("__get__", 0);
24936   __Pyx_XDECREF(__pyx_r);
24937   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 92, __pyx_L1_error)
24938   __Pyx_GOTREF(__pyx_t_1);
24939   __pyx_r = __pyx_t_1;
24940   __pyx_t_1 = 0;
24941   goto __pyx_L0;
24942 
24943   /* function exit code */
24944   __pyx_L1_error:;
24945   __Pyx_XDECREF(__pyx_t_1);
24946   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.nobs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24947   __pyx_r = NULL;
24948   __pyx_L0:;
24949   __Pyx_XGIVEREF(__pyx_r);
24950   __Pyx_RefNannyFinishContext();
24951   return __pyx_r;
24952 }
24953 
24954 /* Python wrapper */
24955 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7k_endog_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7k_endog_1__get__(PyObject * __pyx_v_self)24956 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7k_endog_1__get__(PyObject *__pyx_v_self) {
24957   PyObject *__pyx_r = 0;
24958   __Pyx_RefNannyDeclarations
24959   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24960   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7k_endog___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
24961 
24962   /* function exit code */
24963   __Pyx_RefNannyFinishContext();
24964   return __pyx_r;
24965 }
24966 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)24967 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
24968   PyObject *__pyx_r = NULL;
24969   __Pyx_RefNannyDeclarations
24970   PyObject *__pyx_t_1 = NULL;
24971   int __pyx_lineno = 0;
24972   const char *__pyx_filename = NULL;
24973   int __pyx_clineno = 0;
24974   __Pyx_RefNannySetupContext("__get__", 0);
24975   __Pyx_XDECREF(__pyx_r);
24976   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_endog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 92, __pyx_L1_error)
24977   __Pyx_GOTREF(__pyx_t_1);
24978   __pyx_r = __pyx_t_1;
24979   __pyx_t_1 = 0;
24980   goto __pyx_L0;
24981 
24982   /* function exit code */
24983   __pyx_L1_error:;
24984   __Pyx_XDECREF(__pyx_t_1);
24985   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.k_endog.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24986   __pyx_r = NULL;
24987   __pyx_L0:;
24988   __Pyx_XGIVEREF(__pyx_r);
24989   __Pyx_RefNannyFinishContext();
24990   return __pyx_r;
24991 }
24992 
24993 /* Python wrapper */
24994 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_states_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_states_1__get__(PyObject * __pyx_v_self)24995 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_states_1__get__(PyObject *__pyx_v_self) {
24996   PyObject *__pyx_r = 0;
24997   __Pyx_RefNannyDeclarations
24998   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
24999   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_states___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25000 
25001   /* function exit code */
25002   __Pyx_RefNannyFinishContext();
25003   return __pyx_r;
25004 }
25005 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25006 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25007   PyObject *__pyx_r = NULL;
25008   __Pyx_RefNannyDeclarations
25009   PyObject *__pyx_t_1 = NULL;
25010   int __pyx_lineno = 0;
25011   const char *__pyx_filename = NULL;
25012   int __pyx_clineno = 0;
25013   __Pyx_RefNannySetupContext("__get__", 0);
25014   __Pyx_XDECREF(__pyx_r);
25015   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 92, __pyx_L1_error)
25016   __Pyx_GOTREF(__pyx_t_1);
25017   __pyx_r = __pyx_t_1;
25018   __pyx_t_1 = 0;
25019   goto __pyx_L0;
25020 
25021   /* function exit code */
25022   __pyx_L1_error:;
25023   __Pyx_XDECREF(__pyx_t_1);
25024   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.k_states.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25025   __pyx_r = NULL;
25026   __pyx_L0:;
25027   __Pyx_XGIVEREF(__pyx_r);
25028   __Pyx_RefNannyFinishContext();
25029   return __pyx_r;
25030 }
25031 
25032 /* Python wrapper */
25033 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_posdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_posdef_1__get__(PyObject * __pyx_v_self)25034 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_posdef_1__get__(PyObject *__pyx_v_self) {
25035   PyObject *__pyx_r = 0;
25036   __Pyx_RefNannyDeclarations
25037   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25038   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_posdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25039 
25040   /* function exit code */
25041   __Pyx_RefNannyFinishContext();
25042   return __pyx_r;
25043 }
25044 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25045 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25046   PyObject *__pyx_r = NULL;
25047   __Pyx_RefNannyDeclarations
25048   PyObject *__pyx_t_1 = NULL;
25049   int __pyx_lineno = 0;
25050   const char *__pyx_filename = NULL;
25051   int __pyx_clineno = 0;
25052   __Pyx_RefNannySetupContext("__get__", 0);
25053   __Pyx_XDECREF(__pyx_r);
25054   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_posdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 92, __pyx_L1_error)
25055   __Pyx_GOTREF(__pyx_t_1);
25056   __pyx_r = __pyx_t_1;
25057   __pyx_t_1 = 0;
25058   goto __pyx_L0;
25059 
25060   /* function exit code */
25061   __pyx_L1_error:;
25062   __Pyx_XDECREF(__pyx_t_1);
25063   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.k_posdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25064   __pyx_r = NULL;
25065   __pyx_L0:;
25066   __Pyx_XGIVEREF(__pyx_r);
25067   __Pyx_RefNannyFinishContext();
25068   return __pyx_r;
25069 }
25070 
25071 /* "statsmodels/tsa/statespace/_representation.pxd":95
25072  *
25073  *     # Statespace representation matrices
25074  *     cdef readonly np.float64_t [::1,:] obs, obs_intercept, state_intercept             # <<<<<<<<<<<<<<
25075  *     cdef readonly np.float64_t [:] initial_state
25076  *     cdef readonly np.float64_t [::1,:] initial_state_cov, initial_diffuse_state_cov
25077  */
25078 
25079 /* Python wrapper */
25080 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3obs_1__get__(PyObject * __pyx_v_self)25081 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3obs_1__get__(PyObject *__pyx_v_self) {
25082   PyObject *__pyx_r = 0;
25083   __Pyx_RefNannyDeclarations
25084   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25085   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25086 
25087   /* function exit code */
25088   __Pyx_RefNannyFinishContext();
25089   return __pyx_r;
25090 }
25091 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25092 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25093   PyObject *__pyx_r = NULL;
25094   __Pyx_RefNannyDeclarations
25095   PyObject *__pyx_t_1 = NULL;
25096   int __pyx_lineno = 0;
25097   const char *__pyx_filename = NULL;
25098   int __pyx_clineno = 0;
25099   __Pyx_RefNannySetupContext("__get__", 0);
25100   __Pyx_XDECREF(__pyx_r);
25101   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 95, __pyx_L1_error)}
25102   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 95, __pyx_L1_error)
25103   __Pyx_GOTREF(__pyx_t_1);
25104   __pyx_r = __pyx_t_1;
25105   __pyx_t_1 = 0;
25106   goto __pyx_L0;
25107 
25108   /* function exit code */
25109   __pyx_L1_error:;
25110   __Pyx_XDECREF(__pyx_t_1);
25111   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25112   __pyx_r = NULL;
25113   __pyx_L0:;
25114   __Pyx_XGIVEREF(__pyx_r);
25115   __Pyx_RefNannyFinishContext();
25116   return __pyx_r;
25117 }
25118 
25119 /* Python wrapper */
25120 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13obs_intercept_1__get__(PyObject * __pyx_v_self)25121 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13obs_intercept_1__get__(PyObject *__pyx_v_self) {
25122   PyObject *__pyx_r = 0;
25123   __Pyx_RefNannyDeclarations
25124   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25125   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25126 
25127   /* function exit code */
25128   __Pyx_RefNannyFinishContext();
25129   return __pyx_r;
25130 }
25131 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25132 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25133   PyObject *__pyx_r = NULL;
25134   __Pyx_RefNannyDeclarations
25135   PyObject *__pyx_t_1 = NULL;
25136   int __pyx_lineno = 0;
25137   const char *__pyx_filename = NULL;
25138   int __pyx_clineno = 0;
25139   __Pyx_RefNannySetupContext("__get__", 0);
25140   __Pyx_XDECREF(__pyx_r);
25141   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 95, __pyx_L1_error)}
25142   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 95, __pyx_L1_error)
25143   __Pyx_GOTREF(__pyx_t_1);
25144   __pyx_r = __pyx_t_1;
25145   __pyx_t_1 = 0;
25146   goto __pyx_L0;
25147 
25148   /* function exit code */
25149   __pyx_L1_error:;
25150   __Pyx_XDECREF(__pyx_t_1);
25151   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25152   __pyx_r = NULL;
25153   __pyx_L0:;
25154   __Pyx_XGIVEREF(__pyx_r);
25155   __Pyx_RefNannyFinishContext();
25156   return __pyx_r;
25157 }
25158 
25159 /* Python wrapper */
25160 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15state_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15state_intercept_1__get__(PyObject * __pyx_v_self)25161 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15state_intercept_1__get__(PyObject *__pyx_v_self) {
25162   PyObject *__pyx_r = 0;
25163   __Pyx_RefNannyDeclarations
25164   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25165   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15state_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25166 
25167   /* function exit code */
25168   __Pyx_RefNannyFinishContext();
25169   return __pyx_r;
25170 }
25171 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25172 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25173   PyObject *__pyx_r = NULL;
25174   __Pyx_RefNannyDeclarations
25175   PyObject *__pyx_t_1 = NULL;
25176   int __pyx_lineno = 0;
25177   const char *__pyx_filename = NULL;
25178   int __pyx_clineno = 0;
25179   __Pyx_RefNannySetupContext("__get__", 0);
25180   __Pyx_XDECREF(__pyx_r);
25181   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 95, __pyx_L1_error)}
25182   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 95, __pyx_L1_error)
25183   __Pyx_GOTREF(__pyx_t_1);
25184   __pyx_r = __pyx_t_1;
25185   __pyx_t_1 = 0;
25186   goto __pyx_L0;
25187 
25188   /* function exit code */
25189   __pyx_L1_error:;
25190   __Pyx_XDECREF(__pyx_t_1);
25191   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.state_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25192   __pyx_r = NULL;
25193   __pyx_L0:;
25194   __Pyx_XGIVEREF(__pyx_r);
25195   __Pyx_RefNannyFinishContext();
25196   return __pyx_r;
25197 }
25198 
25199 /* "statsmodels/tsa/statespace/_representation.pxd":96
25200  *     # Statespace representation matrices
25201  *     cdef readonly np.float64_t [::1,:] obs, obs_intercept, state_intercept
25202  *     cdef readonly np.float64_t [:] initial_state             # <<<<<<<<<<<<<<
25203  *     cdef readonly np.float64_t [::1,:] initial_state_cov, initial_diffuse_state_cov
25204  *     cdef readonly np.float64_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
25205  */
25206 
25207 /* Python wrapper */
25208 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initial_state_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initial_state_1__get__(PyObject * __pyx_v_self)25209 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initial_state_1__get__(PyObject *__pyx_v_self) {
25210   PyObject *__pyx_r = 0;
25211   __Pyx_RefNannyDeclarations
25212   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25213   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initial_state___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25214 
25215   /* function exit code */
25216   __Pyx_RefNannyFinishContext();
25217   return __pyx_r;
25218 }
25219 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25220 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25221   PyObject *__pyx_r = NULL;
25222   __Pyx_RefNannyDeclarations
25223   PyObject *__pyx_t_1 = NULL;
25224   int __pyx_lineno = 0;
25225   const char *__pyx_filename = NULL;
25226   int __pyx_clineno = 0;
25227   __Pyx_RefNannySetupContext("__get__", 0);
25228   __Pyx_XDECREF(__pyx_r);
25229   if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 96, __pyx_L1_error)}
25230   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 96, __pyx_L1_error)
25231   __Pyx_GOTREF(__pyx_t_1);
25232   __pyx_r = __pyx_t_1;
25233   __pyx_t_1 = 0;
25234   goto __pyx_L0;
25235 
25236   /* function exit code */
25237   __pyx_L1_error:;
25238   __Pyx_XDECREF(__pyx_t_1);
25239   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initial_state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25240   __pyx_r = NULL;
25241   __pyx_L0:;
25242   __Pyx_XGIVEREF(__pyx_r);
25243   __Pyx_RefNannyFinishContext();
25244   return __pyx_r;
25245 }
25246 
25247 /* "statsmodels/tsa/statespace/_representation.pxd":97
25248  *     cdef readonly np.float64_t [::1,:] obs, obs_intercept, state_intercept
25249  *     cdef readonly np.float64_t [:] initial_state
25250  *     cdef readonly np.float64_t [::1,:] initial_state_cov, initial_diffuse_state_cov             # <<<<<<<<<<<<<<
25251  *     cdef readonly np.float64_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
25252  *
25253  */
25254 
25255 /* Python wrapper */
25256 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17initial_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17initial_state_cov_1__get__(PyObject * __pyx_v_self)25257 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17initial_state_cov_1__get__(PyObject *__pyx_v_self) {
25258   PyObject *__pyx_r = 0;
25259   __Pyx_RefNannyDeclarations
25260   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25261   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17initial_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25262 
25263   /* function exit code */
25264   __Pyx_RefNannyFinishContext();
25265   return __pyx_r;
25266 }
25267 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25268 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25269   PyObject *__pyx_r = NULL;
25270   __Pyx_RefNannyDeclarations
25271   PyObject *__pyx_t_1 = NULL;
25272   int __pyx_lineno = 0;
25273   const char *__pyx_filename = NULL;
25274   int __pyx_clineno = 0;
25275   __Pyx_RefNannySetupContext("__get__", 0);
25276   __Pyx_XDECREF(__pyx_r);
25277   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 97, __pyx_L1_error)}
25278   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 97, __pyx_L1_error)
25279   __Pyx_GOTREF(__pyx_t_1);
25280   __pyx_r = __pyx_t_1;
25281   __pyx_t_1 = 0;
25282   goto __pyx_L0;
25283 
25284   /* function exit code */
25285   __pyx_L1_error:;
25286   __Pyx_XDECREF(__pyx_t_1);
25287   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initial_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25288   __pyx_r = NULL;
25289   __pyx_L0:;
25290   __Pyx_XGIVEREF(__pyx_r);
25291   __Pyx_RefNannyFinishContext();
25292   return __pyx_r;
25293 }
25294 
25295 /* Python wrapper */
25296 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_25initial_diffuse_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_25initial_diffuse_state_cov_1__get__(PyObject * __pyx_v_self)25297 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_25initial_diffuse_state_cov_1__get__(PyObject *__pyx_v_self) {
25298   PyObject *__pyx_r = 0;
25299   __Pyx_RefNannyDeclarations
25300   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25301   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_25initial_diffuse_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25302 
25303   /* function exit code */
25304   __Pyx_RefNannyFinishContext();
25305   return __pyx_r;
25306 }
25307 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25308 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25309   PyObject *__pyx_r = NULL;
25310   __Pyx_RefNannyDeclarations
25311   PyObject *__pyx_t_1 = NULL;
25312   int __pyx_lineno = 0;
25313   const char *__pyx_filename = NULL;
25314   int __pyx_clineno = 0;
25315   __Pyx_RefNannySetupContext("__get__", 0);
25316   __Pyx_XDECREF(__pyx_r);
25317   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 97, __pyx_L1_error)}
25318   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_diffuse_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 97, __pyx_L1_error)
25319   __Pyx_GOTREF(__pyx_t_1);
25320   __pyx_r = __pyx_t_1;
25321   __pyx_t_1 = 0;
25322   goto __pyx_L0;
25323 
25324   /* function exit code */
25325   __pyx_L1_error:;
25326   __Pyx_XDECREF(__pyx_t_1);
25327   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initial_diffuse_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25328   __pyx_r = NULL;
25329   __pyx_L0:;
25330   __Pyx_XGIVEREF(__pyx_r);
25331   __Pyx_RefNannyFinishContext();
25332   return __pyx_r;
25333 }
25334 
25335 /* "statsmodels/tsa/statespace/_representation.pxd":98
25336  *     cdef readonly np.float64_t [:] initial_state
25337  *     cdef readonly np.float64_t [::1,:] initial_state_cov, initial_diffuse_state_cov
25338  *     cdef readonly np.float64_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov             # <<<<<<<<<<<<<<
25339  *
25340  *     cdef readonly int [::1,:] missing
25341  */
25342 
25343 /* Python wrapper */
25344 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6design_1__get__(PyObject * __pyx_v_self)25345 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6design_1__get__(PyObject *__pyx_v_self) {
25346   PyObject *__pyx_r = 0;
25347   __Pyx_RefNannyDeclarations
25348   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25349   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25350 
25351   /* function exit code */
25352   __Pyx_RefNannyFinishContext();
25353   return __pyx_r;
25354 }
25355 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25356 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25357   PyObject *__pyx_r = NULL;
25358   __Pyx_RefNannyDeclarations
25359   PyObject *__pyx_t_1 = NULL;
25360   int __pyx_lineno = 0;
25361   const char *__pyx_filename = NULL;
25362   int __pyx_clineno = 0;
25363   __Pyx_RefNannySetupContext("__get__", 0);
25364   __Pyx_XDECREF(__pyx_r);
25365   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 98, __pyx_L1_error)}
25366   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->design, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
25367   __Pyx_GOTREF(__pyx_t_1);
25368   __pyx_r = __pyx_t_1;
25369   __pyx_t_1 = 0;
25370   goto __pyx_L0;
25371 
25372   /* function exit code */
25373   __pyx_L1_error:;
25374   __Pyx_XDECREF(__pyx_t_1);
25375   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25376   __pyx_r = NULL;
25377   __pyx_L0:;
25378   __Pyx_XGIVEREF(__pyx_r);
25379   __Pyx_RefNannyFinishContext();
25380   return __pyx_r;
25381 }
25382 
25383 /* Python wrapper */
25384 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7obs_cov_1__get__(PyObject * __pyx_v_self)25385 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7obs_cov_1__get__(PyObject *__pyx_v_self) {
25386   PyObject *__pyx_r = 0;
25387   __Pyx_RefNannyDeclarations
25388   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25389   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25390 
25391   /* function exit code */
25392   __Pyx_RefNannyFinishContext();
25393   return __pyx_r;
25394 }
25395 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25396 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25397   PyObject *__pyx_r = NULL;
25398   __Pyx_RefNannyDeclarations
25399   PyObject *__pyx_t_1 = NULL;
25400   int __pyx_lineno = 0;
25401   const char *__pyx_filename = NULL;
25402   int __pyx_clineno = 0;
25403   __Pyx_RefNannySetupContext("__get__", 0);
25404   __Pyx_XDECREF(__pyx_r);
25405   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 98, __pyx_L1_error)}
25406   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
25407   __Pyx_GOTREF(__pyx_t_1);
25408   __pyx_r = __pyx_t_1;
25409   __pyx_t_1 = 0;
25410   goto __pyx_L0;
25411 
25412   /* function exit code */
25413   __pyx_L1_error:;
25414   __Pyx_XDECREF(__pyx_t_1);
25415   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25416   __pyx_r = NULL;
25417   __pyx_L0:;
25418   __Pyx_XGIVEREF(__pyx_r);
25419   __Pyx_RefNannyFinishContext();
25420   return __pyx_r;
25421 }
25422 
25423 /* Python wrapper */
25424 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10transition_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10transition_1__get__(PyObject * __pyx_v_self)25425 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10transition_1__get__(PyObject *__pyx_v_self) {
25426   PyObject *__pyx_r = 0;
25427   __Pyx_RefNannyDeclarations
25428   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25429   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10transition___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25430 
25431   /* function exit code */
25432   __Pyx_RefNannyFinishContext();
25433   return __pyx_r;
25434 }
25435 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25436 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25437   PyObject *__pyx_r = NULL;
25438   __Pyx_RefNannyDeclarations
25439   PyObject *__pyx_t_1 = NULL;
25440   int __pyx_lineno = 0;
25441   const char *__pyx_filename = NULL;
25442   int __pyx_clineno = 0;
25443   __Pyx_RefNannySetupContext("__get__", 0);
25444   __Pyx_XDECREF(__pyx_r);
25445   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 98, __pyx_L1_error)}
25446   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transition, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
25447   __Pyx_GOTREF(__pyx_t_1);
25448   __pyx_r = __pyx_t_1;
25449   __pyx_t_1 = 0;
25450   goto __pyx_L0;
25451 
25452   /* function exit code */
25453   __pyx_L1_error:;
25454   __Pyx_XDECREF(__pyx_t_1);
25455   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25456   __pyx_r = NULL;
25457   __pyx_L0:;
25458   __Pyx_XGIVEREF(__pyx_r);
25459   __Pyx_RefNannyFinishContext();
25460   return __pyx_r;
25461 }
25462 
25463 /* Python wrapper */
25464 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9selection_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9selection_1__get__(PyObject * __pyx_v_self)25465 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9selection_1__get__(PyObject *__pyx_v_self) {
25466   PyObject *__pyx_r = 0;
25467   __Pyx_RefNannyDeclarations
25468   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25469   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9selection___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25470 
25471   /* function exit code */
25472   __Pyx_RefNannyFinishContext();
25473   return __pyx_r;
25474 }
25475 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25476 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25477   PyObject *__pyx_r = NULL;
25478   __Pyx_RefNannyDeclarations
25479   PyObject *__pyx_t_1 = NULL;
25480   int __pyx_lineno = 0;
25481   const char *__pyx_filename = NULL;
25482   int __pyx_clineno = 0;
25483   __Pyx_RefNannySetupContext("__get__", 0);
25484   __Pyx_XDECREF(__pyx_r);
25485   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 98, __pyx_L1_error)}
25486   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selection, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
25487   __Pyx_GOTREF(__pyx_t_1);
25488   __pyx_r = __pyx_t_1;
25489   __pyx_t_1 = 0;
25490   goto __pyx_L0;
25491 
25492   /* function exit code */
25493   __pyx_L1_error:;
25494   __Pyx_XDECREF(__pyx_t_1);
25495   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.selection.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25496   __pyx_r = NULL;
25497   __pyx_L0:;
25498   __Pyx_XGIVEREF(__pyx_r);
25499   __Pyx_RefNannyFinishContext();
25500   return __pyx_r;
25501 }
25502 
25503 /* Python wrapper */
25504 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9state_cov_1__get__(PyObject * __pyx_v_self)25505 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9state_cov_1__get__(PyObject *__pyx_v_self) {
25506   PyObject *__pyx_r = 0;
25507   __Pyx_RefNannyDeclarations
25508   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25509   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25510 
25511   /* function exit code */
25512   __Pyx_RefNannyFinishContext();
25513   return __pyx_r;
25514 }
25515 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25516 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25517   PyObject *__pyx_r = NULL;
25518   __Pyx_RefNannyDeclarations
25519   PyObject *__pyx_t_1 = NULL;
25520   int __pyx_lineno = 0;
25521   const char *__pyx_filename = NULL;
25522   int __pyx_clineno = 0;
25523   __Pyx_RefNannySetupContext("__get__", 0);
25524   __Pyx_XDECREF(__pyx_r);
25525   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 98, __pyx_L1_error)}
25526   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
25527   __Pyx_GOTREF(__pyx_t_1);
25528   __pyx_r = __pyx_t_1;
25529   __pyx_t_1 = 0;
25530   goto __pyx_L0;
25531 
25532   /* function exit code */
25533   __pyx_L1_error:;
25534   __Pyx_XDECREF(__pyx_t_1);
25535   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25536   __pyx_r = NULL;
25537   __pyx_L0:;
25538   __Pyx_XGIVEREF(__pyx_r);
25539   __Pyx_RefNannyFinishContext();
25540   return __pyx_r;
25541 }
25542 
25543 /* Python wrapper */
25544 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18selected_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18selected_state_cov_1__get__(PyObject * __pyx_v_self)25545 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18selected_state_cov_1__get__(PyObject *__pyx_v_self) {
25546   PyObject *__pyx_r = 0;
25547   __Pyx_RefNannyDeclarations
25548   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25549   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18selected_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25550 
25551   /* function exit code */
25552   __Pyx_RefNannyFinishContext();
25553   return __pyx_r;
25554 }
25555 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25556 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25557   PyObject *__pyx_r = NULL;
25558   __Pyx_RefNannyDeclarations
25559   PyObject *__pyx_t_1 = NULL;
25560   int __pyx_lineno = 0;
25561   const char *__pyx_filename = NULL;
25562   int __pyx_clineno = 0;
25563   __Pyx_RefNannySetupContext("__get__", 0);
25564   __Pyx_XDECREF(__pyx_r);
25565   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 98, __pyx_L1_error)}
25566   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
25567   __Pyx_GOTREF(__pyx_t_1);
25568   __pyx_r = __pyx_t_1;
25569   __pyx_t_1 = 0;
25570   goto __pyx_L0;
25571 
25572   /* function exit code */
25573   __pyx_L1_error:;
25574   __Pyx_XDECREF(__pyx_t_1);
25575   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.selected_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25576   __pyx_r = NULL;
25577   __pyx_L0:;
25578   __Pyx_XGIVEREF(__pyx_r);
25579   __Pyx_RefNannyFinishContext();
25580   return __pyx_r;
25581 }
25582 
25583 /* "statsmodels/tsa/statespace/_representation.pxd":100
25584  *     cdef readonly np.float64_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
25585  *
25586  *     cdef readonly int [::1,:] missing             # <<<<<<<<<<<<<<
25587  *     cdef readonly int [:] nmissing
25588  *     cdef readonly int has_missing
25589  */
25590 
25591 /* Python wrapper */
25592 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7missing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7missing_1__get__(PyObject * __pyx_v_self)25593 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7missing_1__get__(PyObject *__pyx_v_self) {
25594   PyObject *__pyx_r = 0;
25595   __Pyx_RefNannyDeclarations
25596   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25597   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7missing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25598 
25599   /* function exit code */
25600   __Pyx_RefNannyFinishContext();
25601   return __pyx_r;
25602 }
25603 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25604 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25605   PyObject *__pyx_r = NULL;
25606   __Pyx_RefNannyDeclarations
25607   PyObject *__pyx_t_1 = NULL;
25608   int __pyx_lineno = 0;
25609   const char *__pyx_filename = NULL;
25610   int __pyx_clineno = 0;
25611   __Pyx_RefNannySetupContext("__get__", 0);
25612   __Pyx_XDECREF(__pyx_r);
25613   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 100, __pyx_L1_error)}
25614   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 100, __pyx_L1_error)
25615   __Pyx_GOTREF(__pyx_t_1);
25616   __pyx_r = __pyx_t_1;
25617   __pyx_t_1 = 0;
25618   goto __pyx_L0;
25619 
25620   /* function exit code */
25621   __pyx_L1_error:;
25622   __Pyx_XDECREF(__pyx_t_1);
25623   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.missing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25624   __pyx_r = NULL;
25625   __pyx_L0:;
25626   __Pyx_XGIVEREF(__pyx_r);
25627   __Pyx_RefNannyFinishContext();
25628   return __pyx_r;
25629 }
25630 
25631 /* "statsmodels/tsa/statespace/_representation.pxd":101
25632  *
25633  *     cdef readonly int [::1,:] missing
25634  *     cdef readonly int [:] nmissing             # <<<<<<<<<<<<<<
25635  *     cdef readonly int has_missing
25636  *
25637  */
25638 
25639 /* Python wrapper */
25640 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8nmissing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8nmissing_1__get__(PyObject * __pyx_v_self)25641 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8nmissing_1__get__(PyObject *__pyx_v_self) {
25642   PyObject *__pyx_r = 0;
25643   __Pyx_RefNannyDeclarations
25644   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25645   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8nmissing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25646 
25647   /* function exit code */
25648   __Pyx_RefNannyFinishContext();
25649   return __pyx_r;
25650 }
25651 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25652 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25653   PyObject *__pyx_r = NULL;
25654   __Pyx_RefNannyDeclarations
25655   PyObject *__pyx_t_1 = NULL;
25656   int __pyx_lineno = 0;
25657   const char *__pyx_filename = NULL;
25658   int __pyx_clineno = 0;
25659   __Pyx_RefNannySetupContext("__get__", 0);
25660   __Pyx_XDECREF(__pyx_r);
25661   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 101, __pyx_L1_error)}
25662   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 101, __pyx_L1_error)
25663   __Pyx_GOTREF(__pyx_t_1);
25664   __pyx_r = __pyx_t_1;
25665   __pyx_t_1 = 0;
25666   goto __pyx_L0;
25667 
25668   /* function exit code */
25669   __pyx_L1_error:;
25670   __Pyx_XDECREF(__pyx_t_1);
25671   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.nmissing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25672   __pyx_r = NULL;
25673   __pyx_L0:;
25674   __Pyx_XGIVEREF(__pyx_r);
25675   __Pyx_RefNannyFinishContext();
25676   return __pyx_r;
25677 }
25678 
25679 /* "statsmodels/tsa/statespace/_representation.pxd":102
25680  *     cdef readonly int [::1,:] missing
25681  *     cdef readonly int [:] nmissing
25682  *     cdef readonly int has_missing             # <<<<<<<<<<<<<<
25683  *
25684  *     # Flags
25685  */
25686 
25687 /* Python wrapper */
25688 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11has_missing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11has_missing_1__get__(PyObject * __pyx_v_self)25689 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11has_missing_1__get__(PyObject *__pyx_v_self) {
25690   PyObject *__pyx_r = 0;
25691   __Pyx_RefNannyDeclarations
25692   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25693   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11has_missing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25694 
25695   /* function exit code */
25696   __Pyx_RefNannyFinishContext();
25697   return __pyx_r;
25698 }
25699 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25700 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25701   PyObject *__pyx_r = NULL;
25702   __Pyx_RefNannyDeclarations
25703   PyObject *__pyx_t_1 = NULL;
25704   int __pyx_lineno = 0;
25705   const char *__pyx_filename = NULL;
25706   int __pyx_clineno = 0;
25707   __Pyx_RefNannySetupContext("__get__", 0);
25708   __Pyx_XDECREF(__pyx_r);
25709   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->has_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 102, __pyx_L1_error)
25710   __Pyx_GOTREF(__pyx_t_1);
25711   __pyx_r = __pyx_t_1;
25712   __pyx_t_1 = 0;
25713   goto __pyx_L0;
25714 
25715   /* function exit code */
25716   __pyx_L1_error:;
25717   __Pyx_XDECREF(__pyx_t_1);
25718   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.has_missing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25719   __pyx_r = NULL;
25720   __pyx_L0:;
25721   __Pyx_XGIVEREF(__pyx_r);
25722   __Pyx_RefNannyFinishContext();
25723   return __pyx_r;
25724 }
25725 
25726 /* "statsmodels/tsa/statespace/_representation.pxd":105
25727  *
25728  *     # Flags
25729  *     cdef readonly int time_invariant             # <<<<<<<<<<<<<<
25730  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
25731  *     cdef public int diagonal_obs_cov
25732  */
25733 
25734 /* Python wrapper */
25735 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14time_invariant_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14time_invariant_1__get__(PyObject * __pyx_v_self)25736 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14time_invariant_1__get__(PyObject *__pyx_v_self) {
25737   PyObject *__pyx_r = 0;
25738   __Pyx_RefNannyDeclarations
25739   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25740   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14time_invariant___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25741 
25742   /* function exit code */
25743   __Pyx_RefNannyFinishContext();
25744   return __pyx_r;
25745 }
25746 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25747 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25748   PyObject *__pyx_r = NULL;
25749   __Pyx_RefNannyDeclarations
25750   PyObject *__pyx_t_1 = NULL;
25751   int __pyx_lineno = 0;
25752   const char *__pyx_filename = NULL;
25753   int __pyx_clineno = 0;
25754   __Pyx_RefNannySetupContext("__get__", 0);
25755   __Pyx_XDECREF(__pyx_r);
25756   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time_invariant); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
25757   __Pyx_GOTREF(__pyx_t_1);
25758   __pyx_r = __pyx_t_1;
25759   __pyx_t_1 = 0;
25760   goto __pyx_L0;
25761 
25762   /* function exit code */
25763   __pyx_L1_error:;
25764   __Pyx_XDECREF(__pyx_t_1);
25765   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.time_invariant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25766   __pyx_r = NULL;
25767   __pyx_L0:;
25768   __Pyx_XGIVEREF(__pyx_r);
25769   __Pyx_RefNannyFinishContext();
25770   return __pyx_r;
25771 }
25772 
25773 /* "statsmodels/tsa/statespace/_representation.pxd":106
25774  *     # Flags
25775  *     cdef readonly int time_invariant
25776  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary             # <<<<<<<<<<<<<<
25777  *     cdef public int diagonal_obs_cov
25778  *     cdef readonly int _diagonal_obs_cov
25779  */
25780 
25781 /* Python wrapper */
25782 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialized_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialized_1__get__(PyObject * __pyx_v_self)25783 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialized_1__get__(PyObject *__pyx_v_self) {
25784   PyObject *__pyx_r = 0;
25785   __Pyx_RefNannyDeclarations
25786   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25787   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialized___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25788 
25789   /* function exit code */
25790   __Pyx_RefNannyFinishContext();
25791   return __pyx_r;
25792 }
25793 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25794 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25795   PyObject *__pyx_r = NULL;
25796   __Pyx_RefNannyDeclarations
25797   PyObject *__pyx_t_1 = NULL;
25798   int __pyx_lineno = 0;
25799   const char *__pyx_filename = NULL;
25800   int __pyx_clineno = 0;
25801   __Pyx_RefNannySetupContext("__get__", 0);
25802   __Pyx_XDECREF(__pyx_r);
25803   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
25804   __Pyx_GOTREF(__pyx_t_1);
25805   __pyx_r = __pyx_t_1;
25806   __pyx_t_1 = 0;
25807   goto __pyx_L0;
25808 
25809   /* function exit code */
25810   __pyx_L1_error:;
25811   __Pyx_XDECREF(__pyx_t_1);
25812   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25813   __pyx_r = NULL;
25814   __pyx_L0:;
25815   __Pyx_XGIVEREF(__pyx_r);
25816   __Pyx_RefNannyFinishContext();
25817   return __pyx_r;
25818 }
25819 
25820 /* Python wrapper */
25821 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19initialized_diffuse_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19initialized_diffuse_1__get__(PyObject * __pyx_v_self)25822 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19initialized_diffuse_1__get__(PyObject *__pyx_v_self) {
25823   PyObject *__pyx_r = 0;
25824   __Pyx_RefNannyDeclarations
25825   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25826   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19initialized_diffuse___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25827 
25828   /* function exit code */
25829   __Pyx_RefNannyFinishContext();
25830   return __pyx_r;
25831 }
25832 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25833 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25834   PyObject *__pyx_r = NULL;
25835   __Pyx_RefNannyDeclarations
25836   PyObject *__pyx_t_1 = NULL;
25837   int __pyx_lineno = 0;
25838   const char *__pyx_filename = NULL;
25839   int __pyx_clineno = 0;
25840   __Pyx_RefNannySetupContext("__get__", 0);
25841   __Pyx_XDECREF(__pyx_r);
25842   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
25843   __Pyx_GOTREF(__pyx_t_1);
25844   __pyx_r = __pyx_t_1;
25845   __pyx_t_1 = 0;
25846   goto __pyx_L0;
25847 
25848   /* function exit code */
25849   __pyx_L1_error:;
25850   __Pyx_XDECREF(__pyx_t_1);
25851   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialized_diffuse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25852   __pyx_r = NULL;
25853   __pyx_L0:;
25854   __Pyx_XGIVEREF(__pyx_r);
25855   __Pyx_RefNannyFinishContext();
25856   return __pyx_r;
25857 }
25858 
25859 /* Python wrapper */
25860 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22initialized_stationary_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22initialized_stationary_1__get__(PyObject * __pyx_v_self)25861 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22initialized_stationary_1__get__(PyObject *__pyx_v_self) {
25862   PyObject *__pyx_r = 0;
25863   __Pyx_RefNannyDeclarations
25864   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25865   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22initialized_stationary___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25866 
25867   /* function exit code */
25868   __Pyx_RefNannyFinishContext();
25869   return __pyx_r;
25870 }
25871 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25872 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25873   PyObject *__pyx_r = NULL;
25874   __Pyx_RefNannyDeclarations
25875   PyObject *__pyx_t_1 = NULL;
25876   int __pyx_lineno = 0;
25877   const char *__pyx_filename = NULL;
25878   int __pyx_clineno = 0;
25879   __Pyx_RefNannySetupContext("__get__", 0);
25880   __Pyx_XDECREF(__pyx_r);
25881   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 106, __pyx_L1_error)
25882   __Pyx_GOTREF(__pyx_t_1);
25883   __pyx_r = __pyx_t_1;
25884   __pyx_t_1 = 0;
25885   goto __pyx_L0;
25886 
25887   /* function exit code */
25888   __pyx_L1_error:;
25889   __Pyx_XDECREF(__pyx_t_1);
25890   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.initialized_stationary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25891   __pyx_r = NULL;
25892   __pyx_L0:;
25893   __Pyx_XGIVEREF(__pyx_r);
25894   __Pyx_RefNannyFinishContext();
25895   return __pyx_r;
25896 }
25897 
25898 /* "statsmodels/tsa/statespace/_representation.pxd":107
25899  *     cdef readonly int time_invariant
25900  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
25901  *     cdef public int diagonal_obs_cov             # <<<<<<<<<<<<<<
25902  *     cdef readonly int _diagonal_obs_cov
25903  *     cdef public int subset_design
25904  */
25905 
25906 /* Python wrapper */
25907 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_1__get__(PyObject * __pyx_v_self)25908 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_1__get__(PyObject *__pyx_v_self) {
25909   PyObject *__pyx_r = 0;
25910   __Pyx_RefNannyDeclarations
25911   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25912   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25913 
25914   /* function exit code */
25915   __Pyx_RefNannyFinishContext();
25916   return __pyx_r;
25917 }
25918 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)25919 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
25920   PyObject *__pyx_r = NULL;
25921   __Pyx_RefNannyDeclarations
25922   PyObject *__pyx_t_1 = NULL;
25923   int __pyx_lineno = 0;
25924   const char *__pyx_filename = NULL;
25925   int __pyx_clineno = 0;
25926   __Pyx_RefNannySetupContext("__get__", 0);
25927   __Pyx_XDECREF(__pyx_r);
25928   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 107, __pyx_L1_error)
25929   __Pyx_GOTREF(__pyx_t_1);
25930   __pyx_r = __pyx_t_1;
25931   __pyx_t_1 = 0;
25932   goto __pyx_L0;
25933 
25934   /* function exit code */
25935   __pyx_L1_error:;
25936   __Pyx_XDECREF(__pyx_t_1);
25937   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.diagonal_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25938   __pyx_r = NULL;
25939   __pyx_L0:;
25940   __Pyx_XGIVEREF(__pyx_r);
25941   __Pyx_RefNannyFinishContext();
25942   return __pyx_r;
25943 }
25944 
25945 /* Python wrapper */
25946 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)25947 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
25948   int __pyx_r;
25949   __Pyx_RefNannyDeclarations
25950   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
25951   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
25952 
25953   /* function exit code */
25954   __Pyx_RefNannyFinishContext();
25955   return __pyx_r;
25956 }
25957 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,PyObject * __pyx_v_value)25958 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
25959   int __pyx_r;
25960   __Pyx_RefNannyDeclarations
25961   int __pyx_t_1;
25962   int __pyx_lineno = 0;
25963   const char *__pyx_filename = NULL;
25964   int __pyx_clineno = 0;
25965   __Pyx_RefNannySetupContext("__set__", 0);
25966   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 107, __pyx_L1_error)
25967   __pyx_v_self->diagonal_obs_cov = __pyx_t_1;
25968 
25969   /* function exit code */
25970   __pyx_r = 0;
25971   goto __pyx_L0;
25972   __pyx_L1_error:;
25973   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.diagonal_obs_cov.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25974   __pyx_r = -1;
25975   __pyx_L0:;
25976   __Pyx_RefNannyFinishContext();
25977   return __pyx_r;
25978 }
25979 
25980 /* "statsmodels/tsa/statespace/_representation.pxd":108
25981  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
25982  *     cdef public int diagonal_obs_cov
25983  *     cdef readonly int _diagonal_obs_cov             # <<<<<<<<<<<<<<
25984  *     cdef public int subset_design
25985  *     cdef public int companion_transition
25986  */
25987 
25988 /* Python wrapper */
25989 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17_diagonal_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17_diagonal_obs_cov_1__get__(PyObject * __pyx_v_self)25990 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17_diagonal_obs_cov_1__get__(PyObject *__pyx_v_self) {
25991   PyObject *__pyx_r = 0;
25992   __Pyx_RefNannyDeclarations
25993   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25994   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17_diagonal_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
25995 
25996   /* function exit code */
25997   __Pyx_RefNannyFinishContext();
25998   return __pyx_r;
25999 }
26000 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26001 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26002   PyObject *__pyx_r = NULL;
26003   __Pyx_RefNannyDeclarations
26004   PyObject *__pyx_t_1 = NULL;
26005   int __pyx_lineno = 0;
26006   const char *__pyx_filename = NULL;
26007   int __pyx_clineno = 0;
26008   __Pyx_RefNannySetupContext("__get__", 0);
26009   __Pyx_XDECREF(__pyx_r);
26010   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
26011   __Pyx_GOTREF(__pyx_t_1);
26012   __pyx_r = __pyx_t_1;
26013   __pyx_t_1 = 0;
26014   goto __pyx_L0;
26015 
26016   /* function exit code */
26017   __pyx_L1_error:;
26018   __Pyx_XDECREF(__pyx_t_1);
26019   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._diagonal_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26020   __pyx_r = NULL;
26021   __pyx_L0:;
26022   __Pyx_XGIVEREF(__pyx_r);
26023   __Pyx_RefNannyFinishContext();
26024   return __pyx_r;
26025 }
26026 
26027 /* "statsmodels/tsa/statespace/_representation.pxd":109
26028  *     cdef public int diagonal_obs_cov
26029  *     cdef readonly int _diagonal_obs_cov
26030  *     cdef public int subset_design             # <<<<<<<<<<<<<<
26031  *     cdef public int companion_transition
26032  *
26033  */
26034 
26035 /* Python wrapper */
26036 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_1__get__(PyObject * __pyx_v_self)26037 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_1__get__(PyObject *__pyx_v_self) {
26038   PyObject *__pyx_r = 0;
26039   __Pyx_RefNannyDeclarations
26040   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26041   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26042 
26043   /* function exit code */
26044   __Pyx_RefNannyFinishContext();
26045   return __pyx_r;
26046 }
26047 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26048 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26049   PyObject *__pyx_r = NULL;
26050   __Pyx_RefNannyDeclarations
26051   PyObject *__pyx_t_1 = NULL;
26052   int __pyx_lineno = 0;
26053   const char *__pyx_filename = NULL;
26054   int __pyx_clineno = 0;
26055   __Pyx_RefNannySetupContext("__get__", 0);
26056   __Pyx_XDECREF(__pyx_r);
26057   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->subset_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 109, __pyx_L1_error)
26058   __Pyx_GOTREF(__pyx_t_1);
26059   __pyx_r = __pyx_t_1;
26060   __pyx_t_1 = 0;
26061   goto __pyx_L0;
26062 
26063   /* function exit code */
26064   __pyx_L1_error:;
26065   __Pyx_XDECREF(__pyx_t_1);
26066   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.subset_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26067   __pyx_r = NULL;
26068   __pyx_L0:;
26069   __Pyx_XGIVEREF(__pyx_r);
26070   __Pyx_RefNannyFinishContext();
26071   return __pyx_r;
26072 }
26073 
26074 /* Python wrapper */
26075 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)26076 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
26077   int __pyx_r;
26078   __Pyx_RefNannyDeclarations
26079   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
26080   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
26081 
26082   /* function exit code */
26083   __Pyx_RefNannyFinishContext();
26084   return __pyx_r;
26085 }
26086 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,PyObject * __pyx_v_value)26087 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
26088   int __pyx_r;
26089   __Pyx_RefNannyDeclarations
26090   int __pyx_t_1;
26091   int __pyx_lineno = 0;
26092   const char *__pyx_filename = NULL;
26093   int __pyx_clineno = 0;
26094   __Pyx_RefNannySetupContext("__set__", 0);
26095   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L1_error)
26096   __pyx_v_self->subset_design = __pyx_t_1;
26097 
26098   /* function exit code */
26099   __pyx_r = 0;
26100   goto __pyx_L0;
26101   __pyx_L1_error:;
26102   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.subset_design.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26103   __pyx_r = -1;
26104   __pyx_L0:;
26105   __Pyx_RefNannyFinishContext();
26106   return __pyx_r;
26107 }
26108 
26109 /* "statsmodels/tsa/statespace/_representation.pxd":110
26110  *     cdef readonly int _diagonal_obs_cov
26111  *     cdef public int subset_design
26112  *     cdef public int companion_transition             # <<<<<<<<<<<<<<
26113  *
26114  *     # Temporary arrays
26115  */
26116 
26117 /* Python wrapper */
26118 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_1__get__(PyObject * __pyx_v_self)26119 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_1__get__(PyObject *__pyx_v_self) {
26120   PyObject *__pyx_r = 0;
26121   __Pyx_RefNannyDeclarations
26122   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26123   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26124 
26125   /* function exit code */
26126   __Pyx_RefNannyFinishContext();
26127   return __pyx_r;
26128 }
26129 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26130 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26131   PyObject *__pyx_r = NULL;
26132   __Pyx_RefNannyDeclarations
26133   PyObject *__pyx_t_1 = NULL;
26134   int __pyx_lineno = 0;
26135   const char *__pyx_filename = NULL;
26136   int __pyx_clineno = 0;
26137   __Pyx_RefNannySetupContext("__get__", 0);
26138   __Pyx_XDECREF(__pyx_r);
26139   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->companion_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 110, __pyx_L1_error)
26140   __Pyx_GOTREF(__pyx_t_1);
26141   __pyx_r = __pyx_t_1;
26142   __pyx_t_1 = 0;
26143   goto __pyx_L0;
26144 
26145   /* function exit code */
26146   __pyx_L1_error:;
26147   __Pyx_XDECREF(__pyx_t_1);
26148   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.companion_transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26149   __pyx_r = NULL;
26150   __pyx_L0:;
26151   __Pyx_XGIVEREF(__pyx_r);
26152   __Pyx_RefNannyFinishContext();
26153   return __pyx_r;
26154 }
26155 
26156 /* Python wrapper */
26157 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)26158 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
26159   int __pyx_r;
26160   __Pyx_RefNannyDeclarations
26161   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
26162   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
26163 
26164   /* function exit code */
26165   __Pyx_RefNannyFinishContext();
26166   return __pyx_r;
26167 }
26168 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self,PyObject * __pyx_v_value)26169 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
26170   int __pyx_r;
26171   __Pyx_RefNannyDeclarations
26172   int __pyx_t_1;
26173   int __pyx_lineno = 0;
26174   const char *__pyx_filename = NULL;
26175   int __pyx_clineno = 0;
26176   __Pyx_RefNannySetupContext("__set__", 0);
26177   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 110, __pyx_L1_error)
26178   __pyx_v_self->companion_transition = __pyx_t_1;
26179 
26180   /* function exit code */
26181   __pyx_r = 0;
26182   goto __pyx_L0;
26183   __pyx_L1_error:;
26184   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.companion_transition.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26185   __pyx_r = -1;
26186   __pyx_L0:;
26187   __Pyx_RefNannyFinishContext();
26188   return __pyx_r;
26189 }
26190 
26191 /* "statsmodels/tsa/statespace/_representation.pxd":116
26192  *
26193  *     # Temporary selection arrays
26194  *     cdef readonly np.float64_t [:] selected_obs             # <<<<<<<<<<<<<<
26195  *     cdef readonly np.float64_t [:] selected_obs_intercept
26196  *     cdef readonly np.float64_t [:] selected_design
26197  */
26198 
26199 /* Python wrapper */
26200 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12selected_obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12selected_obs_1__get__(PyObject * __pyx_v_self)26201 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12selected_obs_1__get__(PyObject *__pyx_v_self) {
26202   PyObject *__pyx_r = 0;
26203   __Pyx_RefNannyDeclarations
26204   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26205   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12selected_obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26206 
26207   /* function exit code */
26208   __Pyx_RefNannyFinishContext();
26209   return __pyx_r;
26210 }
26211 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26212 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26213   PyObject *__pyx_r = NULL;
26214   __Pyx_RefNannyDeclarations
26215   PyObject *__pyx_t_1 = NULL;
26216   int __pyx_lineno = 0;
26217   const char *__pyx_filename = NULL;
26218   int __pyx_clineno = 0;
26219   __Pyx_RefNannySetupContext("__get__", 0);
26220   __Pyx_XDECREF(__pyx_r);
26221   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 116, __pyx_L1_error)}
26222   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 116, __pyx_L1_error)
26223   __Pyx_GOTREF(__pyx_t_1);
26224   __pyx_r = __pyx_t_1;
26225   __pyx_t_1 = 0;
26226   goto __pyx_L0;
26227 
26228   /* function exit code */
26229   __pyx_L1_error:;
26230   __Pyx_XDECREF(__pyx_t_1);
26231   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.selected_obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26232   __pyx_r = NULL;
26233   __pyx_L0:;
26234   __Pyx_XGIVEREF(__pyx_r);
26235   __Pyx_RefNannyFinishContext();
26236   return __pyx_r;
26237 }
26238 
26239 /* "statsmodels/tsa/statespace/_representation.pxd":117
26240  *     # Temporary selection arrays
26241  *     cdef readonly np.float64_t [:] selected_obs
26242  *     cdef readonly np.float64_t [:] selected_obs_intercept             # <<<<<<<<<<<<<<
26243  *     cdef readonly np.float64_t [:] selected_design
26244  *     cdef readonly np.float64_t [:] selected_obs_cov
26245  */
26246 
26247 /* Python wrapper */
26248 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22selected_obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22selected_obs_intercept_1__get__(PyObject * __pyx_v_self)26249 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22selected_obs_intercept_1__get__(PyObject *__pyx_v_self) {
26250   PyObject *__pyx_r = 0;
26251   __Pyx_RefNannyDeclarations
26252   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26253   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22selected_obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26254 
26255   /* function exit code */
26256   __Pyx_RefNannyFinishContext();
26257   return __pyx_r;
26258 }
26259 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26260 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26261   PyObject *__pyx_r = NULL;
26262   __Pyx_RefNannyDeclarations
26263   PyObject *__pyx_t_1 = NULL;
26264   int __pyx_lineno = 0;
26265   const char *__pyx_filename = NULL;
26266   int __pyx_clineno = 0;
26267   __Pyx_RefNannySetupContext("__get__", 0);
26268   __Pyx_XDECREF(__pyx_r);
26269   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 117, __pyx_L1_error)}
26270   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
26271   __Pyx_GOTREF(__pyx_t_1);
26272   __pyx_r = __pyx_t_1;
26273   __pyx_t_1 = 0;
26274   goto __pyx_L0;
26275 
26276   /* function exit code */
26277   __pyx_L1_error:;
26278   __Pyx_XDECREF(__pyx_t_1);
26279   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.selected_obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26280   __pyx_r = NULL;
26281   __pyx_L0:;
26282   __Pyx_XGIVEREF(__pyx_r);
26283   __Pyx_RefNannyFinishContext();
26284   return __pyx_r;
26285 }
26286 
26287 /* "statsmodels/tsa/statespace/_representation.pxd":118
26288  *     cdef readonly np.float64_t [:] selected_obs
26289  *     cdef readonly np.float64_t [:] selected_obs_intercept
26290  *     cdef readonly np.float64_t [:] selected_design             # <<<<<<<<<<<<<<
26291  *     cdef readonly np.float64_t [:] selected_obs_cov
26292  *
26293  */
26294 
26295 /* Python wrapper */
26296 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15selected_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15selected_design_1__get__(PyObject * __pyx_v_self)26297 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15selected_design_1__get__(PyObject *__pyx_v_self) {
26298   PyObject *__pyx_r = 0;
26299   __Pyx_RefNannyDeclarations
26300   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26301   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15selected_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26302 
26303   /* function exit code */
26304   __Pyx_RefNannyFinishContext();
26305   return __pyx_r;
26306 }
26307 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26308 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26309   PyObject *__pyx_r = NULL;
26310   __Pyx_RefNannyDeclarations
26311   PyObject *__pyx_t_1 = NULL;
26312   int __pyx_lineno = 0;
26313   const char *__pyx_filename = NULL;
26314   int __pyx_clineno = 0;
26315   __Pyx_RefNannySetupContext("__get__", 0);
26316   __Pyx_XDECREF(__pyx_r);
26317   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 118, __pyx_L1_error)}
26318   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_design, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 118, __pyx_L1_error)
26319   __Pyx_GOTREF(__pyx_t_1);
26320   __pyx_r = __pyx_t_1;
26321   __pyx_t_1 = 0;
26322   goto __pyx_L0;
26323 
26324   /* function exit code */
26325   __pyx_L1_error:;
26326   __Pyx_XDECREF(__pyx_t_1);
26327   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.selected_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26328   __pyx_r = NULL;
26329   __pyx_L0:;
26330   __Pyx_XGIVEREF(__pyx_r);
26331   __Pyx_RefNannyFinishContext();
26332   return __pyx_r;
26333 }
26334 
26335 /* "statsmodels/tsa/statespace/_representation.pxd":119
26336  *     cdef readonly np.float64_t [:] selected_obs_intercept
26337  *     cdef readonly np.float64_t [:] selected_design
26338  *     cdef readonly np.float64_t [:] selected_obs_cov             # <<<<<<<<<<<<<<
26339  *
26340  *     # Temporary transformation arrays
26341  */
26342 
26343 /* Python wrapper */
26344 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16selected_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16selected_obs_cov_1__get__(PyObject * __pyx_v_self)26345 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16selected_obs_cov_1__get__(PyObject *__pyx_v_self) {
26346   PyObject *__pyx_r = 0;
26347   __Pyx_RefNannyDeclarations
26348   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26349   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16selected_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26350 
26351   /* function exit code */
26352   __Pyx_RefNannyFinishContext();
26353   return __pyx_r;
26354 }
26355 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26356 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26357   PyObject *__pyx_r = NULL;
26358   __Pyx_RefNannyDeclarations
26359   PyObject *__pyx_t_1 = NULL;
26360   int __pyx_lineno = 0;
26361   const char *__pyx_filename = NULL;
26362   int __pyx_clineno = 0;
26363   __Pyx_RefNannySetupContext("__get__", 0);
26364   __Pyx_XDECREF(__pyx_r);
26365   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 119, __pyx_L1_error)}
26366   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_cov, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 119, __pyx_L1_error)
26367   __Pyx_GOTREF(__pyx_t_1);
26368   __pyx_r = __pyx_t_1;
26369   __pyx_t_1 = 0;
26370   goto __pyx_L0;
26371 
26372   /* function exit code */
26373   __pyx_L1_error:;
26374   __Pyx_XDECREF(__pyx_t_1);
26375   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.selected_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26376   __pyx_r = NULL;
26377   __pyx_L0:;
26378   __Pyx_XGIVEREF(__pyx_r);
26379   __Pyx_RefNannyFinishContext();
26380   return __pyx_r;
26381 }
26382 
26383 /* "statsmodels/tsa/statespace/_representation.pxd":122
26384  *
26385  *     # Temporary transformation arrays
26386  *     cdef readonly np.float64_t [::1,:] transform_cholesky             # <<<<<<<<<<<<<<
26387  *     cdef readonly np.float64_t [::1,:] transform_obs_cov
26388  *     cdef readonly np.float64_t [::1,:] transform_design
26389  */
26390 
26391 /* Python wrapper */
26392 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18transform_cholesky_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18transform_cholesky_1__get__(PyObject * __pyx_v_self)26393 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18transform_cholesky_1__get__(PyObject *__pyx_v_self) {
26394   PyObject *__pyx_r = 0;
26395   __Pyx_RefNannyDeclarations
26396   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26397   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18transform_cholesky___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26398 
26399   /* function exit code */
26400   __Pyx_RefNannyFinishContext();
26401   return __pyx_r;
26402 }
26403 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26404 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26405   PyObject *__pyx_r = NULL;
26406   __Pyx_RefNannyDeclarations
26407   PyObject *__pyx_t_1 = NULL;
26408   int __pyx_lineno = 0;
26409   const char *__pyx_filename = NULL;
26410   int __pyx_clineno = 0;
26411   __Pyx_RefNannySetupContext("__get__", 0);
26412   __Pyx_XDECREF(__pyx_r);
26413   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 122, __pyx_L1_error)}
26414   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 122, __pyx_L1_error)
26415   __Pyx_GOTREF(__pyx_t_1);
26416   __pyx_r = __pyx_t_1;
26417   __pyx_t_1 = 0;
26418   goto __pyx_L0;
26419 
26420   /* function exit code */
26421   __pyx_L1_error:;
26422   __Pyx_XDECREF(__pyx_t_1);
26423   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transform_cholesky.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26424   __pyx_r = NULL;
26425   __pyx_L0:;
26426   __Pyx_XGIVEREF(__pyx_r);
26427   __Pyx_RefNannyFinishContext();
26428   return __pyx_r;
26429 }
26430 
26431 /* "statsmodels/tsa/statespace/_representation.pxd":123
26432  *     # Temporary transformation arrays
26433  *     cdef readonly np.float64_t [::1,:] transform_cholesky
26434  *     cdef readonly np.float64_t [::1,:] transform_obs_cov             # <<<<<<<<<<<<<<
26435  *     cdef readonly np.float64_t [::1,:] transform_design
26436  *     cdef readonly np.float64_t [:] transform_obs_intercept
26437  */
26438 
26439 /* Python wrapper */
26440 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17transform_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17transform_obs_cov_1__get__(PyObject * __pyx_v_self)26441 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17transform_obs_cov_1__get__(PyObject *__pyx_v_self) {
26442   PyObject *__pyx_r = 0;
26443   __Pyx_RefNannyDeclarations
26444   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26445   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17transform_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26446 
26447   /* function exit code */
26448   __Pyx_RefNannyFinishContext();
26449   return __pyx_r;
26450 }
26451 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26452 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26453   PyObject *__pyx_r = NULL;
26454   __Pyx_RefNannyDeclarations
26455   PyObject *__pyx_t_1 = NULL;
26456   int __pyx_lineno = 0;
26457   const char *__pyx_filename = NULL;
26458   int __pyx_clineno = 0;
26459   __Pyx_RefNannySetupContext("__get__", 0);
26460   __Pyx_XDECREF(__pyx_r);
26461   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 123, __pyx_L1_error)}
26462   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 123, __pyx_L1_error)
26463   __Pyx_GOTREF(__pyx_t_1);
26464   __pyx_r = __pyx_t_1;
26465   __pyx_t_1 = 0;
26466   goto __pyx_L0;
26467 
26468   /* function exit code */
26469   __pyx_L1_error:;
26470   __Pyx_XDECREF(__pyx_t_1);
26471   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transform_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26472   __pyx_r = NULL;
26473   __pyx_L0:;
26474   __Pyx_XGIVEREF(__pyx_r);
26475   __Pyx_RefNannyFinishContext();
26476   return __pyx_r;
26477 }
26478 
26479 /* "statsmodels/tsa/statespace/_representation.pxd":124
26480  *     cdef readonly np.float64_t [::1,:] transform_cholesky
26481  *     cdef readonly np.float64_t [::1,:] transform_obs_cov
26482  *     cdef readonly np.float64_t [::1,:] transform_design             # <<<<<<<<<<<<<<
26483  *     cdef readonly np.float64_t [:] transform_obs_intercept
26484  *     cdef readonly np.float64_t transform_determinant
26485  */
26486 
26487 /* Python wrapper */
26488 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16transform_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16transform_design_1__get__(PyObject * __pyx_v_self)26489 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16transform_design_1__get__(PyObject *__pyx_v_self) {
26490   PyObject *__pyx_r = 0;
26491   __Pyx_RefNannyDeclarations
26492   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26493   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16transform_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26494 
26495   /* function exit code */
26496   __Pyx_RefNannyFinishContext();
26497   return __pyx_r;
26498 }
26499 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26500 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26501   PyObject *__pyx_r = NULL;
26502   __Pyx_RefNannyDeclarations
26503   PyObject *__pyx_t_1 = NULL;
26504   int __pyx_lineno = 0;
26505   const char *__pyx_filename = NULL;
26506   int __pyx_clineno = 0;
26507   __Pyx_RefNannySetupContext("__get__", 0);
26508   __Pyx_XDECREF(__pyx_r);
26509   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 124, __pyx_L1_error)}
26510   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_design, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 124, __pyx_L1_error)
26511   __Pyx_GOTREF(__pyx_t_1);
26512   __pyx_r = __pyx_t_1;
26513   __pyx_t_1 = 0;
26514   goto __pyx_L0;
26515 
26516   /* function exit code */
26517   __pyx_L1_error:;
26518   __Pyx_XDECREF(__pyx_t_1);
26519   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transform_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26520   __pyx_r = NULL;
26521   __pyx_L0:;
26522   __Pyx_XGIVEREF(__pyx_r);
26523   __Pyx_RefNannyFinishContext();
26524   return __pyx_r;
26525 }
26526 
26527 /* "statsmodels/tsa/statespace/_representation.pxd":125
26528  *     cdef readonly np.float64_t [::1,:] transform_obs_cov
26529  *     cdef readonly np.float64_t [::1,:] transform_design
26530  *     cdef readonly np.float64_t [:] transform_obs_intercept             # <<<<<<<<<<<<<<
26531  *     cdef readonly np.float64_t transform_determinant
26532  *
26533  */
26534 
26535 /* Python wrapper */
26536 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_23transform_obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_23transform_obs_intercept_1__get__(PyObject * __pyx_v_self)26537 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_23transform_obs_intercept_1__get__(PyObject *__pyx_v_self) {
26538   PyObject *__pyx_r = 0;
26539   __Pyx_RefNannyDeclarations
26540   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26541   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_23transform_obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26542 
26543   /* function exit code */
26544   __Pyx_RefNannyFinishContext();
26545   return __pyx_r;
26546 }
26547 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26548 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26549   PyObject *__pyx_r = NULL;
26550   __Pyx_RefNannyDeclarations
26551   PyObject *__pyx_t_1 = NULL;
26552   int __pyx_lineno = 0;
26553   const char *__pyx_filename = NULL;
26554   int __pyx_clineno = 0;
26555   __Pyx_RefNannySetupContext("__get__", 0);
26556   __Pyx_XDECREF(__pyx_r);
26557   if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 125, __pyx_L1_error)}
26558   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 125, __pyx_L1_error)
26559   __Pyx_GOTREF(__pyx_t_1);
26560   __pyx_r = __pyx_t_1;
26561   __pyx_t_1 = 0;
26562   goto __pyx_L0;
26563 
26564   /* function exit code */
26565   __pyx_L1_error:;
26566   __Pyx_XDECREF(__pyx_t_1);
26567   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transform_obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26568   __pyx_r = NULL;
26569   __pyx_L0:;
26570   __Pyx_XGIVEREF(__pyx_r);
26571   __Pyx_RefNannyFinishContext();
26572   return __pyx_r;
26573 }
26574 
26575 /* "statsmodels/tsa/statespace/_representation.pxd":126
26576  *     cdef readonly np.float64_t [::1,:] transform_design
26577  *     cdef readonly np.float64_t [:] transform_obs_intercept
26578  *     cdef readonly np.float64_t transform_determinant             # <<<<<<<<<<<<<<
26579  *
26580  *     cdef readonly np.float64_t [:] collapse_obs
26581  */
26582 
26583 /* Python wrapper */
26584 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_21transform_determinant_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_21transform_determinant_1__get__(PyObject * __pyx_v_self)26585 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_21transform_determinant_1__get__(PyObject *__pyx_v_self) {
26586   PyObject *__pyx_r = 0;
26587   __Pyx_RefNannyDeclarations
26588   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26589   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_21transform_determinant___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26590 
26591   /* function exit code */
26592   __Pyx_RefNannyFinishContext();
26593   return __pyx_r;
26594 }
26595 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26596 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26597   PyObject *__pyx_r = NULL;
26598   __Pyx_RefNannyDeclarations
26599   PyObject *__pyx_t_1 = NULL;
26600   int __pyx_lineno = 0;
26601   const char *__pyx_filename = NULL;
26602   int __pyx_clineno = 0;
26603   __Pyx_RefNannySetupContext("__get__", 0);
26604   __Pyx_XDECREF(__pyx_r);
26605   __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->transform_determinant); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 126, __pyx_L1_error)
26606   __Pyx_GOTREF(__pyx_t_1);
26607   __pyx_r = __pyx_t_1;
26608   __pyx_t_1 = 0;
26609   goto __pyx_L0;
26610 
26611   /* function exit code */
26612   __pyx_L1_error:;
26613   __Pyx_XDECREF(__pyx_t_1);
26614   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.transform_determinant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26615   __pyx_r = NULL;
26616   __pyx_L0:;
26617   __Pyx_XGIVEREF(__pyx_r);
26618   __Pyx_RefNannyFinishContext();
26619   return __pyx_r;
26620 }
26621 
26622 /* "statsmodels/tsa/statespace/_representation.pxd":128
26623  *     cdef readonly np.float64_t transform_determinant
26624  *
26625  *     cdef readonly np.float64_t [:] collapse_obs             # <<<<<<<<<<<<<<
26626  *     cdef readonly np.float64_t [:] collapse_obs_tmp
26627  *     cdef readonly np.float64_t [::1,:] collapse_design
26628  */
26629 
26630 /* Python wrapper */
26631 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12collapse_obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12collapse_obs_1__get__(PyObject * __pyx_v_self)26632 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12collapse_obs_1__get__(PyObject *__pyx_v_self) {
26633   PyObject *__pyx_r = 0;
26634   __Pyx_RefNannyDeclarations
26635   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26636   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12collapse_obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26637 
26638   /* function exit code */
26639   __Pyx_RefNannyFinishContext();
26640   return __pyx_r;
26641 }
26642 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26643 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26644   PyObject *__pyx_r = NULL;
26645   __Pyx_RefNannyDeclarations
26646   PyObject *__pyx_t_1 = NULL;
26647   int __pyx_lineno = 0;
26648   const char *__pyx_filename = NULL;
26649   int __pyx_clineno = 0;
26650   __Pyx_RefNannySetupContext("__get__", 0);
26651   __Pyx_XDECREF(__pyx_r);
26652   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 128, __pyx_L1_error)}
26653   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 128, __pyx_L1_error)
26654   __Pyx_GOTREF(__pyx_t_1);
26655   __pyx_r = __pyx_t_1;
26656   __pyx_t_1 = 0;
26657   goto __pyx_L0;
26658 
26659   /* function exit code */
26660   __pyx_L1_error:;
26661   __Pyx_XDECREF(__pyx_t_1);
26662   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.collapse_obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26663   __pyx_r = NULL;
26664   __pyx_L0:;
26665   __Pyx_XGIVEREF(__pyx_r);
26666   __Pyx_RefNannyFinishContext();
26667   return __pyx_r;
26668 }
26669 
26670 /* "statsmodels/tsa/statespace/_representation.pxd":129
26671  *
26672  *     cdef readonly np.float64_t [:] collapse_obs
26673  *     cdef readonly np.float64_t [:] collapse_obs_tmp             # <<<<<<<<<<<<<<
26674  *     cdef readonly np.float64_t [::1,:] collapse_design
26675  *     cdef readonly np.float64_t [::1,:] collapse_obs_cov
26676  */
26677 
26678 /* Python wrapper */
26679 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_tmp_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_tmp_1__get__(PyObject * __pyx_v_self)26680 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_tmp_1__get__(PyObject *__pyx_v_self) {
26681   PyObject *__pyx_r = 0;
26682   __Pyx_RefNannyDeclarations
26683   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26684   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_tmp___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26685 
26686   /* function exit code */
26687   __Pyx_RefNannyFinishContext();
26688   return __pyx_r;
26689 }
26690 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26691 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26692   PyObject *__pyx_r = NULL;
26693   __Pyx_RefNannyDeclarations
26694   PyObject *__pyx_t_1 = NULL;
26695   int __pyx_lineno = 0;
26696   const char *__pyx_filename = NULL;
26697   int __pyx_clineno = 0;
26698   __Pyx_RefNannySetupContext("__get__", 0);
26699   __Pyx_XDECREF(__pyx_r);
26700   if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 129, __pyx_L1_error)}
26701   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_tmp, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
26702   __Pyx_GOTREF(__pyx_t_1);
26703   __pyx_r = __pyx_t_1;
26704   __pyx_t_1 = 0;
26705   goto __pyx_L0;
26706 
26707   /* function exit code */
26708   __pyx_L1_error:;
26709   __Pyx_XDECREF(__pyx_t_1);
26710   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.collapse_obs_tmp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26711   __pyx_r = NULL;
26712   __pyx_L0:;
26713   __Pyx_XGIVEREF(__pyx_r);
26714   __Pyx_RefNannyFinishContext();
26715   return __pyx_r;
26716 }
26717 
26718 /* "statsmodels/tsa/statespace/_representation.pxd":130
26719  *     cdef readonly np.float64_t [:] collapse_obs
26720  *     cdef readonly np.float64_t [:] collapse_obs_tmp
26721  *     cdef readonly np.float64_t [::1,:] collapse_design             # <<<<<<<<<<<<<<
26722  *     cdef readonly np.float64_t [::1,:] collapse_obs_cov
26723  *     cdef readonly np.float64_t [::1,:] collapse_cholesky
26724  */
26725 
26726 /* Python wrapper */
26727 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15collapse_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15collapse_design_1__get__(PyObject * __pyx_v_self)26728 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15collapse_design_1__get__(PyObject *__pyx_v_self) {
26729   PyObject *__pyx_r = 0;
26730   __Pyx_RefNannyDeclarations
26731   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26732   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15collapse_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26733 
26734   /* function exit code */
26735   __Pyx_RefNannyFinishContext();
26736   return __pyx_r;
26737 }
26738 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26739 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26740   PyObject *__pyx_r = NULL;
26741   __Pyx_RefNannyDeclarations
26742   PyObject *__pyx_t_1 = NULL;
26743   int __pyx_lineno = 0;
26744   const char *__pyx_filename = NULL;
26745   int __pyx_clineno = 0;
26746   __Pyx_RefNannySetupContext("__get__", 0);
26747   __Pyx_XDECREF(__pyx_r);
26748   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 130, __pyx_L1_error)}
26749   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_design, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 130, __pyx_L1_error)
26750   __Pyx_GOTREF(__pyx_t_1);
26751   __pyx_r = __pyx_t_1;
26752   __pyx_t_1 = 0;
26753   goto __pyx_L0;
26754 
26755   /* function exit code */
26756   __pyx_L1_error:;
26757   __Pyx_XDECREF(__pyx_t_1);
26758   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.collapse_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26759   __pyx_r = NULL;
26760   __pyx_L0:;
26761   __Pyx_XGIVEREF(__pyx_r);
26762   __Pyx_RefNannyFinishContext();
26763   return __pyx_r;
26764 }
26765 
26766 /* "statsmodels/tsa/statespace/_representation.pxd":131
26767  *     cdef readonly np.float64_t [:] collapse_obs_tmp
26768  *     cdef readonly np.float64_t [::1,:] collapse_design
26769  *     cdef readonly np.float64_t [::1,:] collapse_obs_cov             # <<<<<<<<<<<<<<
26770  *     cdef readonly np.float64_t [::1,:] collapse_cholesky
26771  *     cdef readonly np.float64_t collapse_loglikelihood
26772  */
26773 
26774 /* Python wrapper */
26775 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_cov_1__get__(PyObject * __pyx_v_self)26776 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_cov_1__get__(PyObject *__pyx_v_self) {
26777   PyObject *__pyx_r = 0;
26778   __Pyx_RefNannyDeclarations
26779   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26780   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26781 
26782   /* function exit code */
26783   __Pyx_RefNannyFinishContext();
26784   return __pyx_r;
26785 }
26786 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26787 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26788   PyObject *__pyx_r = NULL;
26789   __Pyx_RefNannyDeclarations
26790   PyObject *__pyx_t_1 = NULL;
26791   int __pyx_lineno = 0;
26792   const char *__pyx_filename = NULL;
26793   int __pyx_clineno = 0;
26794   __Pyx_RefNannySetupContext("__get__", 0);
26795   __Pyx_XDECREF(__pyx_r);
26796   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 131, __pyx_L1_error)}
26797   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 131, __pyx_L1_error)
26798   __Pyx_GOTREF(__pyx_t_1);
26799   __pyx_r = __pyx_t_1;
26800   __pyx_t_1 = 0;
26801   goto __pyx_L0;
26802 
26803   /* function exit code */
26804   __pyx_L1_error:;
26805   __Pyx_XDECREF(__pyx_t_1);
26806   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.collapse_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26807   __pyx_r = NULL;
26808   __pyx_L0:;
26809   __Pyx_XGIVEREF(__pyx_r);
26810   __Pyx_RefNannyFinishContext();
26811   return __pyx_r;
26812 }
26813 
26814 /* "statsmodels/tsa/statespace/_representation.pxd":132
26815  *     cdef readonly np.float64_t [::1,:] collapse_design
26816  *     cdef readonly np.float64_t [::1,:] collapse_obs_cov
26817  *     cdef readonly np.float64_t [::1,:] collapse_cholesky             # <<<<<<<<<<<<<<
26818  *     cdef readonly np.float64_t collapse_loglikelihood
26819  *
26820  */
26821 
26822 /* Python wrapper */
26823 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17collapse_cholesky_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17collapse_cholesky_1__get__(PyObject * __pyx_v_self)26824 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17collapse_cholesky_1__get__(PyObject *__pyx_v_self) {
26825   PyObject *__pyx_r = 0;
26826   __Pyx_RefNannyDeclarations
26827   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26828   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17collapse_cholesky___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26829 
26830   /* function exit code */
26831   __Pyx_RefNannyFinishContext();
26832   return __pyx_r;
26833 }
26834 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26835 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26836   PyObject *__pyx_r = NULL;
26837   __Pyx_RefNannyDeclarations
26838   PyObject *__pyx_t_1 = NULL;
26839   int __pyx_lineno = 0;
26840   const char *__pyx_filename = NULL;
26841   int __pyx_clineno = 0;
26842   __Pyx_RefNannySetupContext("__get__", 0);
26843   __Pyx_XDECREF(__pyx_r);
26844   if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 132, __pyx_L1_error)}
26845   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_float64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_float64_t, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 132, __pyx_L1_error)
26846   __Pyx_GOTREF(__pyx_t_1);
26847   __pyx_r = __pyx_t_1;
26848   __pyx_t_1 = 0;
26849   goto __pyx_L0;
26850 
26851   /* function exit code */
26852   __pyx_L1_error:;
26853   __Pyx_XDECREF(__pyx_t_1);
26854   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.collapse_cholesky.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26855   __pyx_r = NULL;
26856   __pyx_L0:;
26857   __Pyx_XGIVEREF(__pyx_r);
26858   __Pyx_RefNannyFinishContext();
26859   return __pyx_r;
26860 }
26861 
26862 /* "statsmodels/tsa/statespace/_representation.pxd":133
26863  *     cdef readonly np.float64_t [::1,:] collapse_obs_cov
26864  *     cdef readonly np.float64_t [::1,:] collapse_cholesky
26865  *     cdef readonly np.float64_t collapse_loglikelihood             # <<<<<<<<<<<<<<
26866  *
26867  *     # Pointers
26868  */
26869 
26870 /* Python wrapper */
26871 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22collapse_loglikelihood_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22collapse_loglikelihood_1__get__(PyObject * __pyx_v_self)26872 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22collapse_loglikelihood_1__get__(PyObject *__pyx_v_self) {
26873   PyObject *__pyx_r = 0;
26874   __Pyx_RefNannyDeclarations
26875   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26876   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22collapse_loglikelihood___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26877 
26878   /* function exit code */
26879   __Pyx_RefNannyFinishContext();
26880   return __pyx_r;
26881 }
26882 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26883 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26884   PyObject *__pyx_r = NULL;
26885   __Pyx_RefNannyDeclarations
26886   PyObject *__pyx_t_1 = NULL;
26887   int __pyx_lineno = 0;
26888   const char *__pyx_filename = NULL;
26889   int __pyx_clineno = 0;
26890   __Pyx_RefNannySetupContext("__get__", 0);
26891   __Pyx_XDECREF(__pyx_r);
26892   __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->collapse_loglikelihood); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 133, __pyx_L1_error)
26893   __Pyx_GOTREF(__pyx_t_1);
26894   __pyx_r = __pyx_t_1;
26895   __pyx_t_1 = 0;
26896   goto __pyx_L0;
26897 
26898   /* function exit code */
26899   __pyx_L1_error:;
26900   __Pyx_XDECREF(__pyx_t_1);
26901   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.collapse_loglikelihood.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26902   __pyx_r = NULL;
26903   __pyx_L0:;
26904   __Pyx_XGIVEREF(__pyx_r);
26905   __Pyx_RefNannyFinishContext();
26906   return __pyx_r;
26907 }
26908 
26909 /* "statsmodels/tsa/statespace/_representation.pxd":150
26910  *
26911  *     # Current location
26912  *     cdef readonly int t             # <<<<<<<<<<<<<<
26913  *     cdef readonly int _previous_t
26914  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
26915  */
26916 
26917 /* Python wrapper */
26918 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1t_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1t_1__get__(PyObject * __pyx_v_self)26919 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1t_1__get__(PyObject *__pyx_v_self) {
26920   PyObject *__pyx_r = 0;
26921   __Pyx_RefNannyDeclarations
26922   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26923   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1t___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26924 
26925   /* function exit code */
26926   __Pyx_RefNannyFinishContext();
26927   return __pyx_r;
26928 }
26929 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26930 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26931   PyObject *__pyx_r = NULL;
26932   __Pyx_RefNannyDeclarations
26933   PyObject *__pyx_t_1 = NULL;
26934   int __pyx_lineno = 0;
26935   const char *__pyx_filename = NULL;
26936   int __pyx_clineno = 0;
26937   __Pyx_RefNannySetupContext("__get__", 0);
26938   __Pyx_XDECREF(__pyx_r);
26939   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 150, __pyx_L1_error)
26940   __Pyx_GOTREF(__pyx_t_1);
26941   __pyx_r = __pyx_t_1;
26942   __pyx_t_1 = 0;
26943   goto __pyx_L0;
26944 
26945   /* function exit code */
26946   __pyx_L1_error:;
26947   __Pyx_XDECREF(__pyx_t_1);
26948   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace.t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26949   __pyx_r = NULL;
26950   __pyx_L0:;
26951   __Pyx_XGIVEREF(__pyx_r);
26952   __Pyx_RefNannyFinishContext();
26953   return __pyx_r;
26954 }
26955 
26956 /* "statsmodels/tsa/statespace/_representation.pxd":151
26957  *     # Current location
26958  *     cdef readonly int t
26959  *     cdef readonly int _previous_t             # <<<<<<<<<<<<<<
26960  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
26961  *     cdef readonly int _nmissing
26962  */
26963 
26964 /* Python wrapper */
26965 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11_previous_t_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11_previous_t_1__get__(PyObject * __pyx_v_self)26966 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11_previous_t_1__get__(PyObject *__pyx_v_self) {
26967   PyObject *__pyx_r = 0;
26968   __Pyx_RefNannyDeclarations
26969   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26970   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11_previous_t___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
26971 
26972   /* function exit code */
26973   __Pyx_RefNannyFinishContext();
26974   return __pyx_r;
26975 }
26976 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)26977 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
26978   PyObject *__pyx_r = NULL;
26979   __Pyx_RefNannyDeclarations
26980   PyObject *__pyx_t_1 = NULL;
26981   int __pyx_lineno = 0;
26982   const char *__pyx_filename = NULL;
26983   int __pyx_clineno = 0;
26984   __Pyx_RefNannySetupContext("__get__", 0);
26985   __Pyx_XDECREF(__pyx_r);
26986   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_previous_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 151, __pyx_L1_error)
26987   __Pyx_GOTREF(__pyx_t_1);
26988   __pyx_r = __pyx_t_1;
26989   __pyx_t_1 = 0;
26990   goto __pyx_L0;
26991 
26992   /* function exit code */
26993   __pyx_L1_error:;
26994   __Pyx_XDECREF(__pyx_t_1);
26995   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._previous_t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26996   __pyx_r = NULL;
26997   __pyx_L0:;
26998   __Pyx_XGIVEREF(__pyx_r);
26999   __Pyx_RefNannyFinishContext();
27000   return __pyx_r;
27001 }
27002 
27003 /* "statsmodels/tsa/statespace/_representation.pxd":152
27004  *     cdef readonly int t
27005  *     cdef readonly int _previous_t
27006  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef             # <<<<<<<<<<<<<<
27007  *     cdef readonly int _nmissing
27008  *
27009  */
27010 
27011 /* Python wrapper */
27012 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8_k_endog_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8_k_endog_1__get__(PyObject * __pyx_v_self)27013 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8_k_endog_1__get__(PyObject *__pyx_v_self) {
27014   PyObject *__pyx_r = 0;
27015   __Pyx_RefNannyDeclarations
27016   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27017   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8_k_endog___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27018 
27019   /* function exit code */
27020   __Pyx_RefNannyFinishContext();
27021   return __pyx_r;
27022 }
27023 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27024 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27025   PyObject *__pyx_r = NULL;
27026   __Pyx_RefNannyDeclarations
27027   PyObject *__pyx_t_1 = NULL;
27028   int __pyx_lineno = 0;
27029   const char *__pyx_filename = NULL;
27030   int __pyx_clineno = 0;
27031   __Pyx_RefNannySetupContext("__get__", 0);
27032   __Pyx_XDECREF(__pyx_r);
27033   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
27034   __Pyx_GOTREF(__pyx_t_1);
27035   __pyx_r = __pyx_t_1;
27036   __pyx_t_1 = 0;
27037   goto __pyx_L0;
27038 
27039   /* function exit code */
27040   __pyx_L1_error:;
27041   __Pyx_XDECREF(__pyx_t_1);
27042   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._k_endog.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27043   __pyx_r = NULL;
27044   __pyx_L0:;
27045   __Pyx_XGIVEREF(__pyx_r);
27046   __Pyx_RefNannyFinishContext();
27047   return __pyx_r;
27048 }
27049 
27050 /* Python wrapper */
27051 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_states_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_states_1__get__(PyObject * __pyx_v_self)27052 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_states_1__get__(PyObject *__pyx_v_self) {
27053   PyObject *__pyx_r = 0;
27054   __Pyx_RefNannyDeclarations
27055   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27056   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_states___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27057 
27058   /* function exit code */
27059   __Pyx_RefNannyFinishContext();
27060   return __pyx_r;
27061 }
27062 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27063 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27064   PyObject *__pyx_r = NULL;
27065   __Pyx_RefNannyDeclarations
27066   PyObject *__pyx_t_1 = NULL;
27067   int __pyx_lineno = 0;
27068   const char *__pyx_filename = NULL;
27069   int __pyx_clineno = 0;
27070   __Pyx_RefNannySetupContext("__get__", 0);
27071   __Pyx_XDECREF(__pyx_r);
27072   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
27073   __Pyx_GOTREF(__pyx_t_1);
27074   __pyx_r = __pyx_t_1;
27075   __pyx_t_1 = 0;
27076   goto __pyx_L0;
27077 
27078   /* function exit code */
27079   __pyx_L1_error:;
27080   __Pyx_XDECREF(__pyx_t_1);
27081   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._k_states.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27082   __pyx_r = NULL;
27083   __pyx_L0:;
27084   __Pyx_XGIVEREF(__pyx_r);
27085   __Pyx_RefNannyFinishContext();
27086   return __pyx_r;
27087 }
27088 
27089 /* Python wrapper */
27090 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_posdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_posdef_1__get__(PyObject * __pyx_v_self)27091 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_posdef_1__get__(PyObject *__pyx_v_self) {
27092   PyObject *__pyx_r = 0;
27093   __Pyx_RefNannyDeclarations
27094   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27095   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_posdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27096 
27097   /* function exit code */
27098   __Pyx_RefNannyFinishContext();
27099   return __pyx_r;
27100 }
27101 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27102 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27103   PyObject *__pyx_r = NULL;
27104   __Pyx_RefNannyDeclarations
27105   PyObject *__pyx_t_1 = NULL;
27106   int __pyx_lineno = 0;
27107   const char *__pyx_filename = NULL;
27108   int __pyx_clineno = 0;
27109   __Pyx_RefNannySetupContext("__get__", 0);
27110   __Pyx_XDECREF(__pyx_r);
27111   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_posdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
27112   __Pyx_GOTREF(__pyx_t_1);
27113   __pyx_r = __pyx_t_1;
27114   __pyx_t_1 = 0;
27115   goto __pyx_L0;
27116 
27117   /* function exit code */
27118   __pyx_L1_error:;
27119   __Pyx_XDECREF(__pyx_t_1);
27120   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._k_posdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27121   __pyx_r = NULL;
27122   __pyx_L0:;
27123   __Pyx_XGIVEREF(__pyx_r);
27124   __Pyx_RefNannyFinishContext();
27125   return __pyx_r;
27126 }
27127 
27128 /* Python wrapper */
27129 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_endog2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_endog2_1__get__(PyObject * __pyx_v_self)27130 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_endog2_1__get__(PyObject *__pyx_v_self) {
27131   PyObject *__pyx_r = 0;
27132   __Pyx_RefNannyDeclarations
27133   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27134   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_endog2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27135 
27136   /* function exit code */
27137   __Pyx_RefNannyFinishContext();
27138   return __pyx_r;
27139 }
27140 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27141 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27142   PyObject *__pyx_r = NULL;
27143   __Pyx_RefNannyDeclarations
27144   PyObject *__pyx_t_1 = NULL;
27145   int __pyx_lineno = 0;
27146   const char *__pyx_filename = NULL;
27147   int __pyx_clineno = 0;
27148   __Pyx_RefNannySetupContext("__get__", 0);
27149   __Pyx_XDECREF(__pyx_r);
27150   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endog2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
27151   __Pyx_GOTREF(__pyx_t_1);
27152   __pyx_r = __pyx_t_1;
27153   __pyx_t_1 = 0;
27154   goto __pyx_L0;
27155 
27156   /* function exit code */
27157   __pyx_L1_error:;
27158   __Pyx_XDECREF(__pyx_t_1);
27159   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._k_endog2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27160   __pyx_r = NULL;
27161   __pyx_L0:;
27162   __Pyx_XGIVEREF(__pyx_r);
27163   __Pyx_RefNannyFinishContext();
27164   return __pyx_r;
27165 }
27166 
27167 /* Python wrapper */
27168 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_states2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_states2_1__get__(PyObject * __pyx_v_self)27169 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_states2_1__get__(PyObject *__pyx_v_self) {
27170   PyObject *__pyx_r = 0;
27171   __Pyx_RefNannyDeclarations
27172   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27173   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_states2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27174 
27175   /* function exit code */
27176   __Pyx_RefNannyFinishContext();
27177   return __pyx_r;
27178 }
27179 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27180 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27181   PyObject *__pyx_r = NULL;
27182   __Pyx_RefNannyDeclarations
27183   PyObject *__pyx_t_1 = NULL;
27184   int __pyx_lineno = 0;
27185   const char *__pyx_filename = NULL;
27186   int __pyx_clineno = 0;
27187   __Pyx_RefNannySetupContext("__get__", 0);
27188   __Pyx_XDECREF(__pyx_r);
27189   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_states2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
27190   __Pyx_GOTREF(__pyx_t_1);
27191   __pyx_r = __pyx_t_1;
27192   __pyx_t_1 = 0;
27193   goto __pyx_L0;
27194 
27195   /* function exit code */
27196   __pyx_L1_error:;
27197   __Pyx_XDECREF(__pyx_t_1);
27198   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._k_states2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27199   __pyx_r = NULL;
27200   __pyx_L0:;
27201   __Pyx_XGIVEREF(__pyx_r);
27202   __Pyx_RefNannyFinishContext();
27203   return __pyx_r;
27204 }
27205 
27206 /* Python wrapper */
27207 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_posdef2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_posdef2_1__get__(PyObject * __pyx_v_self)27208 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_posdef2_1__get__(PyObject *__pyx_v_self) {
27209   PyObject *__pyx_r = 0;
27210   __Pyx_RefNannyDeclarations
27211   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27212   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_posdef2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27213 
27214   /* function exit code */
27215   __Pyx_RefNannyFinishContext();
27216   return __pyx_r;
27217 }
27218 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27219 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27220   PyObject *__pyx_r = NULL;
27221   __Pyx_RefNannyDeclarations
27222   PyObject *__pyx_t_1 = NULL;
27223   int __pyx_lineno = 0;
27224   const char *__pyx_filename = NULL;
27225   int __pyx_clineno = 0;
27226   __Pyx_RefNannySetupContext("__get__", 0);
27227   __Pyx_XDECREF(__pyx_r);
27228   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_posdef2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
27229   __Pyx_GOTREF(__pyx_t_1);
27230   __pyx_r = __pyx_t_1;
27231   __pyx_t_1 = 0;
27232   goto __pyx_L0;
27233 
27234   /* function exit code */
27235   __pyx_L1_error:;
27236   __Pyx_XDECREF(__pyx_t_1);
27237   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._k_posdef2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27238   __pyx_r = NULL;
27239   __pyx_L0:;
27240   __Pyx_XGIVEREF(__pyx_r);
27241   __Pyx_RefNannyFinishContext();
27242   return __pyx_r;
27243 }
27244 
27245 /* Python wrapper */
27246 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14_k_endogstates_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14_k_endogstates_1__get__(PyObject * __pyx_v_self)27247 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14_k_endogstates_1__get__(PyObject *__pyx_v_self) {
27248   PyObject *__pyx_r = 0;
27249   __Pyx_RefNannyDeclarations
27250   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27251   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14_k_endogstates___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27252 
27253   /* function exit code */
27254   __Pyx_RefNannyFinishContext();
27255   return __pyx_r;
27256 }
27257 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27258 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27259   PyObject *__pyx_r = NULL;
27260   __Pyx_RefNannyDeclarations
27261   PyObject *__pyx_t_1 = NULL;
27262   int __pyx_lineno = 0;
27263   const char *__pyx_filename = NULL;
27264   int __pyx_clineno = 0;
27265   __Pyx_RefNannySetupContext("__get__", 0);
27266   __Pyx_XDECREF(__pyx_r);
27267   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endogstates); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
27268   __Pyx_GOTREF(__pyx_t_1);
27269   __pyx_r = __pyx_t_1;
27270   __pyx_t_1 = 0;
27271   goto __pyx_L0;
27272 
27273   /* function exit code */
27274   __pyx_L1_error:;
27275   __Pyx_XDECREF(__pyx_t_1);
27276   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._k_endogstates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27277   __pyx_r = NULL;
27278   __pyx_L0:;
27279   __Pyx_XGIVEREF(__pyx_r);
27280   __Pyx_RefNannyFinishContext();
27281   return __pyx_r;
27282 }
27283 
27284 /* Python wrapper */
27285 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15_k_statesposdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15_k_statesposdef_1__get__(PyObject * __pyx_v_self)27286 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15_k_statesposdef_1__get__(PyObject *__pyx_v_self) {
27287   PyObject *__pyx_r = 0;
27288   __Pyx_RefNannyDeclarations
27289   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27290   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15_k_statesposdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27291 
27292   /* function exit code */
27293   __Pyx_RefNannyFinishContext();
27294   return __pyx_r;
27295 }
27296 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27297 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27298   PyObject *__pyx_r = NULL;
27299   __Pyx_RefNannyDeclarations
27300   PyObject *__pyx_t_1 = NULL;
27301   int __pyx_lineno = 0;
27302   const char *__pyx_filename = NULL;
27303   int __pyx_clineno = 0;
27304   __Pyx_RefNannySetupContext("__get__", 0);
27305   __Pyx_XDECREF(__pyx_r);
27306   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_statesposdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
27307   __Pyx_GOTREF(__pyx_t_1);
27308   __pyx_r = __pyx_t_1;
27309   __pyx_t_1 = 0;
27310   goto __pyx_L0;
27311 
27312   /* function exit code */
27313   __pyx_L1_error:;
27314   __Pyx_XDECREF(__pyx_t_1);
27315   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._k_statesposdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27316   __pyx_r = NULL;
27317   __pyx_L0:;
27318   __Pyx_XGIVEREF(__pyx_r);
27319   __Pyx_RefNannyFinishContext();
27320   return __pyx_r;
27321 }
27322 
27323 /* "statsmodels/tsa/statespace/_representation.pxd":153
27324  *     cdef readonly int _previous_t
27325  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
27326  *     cdef readonly int _nmissing             # <<<<<<<<<<<<<<
27327  *
27328  *     # Functions
27329  */
27330 
27331 /* Python wrapper */
27332 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_nmissing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_nmissing_1__get__(PyObject * __pyx_v_self)27333 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_nmissing_1__get__(PyObject *__pyx_v_self) {
27334   PyObject *__pyx_r = 0;
27335   __Pyx_RefNannyDeclarations
27336   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
27337   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_nmissing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)__pyx_v_self));
27338 
27339   /* function exit code */
27340   __Pyx_RefNannyFinishContext();
27341   return __pyx_r;
27342 }
27343 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace * __pyx_v_self)27344 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *__pyx_v_self) {
27345   PyObject *__pyx_r = NULL;
27346   __Pyx_RefNannyDeclarations
27347   PyObject *__pyx_t_1 = NULL;
27348   int __pyx_lineno = 0;
27349   const char *__pyx_filename = NULL;
27350   int __pyx_clineno = 0;
27351   __Pyx_RefNannySetupContext("__get__", 0);
27352   __Pyx_XDECREF(__pyx_r);
27353   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nmissing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 153, __pyx_L1_error)
27354   __Pyx_GOTREF(__pyx_t_1);
27355   __pyx_r = __pyx_t_1;
27356   __pyx_t_1 = 0;
27357   goto __pyx_L0;
27358 
27359   /* function exit code */
27360   __pyx_L1_error:;
27361   __Pyx_XDECREF(__pyx_t_1);
27362   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.dStatespace._nmissing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27363   __pyx_r = NULL;
27364   __pyx_L0:;
27365   __Pyx_XGIVEREF(__pyx_r);
27366   __Pyx_RefNannyFinishContext();
27367   return __pyx_r;
27368 }
27369 
27370 /* "statsmodels/tsa/statespace/_representation.pyx":1986
27371  *
27372  * # ### Selected covariance matrice
27373  * cdef int dselect_cov(int k, int k_posdef,             # <<<<<<<<<<<<<<
27374  *                               np.float64_t * tmp,
27375  *                               np.float64_t * selection,
27376  */
27377 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_dselect_cov(int __pyx_v_k,int __pyx_v_k_posdef,__pyx_t_5numpy_float64_t * __pyx_v_tmp,__pyx_t_5numpy_float64_t * __pyx_v_selection,__pyx_t_5numpy_float64_t * __pyx_v_cov,__pyx_t_5numpy_float64_t * __pyx_v_selected_cov)27378 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_dselect_cov(int __pyx_v_k, int __pyx_v_k_posdef, __pyx_t_5numpy_float64_t *__pyx_v_tmp, __pyx_t_5numpy_float64_t *__pyx_v_selection, __pyx_t_5numpy_float64_t *__pyx_v_cov, __pyx_t_5numpy_float64_t *__pyx_v_selected_cov) {
27379   __pyx_t_5numpy_float64_t __pyx_v_alpha;
27380   __pyx_t_5numpy_float64_t __pyx_v_beta;
27381   int __pyx_r;
27382   __Pyx_RefNannyDeclarations
27383   int __pyx_t_1;
27384   __Pyx_RefNannySetupContext("dselect_cov", 0);
27385 
27386   /* "statsmodels/tsa/statespace/_representation.pyx":1992
27387  *                               np.float64_t * selected_cov):
27388  *     cdef:
27389  *         np.float64_t alpha = 1.0             # <<<<<<<<<<<<<<
27390  *         np.float64_t beta = 0.0
27391  *
27392  */
27393   __pyx_v_alpha = 1.0;
27394 
27395   /* "statsmodels/tsa/statespace/_representation.pyx":1993
27396  *     cdef:
27397  *         np.float64_t alpha = 1.0
27398  *         np.float64_t beta = 0.0             # <<<<<<<<<<<<<<
27399  *
27400  *     # Only need to do something if there is a covariance matrix
27401  */
27402   __pyx_v_beta = 0.0;
27403 
27404   /* "statsmodels/tsa/statespace/_representation.pyx":1997
27405  *     # Only need to do something if there is a covariance matrix
27406  *     # (i.e k_posdof == 0)
27407  *     if k_posdef > 0:             # <<<<<<<<<<<<<<
27408  *
27409  *         # #### Calculate selected state covariance matrix
27410  */
27411   __pyx_t_1 = ((__pyx_v_k_posdef > 0) != 0);
27412   if (__pyx_t_1) {
27413 
27414     /* "statsmodels/tsa/statespace/_representation.pyx":2013
27415  *         # $\\#_0 = 1.0 * R_t Q_t$
27416  *         # $(m \times r) = (m \times r) (r \times r)$
27417  *         blas.dgemm("N", "N", &k, &k_posdef, &k_posdef,             # <<<<<<<<<<<<<<
27418  *               &alpha, selection, &k,
27419  *                       cov, &k_posdef,
27420  */
27421     __pyx_f_5scipy_6linalg_11cython_blas_dgemm(((char *)"N"), ((char *)"N"), (&__pyx_v_k), (&__pyx_v_k_posdef), (&__pyx_v_k_posdef), (&__pyx_v_alpha), __pyx_v_selection, (&__pyx_v_k), __pyx_v_cov, (&__pyx_v_k_posdef), (&__pyx_v_beta), __pyx_v_tmp, (&__pyx_v_k));
27422 
27423     /* "statsmodels/tsa/statespace/_representation.pyx":2019
27424  *         # $Q_t^* = 1.0 * \\#_0 R_t'$
27425  *         # $(m \times m) = (m \times r) (m \times r)'$
27426  *         blas.dgemm("N", "T", &k, &k, &k_posdef,             # <<<<<<<<<<<<<<
27427  *               &alpha, tmp, &k,
27428  *                       selection, &k,
27429  */
27430     __pyx_f_5scipy_6linalg_11cython_blas_dgemm(((char *)"N"), ((char *)"T"), (&__pyx_v_k), (&__pyx_v_k), (&__pyx_v_k_posdef), (&__pyx_v_alpha), __pyx_v_tmp, (&__pyx_v_k), __pyx_v_selection, (&__pyx_v_k), (&__pyx_v_beta), __pyx_v_selected_cov, (&__pyx_v_k));
27431 
27432     /* "statsmodels/tsa/statespace/_representation.pyx":1997
27433  *     # Only need to do something if there is a covariance matrix
27434  *     # (i.e k_posdof == 0)
27435  *     if k_posdef > 0:             # <<<<<<<<<<<<<<
27436  *
27437  *         # #### Calculate selected state covariance matrix
27438  */
27439   }
27440 
27441   /* "statsmodels/tsa/statespace/_representation.pyx":1986
27442  *
27443  * # ### Selected covariance matrice
27444  * cdef int dselect_cov(int k, int k_posdef,             # <<<<<<<<<<<<<<
27445  *                               np.float64_t * tmp,
27446  *                               np.float64_t * selection,
27447  */
27448 
27449   /* function exit code */
27450   __pyx_r = 0;
27451   __Pyx_RefNannyFinishContext();
27452   return __pyx_r;
27453 }
27454 
27455 /* "statsmodels/tsa/statespace/_representation.pyx":2144
27456  *     # ### Initialize state space model
27457  *     # *Note*: The initial state and state covariance matrix must be provided.
27458  *     def __init__(self,             # <<<<<<<<<<<<<<
27459  *                  np.complex64_t [::1,:]   obs,
27460  *                  np.complex64_t [::1,:,:] design,
27461  */
27462 
27463 /* Python wrapper */
27464 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1__init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)27465 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
27466   __Pyx_memviewslice __pyx_v_obs = { 0, 0, { 0 }, { 0 }, { 0 } };
27467   __Pyx_memviewslice __pyx_v_design = { 0, 0, { 0 }, { 0 }, { 0 } };
27468   __Pyx_memviewslice __pyx_v_obs_intercept = { 0, 0, { 0 }, { 0 }, { 0 } };
27469   __Pyx_memviewslice __pyx_v_obs_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
27470   __Pyx_memviewslice __pyx_v_transition = { 0, 0, { 0 }, { 0 }, { 0 } };
27471   __Pyx_memviewslice __pyx_v_state_intercept = { 0, 0, { 0 }, { 0 }, { 0 } };
27472   __Pyx_memviewslice __pyx_v_selection = { 0, 0, { 0 }, { 0 }, { 0 } };
27473   __Pyx_memviewslice __pyx_v_state_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
27474   PyObject *__pyx_v_diagonal_obs_cov = 0;
27475   int __pyx_lineno = 0;
27476   const char *__pyx_filename = NULL;
27477   int __pyx_clineno = 0;
27478   int __pyx_r;
27479   __Pyx_RefNannyDeclarations
27480   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
27481   {
27482     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obs,&__pyx_n_s_design,&__pyx_n_s_obs_intercept,&__pyx_n_s_obs_cov,&__pyx_n_s_transition,&__pyx_n_s_state_intercept,&__pyx_n_s_selection,&__pyx_n_s_state_cov,&__pyx_n_s_diagonal_obs_cov,0};
27483     PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
27484     values[8] = ((PyObject *)__pyx_int_neg_1);
27485     if (unlikely(__pyx_kwds)) {
27486       Py_ssize_t kw_args;
27487       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
27488       switch (pos_args) {
27489         case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27490         CYTHON_FALLTHROUGH;
27491         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27492         CYTHON_FALLTHROUGH;
27493         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27494         CYTHON_FALLTHROUGH;
27495         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27496         CYTHON_FALLTHROUGH;
27497         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27498         CYTHON_FALLTHROUGH;
27499         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27500         CYTHON_FALLTHROUGH;
27501         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27502         CYTHON_FALLTHROUGH;
27503         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27504         CYTHON_FALLTHROUGH;
27505         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27506         CYTHON_FALLTHROUGH;
27507         case  0: break;
27508         default: goto __pyx_L5_argtuple_error;
27509       }
27510       kw_args = PyDict_Size(__pyx_kwds);
27511       switch (pos_args) {
27512         case  0:
27513         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs)) != 0)) kw_args--;
27514         else goto __pyx_L5_argtuple_error;
27515         CYTHON_FALLTHROUGH;
27516         case  1:
27517         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_design)) != 0)) kw_args--;
27518         else {
27519           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 1); __PYX_ERR(0, 2144, __pyx_L3_error)
27520         }
27521         CYTHON_FALLTHROUGH;
27522         case  2:
27523         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs_intercept)) != 0)) kw_args--;
27524         else {
27525           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 2); __PYX_ERR(0, 2144, __pyx_L3_error)
27526         }
27527         CYTHON_FALLTHROUGH;
27528         case  3:
27529         if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs_cov)) != 0)) kw_args--;
27530         else {
27531           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 3); __PYX_ERR(0, 2144, __pyx_L3_error)
27532         }
27533         CYTHON_FALLTHROUGH;
27534         case  4:
27535         if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transition)) != 0)) kw_args--;
27536         else {
27537           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 4); __PYX_ERR(0, 2144, __pyx_L3_error)
27538         }
27539         CYTHON_FALLTHROUGH;
27540         case  5:
27541         if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_intercept)) != 0)) kw_args--;
27542         else {
27543           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 5); __PYX_ERR(0, 2144, __pyx_L3_error)
27544         }
27545         CYTHON_FALLTHROUGH;
27546         case  6:
27547         if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_selection)) != 0)) kw_args--;
27548         else {
27549           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 6); __PYX_ERR(0, 2144, __pyx_L3_error)
27550         }
27551         CYTHON_FALLTHROUGH;
27552         case  7:
27553         if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_cov)) != 0)) kw_args--;
27554         else {
27555           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 7); __PYX_ERR(0, 2144, __pyx_L3_error)
27556         }
27557         CYTHON_FALLTHROUGH;
27558         case  8:
27559         if (kw_args > 0) {
27560           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_diagonal_obs_cov);
27561           if (value) { values[8] = value; kw_args--; }
27562         }
27563       }
27564       if (unlikely(kw_args > 0)) {
27565         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2144, __pyx_L3_error)
27566       }
27567     } else {
27568       switch (PyTuple_GET_SIZE(__pyx_args)) {
27569         case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
27570         CYTHON_FALLTHROUGH;
27571         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
27572         values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
27573         values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
27574         values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
27575         values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
27576         values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
27577         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
27578         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
27579         break;
27580         default: goto __pyx_L5_argtuple_error;
27581       }
27582     }
27583     __pyx_v_obs = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs.memview)) __PYX_ERR(0, 2145, __pyx_L3_error)
27584     __pyx_v_design = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_design.memview)) __PYX_ERR(0, 2146, __pyx_L3_error)
27585     __pyx_v_obs_intercept = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs_intercept.memview)) __PYX_ERR(0, 2147, __pyx_L3_error)
27586     __pyx_v_obs_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs_cov.memview)) __PYX_ERR(0, 2148, __pyx_L3_error)
27587     __pyx_v_transition = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_transition.memview)) __PYX_ERR(0, 2149, __pyx_L3_error)
27588     __pyx_v_state_intercept = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_state_intercept.memview)) __PYX_ERR(0, 2150, __pyx_L3_error)
27589     __pyx_v_selection = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_selection.memview)) __PYX_ERR(0, 2151, __pyx_L3_error)
27590     __pyx_v_state_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(values[7], PyBUF_WRITABLE); if (unlikely(!__pyx_v_state_cov.memview)) __PYX_ERR(0, 2152, __pyx_L3_error)
27591     __pyx_v_diagonal_obs_cov = values[8];
27592   }
27593   goto __pyx_L4_argument_unpacking_done;
27594   __pyx_L5_argtuple_error:;
27595   __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2144, __pyx_L3_error)
27596   __pyx_L3_error:;
27597   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27598   __Pyx_RefNannyFinishContext();
27599   return -1;
27600   __pyx_L4_argument_unpacking_done:;
27601   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace___init__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), __pyx_v_obs, __pyx_v_design, __pyx_v_obs_intercept, __pyx_v_obs_cov, __pyx_v_transition, __pyx_v_state_intercept, __pyx_v_selection, __pyx_v_state_cov, __pyx_v_diagonal_obs_cov);
27602 
27603   /* function exit code */
27604   __Pyx_RefNannyFinishContext();
27605   return __pyx_r;
27606 }
27607 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,__Pyx_memviewslice __pyx_v_obs,__Pyx_memviewslice __pyx_v_design,__Pyx_memviewslice __pyx_v_obs_intercept,__Pyx_memviewslice __pyx_v_obs_cov,__Pyx_memviewslice __pyx_v_transition,__Pyx_memviewslice __pyx_v_state_intercept,__Pyx_memviewslice __pyx_v_selection,__Pyx_memviewslice __pyx_v_state_cov,PyObject * __pyx_v_diagonal_obs_cov)27608 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_obs, __Pyx_memviewslice __pyx_v_design, __Pyx_memviewslice __pyx_v_obs_intercept, __Pyx_memviewslice __pyx_v_obs_cov, __Pyx_memviewslice __pyx_v_transition, __Pyx_memviewslice __pyx_v_state_intercept, __Pyx_memviewslice __pyx_v_selection, __Pyx_memviewslice __pyx_v_state_cov, PyObject *__pyx_v_diagonal_obs_cov) {
27609   npy_intp __pyx_v_dim1[1];
27610   npy_intp __pyx_v_dim2[2];
27611   npy_intp __pyx_v_dim3[3];
27612   int __pyx_r;
27613   __Pyx_RefNannyDeclarations
27614   PyObject *__pyx_t_1 = NULL;
27615   PyObject *__pyx_t_2 = NULL;
27616   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape __pyx_t_3;
27617   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape __pyx_t_4;
27618   int __pyx_t_5;
27619   int __pyx_t_6;
27620   int __pyx_t_7;
27621   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
27622   PyObject *__pyx_t_9 = NULL;
27623   PyObject *__pyx_t_10 = NULL;
27624   PyObject *__pyx_t_11 = NULL;
27625   __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
27626   __Pyx_memviewslice __pyx_t_13 = { 0, 0, { 0 }, { 0 }, { 0 } };
27627   int __pyx_t_14;
27628   int __pyx_t_15;
27629   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
27630   __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
27631   int __pyx_lineno = 0;
27632   const char *__pyx_filename = NULL;
27633   int __pyx_clineno = 0;
27634   __Pyx_RefNannySetupContext("__init__", 0);
27635 
27636   /* "statsmodels/tsa/statespace/_representation.pyx":2166
27637  *         # Python and passed to this constructor, so if they are updated in
27638  *         # Python they will also be updated here.
27639  *         self.obs = obs             # <<<<<<<<<<<<<<
27640  *         self.design = design
27641  *         self.obs_intercept = obs_intercept
27642  */
27643   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs, 0);
27644   __PYX_INC_MEMVIEW(&__pyx_v_obs, 0);
27645   __pyx_v_self->obs = __pyx_v_obs;
27646 
27647   /* "statsmodels/tsa/statespace/_representation.pyx":2167
27648  *         # Python they will also be updated here.
27649  *         self.obs = obs
27650  *         self.design = design             # <<<<<<<<<<<<<<
27651  *         self.obs_intercept = obs_intercept
27652  *         self.obs_cov = obs_cov
27653  */
27654   __PYX_XDEC_MEMVIEW(&__pyx_v_self->design, 0);
27655   __PYX_INC_MEMVIEW(&__pyx_v_design, 0);
27656   __pyx_v_self->design = __pyx_v_design;
27657 
27658   /* "statsmodels/tsa/statespace/_representation.pyx":2168
27659  *         self.obs = obs
27660  *         self.design = design
27661  *         self.obs_intercept = obs_intercept             # <<<<<<<<<<<<<<
27662  *         self.obs_cov = obs_cov
27663  *         self.transition = transition
27664  */
27665   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs_intercept, 0);
27666   __PYX_INC_MEMVIEW(&__pyx_v_obs_intercept, 0);
27667   __pyx_v_self->obs_intercept = __pyx_v_obs_intercept;
27668 
27669   /* "statsmodels/tsa/statespace/_representation.pyx":2169
27670  *         self.design = design
27671  *         self.obs_intercept = obs_intercept
27672  *         self.obs_cov = obs_cov             # <<<<<<<<<<<<<<
27673  *         self.transition = transition
27674  *         self.state_intercept = state_intercept
27675  */
27676   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs_cov, 0);
27677   __PYX_INC_MEMVIEW(&__pyx_v_obs_cov, 0);
27678   __pyx_v_self->obs_cov = __pyx_v_obs_cov;
27679 
27680   /* "statsmodels/tsa/statespace/_representation.pyx":2170
27681  *         self.obs_intercept = obs_intercept
27682  *         self.obs_cov = obs_cov
27683  *         self.transition = transition             # <<<<<<<<<<<<<<
27684  *         self.state_intercept = state_intercept
27685  *         self.selection = selection
27686  */
27687   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transition, 0);
27688   __PYX_INC_MEMVIEW(&__pyx_v_transition, 0);
27689   __pyx_v_self->transition = __pyx_v_transition;
27690 
27691   /* "statsmodels/tsa/statespace/_representation.pyx":2171
27692  *         self.obs_cov = obs_cov
27693  *         self.transition = transition
27694  *         self.state_intercept = state_intercept             # <<<<<<<<<<<<<<
27695  *         self.selection = selection
27696  *         self.state_cov = state_cov
27697  */
27698   __PYX_XDEC_MEMVIEW(&__pyx_v_self->state_intercept, 0);
27699   __PYX_INC_MEMVIEW(&__pyx_v_state_intercept, 0);
27700   __pyx_v_self->state_intercept = __pyx_v_state_intercept;
27701 
27702   /* "statsmodels/tsa/statespace/_representation.pyx":2172
27703  *         self.transition = transition
27704  *         self.state_intercept = state_intercept
27705  *         self.selection = selection             # <<<<<<<<<<<<<<
27706  *         self.state_cov = state_cov
27707  *
27708  */
27709   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selection, 0);
27710   __PYX_INC_MEMVIEW(&__pyx_v_selection, 0);
27711   __pyx_v_self->selection = __pyx_v_selection;
27712 
27713   /* "statsmodels/tsa/statespace/_representation.pyx":2173
27714  *         self.state_intercept = state_intercept
27715  *         self.selection = selection
27716  *         self.state_cov = state_cov             # <<<<<<<<<<<<<<
27717  *
27718  *         # Dimensions
27719  */
27720   __PYX_XDEC_MEMVIEW(&__pyx_v_self->state_cov, 0);
27721   __PYX_INC_MEMVIEW(&__pyx_v_state_cov, 0);
27722   __pyx_v_self->state_cov = __pyx_v_state_cov;
27723 
27724   /* "statsmodels/tsa/statespace/_representation.pyx":2176
27725  *
27726  *         # Dimensions
27727  *         self.k_endog = obs.shape[0]             # <<<<<<<<<<<<<<
27728  *         self.k_states = selection.shape[0]
27729  *         self.k_posdef = selection.shape[1]
27730  */
27731   __pyx_v_self->k_endog = (__pyx_v_obs.shape[0]);
27732 
27733   /* "statsmodels/tsa/statespace/_representation.pyx":2177
27734  *         # Dimensions
27735  *         self.k_endog = obs.shape[0]
27736  *         self.k_states = selection.shape[0]             # <<<<<<<<<<<<<<
27737  *         self.k_posdef = selection.shape[1]
27738  *         self.nobs = obs.shape[1]
27739  */
27740   __pyx_v_self->k_states = (__pyx_v_selection.shape[0]);
27741 
27742   /* "statsmodels/tsa/statespace/_representation.pyx":2178
27743  *         self.k_endog = obs.shape[0]
27744  *         self.k_states = selection.shape[0]
27745  *         self.k_posdef = selection.shape[1]             # <<<<<<<<<<<<<<
27746  *         self.nobs = obs.shape[1]
27747  *
27748  */
27749   __pyx_v_self->k_posdef = (__pyx_v_selection.shape[1]);
27750 
27751   /* "statsmodels/tsa/statespace/_representation.pyx":2179
27752  *         self.k_states = selection.shape[0]
27753  *         self.k_posdef = selection.shape[1]
27754  *         self.nobs = obs.shape[1]             # <<<<<<<<<<<<<<
27755  *
27756  *         # #### Validate matrix dimensions
27757  */
27758   __pyx_v_self->nobs = (__pyx_v_obs.shape[1]);
27759 
27760   /* "statsmodels/tsa/statespace/_representation.pyx":2184
27761  *         #
27762  *         # Make sure that the given state-space matrices have consistent sizes
27763  *         tools.validate_matrix_shape('design', &self.design.shape[0],             # <<<<<<<<<<<<<<
27764  *                               self.k_endog, self.k_states, self.nobs)
27765  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
27766  */
27767   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2184, __pyx_L1_error)}
27768 
27769   /* "statsmodels/tsa/statespace/_representation.pyx":2185
27770  *         # Make sure that the given state-space matrices have consistent sizes
27771  *         tools.validate_matrix_shape('design', &self.design.shape[0],
27772  *                               self.k_endog, self.k_states, self.nobs)             # <<<<<<<<<<<<<<
27773  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
27774  *                               self.k_endog, self.nobs)
27775  */
27776   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L1_error)
27777   __Pyx_GOTREF(__pyx_t_1);
27778 
27779   /* "statsmodels/tsa/statespace/_representation.pyx":2184
27780  *         #
27781  *         # Make sure that the given state-space matrices have consistent sizes
27782  *         tools.validate_matrix_shape('design', &self.design.shape[0],             # <<<<<<<<<<<<<<
27783  *                               self.k_endog, self.k_states, self.nobs)
27784  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
27785  */
27786   __pyx_t_3.__pyx_n = 1;
27787   __pyx_t_3.nobs = __pyx_t_1;
27788   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_n_u_design, (&(__pyx_v_self->design.shape[0])), __pyx_v_self->k_endog, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2184, __pyx_L1_error)
27789   __Pyx_GOTREF(__pyx_t_2);
27790   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27791   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27792 
27793   /* "statsmodels/tsa/statespace/_representation.pyx":2186
27794  *         tools.validate_matrix_shape('design', &self.design.shape[0],
27795  *                               self.k_endog, self.k_states, self.nobs)
27796  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],             # <<<<<<<<<<<<<<
27797  *                               self.k_endog, self.nobs)
27798  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
27799  */
27800   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2186, __pyx_L1_error)}
27801 
27802   /* "statsmodels/tsa/statespace/_representation.pyx":2187
27803  *                               self.k_endog, self.k_states, self.nobs)
27804  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
27805  *                               self.k_endog, self.nobs)             # <<<<<<<<<<<<<<
27806  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
27807  *                               self.k_endog, self.k_endog, self.nobs)
27808  */
27809   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2187, __pyx_L1_error)
27810   __Pyx_GOTREF(__pyx_t_2);
27811 
27812   /* "statsmodels/tsa/statespace/_representation.pyx":2186
27813  *         tools.validate_matrix_shape('design', &self.design.shape[0],
27814  *                               self.k_endog, self.k_states, self.nobs)
27815  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],             # <<<<<<<<<<<<<<
27816  *                               self.k_endog, self.nobs)
27817  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
27818  */
27819   __pyx_t_4.__pyx_n = 1;
27820   __pyx_t_4.nobs = __pyx_t_2;
27821   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_observation_intercept, (&(__pyx_v_self->obs_intercept.shape[0])), __pyx_v_self->k_endog, &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2186, __pyx_L1_error)
27822   __Pyx_GOTREF(__pyx_t_1);
27823   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27824   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27825 
27826   /* "statsmodels/tsa/statespace/_representation.pyx":2188
27827  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
27828  *                               self.k_endog, self.nobs)
27829  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],             # <<<<<<<<<<<<<<
27830  *                               self.k_endog, self.k_endog, self.nobs)
27831  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
27832  */
27833   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2188, __pyx_L1_error)}
27834 
27835   /* "statsmodels/tsa/statespace/_representation.pyx":2189
27836  *                               self.k_endog, self.nobs)
27837  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
27838  *                               self.k_endog, self.k_endog, self.nobs)             # <<<<<<<<<<<<<<
27839  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
27840  *                               self.k_states, self.k_states, self.nobs)
27841  */
27842   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2189, __pyx_L1_error)
27843   __Pyx_GOTREF(__pyx_t_1);
27844 
27845   /* "statsmodels/tsa/statespace/_representation.pyx":2188
27846  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
27847  *                               self.k_endog, self.nobs)
27848  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],             # <<<<<<<<<<<<<<
27849  *                               self.k_endog, self.k_endog, self.nobs)
27850  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
27851  */
27852   __pyx_t_3.__pyx_n = 1;
27853   __pyx_t_3.nobs = __pyx_t_1;
27854   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_observation_covariance_matrix, (&(__pyx_v_self->obs_cov.shape[0])), __pyx_v_self->k_endog, __pyx_v_self->k_endog, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2188, __pyx_L1_error)
27855   __Pyx_GOTREF(__pyx_t_2);
27856   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27857   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27858 
27859   /* "statsmodels/tsa/statespace/_representation.pyx":2190
27860  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
27861  *                               self.k_endog, self.k_endog, self.nobs)
27862  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],             # <<<<<<<<<<<<<<
27863  *                               self.k_states, self.k_states, self.nobs)
27864  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
27865  */
27866   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2190, __pyx_L1_error)}
27867 
27868   /* "statsmodels/tsa/statespace/_representation.pyx":2191
27869  *                               self.k_endog, self.k_endog, self.nobs)
27870  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
27871  *                               self.k_states, self.k_states, self.nobs)             # <<<<<<<<<<<<<<
27872  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
27873  *                               self.k_states, self.nobs)
27874  */
27875   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2191, __pyx_L1_error)
27876   __Pyx_GOTREF(__pyx_t_2);
27877 
27878   /* "statsmodels/tsa/statespace/_representation.pyx":2190
27879  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
27880  *                               self.k_endog, self.k_endog, self.nobs)
27881  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],             # <<<<<<<<<<<<<<
27882  *                               self.k_states, self.k_states, self.nobs)
27883  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
27884  */
27885   __pyx_t_3.__pyx_n = 1;
27886   __pyx_t_3.nobs = __pyx_t_2;
27887   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_n_u_transition, (&(__pyx_v_self->transition.shape[0])), __pyx_v_self->k_states, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2190, __pyx_L1_error)
27888   __Pyx_GOTREF(__pyx_t_1);
27889   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27890   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27891 
27892   /* "statsmodels/tsa/statespace/_representation.pyx":2192
27893  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
27894  *                               self.k_states, self.k_states, self.nobs)
27895  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],             # <<<<<<<<<<<<<<
27896  *                               self.k_states, self.nobs)
27897  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
27898  */
27899   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2192, __pyx_L1_error)}
27900 
27901   /* "statsmodels/tsa/statespace/_representation.pyx":2193
27902  *                               self.k_states, self.k_states, self.nobs)
27903  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
27904  *                               self.k_states, self.nobs)             # <<<<<<<<<<<<<<
27905  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
27906  *                               self.k_posdef, self.k_posdef, self.nobs)
27907  */
27908   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2193, __pyx_L1_error)
27909   __Pyx_GOTREF(__pyx_t_1);
27910 
27911   /* "statsmodels/tsa/statespace/_representation.pyx":2192
27912  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
27913  *                               self.k_states, self.k_states, self.nobs)
27914  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],             # <<<<<<<<<<<<<<
27915  *                               self.k_states, self.nobs)
27916  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
27917  */
27918   __pyx_t_4.__pyx_n = 1;
27919   __pyx_t_4.nobs = __pyx_t_1;
27920   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_state_intercept_2, (&(__pyx_v_self->state_intercept.shape[0])), __pyx_v_self->k_states, &__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2192, __pyx_L1_error)
27921   __Pyx_GOTREF(__pyx_t_2);
27922   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27923   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27924 
27925   /* "statsmodels/tsa/statespace/_representation.pyx":2194
27926  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
27927  *                               self.k_states, self.nobs)
27928  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],             # <<<<<<<<<<<<<<
27929  *                               self.k_posdef, self.k_posdef, self.nobs)
27930  *
27931  */
27932   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2194, __pyx_L1_error)}
27933 
27934   /* "statsmodels/tsa/statespace/_representation.pyx":2195
27935  *                               self.k_states, self.nobs)
27936  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
27937  *                               self.k_posdef, self.k_posdef, self.nobs)             # <<<<<<<<<<<<<<
27938  *
27939  *         # Check for a time-invariant model
27940  */
27941   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2195, __pyx_L1_error)
27942   __Pyx_GOTREF(__pyx_t_2);
27943 
27944   /* "statsmodels/tsa/statespace/_representation.pyx":2194
27945  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
27946  *                               self.k_states, self.nobs)
27947  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],             # <<<<<<<<<<<<<<
27948  *                               self.k_posdef, self.k_posdef, self.nobs)
27949  *
27950  */
27951   __pyx_t_3.__pyx_n = 1;
27952   __pyx_t_3.nobs = __pyx_t_2;
27953   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_state_covariance_matrix, (&(__pyx_v_self->state_cov.shape[0])), __pyx_v_self->k_posdef, __pyx_v_self->k_posdef, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2194, __pyx_L1_error)
27954   __Pyx_GOTREF(__pyx_t_1);
27955   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27956   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27957 
27958   /* "statsmodels/tsa/statespace/_representation.pyx":2199
27959  *         # Check for a time-invariant model
27960  *         self.time_invariant = (
27961  *             self.design.shape[2] == 1           and             # <<<<<<<<<<<<<<
27962  *             self.obs_intercept.shape[1] == 1    and
27963  *             self.obs_cov.shape[2] == 1          and
27964  */
27965   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2199, __pyx_L1_error)}
27966   __pyx_t_6 = ((__pyx_v_self->design.shape[2]) == 1);
27967   if (__pyx_t_6) {
27968   } else {
27969     __pyx_t_5 = __pyx_t_6;
27970     goto __pyx_L3_bool_binop_done;
27971   }
27972 
27973   /* "statsmodels/tsa/statespace/_representation.pyx":2200
27974  *         self.time_invariant = (
27975  *             self.design.shape[2] == 1           and
27976  *             self.obs_intercept.shape[1] == 1    and             # <<<<<<<<<<<<<<
27977  *             self.obs_cov.shape[2] == 1          and
27978  *             self.transition.shape[2] == 1       and
27979  */
27980   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2200, __pyx_L1_error)}
27981   __pyx_t_6 = ((__pyx_v_self->obs_intercept.shape[1]) == 1);
27982   if (__pyx_t_6) {
27983   } else {
27984     __pyx_t_5 = __pyx_t_6;
27985     goto __pyx_L3_bool_binop_done;
27986   }
27987 
27988   /* "statsmodels/tsa/statespace/_representation.pyx":2201
27989  *             self.design.shape[2] == 1           and
27990  *             self.obs_intercept.shape[1] == 1    and
27991  *             self.obs_cov.shape[2] == 1          and             # <<<<<<<<<<<<<<
27992  *             self.transition.shape[2] == 1       and
27993  *             self.state_intercept.shape[1] == 1  and
27994  */
27995   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2201, __pyx_L1_error)}
27996   __pyx_t_6 = ((__pyx_v_self->obs_cov.shape[2]) == 1);
27997   if (__pyx_t_6) {
27998   } else {
27999     __pyx_t_5 = __pyx_t_6;
28000     goto __pyx_L3_bool_binop_done;
28001   }
28002 
28003   /* "statsmodels/tsa/statespace/_representation.pyx":2202
28004  *             self.obs_intercept.shape[1] == 1    and
28005  *             self.obs_cov.shape[2] == 1          and
28006  *             self.transition.shape[2] == 1       and             # <<<<<<<<<<<<<<
28007  *             self.state_intercept.shape[1] == 1  and
28008  *             self.selection.shape[2] == 1        and
28009  */
28010   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2202, __pyx_L1_error)}
28011   __pyx_t_6 = ((__pyx_v_self->transition.shape[2]) == 1);
28012   if (__pyx_t_6) {
28013   } else {
28014     __pyx_t_5 = __pyx_t_6;
28015     goto __pyx_L3_bool_binop_done;
28016   }
28017 
28018   /* "statsmodels/tsa/statespace/_representation.pyx":2203
28019  *             self.obs_cov.shape[2] == 1          and
28020  *             self.transition.shape[2] == 1       and
28021  *             self.state_intercept.shape[1] == 1  and             # <<<<<<<<<<<<<<
28022  *             self.selection.shape[2] == 1        and
28023  *             self.state_cov.shape[2] == 1
28024  */
28025   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2203, __pyx_L1_error)}
28026   __pyx_t_6 = ((__pyx_v_self->state_intercept.shape[1]) == 1);
28027   if (__pyx_t_6) {
28028   } else {
28029     __pyx_t_5 = __pyx_t_6;
28030     goto __pyx_L3_bool_binop_done;
28031   }
28032 
28033   /* "statsmodels/tsa/statespace/_representation.pyx":2204
28034  *             self.transition.shape[2] == 1       and
28035  *             self.state_intercept.shape[1] == 1  and
28036  *             self.selection.shape[2] == 1        and             # <<<<<<<<<<<<<<
28037  *             self.state_cov.shape[2] == 1
28038  *         )
28039  */
28040   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2204, __pyx_L1_error)}
28041   __pyx_t_6 = ((__pyx_v_self->selection.shape[2]) == 1);
28042   if (__pyx_t_6) {
28043   } else {
28044     __pyx_t_5 = __pyx_t_6;
28045     goto __pyx_L3_bool_binop_done;
28046   }
28047 
28048   /* "statsmodels/tsa/statespace/_representation.pyx":2205
28049  *             self.state_intercept.shape[1] == 1  and
28050  *             self.selection.shape[2] == 1        and
28051  *             self.state_cov.shape[2] == 1             # <<<<<<<<<<<<<<
28052  *         )
28053  *
28054  */
28055   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2205, __pyx_L1_error)}
28056   __pyx_t_6 = ((__pyx_v_self->state_cov.shape[2]) == 1);
28057   __pyx_t_5 = __pyx_t_6;
28058   __pyx_L3_bool_binop_done:;
28059 
28060   /* "statsmodels/tsa/statespace/_representation.pyx":2198
28061  *
28062  *         # Check for a time-invariant model
28063  *         self.time_invariant = (             # <<<<<<<<<<<<<<
28064  *             self.design.shape[2] == 1           and
28065  *             self.obs_intercept.shape[1] == 1    and
28066  */
28067   __pyx_v_self->time_invariant = __pyx_t_5;
28068 
28069   /* "statsmodels/tsa/statespace/_representation.pyx":2209
28070  *
28071  *         # Set the flags for initialization to be false
28072  *         self.initialized = False             # <<<<<<<<<<<<<<
28073  *         self.initialized_diffuse = False
28074  *         self.initialized_stationary = False
28075  */
28076   __pyx_v_self->initialized = 0;
28077 
28078   /* "statsmodels/tsa/statespace/_representation.pyx":2210
28079  *         # Set the flags for initialization to be false
28080  *         self.initialized = False
28081  *         self.initialized_diffuse = False             # <<<<<<<<<<<<<<
28082  *         self.initialized_stationary = False
28083  *
28084  */
28085   __pyx_v_self->initialized_diffuse = 0;
28086 
28087   /* "statsmodels/tsa/statespace/_representation.pyx":2211
28088  *         self.initialized = False
28089  *         self.initialized_diffuse = False
28090  *         self.initialized_stationary = False             # <<<<<<<<<<<<<<
28091  *
28092  *         self.diagonal_obs_cov = diagonal_obs_cov
28093  */
28094   __pyx_v_self->initialized_stationary = 0;
28095 
28096   /* "statsmodels/tsa/statespace/_representation.pyx":2213
28097  *         self.initialized_stationary = False
28098  *
28099  *         self.diagonal_obs_cov = diagonal_obs_cov             # <<<<<<<<<<<<<<
28100  *         self._diagonal_obs_cov = -1
28101  *
28102  */
28103   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_diagonal_obs_cov); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2213, __pyx_L1_error)
28104   __pyx_v_self->diagonal_obs_cov = __pyx_t_5;
28105 
28106   /* "statsmodels/tsa/statespace/_representation.pyx":2214
28107  *
28108  *         self.diagonal_obs_cov = diagonal_obs_cov
28109  *         self._diagonal_obs_cov = -1             # <<<<<<<<<<<<<<
28110  *
28111  *         # Allocate selected state covariance matrix
28112  */
28113   __pyx_v_self->_diagonal_obs_cov = -1;
28114 
28115   /* "statsmodels/tsa/statespace/_representation.pyx":2217
28116  *
28117  *         # Allocate selected state covariance matrix
28118  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;             # <<<<<<<<<<<<<<
28119  *         # (we only allocate memory for time-varying array if necessary)
28120  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
28121  */
28122   __pyx_t_5 = __pyx_v_self->k_states;
28123   (__pyx_v_dim3[0]) = __pyx_t_5;
28124   __pyx_t_5 = __pyx_v_self->k_states;
28125   (__pyx_v_dim3[1]) = __pyx_t_5;
28126   (__pyx_v_dim3[2]) = 1;
28127 
28128   /* "statsmodels/tsa/statespace/_representation.pyx":2219
28129  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;
28130  *         # (we only allocate memory for time-varying array if necessary)
28131  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:             # <<<<<<<<<<<<<<
28132  *             dim3[2] = self.nobs
28133  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_COMPLEX64, FORTRAN)
28134  */
28135   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2219, __pyx_L1_error)}
28136   __pyx_t_7 = (((__pyx_v_self->state_cov.shape[2]) > 1) != 0);
28137   if (!__pyx_t_7) {
28138   } else {
28139     __pyx_t_6 = __pyx_t_7;
28140     goto __pyx_L11_bool_binop_done;
28141   }
28142   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2219, __pyx_L1_error)}
28143   __pyx_t_7 = (((__pyx_v_self->selection.shape[2]) > 1) != 0);
28144   __pyx_t_6 = __pyx_t_7;
28145   __pyx_L11_bool_binop_done:;
28146   if (__pyx_t_6) {
28147 
28148     /* "statsmodels/tsa/statespace/_representation.pyx":2220
28149  *         # (we only allocate memory for time-varying array if necessary)
28150  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
28151  *             dim3[2] = self.nobs             # <<<<<<<<<<<<<<
28152  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_COMPLEX64, FORTRAN)
28153  *
28154  */
28155     __pyx_t_5 = __pyx_v_self->nobs;
28156     (__pyx_v_dim3[2]) = __pyx_t_5;
28157 
28158     /* "statsmodels/tsa/statespace/_representation.pyx":2219
28159  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;
28160  *         # (we only allocate memory for time-varying array if necessary)
28161  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:             # <<<<<<<<<<<<<<
28162  *             dim3[2] = self.nobs
28163  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_COMPLEX64, FORTRAN)
28164  */
28165   }
28166 
28167   /* "statsmodels/tsa/statespace/_representation.pyx":2221
28168  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
28169  *             dim3[2] = self.nobs
28170  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28171  *
28172  *         # Handle missing data
28173  */
28174   __pyx_t_1 = PyArray_ZEROS(3, __pyx_v_dim3, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2221, __pyx_L1_error)
28175   __Pyx_GOTREF(__pyx_t_1);
28176   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 2221, __pyx_L1_error)
28177   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28178   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_state_cov, 0);
28179   __pyx_v_self->selected_state_cov = __pyx_t_8;
28180   __pyx_t_8.memview = NULL;
28181   __pyx_t_8.data = NULL;
28182 
28183   /* "statsmodels/tsa/statespace/_representation.pyx":2224
28184  *
28185  *         # Handle missing data
28186  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")             # <<<<<<<<<<<<<<
28187  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)
28188  *         self.has_missing = np.sum(self.nmissing) > 0
28189  */
28190   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2224, __pyx_L1_error)
28191   __Pyx_GOTREF(__pyx_t_1);
28192   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2224, __pyx_L1_error)
28193   __Pyx_GOTREF(__pyx_t_2);
28194   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28195   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2224, __pyx_L1_error)
28196   __Pyx_GOTREF(__pyx_t_9);
28197   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_isnan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2224, __pyx_L1_error)
28198   __Pyx_GOTREF(__pyx_t_10);
28199   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28200   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_obs, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2224, __pyx_L1_error)
28201   __Pyx_GOTREF(__pyx_t_9);
28202   __pyx_t_11 = NULL;
28203   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
28204     __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
28205     if (likely(__pyx_t_11)) {
28206       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
28207       __Pyx_INCREF(__pyx_t_11);
28208       __Pyx_INCREF(function);
28209       __Pyx_DECREF_SET(__pyx_t_10, function);
28210     }
28211   }
28212   __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9);
28213   __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
28214   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28215   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2224, __pyx_L1_error)
28216   __Pyx_GOTREF(__pyx_t_1);
28217   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
28218   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2224, __pyx_L1_error)
28219   __Pyx_GOTREF(__pyx_t_10);
28220   __Pyx_GIVEREF(__pyx_t_1);
28221   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
28222   __pyx_t_1 = 0;
28223   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2224, __pyx_L1_error)
28224   __Pyx_GOTREF(__pyx_t_1);
28225   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2224, __pyx_L1_error)
28226   __Pyx_GOTREF(__pyx_t_9);
28227   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2224, __pyx_L1_error)
28228   __Pyx_GOTREF(__pyx_t_11);
28229   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28230   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 2224, __pyx_L1_error)
28231   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28232   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2224, __pyx_L1_error)
28233   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2224, __pyx_L1_error)
28234   __Pyx_GOTREF(__pyx_t_11);
28235   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28236   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
28237   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28238   __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 2224, __pyx_L1_error)
28239   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28240   __PYX_XDEC_MEMVIEW(&__pyx_v_self->missing, 0);
28241   __pyx_v_self->missing = __pyx_t_12;
28242   __pyx_t_12.memview = NULL;
28243   __pyx_t_12.data = NULL;
28244 
28245   /* "statsmodels/tsa/statespace/_representation.pyx":2225
28246  *         # Handle missing data
28247  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")
28248  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)             # <<<<<<<<<<<<<<
28249  *         self.has_missing = np.sum(self.nmissing) > 0
28250  *
28251  */
28252   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2225, __pyx_L1_error)
28253   __Pyx_GOTREF(__pyx_t_11);
28254   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2225, __pyx_L1_error)
28255   __Pyx_GOTREF(__pyx_t_1);
28256   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28257   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2225, __pyx_L1_error)
28258   __Pyx_GOTREF(__pyx_t_11);
28259   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sum); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2225, __pyx_L1_error)
28260   __Pyx_GOTREF(__pyx_t_10);
28261   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28262   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2225, __pyx_L1_error)}
28263   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2225, __pyx_L1_error)
28264   __Pyx_GOTREF(__pyx_t_11);
28265   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2225, __pyx_L1_error)
28266   __Pyx_GOTREF(__pyx_t_2);
28267   __Pyx_GIVEREF(__pyx_t_11);
28268   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
28269   __pyx_t_11 = 0;
28270   __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2225, __pyx_L1_error)
28271   __Pyx_GOTREF(__pyx_t_11);
28272   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2225, __pyx_L1_error)
28273   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2225, __pyx_L1_error)
28274   __Pyx_GOTREF(__pyx_t_9);
28275   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
28276   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28277   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28278   __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2225, __pyx_L1_error)
28279   __Pyx_GOTREF(__pyx_t_11);
28280   __Pyx_GIVEREF(__pyx_t_9);
28281   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
28282   __pyx_t_9 = 0;
28283   __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2225, __pyx_L1_error)
28284   __Pyx_GOTREF(__pyx_t_9);
28285   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2225, __pyx_L1_error)
28286   __Pyx_GOTREF(__pyx_t_2);
28287   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2225, __pyx_L1_error)
28288   __Pyx_GOTREF(__pyx_t_10);
28289   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28290   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 2225, __pyx_L1_error)
28291   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
28292   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2225, __pyx_L1_error)
28293   __Pyx_GOTREF(__pyx_t_10);
28294   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28295   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28296   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28297   __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 2225, __pyx_L1_error)
28298   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
28299   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nmissing, 0);
28300   __pyx_v_self->nmissing = __pyx_t_13;
28301   __pyx_t_13.memview = NULL;
28302   __pyx_t_13.data = NULL;
28303 
28304   /* "statsmodels/tsa/statespace/_representation.pyx":2226
28305  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")
28306  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)
28307  *         self.has_missing = np.sum(self.nmissing) > 0             # <<<<<<<<<<<<<<
28308  *
28309  *         # Create the temporary array
28310  */
28311   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2226, __pyx_L1_error)
28312   __Pyx_GOTREF(__pyx_t_9);
28313   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2226, __pyx_L1_error)
28314   __Pyx_GOTREF(__pyx_t_11);
28315   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28316   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2226, __pyx_L1_error)}
28317   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2226, __pyx_L1_error)
28318   __Pyx_GOTREF(__pyx_t_9);
28319   __pyx_t_1 = NULL;
28320   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
28321     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
28322     if (likely(__pyx_t_1)) {
28323       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
28324       __Pyx_INCREF(__pyx_t_1);
28325       __Pyx_INCREF(function);
28326       __Pyx_DECREF_SET(__pyx_t_11, function);
28327     }
28328   }
28329   __pyx_t_10 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_9);
28330   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28331   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28332   if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2226, __pyx_L1_error)
28333   __Pyx_GOTREF(__pyx_t_10);
28334   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28335   __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2226, __pyx_L1_error)
28336   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
28337   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2226, __pyx_L1_error)
28338   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28339   __pyx_v_self->has_missing = __pyx_t_5;
28340 
28341   /* "statsmodels/tsa/statespace/_representation.pyx":2230
28342  *         # Create the temporary array
28343  *         # Holds arrays of dimension $(m \times m)$
28344  *         dim2[0] = self.k_states; dim2[1] = max(self.k_states, self.k_posdef);             # <<<<<<<<<<<<<<
28345  *         self.tmp = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28346  *
28347  */
28348   __pyx_t_5 = __pyx_v_self->k_states;
28349   (__pyx_v_dim2[0]) = __pyx_t_5;
28350   __pyx_t_5 = __pyx_v_self->k_posdef;
28351   __pyx_t_14 = __pyx_v_self->k_states;
28352   if (((__pyx_t_5 > __pyx_t_14) != 0)) {
28353     __pyx_t_15 = __pyx_t_5;
28354   } else {
28355     __pyx_t_15 = __pyx_t_14;
28356   }
28357   (__pyx_v_dim2[1]) = __pyx_t_15;
28358 
28359   /* "statsmodels/tsa/statespace/_representation.pyx":2231
28360  *         # Holds arrays of dimension $(m \times m)$
28361  *         dim2[0] = self.k_states; dim2[1] = max(self.k_states, self.k_posdef);
28362  *         self.tmp = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28363  *
28364  *         # Arrays for initialization
28365  */
28366   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2231, __pyx_L1_error)
28367   __Pyx_GOTREF(__pyx_t_11);
28368   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2231, __pyx_L1_error)
28369   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28370   __PYX_XDEC_MEMVIEW(&__pyx_v_self->tmp, 0);
28371   __pyx_v_self->tmp = __pyx_t_16;
28372   __pyx_t_16.memview = NULL;
28373   __pyx_t_16.data = NULL;
28374 
28375   /* "statsmodels/tsa/statespace/_representation.pyx":2234
28376  *
28377  *         # Arrays for initialization
28378  *         dim1[0] = self.k_states;             # <<<<<<<<<<<<<<
28379  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28380  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28381  */
28382   __pyx_t_15 = __pyx_v_self->k_states;
28383   (__pyx_v_dim1[0]) = __pyx_t_15;
28384 
28385   /* "statsmodels/tsa/statespace/_representation.pyx":2235
28386  *         # Arrays for initialization
28387  *         dim1[0] = self.k_states;
28388  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28389  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28390  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28391  */
28392   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2235, __pyx_L1_error)
28393   __Pyx_GOTREF(__pyx_t_11);
28394   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 2235, __pyx_L1_error)
28395   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28396   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
28397   __pyx_v_self->initial_state = __pyx_t_17;
28398   __pyx_t_17.memview = NULL;
28399   __pyx_t_17.data = NULL;
28400 
28401   /* "statsmodels/tsa/statespace/_representation.pyx":2236
28402  *         dim1[0] = self.k_states;
28403  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28404  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
28405  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28406  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28407  */
28408   __pyx_t_15 = __pyx_v_self->k_states;
28409   (__pyx_v_dim2[0]) = __pyx_t_15;
28410   __pyx_t_15 = __pyx_v_self->k_states;
28411   (__pyx_v_dim2[1]) = __pyx_t_15;
28412 
28413   /* "statsmodels/tsa/statespace/_representation.pyx":2237
28414  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28415  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28416  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28417  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28418  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28419  */
28420   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2237, __pyx_L1_error)
28421   __Pyx_GOTREF(__pyx_t_11);
28422   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2237, __pyx_L1_error)
28423   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28424   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
28425   __pyx_v_self->initial_state_cov = __pyx_t_16;
28426   __pyx_t_16.memview = NULL;
28427   __pyx_t_16.data = NULL;
28428 
28429   /* "statsmodels/tsa/statespace/_representation.pyx":2238
28430  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28431  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28432  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
28433  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28434  *
28435  */
28436   __pyx_t_15 = __pyx_v_self->k_states;
28437   (__pyx_v_dim2[0]) = __pyx_t_15;
28438   __pyx_t_15 = __pyx_v_self->k_states;
28439   (__pyx_v_dim2[1]) = __pyx_t_15;
28440 
28441   /* "statsmodels/tsa/statespace/_representation.pyx":2239
28442  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28443  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28444  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28445  *
28446  *         # Arrays for missing data
28447  */
28448   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2239, __pyx_L1_error)
28449   __Pyx_GOTREF(__pyx_t_11);
28450   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2239, __pyx_L1_error)
28451   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28452   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_diffuse_state_cov, 0);
28453   __pyx_v_self->initial_diffuse_state_cov = __pyx_t_16;
28454   __pyx_t_16.memview = NULL;
28455   __pyx_t_16.data = NULL;
28456 
28457   /* "statsmodels/tsa/statespace/_representation.pyx":2242
28458  *
28459  *         # Arrays for missing data
28460  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
28461  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28462  *         dim1[0] = self.k_endog;
28463  */
28464   __pyx_t_15 = __pyx_v_self->k_endog;
28465   (__pyx_v_dim1[0]) = __pyx_t_15;
28466 
28467   /* "statsmodels/tsa/statespace/_representation.pyx":2243
28468  *         # Arrays for missing data
28469  *         dim1[0] = self.k_endog;
28470  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28471  *         dim1[0] = self.k_endog;
28472  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28473  */
28474   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2243, __pyx_L1_error)
28475   __Pyx_GOTREF(__pyx_t_11);
28476   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 2243, __pyx_L1_error)
28477   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28478   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs, 0);
28479   __pyx_v_self->selected_obs = __pyx_t_17;
28480   __pyx_t_17.memview = NULL;
28481   __pyx_t_17.data = NULL;
28482 
28483   /* "statsmodels/tsa/statespace/_representation.pyx":2244
28484  *         dim1[0] = self.k_endog;
28485  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28486  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
28487  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28488  *         dim1[0] = self.k_endog * self.k_states;
28489  */
28490   __pyx_t_15 = __pyx_v_self->k_endog;
28491   (__pyx_v_dim1[0]) = __pyx_t_15;
28492 
28493   /* "statsmodels/tsa/statespace/_representation.pyx":2245
28494  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28495  *         dim1[0] = self.k_endog;
28496  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28497  *         dim1[0] = self.k_endog * self.k_states;
28498  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28499  */
28500   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2245, __pyx_L1_error)
28501   __Pyx_GOTREF(__pyx_t_11);
28502   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 2245, __pyx_L1_error)
28503   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28504   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_intercept, 0);
28505   __pyx_v_self->selected_obs_intercept = __pyx_t_17;
28506   __pyx_t_17.memview = NULL;
28507   __pyx_t_17.data = NULL;
28508 
28509   /* "statsmodels/tsa/statespace/_representation.pyx":2246
28510  *         dim1[0] = self.k_endog;
28511  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28512  *         dim1[0] = self.k_endog * self.k_states;             # <<<<<<<<<<<<<<
28513  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28514  *         dim1[0] = self.k_endog**2;
28515  */
28516   (__pyx_v_dim1[0]) = (__pyx_v_self->k_endog * __pyx_v_self->k_states);
28517 
28518   /* "statsmodels/tsa/statespace/_representation.pyx":2247
28519  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28520  *         dim1[0] = self.k_endog * self.k_states;
28521  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28522  *         dim1[0] = self.k_endog**2;
28523  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28524  */
28525   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2247, __pyx_L1_error)
28526   __Pyx_GOTREF(__pyx_t_11);
28527   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 2247, __pyx_L1_error)
28528   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28529   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_design, 0);
28530   __pyx_v_self->selected_design = __pyx_t_17;
28531   __pyx_t_17.memview = NULL;
28532   __pyx_t_17.data = NULL;
28533 
28534   /* "statsmodels/tsa/statespace/_representation.pyx":2248
28535  *         dim1[0] = self.k_endog * self.k_states;
28536  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28537  *         dim1[0] = self.k_endog**2;             # <<<<<<<<<<<<<<
28538  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28539  *
28540  */
28541   (__pyx_v_dim1[0]) = __Pyx_pow_long(((long)__pyx_v_self->k_endog), 2);
28542 
28543   /* "statsmodels/tsa/statespace/_representation.pyx":2249
28544  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28545  *         dim1[0] = self.k_endog**2;
28546  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28547  *
28548  *         # Arrays for transformations
28549  */
28550   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2249, __pyx_L1_error)
28551   __Pyx_GOTREF(__pyx_t_11);
28552   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 2249, __pyx_L1_error)
28553   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28554   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_cov, 0);
28555   __pyx_v_self->selected_obs_cov = __pyx_t_17;
28556   __pyx_t_17.memview = NULL;
28557   __pyx_t_17.data = NULL;
28558 
28559   /* "statsmodels/tsa/statespace/_representation.pyx":2252
28560  *
28561  *         # Arrays for transformations
28562  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;             # <<<<<<<<<<<<<<
28563  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28564  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28565  */
28566   __pyx_t_15 = __pyx_v_self->k_endog;
28567   (__pyx_v_dim2[0]) = __pyx_t_15;
28568   __pyx_t_15 = __pyx_v_self->k_endog;
28569   (__pyx_v_dim2[1]) = __pyx_t_15;
28570 
28571   /* "statsmodels/tsa/statespace/_representation.pyx":2253
28572  *         # Arrays for transformations
28573  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;
28574  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28575  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28576  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
28577  */
28578   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2253, __pyx_L1_error)
28579   __Pyx_GOTREF(__pyx_t_11);
28580   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2253, __pyx_L1_error)
28581   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28582   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_cholesky, 0);
28583   __pyx_v_self->transform_cholesky = __pyx_t_16;
28584   __pyx_t_16.memview = NULL;
28585   __pyx_t_16.data = NULL;
28586 
28587   /* "statsmodels/tsa/statespace/_representation.pyx":2254
28588  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;
28589  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28590  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28591  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
28592  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28593  */
28594   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2254, __pyx_L1_error)
28595   __Pyx_GOTREF(__pyx_t_11);
28596   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2254, __pyx_L1_error)
28597   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28598   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_cov, 0);
28599   __pyx_v_self->transform_obs_cov = __pyx_t_16;
28600   __pyx_t_16.memview = NULL;
28601   __pyx_t_16.data = NULL;
28602 
28603   /* "statsmodels/tsa/statespace/_representation.pyx":2255
28604  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28605  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28606  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
28607  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28608  *         dim1[0] = self.k_endog;
28609  */
28610   __pyx_t_15 = __pyx_v_self->k_endog;
28611   (__pyx_v_dim2[0]) = __pyx_t_15;
28612   __pyx_t_15 = __pyx_v_self->k_states;
28613   (__pyx_v_dim2[1]) = __pyx_t_15;
28614 
28615   /* "statsmodels/tsa/statespace/_representation.pyx":2256
28616  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28617  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
28618  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28619  *         dim1[0] = self.k_endog;
28620  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28621  */
28622   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2256, __pyx_L1_error)
28623   __Pyx_GOTREF(__pyx_t_11);
28624   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2256, __pyx_L1_error)
28625   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28626   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_design, 0);
28627   __pyx_v_self->transform_design = __pyx_t_16;
28628   __pyx_t_16.memview = NULL;
28629   __pyx_t_16.data = NULL;
28630 
28631   /* "statsmodels/tsa/statespace/_representation.pyx":2257
28632  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
28633  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28634  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
28635  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28636  *
28637  */
28638   __pyx_t_15 = __pyx_v_self->k_endog;
28639   (__pyx_v_dim1[0]) = __pyx_t_15;
28640 
28641   /* "statsmodels/tsa/statespace/_representation.pyx":2258
28642  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28643  *         dim1[0] = self.k_endog;
28644  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28645  *
28646  *         dim1[0] = self.k_states;
28647  */
28648   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2258, __pyx_L1_error)
28649   __Pyx_GOTREF(__pyx_t_11);
28650   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 2258, __pyx_L1_error)
28651   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28652   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_intercept, 0);
28653   __pyx_v_self->transform_obs_intercept = __pyx_t_17;
28654   __pyx_t_17.memview = NULL;
28655   __pyx_t_17.data = NULL;
28656 
28657   /* "statsmodels/tsa/statespace/_representation.pyx":2260
28658  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28659  *
28660  *         dim1[0] = self.k_states;             # <<<<<<<<<<<<<<
28661  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28662  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28663  */
28664   __pyx_t_15 = __pyx_v_self->k_states;
28665   (__pyx_v_dim1[0]) = __pyx_t_15;
28666 
28667   /* "statsmodels/tsa/statespace/_representation.pyx":2261
28668  *
28669  *         dim1[0] = self.k_states;
28670  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28671  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28672  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28673  */
28674   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2261, __pyx_L1_error)
28675   __Pyx_GOTREF(__pyx_t_11);
28676   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 2261, __pyx_L1_error)
28677   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28678   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs, 0);
28679   __pyx_v_self->collapse_obs = __pyx_t_17;
28680   __pyx_t_17.memview = NULL;
28681   __pyx_t_17.data = NULL;
28682 
28683   /* "statsmodels/tsa/statespace/_representation.pyx":2262
28684  *         dim1[0] = self.k_states;
28685  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28686  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28687  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28688  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28689  */
28690   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2262, __pyx_L1_error)
28691   __Pyx_GOTREF(__pyx_t_11);
28692   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 2262, __pyx_L1_error)
28693   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28694   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_tmp, 0);
28695   __pyx_v_self->collapse_obs_tmp = __pyx_t_17;
28696   __pyx_t_17.memview = NULL;
28697   __pyx_t_17.data = NULL;
28698 
28699   /* "statsmodels/tsa/statespace/_representation.pyx":2263
28700  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28701  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28702  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
28703  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28704  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28705  */
28706   __pyx_t_15 = __pyx_v_self->k_states;
28707   (__pyx_v_dim2[0]) = __pyx_t_15;
28708   __pyx_t_15 = __pyx_v_self->k_states;
28709   (__pyx_v_dim2[1]) = __pyx_t_15;
28710 
28711   /* "statsmodels/tsa/statespace/_representation.pyx":2264
28712  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
28713  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28714  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28715  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28716  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28717  */
28718   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2264, __pyx_L1_error)
28719   __Pyx_GOTREF(__pyx_t_11);
28720   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2264, __pyx_L1_error)
28721   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28722   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_design, 0);
28723   __pyx_v_self->collapse_design = __pyx_t_16;
28724   __pyx_t_16.memview = NULL;
28725   __pyx_t_16.data = NULL;
28726 
28727   /* "statsmodels/tsa/statespace/_representation.pyx":2265
28728  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
28729  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28730  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28731  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28732  *
28733  */
28734   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2265, __pyx_L1_error)
28735   __Pyx_GOTREF(__pyx_t_11);
28736   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2265, __pyx_L1_error)
28737   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28738   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_cov, 0);
28739   __pyx_v_self->collapse_obs_cov = __pyx_t_16;
28740   __pyx_t_16.memview = NULL;
28741   __pyx_t_16.data = NULL;
28742 
28743   /* "statsmodels/tsa/statespace/_representation.pyx":2266
28744  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28745  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
28746  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
28747  *
28748  *         # Initialize location
28749  */
28750   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2266, __pyx_L1_error)
28751   __Pyx_GOTREF(__pyx_t_11);
28752   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2266, __pyx_L1_error)
28753   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
28754   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_cholesky, 0);
28755   __pyx_v_self->collapse_cholesky = __pyx_t_16;
28756   __pyx_t_16.memview = NULL;
28757   __pyx_t_16.data = NULL;
28758 
28759   /* "statsmodels/tsa/statespace/_representation.pyx":2269
28760  *
28761  *         # Initialize location
28762  *         self.t = 0             # <<<<<<<<<<<<<<
28763  *         self._previous_t = 0
28764  *
28765  */
28766   __pyx_v_self->t = 0;
28767 
28768   /* "statsmodels/tsa/statespace/_representation.pyx":2270
28769  *         # Initialize location
28770  *         self.t = 0
28771  *         self._previous_t = 0             # <<<<<<<<<<<<<<
28772  *
28773  *         # Initialize dimensions
28774  */
28775   __pyx_v_self->_previous_t = 0;
28776 
28777   /* "statsmodels/tsa/statespace/_representation.pyx":2273
28778  *
28779  *         # Initialize dimensions
28780  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)             # <<<<<<<<<<<<<<
28781  *
28782  *     def __reduce__(self):
28783  */
28784   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_self->k_endog, __pyx_v_self->k_states, __pyx_v_self->k_posdef);
28785 
28786   /* "statsmodels/tsa/statespace/_representation.pyx":2144
28787  *     # ### Initialize state space model
28788  *     # *Note*: The initial state and state covariance matrix must be provided.
28789  *     def __init__(self,             # <<<<<<<<<<<<<<
28790  *                  np.complex64_t [::1,:]   obs,
28791  *                  np.complex64_t [::1,:,:] design,
28792  */
28793 
28794   /* function exit code */
28795   __pyx_r = 0;
28796   goto __pyx_L0;
28797   __pyx_L1_error:;
28798   __Pyx_XDECREF(__pyx_t_1);
28799   __Pyx_XDECREF(__pyx_t_2);
28800   __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
28801   __Pyx_XDECREF(__pyx_t_9);
28802   __Pyx_XDECREF(__pyx_t_10);
28803   __Pyx_XDECREF(__pyx_t_11);
28804   __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
28805   __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
28806   __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
28807   __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
28808   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28809   __pyx_r = -1;
28810   __pyx_L0:;
28811   __PYX_XDEC_MEMVIEW(&__pyx_v_obs, 1);
28812   __PYX_XDEC_MEMVIEW(&__pyx_v_design, 1);
28813   __PYX_XDEC_MEMVIEW(&__pyx_v_obs_intercept, 1);
28814   __PYX_XDEC_MEMVIEW(&__pyx_v_obs_cov, 1);
28815   __PYX_XDEC_MEMVIEW(&__pyx_v_transition, 1);
28816   __PYX_XDEC_MEMVIEW(&__pyx_v_state_intercept, 1);
28817   __PYX_XDEC_MEMVIEW(&__pyx_v_selection, 1);
28818   __PYX_XDEC_MEMVIEW(&__pyx_v_state_cov, 1);
28819   __Pyx_RefNannyFinishContext();
28820   return __pyx_r;
28821 }
28822 
28823 /* "statsmodels/tsa/statespace/_representation.pyx":2275
28824  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)
28825  *
28826  *     def __reduce__(self):             # <<<<<<<<<<<<<<
28827  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
28828  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
28829  */
28830 
28831 /* Python wrapper */
28832 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3__reduce__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)28833 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
28834   PyObject *__pyx_r = 0;
28835   __Pyx_RefNannyDeclarations
28836   __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
28837   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_2__reduce__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
28838 
28839   /* function exit code */
28840   __Pyx_RefNannyFinishContext();
28841   return __pyx_r;
28842 }
28843 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)28844 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
28845   PyObject *__pyx_v_init = NULL;
28846   PyObject *__pyx_v_state = NULL;
28847   PyObject *__pyx_r = NULL;
28848   __Pyx_RefNannyDeclarations
28849   PyObject *__pyx_t_1 = NULL;
28850   PyObject *__pyx_t_2 = NULL;
28851   PyObject *__pyx_t_3 = NULL;
28852   PyObject *__pyx_t_4 = NULL;
28853   PyObject *__pyx_t_5 = NULL;
28854   PyObject *__pyx_t_6 = NULL;
28855   PyObject *__pyx_t_7 = NULL;
28856   PyObject *__pyx_t_8 = NULL;
28857   PyObject *__pyx_t_9 = NULL;
28858   PyObject *__pyx_t_10 = NULL;
28859   PyObject *__pyx_t_11 = NULL;
28860   int __pyx_t_12;
28861   int __pyx_lineno = 0;
28862   const char *__pyx_filename = NULL;
28863   int __pyx_clineno = 0;
28864   __Pyx_RefNannySetupContext("__reduce__", 0);
28865 
28866   /* "statsmodels/tsa/statespace/_representation.pyx":2276
28867  *
28868  *     def __reduce__(self):
28869  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),             # <<<<<<<<<<<<<<
28870  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
28871  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
28872  */
28873   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2276, __pyx_L1_error)
28874   __Pyx_GOTREF(__pyx_t_1);
28875   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2276, __pyx_L1_error)
28876   __Pyx_GOTREF(__pyx_t_2);
28877   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28878   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2276, __pyx_L1_error)}
28879   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2276, __pyx_L1_error)
28880   __Pyx_GOTREF(__pyx_t_1);
28881   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2276, __pyx_L1_error)
28882   __Pyx_GOTREF(__pyx_t_3);
28883   __Pyx_GIVEREF(__pyx_t_1);
28884   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
28885   __pyx_t_1 = 0;
28886   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2276, __pyx_L1_error)
28887   __Pyx_GOTREF(__pyx_t_1);
28888   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2276, __pyx_L1_error)
28889   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2276, __pyx_L1_error)
28890   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2276, __pyx_L1_error)
28891   __Pyx_GOTREF(__pyx_t_4);
28892   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28893   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28894   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28895   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2276, __pyx_L1_error)
28896   __Pyx_GOTREF(__pyx_t_1);
28897   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2276, __pyx_L1_error)
28898   __Pyx_GOTREF(__pyx_t_3);
28899   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28900   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2276, __pyx_L1_error)}
28901   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->design, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2276, __pyx_L1_error)
28902   __Pyx_GOTREF(__pyx_t_1);
28903   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2276, __pyx_L1_error)
28904   __Pyx_GOTREF(__pyx_t_2);
28905   __Pyx_GIVEREF(__pyx_t_1);
28906   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
28907   __pyx_t_1 = 0;
28908   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2276, __pyx_L1_error)
28909   __Pyx_GOTREF(__pyx_t_1);
28910   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2276, __pyx_L1_error)
28911   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2276, __pyx_L1_error)
28912   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2276, __pyx_L1_error)
28913   __Pyx_GOTREF(__pyx_t_5);
28914   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28915   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28916   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28917 
28918   /* "statsmodels/tsa/statespace/_representation.pyx":2277
28919  *     def __reduce__(self):
28920  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
28921  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
28922  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
28923  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
28924  */
28925   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L1_error)
28926   __Pyx_GOTREF(__pyx_t_1);
28927   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2277, __pyx_L1_error)
28928   __Pyx_GOTREF(__pyx_t_2);
28929   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28930   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2277, __pyx_L1_error)}
28931   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L1_error)
28932   __Pyx_GOTREF(__pyx_t_1);
28933   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __pyx_L1_error)
28934   __Pyx_GOTREF(__pyx_t_3);
28935   __Pyx_GIVEREF(__pyx_t_1);
28936   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
28937   __pyx_t_1 = 0;
28938   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L1_error)
28939   __Pyx_GOTREF(__pyx_t_1);
28940   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
28941   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
28942   __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2277, __pyx_L1_error)
28943   __Pyx_GOTREF(__pyx_t_6);
28944   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28945   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28946   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28947   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L1_error)
28948   __Pyx_GOTREF(__pyx_t_1);
28949   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __pyx_L1_error)
28950   __Pyx_GOTREF(__pyx_t_3);
28951   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28952   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2277, __pyx_L1_error)}
28953   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L1_error)
28954   __Pyx_GOTREF(__pyx_t_1);
28955   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2277, __pyx_L1_error)
28956   __Pyx_GOTREF(__pyx_t_2);
28957   __Pyx_GIVEREF(__pyx_t_1);
28958   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
28959   __pyx_t_1 = 0;
28960   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L1_error)
28961   __Pyx_GOTREF(__pyx_t_1);
28962   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
28963   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
28964   __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2277, __pyx_L1_error)
28965   __Pyx_GOTREF(__pyx_t_7);
28966   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28967   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28968   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28969 
28970   /* "statsmodels/tsa/statespace/_representation.pyx":2278
28971  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
28972  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
28973  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),             # <<<<<<<<<<<<<<
28974  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
28975  *                 self.diagonal_obs_cov)
28976  */
28977   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error)
28978   __Pyx_GOTREF(__pyx_t_1);
28979   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2278, __pyx_L1_error)
28980   __Pyx_GOTREF(__pyx_t_2);
28981   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28982   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2278, __pyx_L1_error)}
28983   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transition, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error)
28984   __Pyx_GOTREF(__pyx_t_1);
28985   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2278, __pyx_L1_error)
28986   __Pyx_GOTREF(__pyx_t_3);
28987   __Pyx_GIVEREF(__pyx_t_1);
28988   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
28989   __pyx_t_1 = 0;
28990   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error)
28991   __Pyx_GOTREF(__pyx_t_1);
28992   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2278, __pyx_L1_error)
28993   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2278, __pyx_L1_error)
28994   __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2278, __pyx_L1_error)
28995   __Pyx_GOTREF(__pyx_t_8);
28996   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28997   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28998   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28999   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error)
29000   __Pyx_GOTREF(__pyx_t_1);
29001   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2278, __pyx_L1_error)
29002   __Pyx_GOTREF(__pyx_t_3);
29003   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29004   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2278, __pyx_L1_error)}
29005   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error)
29006   __Pyx_GOTREF(__pyx_t_1);
29007   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2278, __pyx_L1_error)
29008   __Pyx_GOTREF(__pyx_t_2);
29009   __Pyx_GIVEREF(__pyx_t_1);
29010   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
29011   __pyx_t_1 = 0;
29012   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error)
29013   __Pyx_GOTREF(__pyx_t_1);
29014   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2278, __pyx_L1_error)
29015   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2278, __pyx_L1_error)
29016   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2278, __pyx_L1_error)
29017   __Pyx_GOTREF(__pyx_t_9);
29018   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29019   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29020   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29021 
29022   /* "statsmodels/tsa/statespace/_representation.pyx":2279
29023  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
29024  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
29025  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
29026  *                 self.diagonal_obs_cov)
29027  *         state = {'initialized': self.initialized,
29028  */
29029   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __pyx_L1_error)
29030   __Pyx_GOTREF(__pyx_t_1);
29031   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2279, __pyx_L1_error)
29032   __Pyx_GOTREF(__pyx_t_2);
29033   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29034   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2279, __pyx_L1_error)}
29035   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selection, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __pyx_L1_error)
29036   __Pyx_GOTREF(__pyx_t_1);
29037   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2279, __pyx_L1_error)
29038   __Pyx_GOTREF(__pyx_t_3);
29039   __Pyx_GIVEREF(__pyx_t_1);
29040   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
29041   __pyx_t_1 = 0;
29042   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __pyx_L1_error)
29043   __Pyx_GOTREF(__pyx_t_1);
29044   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2279, __pyx_L1_error)
29045   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2279, __pyx_L1_error)
29046   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2279, __pyx_L1_error)
29047   __Pyx_GOTREF(__pyx_t_10);
29048   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29049   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29050   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29051   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __pyx_L1_error)
29052   __Pyx_GOTREF(__pyx_t_1);
29053   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2279, __pyx_L1_error)
29054   __Pyx_GOTREF(__pyx_t_3);
29055   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29056   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2279, __pyx_L1_error)}
29057   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __pyx_L1_error)
29058   __Pyx_GOTREF(__pyx_t_1);
29059   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2279, __pyx_L1_error)
29060   __Pyx_GOTREF(__pyx_t_2);
29061   __Pyx_GIVEREF(__pyx_t_1);
29062   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
29063   __pyx_t_1 = 0;
29064   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __pyx_L1_error)
29065   __Pyx_GOTREF(__pyx_t_1);
29066   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2279, __pyx_L1_error)
29067   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2279, __pyx_L1_error)
29068   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2279, __pyx_L1_error)
29069   __Pyx_GOTREF(__pyx_t_11);
29070   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29071   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29072   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29073 
29074   /* "statsmodels/tsa/statespace/_representation.pyx":2280
29075  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
29076  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
29077  *                 self.diagonal_obs_cov)             # <<<<<<<<<<<<<<
29078  *         state = {'initialized': self.initialized,
29079  *                  'initialized_diffuse': self.initialized_diffuse,
29080  */
29081   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2280, __pyx_L1_error)
29082   __Pyx_GOTREF(__pyx_t_1);
29083 
29084   /* "statsmodels/tsa/statespace/_representation.pyx":2276
29085  *
29086  *     def __reduce__(self):
29087  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),             # <<<<<<<<<<<<<<
29088  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
29089  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
29090  */
29091   __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2276, __pyx_L1_error)
29092   __Pyx_GOTREF(__pyx_t_2);
29093   __Pyx_GIVEREF(__pyx_t_4);
29094   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
29095   __Pyx_GIVEREF(__pyx_t_5);
29096   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
29097   __Pyx_GIVEREF(__pyx_t_6);
29098   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
29099   __Pyx_GIVEREF(__pyx_t_7);
29100   PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
29101   __Pyx_GIVEREF(__pyx_t_8);
29102   PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_8);
29103   __Pyx_GIVEREF(__pyx_t_9);
29104   PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_9);
29105   __Pyx_GIVEREF(__pyx_t_10);
29106   PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_10);
29107   __Pyx_GIVEREF(__pyx_t_11);
29108   PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_11);
29109   __Pyx_GIVEREF(__pyx_t_1);
29110   PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_t_1);
29111   __pyx_t_4 = 0;
29112   __pyx_t_5 = 0;
29113   __pyx_t_6 = 0;
29114   __pyx_t_7 = 0;
29115   __pyx_t_8 = 0;
29116   __pyx_t_9 = 0;
29117   __pyx_t_10 = 0;
29118   __pyx_t_11 = 0;
29119   __pyx_t_1 = 0;
29120   __pyx_v_init = ((PyObject*)__pyx_t_2);
29121   __pyx_t_2 = 0;
29122 
29123   /* "statsmodels/tsa/statespace/_representation.pyx":2281
29124  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
29125  *                 self.diagonal_obs_cov)
29126  *         state = {'initialized': self.initialized,             # <<<<<<<<<<<<<<
29127  *                  'initialized_diffuse': self.initialized_diffuse,
29128  *                  'initialized_stationary': self.initialized_stationary,
29129  */
29130   __pyx_t_2 = __Pyx_PyDict_NewPresized(27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2281, __pyx_L1_error)
29131   __Pyx_GOTREF(__pyx_t_2);
29132   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2281, __pyx_L1_error)
29133   __Pyx_GOTREF(__pyx_t_1);
29134   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized, __pyx_t_1) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29135   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29136 
29137   /* "statsmodels/tsa/statespace/_representation.pyx":2282
29138  *                 self.diagonal_obs_cov)
29139  *         state = {'initialized': self.initialized,
29140  *                  'initialized_diffuse': self.initialized_diffuse,             # <<<<<<<<<<<<<<
29141  *                  'initialized_stationary': self.initialized_stationary,
29142  *                  'initial_state': None,
29143  */
29144   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2282, __pyx_L1_error)
29145   __Pyx_GOTREF(__pyx_t_1);
29146   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized_diffuse, __pyx_t_1) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29147   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29148 
29149   /* "statsmodels/tsa/statespace/_representation.pyx":2283
29150  *         state = {'initialized': self.initialized,
29151  *                  'initialized_diffuse': self.initialized_diffuse,
29152  *                  'initialized_stationary': self.initialized_stationary,             # <<<<<<<<<<<<<<
29153  *                  'initial_state': None,
29154  *                  'initial_state_cov': None,
29155  */
29156   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2283, __pyx_L1_error)
29157   __Pyx_GOTREF(__pyx_t_1);
29158   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized_stationary, __pyx_t_1) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29159   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29160 
29161   /* "statsmodels/tsa/statespace/_representation.pyx":2284
29162  *                  'initialized_diffuse': self.initialized_diffuse,
29163  *                  'initialized_stationary': self.initialized_stationary,
29164  *                  'initial_state': None,             # <<<<<<<<<<<<<<
29165  *                  'initial_state_cov': None,
29166  *                  'initial_diffuse_state_cov': None,
29167  */
29168   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_state, Py_None) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29169 
29170   /* "statsmodels/tsa/statespace/_representation.pyx":2285
29171  *                  'initialized_stationary': self.initialized_stationary,
29172  *                  'initial_state': None,
29173  *                  'initial_state_cov': None,             # <<<<<<<<<<<<<<
29174  *                  'initial_diffuse_state_cov': None,
29175  *                  'missing': np.array(self.missing, copy=True, order='F'),
29176  */
29177   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_state_cov, Py_None) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29178 
29179   /* "statsmodels/tsa/statespace/_representation.pyx":2286
29180  *                  'initial_state': None,
29181  *                  'initial_state_cov': None,
29182  *                  'initial_diffuse_state_cov': None,             # <<<<<<<<<<<<<<
29183  *                  'missing': np.array(self.missing, copy=True, order='F'),
29184  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
29185  */
29186   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_diffuse_state_cov, Py_None) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29187 
29188   /* "statsmodels/tsa/statespace/_representation.pyx":2287
29189  *                  'initial_state_cov': None,
29190  *                  'initial_diffuse_state_cov': None,
29191  *                  'missing': np.array(self.missing, copy=True, order='F'),             # <<<<<<<<<<<<<<
29192  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
29193  *                  'has_missing': self.has_missing,
29194  */
29195   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2287, __pyx_L1_error)
29196   __Pyx_GOTREF(__pyx_t_1);
29197   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2287, __pyx_L1_error)
29198   __Pyx_GOTREF(__pyx_t_11);
29199   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29200   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2287, __pyx_L1_error)}
29201   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2287, __pyx_L1_error)
29202   __Pyx_GOTREF(__pyx_t_1);
29203   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2287, __pyx_L1_error)
29204   __Pyx_GOTREF(__pyx_t_10);
29205   __Pyx_GIVEREF(__pyx_t_1);
29206   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
29207   __pyx_t_1 = 0;
29208   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2287, __pyx_L1_error)
29209   __Pyx_GOTREF(__pyx_t_1);
29210   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2287, __pyx_L1_error)
29211   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2287, __pyx_L1_error)
29212   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2287, __pyx_L1_error)
29213   __Pyx_GOTREF(__pyx_t_9);
29214   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29215   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29216   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29217   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_missing, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29218   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29219 
29220   /* "statsmodels/tsa/statespace/_representation.pyx":2288
29221  *                  'initial_diffuse_state_cov': None,
29222  *                  'missing': np.array(self.missing, copy=True, order='F'),
29223  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),             # <<<<<<<<<<<<<<
29224  *                  'has_missing': self.has_missing,
29225  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
29226  */
29227   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2288, __pyx_L1_error)
29228   __Pyx_GOTREF(__pyx_t_9);
29229   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2288, __pyx_L1_error)
29230   __Pyx_GOTREF(__pyx_t_1);
29231   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29232   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2288, __pyx_L1_error)}
29233   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2288, __pyx_L1_error)
29234   __Pyx_GOTREF(__pyx_t_9);
29235   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2288, __pyx_L1_error)
29236   __Pyx_GOTREF(__pyx_t_10);
29237   __Pyx_GIVEREF(__pyx_t_9);
29238   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
29239   __pyx_t_9 = 0;
29240   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2288, __pyx_L1_error)
29241   __Pyx_GOTREF(__pyx_t_9);
29242   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2288, __pyx_L1_error)
29243   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2288, __pyx_L1_error)
29244   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2288, __pyx_L1_error)
29245   __Pyx_GOTREF(__pyx_t_11);
29246   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29247   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29248   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29249   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nmissing, __pyx_t_11) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29250   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29251 
29252   /* "statsmodels/tsa/statespace/_representation.pyx":2289
29253  *                  'missing': np.array(self.missing, copy=True, order='F'),
29254  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
29255  *                  'has_missing': self.has_missing,             # <<<<<<<<<<<<<<
29256  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
29257  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
29258  */
29259   __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_self->has_missing); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2289, __pyx_L1_error)
29260   __Pyx_GOTREF(__pyx_t_11);
29261   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_has_missing, __pyx_t_11) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29262   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29263 
29264   /* "statsmodels/tsa/statespace/_representation.pyx":2290
29265  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
29266  *                  'has_missing': self.has_missing,
29267  *                  'tmp': np.array(self.tmp, copy=True, order='F'),             # <<<<<<<<<<<<<<
29268  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
29269  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
29270  */
29271   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2290, __pyx_L1_error)
29272   __Pyx_GOTREF(__pyx_t_11);
29273   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2290, __pyx_L1_error)
29274   __Pyx_GOTREF(__pyx_t_9);
29275   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29276   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2290, __pyx_L1_error)}
29277   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->tmp, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2290, __pyx_L1_error)
29278   __Pyx_GOTREF(__pyx_t_11);
29279   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2290, __pyx_L1_error)
29280   __Pyx_GOTREF(__pyx_t_10);
29281   __Pyx_GIVEREF(__pyx_t_11);
29282   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
29283   __pyx_t_11 = 0;
29284   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2290, __pyx_L1_error)
29285   __Pyx_GOTREF(__pyx_t_11);
29286   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2290, __pyx_L1_error)
29287   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2290, __pyx_L1_error)
29288   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2290, __pyx_L1_error)
29289   __Pyx_GOTREF(__pyx_t_1);
29290   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29291   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29292   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29293   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_tmp, __pyx_t_1) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29294   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29295 
29296   /* "statsmodels/tsa/statespace/_representation.pyx":2291
29297  *                  'has_missing': self.has_missing,
29298  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
29299  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
29300  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
29301  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
29302  */
29303   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2291, __pyx_L1_error)
29304   __Pyx_GOTREF(__pyx_t_1);
29305   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2291, __pyx_L1_error)
29306   __Pyx_GOTREF(__pyx_t_11);
29307   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29308   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2291, __pyx_L1_error)}
29309   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2291, __pyx_L1_error)
29310   __Pyx_GOTREF(__pyx_t_1);
29311   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2291, __pyx_L1_error)
29312   __Pyx_GOTREF(__pyx_t_10);
29313   __Pyx_GIVEREF(__pyx_t_1);
29314   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
29315   __pyx_t_1 = 0;
29316   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2291, __pyx_L1_error)
29317   __Pyx_GOTREF(__pyx_t_1);
29318   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2291, __pyx_L1_error)
29319   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2291, __pyx_L1_error)
29320   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2291, __pyx_L1_error)
29321   __Pyx_GOTREF(__pyx_t_9);
29322   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29323   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29324   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29325   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_state_cov, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29326   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29327 
29328   /* "statsmodels/tsa/statespace/_representation.pyx":2292
29329  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
29330  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
29331  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),             # <<<<<<<<<<<<<<
29332  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
29333  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
29334  */
29335   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2292, __pyx_L1_error)
29336   __Pyx_GOTREF(__pyx_t_9);
29337   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2292, __pyx_L1_error)
29338   __Pyx_GOTREF(__pyx_t_1);
29339   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29340   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2292, __pyx_L1_error)}
29341   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2292, __pyx_L1_error)
29342   __Pyx_GOTREF(__pyx_t_9);
29343   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2292, __pyx_L1_error)
29344   __Pyx_GOTREF(__pyx_t_10);
29345   __Pyx_GIVEREF(__pyx_t_9);
29346   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
29347   __pyx_t_9 = 0;
29348   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2292, __pyx_L1_error)
29349   __Pyx_GOTREF(__pyx_t_9);
29350   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2292, __pyx_L1_error)
29351   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2292, __pyx_L1_error)
29352   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2292, __pyx_L1_error)
29353   __Pyx_GOTREF(__pyx_t_11);
29354   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29355   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29356   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29357   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs, __pyx_t_11) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29358   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29359 
29360   /* "statsmodels/tsa/statespace/_representation.pyx":2293
29361  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
29362  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
29363  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),             # <<<<<<<<<<<<<<
29364  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
29365  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
29366  */
29367   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2293, __pyx_L1_error)
29368   __Pyx_GOTREF(__pyx_t_11);
29369   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2293, __pyx_L1_error)
29370   __Pyx_GOTREF(__pyx_t_9);
29371   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29372   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2293, __pyx_L1_error)}
29373   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2293, __pyx_L1_error)
29374   __Pyx_GOTREF(__pyx_t_11);
29375   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2293, __pyx_L1_error)
29376   __Pyx_GOTREF(__pyx_t_10);
29377   __Pyx_GIVEREF(__pyx_t_11);
29378   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
29379   __pyx_t_11 = 0;
29380   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2293, __pyx_L1_error)
29381   __Pyx_GOTREF(__pyx_t_11);
29382   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2293, __pyx_L1_error)
29383   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2293, __pyx_L1_error)
29384   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2293, __pyx_L1_error)
29385   __Pyx_GOTREF(__pyx_t_1);
29386   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29387   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29388   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29389   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs_intercept, __pyx_t_1) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29390   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29391 
29392   /* "statsmodels/tsa/statespace/_representation.pyx":2294
29393  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
29394  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
29395  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
29396  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
29397  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
29398  */
29399   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error)
29400   __Pyx_GOTREF(__pyx_t_1);
29401   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2294, __pyx_L1_error)
29402   __Pyx_GOTREF(__pyx_t_11);
29403   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29404   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2294, __pyx_L1_error)}
29405   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_design, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error)
29406   __Pyx_GOTREF(__pyx_t_1);
29407   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2294, __pyx_L1_error)
29408   __Pyx_GOTREF(__pyx_t_10);
29409   __Pyx_GIVEREF(__pyx_t_1);
29410   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
29411   __pyx_t_1 = 0;
29412   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2294, __pyx_L1_error)
29413   __Pyx_GOTREF(__pyx_t_1);
29414   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
29415   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
29416   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2294, __pyx_L1_error)
29417   __Pyx_GOTREF(__pyx_t_9);
29418   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29419   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29420   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29421   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_design, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29422   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29423 
29424   /* "statsmodels/tsa/statespace/_representation.pyx":2295
29425  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
29426  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
29427  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
29428  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
29429  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
29430  */
29431   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2295, __pyx_L1_error)
29432   __Pyx_GOTREF(__pyx_t_9);
29433   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2295, __pyx_L1_error)
29434   __Pyx_GOTREF(__pyx_t_1);
29435   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29436   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2295, __pyx_L1_error)}
29437   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_cov, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2295, __pyx_L1_error)
29438   __Pyx_GOTREF(__pyx_t_9);
29439   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2295, __pyx_L1_error)
29440   __Pyx_GOTREF(__pyx_t_10);
29441   __Pyx_GIVEREF(__pyx_t_9);
29442   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
29443   __pyx_t_9 = 0;
29444   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2295, __pyx_L1_error)
29445   __Pyx_GOTREF(__pyx_t_9);
29446   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2295, __pyx_L1_error)
29447   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2295, __pyx_L1_error)
29448   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2295, __pyx_L1_error)
29449   __Pyx_GOTREF(__pyx_t_11);
29450   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29451   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29452   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29453   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs_cov, __pyx_t_11) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29454   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29455 
29456   /* "statsmodels/tsa/statespace/_representation.pyx":2296
29457  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
29458  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
29459  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),             # <<<<<<<<<<<<<<
29460  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
29461  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
29462  */
29463   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2296, __pyx_L1_error)
29464   __Pyx_GOTREF(__pyx_t_11);
29465   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2296, __pyx_L1_error)
29466   __Pyx_GOTREF(__pyx_t_9);
29467   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29468   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2296, __pyx_L1_error)}
29469   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->transform_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2296, __pyx_L1_error)
29470   __Pyx_GOTREF(__pyx_t_11);
29471   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2296, __pyx_L1_error)
29472   __Pyx_GOTREF(__pyx_t_10);
29473   __Pyx_GIVEREF(__pyx_t_11);
29474   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
29475   __pyx_t_11 = 0;
29476   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2296, __pyx_L1_error)
29477   __Pyx_GOTREF(__pyx_t_11);
29478   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
29479   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
29480   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
29481   __Pyx_GOTREF(__pyx_t_1);
29482   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29483   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29484   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29485   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_cholesky, __pyx_t_1) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29486   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29487 
29488   /* "statsmodels/tsa/statespace/_representation.pyx":2297
29489  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
29490  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
29491  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
29492  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
29493  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
29494  */
29495   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
29496   __Pyx_GOTREF(__pyx_t_1);
29497   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2297, __pyx_L1_error)
29498   __Pyx_GOTREF(__pyx_t_11);
29499   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29500   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2297, __pyx_L1_error)}
29501   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
29502   __Pyx_GOTREF(__pyx_t_1);
29503   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2297, __pyx_L1_error)
29504   __Pyx_GOTREF(__pyx_t_10);
29505   __Pyx_GIVEREF(__pyx_t_1);
29506   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
29507   __pyx_t_1 = 0;
29508   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
29509   __Pyx_GOTREF(__pyx_t_1);
29510   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2297, __pyx_L1_error)
29511   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2297, __pyx_L1_error)
29512   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2297, __pyx_L1_error)
29513   __Pyx_GOTREF(__pyx_t_9);
29514   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29515   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29516   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29517   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_obs_cov, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29518   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29519 
29520   /* "statsmodels/tsa/statespace/_representation.pyx":2298
29521  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
29522  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
29523  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
29524  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
29525  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
29526  */
29527   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2298, __pyx_L1_error)
29528   __Pyx_GOTREF(__pyx_t_9);
29529   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2298, __pyx_L1_error)
29530   __Pyx_GOTREF(__pyx_t_1);
29531   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29532   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2298, __pyx_L1_error)}
29533   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->transform_design, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2298, __pyx_L1_error)
29534   __Pyx_GOTREF(__pyx_t_9);
29535   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2298, __pyx_L1_error)
29536   __Pyx_GOTREF(__pyx_t_10);
29537   __Pyx_GIVEREF(__pyx_t_9);
29538   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
29539   __pyx_t_9 = 0;
29540   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2298, __pyx_L1_error)
29541   __Pyx_GOTREF(__pyx_t_9);
29542   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2298, __pyx_L1_error)
29543   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2298, __pyx_L1_error)
29544   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2298, __pyx_L1_error)
29545   __Pyx_GOTREF(__pyx_t_11);
29546   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29547   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29548   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29549   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_design, __pyx_t_11) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29550   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29551 
29552   /* "statsmodels/tsa/statespace/_representation.pyx":2299
29553  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
29554  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
29555  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),             # <<<<<<<<<<<<<<
29556  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
29557  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
29558  */
29559   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2299, __pyx_L1_error)
29560   __Pyx_GOTREF(__pyx_t_11);
29561   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2299, __pyx_L1_error)
29562   __Pyx_GOTREF(__pyx_t_9);
29563   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29564   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2299, __pyx_L1_error)}
29565   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2299, __pyx_L1_error)
29566   __Pyx_GOTREF(__pyx_t_11);
29567   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2299, __pyx_L1_error)
29568   __Pyx_GOTREF(__pyx_t_10);
29569   __Pyx_GIVEREF(__pyx_t_11);
29570   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
29571   __pyx_t_11 = 0;
29572   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2299, __pyx_L1_error)
29573   __Pyx_GOTREF(__pyx_t_11);
29574   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2299, __pyx_L1_error)
29575   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2299, __pyx_L1_error)
29576   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2299, __pyx_L1_error)
29577   __Pyx_GOTREF(__pyx_t_1);
29578   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29579   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29580   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29581   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs, __pyx_t_1) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29582   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29583 
29584   /* "statsmodels/tsa/statespace/_representation.pyx":2300
29585  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
29586  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
29587  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),             # <<<<<<<<<<<<<<
29588  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
29589  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
29590  */
29591   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error)
29592   __Pyx_GOTREF(__pyx_t_1);
29593   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2300, __pyx_L1_error)
29594   __Pyx_GOTREF(__pyx_t_11);
29595   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29596   if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2300, __pyx_L1_error)}
29597   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_tmp, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error)
29598   __Pyx_GOTREF(__pyx_t_1);
29599   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2300, __pyx_L1_error)
29600   __Pyx_GOTREF(__pyx_t_10);
29601   __Pyx_GIVEREF(__pyx_t_1);
29602   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
29603   __pyx_t_1 = 0;
29604   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error)
29605   __Pyx_GOTREF(__pyx_t_1);
29606   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2300, __pyx_L1_error)
29607   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2300, __pyx_L1_error)
29608   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2300, __pyx_L1_error)
29609   __Pyx_GOTREF(__pyx_t_9);
29610   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29611   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29612   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29613   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs_tmp, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29614   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29615 
29616   /* "statsmodels/tsa/statespace/_representation.pyx":2301
29617  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
29618  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
29619  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
29620  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
29621  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
29622  */
29623   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2301, __pyx_L1_error)
29624   __Pyx_GOTREF(__pyx_t_9);
29625   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2301, __pyx_L1_error)
29626   __Pyx_GOTREF(__pyx_t_1);
29627   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29628   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2301, __pyx_L1_error)}
29629   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_design, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2301, __pyx_L1_error)
29630   __Pyx_GOTREF(__pyx_t_9);
29631   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2301, __pyx_L1_error)
29632   __Pyx_GOTREF(__pyx_t_10);
29633   __Pyx_GIVEREF(__pyx_t_9);
29634   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
29635   __pyx_t_9 = 0;
29636   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2301, __pyx_L1_error)
29637   __Pyx_GOTREF(__pyx_t_9);
29638   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2301, __pyx_L1_error)
29639   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2301, __pyx_L1_error)
29640   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2301, __pyx_L1_error)
29641   __Pyx_GOTREF(__pyx_t_11);
29642   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29643   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29644   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29645   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_design, __pyx_t_11) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29646   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29647 
29648   /* "statsmodels/tsa/statespace/_representation.pyx":2302
29649  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
29650  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
29651  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
29652  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
29653  *                  't': self.t,
29654  */
29655   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2302, __pyx_L1_error)
29656   __Pyx_GOTREF(__pyx_t_11);
29657   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2302, __pyx_L1_error)
29658   __Pyx_GOTREF(__pyx_t_9);
29659   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29660   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2302, __pyx_L1_error)}
29661   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2302, __pyx_L1_error)
29662   __Pyx_GOTREF(__pyx_t_11);
29663   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2302, __pyx_L1_error)
29664   __Pyx_GOTREF(__pyx_t_10);
29665   __Pyx_GIVEREF(__pyx_t_11);
29666   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
29667   __pyx_t_11 = 0;
29668   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2302, __pyx_L1_error)
29669   __Pyx_GOTREF(__pyx_t_11);
29670   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2302, __pyx_L1_error)
29671   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2302, __pyx_L1_error)
29672   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2302, __pyx_L1_error)
29673   __Pyx_GOTREF(__pyx_t_1);
29674   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29675   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29676   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29677   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs_cov, __pyx_t_1) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29678   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29679 
29680   /* "statsmodels/tsa/statespace/_representation.pyx":2303
29681  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
29682  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
29683  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),             # <<<<<<<<<<<<<<
29684  *                  't': self.t,
29685  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
29686  */
29687   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
29688   __Pyx_GOTREF(__pyx_t_1);
29689   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2303, __pyx_L1_error)
29690   __Pyx_GOTREF(__pyx_t_11);
29691   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29692   if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2303, __pyx_L1_error)}
29693   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
29694   __Pyx_GOTREF(__pyx_t_1);
29695   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2303, __pyx_L1_error)
29696   __Pyx_GOTREF(__pyx_t_10);
29697   __Pyx_GIVEREF(__pyx_t_1);
29698   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
29699   __pyx_t_1 = 0;
29700   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
29701   __Pyx_GOTREF(__pyx_t_1);
29702   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2303, __pyx_L1_error)
29703   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2303, __pyx_L1_error)
29704   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2303, __pyx_L1_error)
29705   __Pyx_GOTREF(__pyx_t_9);
29706   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
29707   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29708   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29709   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_cholesky, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29710   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29711 
29712   /* "statsmodels/tsa/statespace/_representation.pyx":2304
29713  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
29714  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
29715  *                  't': self.t,             # <<<<<<<<<<<<<<
29716  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
29717  *                  'companion_transition': self.companion_transition,
29718  */
29719   __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->t); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2304, __pyx_L1_error)
29720   __Pyx_GOTREF(__pyx_t_9);
29721   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_t, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29722   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29723 
29724   /* "statsmodels/tsa/statespace/_representation.pyx":2305
29725  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
29726  *                  't': self.t,
29727  *                  'collapse_loglikelihood': self.collapse_loglikelihood,             # <<<<<<<<<<<<<<
29728  *                  'companion_transition': self.companion_transition,
29729  *                  'transform_determinant': self.transform_determinant,
29730  */
29731   __pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_self->collapse_loglikelihood); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2305, __pyx_L1_error)
29732   __Pyx_GOTREF(__pyx_t_9);
29733   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_loglikelihood, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29734   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29735 
29736   /* "statsmodels/tsa/statespace/_representation.pyx":2306
29737  *                  't': self.t,
29738  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
29739  *                  'companion_transition': self.companion_transition,             # <<<<<<<<<<<<<<
29740  *                  'transform_determinant': self.transform_determinant,
29741  *                  }
29742  */
29743   __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->companion_transition); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2306, __pyx_L1_error)
29744   __Pyx_GOTREF(__pyx_t_9);
29745   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_companion_transition, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29746   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29747 
29748   /* "statsmodels/tsa/statespace/_representation.pyx":2307
29749  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
29750  *                  'companion_transition': self.companion_transition,
29751  *                  'transform_determinant': self.transform_determinant,             # <<<<<<<<<<<<<<
29752  *                  }
29753  *         if self.initialized:
29754  */
29755   __pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_self->transform_determinant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2307, __pyx_L1_error)
29756   __Pyx_GOTREF(__pyx_t_9);
29757   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_determinant, __pyx_t_9) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
29758   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29759   __pyx_v_state = ((PyObject*)__pyx_t_2);
29760   __pyx_t_2 = 0;
29761 
29762   /* "statsmodels/tsa/statespace/_representation.pyx":2309
29763  *                  'transform_determinant': self.transform_determinant,
29764  *                  }
29765  *         if self.initialized:             # <<<<<<<<<<<<<<
29766  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
29767  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
29768  */
29769   __pyx_t_12 = (__pyx_v_self->initialized != 0);
29770   if (__pyx_t_12) {
29771 
29772     /* "statsmodels/tsa/statespace/_representation.pyx":2310
29773  *                  }
29774  *         if self.initialized:
29775  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')             # <<<<<<<<<<<<<<
29776  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
29777  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
29778  */
29779     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2310, __pyx_L1_error)
29780     __Pyx_GOTREF(__pyx_t_2);
29781     __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2310, __pyx_L1_error)
29782     __Pyx_GOTREF(__pyx_t_9);
29783     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29784     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2310, __pyx_L1_error)}
29785     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2310, __pyx_L1_error)
29786     __Pyx_GOTREF(__pyx_t_2);
29787     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2310, __pyx_L1_error)
29788     __Pyx_GOTREF(__pyx_t_1);
29789     __Pyx_GIVEREF(__pyx_t_2);
29790     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
29791     __pyx_t_2 = 0;
29792     __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2310, __pyx_L1_error)
29793     __Pyx_GOTREF(__pyx_t_2);
29794     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2310, __pyx_L1_error)
29795     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2310, __pyx_L1_error)
29796     __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2310, __pyx_L1_error)
29797     __Pyx_GOTREF(__pyx_t_10);
29798     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29799     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29800     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29801     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_state, __pyx_t_10) < 0)) __PYX_ERR(0, 2310, __pyx_L1_error)
29802     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29803 
29804     /* "statsmodels/tsa/statespace/_representation.pyx":2311
29805  *         if self.initialized:
29806  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
29807  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')             # <<<<<<<<<<<<<<
29808  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
29809  *         return (self.__class__, init, state)
29810  */
29811     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2311, __pyx_L1_error)
29812     __Pyx_GOTREF(__pyx_t_10);
29813     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2311, __pyx_L1_error)
29814     __Pyx_GOTREF(__pyx_t_2);
29815     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29816     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2311, __pyx_L1_error)}
29817     __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2311, __pyx_L1_error)
29818     __Pyx_GOTREF(__pyx_t_10);
29819     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2311, __pyx_L1_error)
29820     __Pyx_GOTREF(__pyx_t_1);
29821     __Pyx_GIVEREF(__pyx_t_10);
29822     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
29823     __pyx_t_10 = 0;
29824     __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2311, __pyx_L1_error)
29825     __Pyx_GOTREF(__pyx_t_10);
29826     if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2311, __pyx_L1_error)
29827     if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2311, __pyx_L1_error)
29828     __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2311, __pyx_L1_error)
29829     __Pyx_GOTREF(__pyx_t_9);
29830     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29831     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29832     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29833     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_state_cov, __pyx_t_9) < 0)) __PYX_ERR(0, 2311, __pyx_L1_error)
29834     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29835 
29836     /* "statsmodels/tsa/statespace/_representation.pyx":2312
29837  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
29838  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
29839  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')             # <<<<<<<<<<<<<<
29840  *         return (self.__class__, init, state)
29841  *
29842  */
29843     __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2312, __pyx_L1_error)
29844     __Pyx_GOTREF(__pyx_t_9);
29845     __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2312, __pyx_L1_error)
29846     __Pyx_GOTREF(__pyx_t_10);
29847     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29848     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2312, __pyx_L1_error)}
29849     __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->initial_diffuse_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2312, __pyx_L1_error)
29850     __Pyx_GOTREF(__pyx_t_9);
29851     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
29852     __Pyx_GOTREF(__pyx_t_1);
29853     __Pyx_GIVEREF(__pyx_t_9);
29854     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
29855     __pyx_t_9 = 0;
29856     __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2312, __pyx_L1_error)
29857     __Pyx_GOTREF(__pyx_t_9);
29858     if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 2312, __pyx_L1_error)
29859     if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 2312, __pyx_L1_error)
29860     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2312, __pyx_L1_error)
29861     __Pyx_GOTREF(__pyx_t_2);
29862     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29863     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29864     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29865     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_diffuse_state_cov, __pyx_t_2) < 0)) __PYX_ERR(0, 2312, __pyx_L1_error)
29866     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29867 
29868     /* "statsmodels/tsa/statespace/_representation.pyx":2309
29869  *                  'transform_determinant': self.transform_determinant,
29870  *                  }
29871  *         if self.initialized:             # <<<<<<<<<<<<<<
29872  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
29873  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
29874  */
29875   }
29876 
29877   /* "statsmodels/tsa/statespace/_representation.pyx":2313
29878  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
29879  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
29880  *         return (self.__class__, init, state)             # <<<<<<<<<<<<<<
29881  *
29882  *     def __setstate__(self, state):
29883  */
29884   __Pyx_XDECREF(__pyx_r);
29885   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
29886   __Pyx_GOTREF(__pyx_t_2);
29887   __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2313, __pyx_L1_error)
29888   __Pyx_GOTREF(__pyx_t_9);
29889   __Pyx_GIVEREF(__pyx_t_2);
29890   PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
29891   __Pyx_INCREF(__pyx_v_init);
29892   __Pyx_GIVEREF(__pyx_v_init);
29893   PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_init);
29894   __Pyx_INCREF(__pyx_v_state);
29895   __Pyx_GIVEREF(__pyx_v_state);
29896   PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_state);
29897   __pyx_t_2 = 0;
29898   __pyx_r = __pyx_t_9;
29899   __pyx_t_9 = 0;
29900   goto __pyx_L0;
29901 
29902   /* "statsmodels/tsa/statespace/_representation.pyx":2275
29903  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)
29904  *
29905  *     def __reduce__(self):             # <<<<<<<<<<<<<<
29906  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
29907  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
29908  */
29909 
29910   /* function exit code */
29911   __pyx_L1_error:;
29912   __Pyx_XDECREF(__pyx_t_1);
29913   __Pyx_XDECREF(__pyx_t_2);
29914   __Pyx_XDECREF(__pyx_t_3);
29915   __Pyx_XDECREF(__pyx_t_4);
29916   __Pyx_XDECREF(__pyx_t_5);
29917   __Pyx_XDECREF(__pyx_t_6);
29918   __Pyx_XDECREF(__pyx_t_7);
29919   __Pyx_XDECREF(__pyx_t_8);
29920   __Pyx_XDECREF(__pyx_t_9);
29921   __Pyx_XDECREF(__pyx_t_10);
29922   __Pyx_XDECREF(__pyx_t_11);
29923   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29924   __pyx_r = NULL;
29925   __pyx_L0:;
29926   __Pyx_XDECREF(__pyx_v_init);
29927   __Pyx_XDECREF(__pyx_v_state);
29928   __Pyx_XGIVEREF(__pyx_r);
29929   __Pyx_RefNannyFinishContext();
29930   return __pyx_r;
29931 }
29932 
29933 /* "statsmodels/tsa/statespace/_representation.pyx":2315
29934  *         return (self.__class__, init, state)
29935  *
29936  *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
29937  *         self.initial_state = state['initial_state']
29938  *         self.initial_state_cov = state['initial_state_cov']
29939  */
29940 
29941 /* Python wrapper */
29942 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_5__setstate__(PyObject * __pyx_v_self,PyObject * __pyx_v_state)29943 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
29944   PyObject *__pyx_r = 0;
29945   __Pyx_RefNannyDeclarations
29946   __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
29947   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4__setstate__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_state));
29948 
29949   /* function exit code */
29950   __Pyx_RefNannyFinishContext();
29951   return __pyx_r;
29952 }
29953 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,PyObject * __pyx_v_state)29954 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_state) {
29955   PyObject *__pyx_r = NULL;
29956   __Pyx_RefNannyDeclarations
29957   PyObject *__pyx_t_1 = NULL;
29958   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
29959   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
29960   int __pyx_t_4;
29961   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
29962   __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
29963   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
29964   __pyx_t_float_complex __pyx_t_8;
29965   int __pyx_lineno = 0;
29966   const char *__pyx_filename = NULL;
29967   int __pyx_clineno = 0;
29968   __Pyx_RefNannySetupContext("__setstate__", 0);
29969 
29970   /* "statsmodels/tsa/statespace/_representation.pyx":2316
29971  *
29972  *     def __setstate__(self, state):
29973  *         self.initial_state = state['initial_state']             # <<<<<<<<<<<<<<
29974  *         self.initial_state_cov = state['initial_state_cov']
29975  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
29976  */
29977   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2316, __pyx_L1_error)
29978   __Pyx_GOTREF(__pyx_t_1);
29979   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2316, __pyx_L1_error)
29980   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29981   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
29982   __pyx_v_self->initial_state = __pyx_t_2;
29983   __pyx_t_2.memview = NULL;
29984   __pyx_t_2.data = NULL;
29985 
29986   /* "statsmodels/tsa/statespace/_representation.pyx":2317
29987  *     def __setstate__(self, state):
29988  *         self.initial_state = state['initial_state']
29989  *         self.initial_state_cov = state['initial_state_cov']             # <<<<<<<<<<<<<<
29990  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
29991  *         self.initialized = state['initialized']
29992  */
29993   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2317, __pyx_L1_error)
29994   __Pyx_GOTREF(__pyx_t_1);
29995   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2317, __pyx_L1_error)
29996   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29997   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
29998   __pyx_v_self->initial_state_cov = __pyx_t_3;
29999   __pyx_t_3.memview = NULL;
30000   __pyx_t_3.data = NULL;
30001 
30002   /* "statsmodels/tsa/statespace/_representation.pyx":2318
30003  *         self.initial_state = state['initial_state']
30004  *         self.initial_state_cov = state['initial_state_cov']
30005  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']             # <<<<<<<<<<<<<<
30006  *         self.initialized = state['initialized']
30007  *         self.initialized_diffuse = state['initialized_diffuse']
30008  */
30009   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_diffuse_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2318, __pyx_L1_error)
30010   __Pyx_GOTREF(__pyx_t_1);
30011   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2318, __pyx_L1_error)
30012   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30013   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_diffuse_state_cov, 0);
30014   __pyx_v_self->initial_diffuse_state_cov = __pyx_t_3;
30015   __pyx_t_3.memview = NULL;
30016   __pyx_t_3.data = NULL;
30017 
30018   /* "statsmodels/tsa/statespace/_representation.pyx":2319
30019  *         self.initial_state_cov = state['initial_state_cov']
30020  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
30021  *         self.initialized = state['initialized']             # <<<<<<<<<<<<<<
30022  *         self.initialized_diffuse = state['initialized_diffuse']
30023  *         self.initialized_stationary = state['initialized_stationary']
30024  */
30025   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2319, __pyx_L1_error)
30026   __Pyx_GOTREF(__pyx_t_1);
30027   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2319, __pyx_L1_error)
30028   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30029   __pyx_v_self->initialized = __pyx_t_4;
30030 
30031   /* "statsmodels/tsa/statespace/_representation.pyx":2320
30032  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
30033  *         self.initialized = state['initialized']
30034  *         self.initialized_diffuse = state['initialized_diffuse']             # <<<<<<<<<<<<<<
30035  *         self.initialized_stationary = state['initialized_stationary']
30036  *         self.selected_state_cov = state['selected_state_cov']
30037  */
30038   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2320, __pyx_L1_error)
30039   __Pyx_GOTREF(__pyx_t_1);
30040   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2320, __pyx_L1_error)
30041   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30042   __pyx_v_self->initialized_diffuse = __pyx_t_4;
30043 
30044   /* "statsmodels/tsa/statespace/_representation.pyx":2321
30045  *         self.initialized = state['initialized']
30046  *         self.initialized_diffuse = state['initialized_diffuse']
30047  *         self.initialized_stationary = state['initialized_stationary']             # <<<<<<<<<<<<<<
30048  *         self.selected_state_cov = state['selected_state_cov']
30049  *         self.missing = state['missing']
30050  */
30051   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2321, __pyx_L1_error)
30052   __Pyx_GOTREF(__pyx_t_1);
30053   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2321, __pyx_L1_error)
30054   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30055   __pyx_v_self->initialized_stationary = __pyx_t_4;
30056 
30057   /* "statsmodels/tsa/statespace/_representation.pyx":2322
30058  *         self.initialized_diffuse = state['initialized_diffuse']
30059  *         self.initialized_stationary = state['initialized_stationary']
30060  *         self.selected_state_cov = state['selected_state_cov']             # <<<<<<<<<<<<<<
30061  *         self.missing = state['missing']
30062  *         self.nmissing =state['nmissing']
30063  */
30064   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error)
30065   __Pyx_GOTREF(__pyx_t_1);
30066   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 2322, __pyx_L1_error)
30067   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30068   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_state_cov, 0);
30069   __pyx_v_self->selected_state_cov = __pyx_t_5;
30070   __pyx_t_5.memview = NULL;
30071   __pyx_t_5.data = NULL;
30072 
30073   /* "statsmodels/tsa/statespace/_representation.pyx":2323
30074  *         self.initialized_stationary = state['initialized_stationary']
30075  *         self.selected_state_cov = state['selected_state_cov']
30076  *         self.missing = state['missing']             # <<<<<<<<<<<<<<
30077  *         self.nmissing =state['nmissing']
30078  *         self.has_missing = state['has_missing']
30079  */
30080   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2323, __pyx_L1_error)
30081   __Pyx_GOTREF(__pyx_t_1);
30082   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 2323, __pyx_L1_error)
30083   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30084   __PYX_XDEC_MEMVIEW(&__pyx_v_self->missing, 0);
30085   __pyx_v_self->missing = __pyx_t_6;
30086   __pyx_t_6.memview = NULL;
30087   __pyx_t_6.data = NULL;
30088 
30089   /* "statsmodels/tsa/statespace/_representation.pyx":2324
30090  *         self.selected_state_cov = state['selected_state_cov']
30091  *         self.missing = state['missing']
30092  *         self.nmissing =state['nmissing']             # <<<<<<<<<<<<<<
30093  *         self.has_missing = state['has_missing']
30094  *         self.tmp = state['tmp']
30095  */
30096   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_nmissing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2324, __pyx_L1_error)
30097   __Pyx_GOTREF(__pyx_t_1);
30098   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 2324, __pyx_L1_error)
30099   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30100   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nmissing, 0);
30101   __pyx_v_self->nmissing = __pyx_t_7;
30102   __pyx_t_7.memview = NULL;
30103   __pyx_t_7.data = NULL;
30104 
30105   /* "statsmodels/tsa/statespace/_representation.pyx":2325
30106  *         self.missing = state['missing']
30107  *         self.nmissing =state['nmissing']
30108  *         self.has_missing = state['has_missing']             # <<<<<<<<<<<<<<
30109  *         self.tmp = state['tmp']
30110  *         self.selected_obs  = state['selected_obs']
30111  */
30112   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_has_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2325, __pyx_L1_error)
30113   __Pyx_GOTREF(__pyx_t_1);
30114   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2325, __pyx_L1_error)
30115   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30116   __pyx_v_self->has_missing = __pyx_t_4;
30117 
30118   /* "statsmodels/tsa/statespace/_representation.pyx":2326
30119  *         self.nmissing =state['nmissing']
30120  *         self.has_missing = state['has_missing']
30121  *         self.tmp = state['tmp']             # <<<<<<<<<<<<<<
30122  *         self.selected_obs  = state['selected_obs']
30123  *         self.selected_obs_intercept  = state['selected_obs_intercept']
30124  */
30125   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
30126   __Pyx_GOTREF(__pyx_t_1);
30127   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2326, __pyx_L1_error)
30128   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30129   __PYX_XDEC_MEMVIEW(&__pyx_v_self->tmp, 0);
30130   __pyx_v_self->tmp = __pyx_t_3;
30131   __pyx_t_3.memview = NULL;
30132   __pyx_t_3.data = NULL;
30133 
30134   /* "statsmodels/tsa/statespace/_representation.pyx":2327
30135  *         self.has_missing = state['has_missing']
30136  *         self.tmp = state['tmp']
30137  *         self.selected_obs  = state['selected_obs']             # <<<<<<<<<<<<<<
30138  *         self.selected_obs_intercept  = state['selected_obs_intercept']
30139  *         self.selected_design  = state['selected_design']
30140  */
30141   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2327, __pyx_L1_error)
30142   __Pyx_GOTREF(__pyx_t_1);
30143   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2327, __pyx_L1_error)
30144   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30145   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs, 0);
30146   __pyx_v_self->selected_obs = __pyx_t_2;
30147   __pyx_t_2.memview = NULL;
30148   __pyx_t_2.data = NULL;
30149 
30150   /* "statsmodels/tsa/statespace/_representation.pyx":2328
30151  *         self.tmp = state['tmp']
30152  *         self.selected_obs  = state['selected_obs']
30153  *         self.selected_obs_intercept  = state['selected_obs_intercept']             # <<<<<<<<<<<<<<
30154  *         self.selected_design  = state['selected_design']
30155  *         self.selected_obs_cov  =state['selected_obs_cov']
30156  */
30157   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs_intercept); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2328, __pyx_L1_error)
30158   __Pyx_GOTREF(__pyx_t_1);
30159   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2328, __pyx_L1_error)
30160   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30161   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_intercept, 0);
30162   __pyx_v_self->selected_obs_intercept = __pyx_t_2;
30163   __pyx_t_2.memview = NULL;
30164   __pyx_t_2.data = NULL;
30165 
30166   /* "statsmodels/tsa/statespace/_representation.pyx":2329
30167  *         self.selected_obs  = state['selected_obs']
30168  *         self.selected_obs_intercept  = state['selected_obs_intercept']
30169  *         self.selected_design  = state['selected_design']             # <<<<<<<<<<<<<<
30170  *         self.selected_obs_cov  =state['selected_obs_cov']
30171  *         self.transform_cholesky  = state['transform_cholesky']
30172  */
30173   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
30174   __Pyx_GOTREF(__pyx_t_1);
30175   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2329, __pyx_L1_error)
30176   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30177   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_design, 0);
30178   __pyx_v_self->selected_design = __pyx_t_2;
30179   __pyx_t_2.memview = NULL;
30180   __pyx_t_2.data = NULL;
30181 
30182   /* "statsmodels/tsa/statespace/_representation.pyx":2330
30183  *         self.selected_obs_intercept  = state['selected_obs_intercept']
30184  *         self.selected_design  = state['selected_design']
30185  *         self.selected_obs_cov  =state['selected_obs_cov']             # <<<<<<<<<<<<<<
30186  *         self.transform_cholesky  = state['transform_cholesky']
30187  *         self.transform_obs_cov  = state['transform_obs_cov']
30188  */
30189   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L1_error)
30190   __Pyx_GOTREF(__pyx_t_1);
30191   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2330, __pyx_L1_error)
30192   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30193   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_cov, 0);
30194   __pyx_v_self->selected_obs_cov = __pyx_t_2;
30195   __pyx_t_2.memview = NULL;
30196   __pyx_t_2.data = NULL;
30197 
30198   /* "statsmodels/tsa/statespace/_representation.pyx":2331
30199  *         self.selected_design  = state['selected_design']
30200  *         self.selected_obs_cov  =state['selected_obs_cov']
30201  *         self.transform_cholesky  = state['transform_cholesky']             # <<<<<<<<<<<<<<
30202  *         self.transform_obs_cov  = state['transform_obs_cov']
30203  *         self.transform_design = state['transform_design']
30204  */
30205   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_cholesky); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2331, __pyx_L1_error)
30206   __Pyx_GOTREF(__pyx_t_1);
30207   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2331, __pyx_L1_error)
30208   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30209   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_cholesky, 0);
30210   __pyx_v_self->transform_cholesky = __pyx_t_3;
30211   __pyx_t_3.memview = NULL;
30212   __pyx_t_3.data = NULL;
30213 
30214   /* "statsmodels/tsa/statespace/_representation.pyx":2332
30215  *         self.selected_obs_cov  =state['selected_obs_cov']
30216  *         self.transform_cholesky  = state['transform_cholesky']
30217  *         self.transform_obs_cov  = state['transform_obs_cov']             # <<<<<<<<<<<<<<
30218  *         self.transform_design = state['transform_design']
30219  *         self.collapse_obs = state['collapse_obs']
30220  */
30221   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2332, __pyx_L1_error)
30222   __Pyx_GOTREF(__pyx_t_1);
30223   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2332, __pyx_L1_error)
30224   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30225   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_cov, 0);
30226   __pyx_v_self->transform_obs_cov = __pyx_t_3;
30227   __pyx_t_3.memview = NULL;
30228   __pyx_t_3.data = NULL;
30229 
30230   /* "statsmodels/tsa/statespace/_representation.pyx":2333
30231  *         self.transform_cholesky  = state['transform_cholesky']
30232  *         self.transform_obs_cov  = state['transform_obs_cov']
30233  *         self.transform_design = state['transform_design']             # <<<<<<<<<<<<<<
30234  *         self.collapse_obs = state['collapse_obs']
30235  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
30236  */
30237   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2333, __pyx_L1_error)
30238   __Pyx_GOTREF(__pyx_t_1);
30239   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2333, __pyx_L1_error)
30240   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30241   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_design, 0);
30242   __pyx_v_self->transform_design = __pyx_t_3;
30243   __pyx_t_3.memview = NULL;
30244   __pyx_t_3.data = NULL;
30245 
30246   /* "statsmodels/tsa/statespace/_representation.pyx":2334
30247  *         self.transform_obs_cov  = state['transform_obs_cov']
30248  *         self.transform_design = state['transform_design']
30249  *         self.collapse_obs = state['collapse_obs']             # <<<<<<<<<<<<<<
30250  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
30251  *         self.collapse_design = state['collapse_design']
30252  */
30253   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error)
30254   __Pyx_GOTREF(__pyx_t_1);
30255   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2334, __pyx_L1_error)
30256   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30257   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs, 0);
30258   __pyx_v_self->collapse_obs = __pyx_t_2;
30259   __pyx_t_2.memview = NULL;
30260   __pyx_t_2.data = NULL;
30261 
30262   /* "statsmodels/tsa/statespace/_representation.pyx":2335
30263  *         self.transform_design = state['transform_design']
30264  *         self.collapse_obs = state['collapse_obs']
30265  *         self.collapse_obs_tmp = state['collapse_obs_tmp']             # <<<<<<<<<<<<<<
30266  *         self.collapse_design = state['collapse_design']
30267  *         self.collapse_obs_cov = state['collapse_obs_cov']
30268  */
30269   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2335, __pyx_L1_error)
30270   __Pyx_GOTREF(__pyx_t_1);
30271   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2335, __pyx_L1_error)
30272   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30273   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_tmp, 0);
30274   __pyx_v_self->collapse_obs_tmp = __pyx_t_2;
30275   __pyx_t_2.memview = NULL;
30276   __pyx_t_2.data = NULL;
30277 
30278   /* "statsmodels/tsa/statespace/_representation.pyx":2336
30279  *         self.collapse_obs = state['collapse_obs']
30280  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
30281  *         self.collapse_design = state['collapse_design']             # <<<<<<<<<<<<<<
30282  *         self.collapse_obs_cov = state['collapse_obs_cov']
30283  *         self.collapse_cholesky = state['collapse_cholesky']
30284  */
30285   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2336, __pyx_L1_error)
30286   __Pyx_GOTREF(__pyx_t_1);
30287   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2336, __pyx_L1_error)
30288   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30289   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_design, 0);
30290   __pyx_v_self->collapse_design = __pyx_t_3;
30291   __pyx_t_3.memview = NULL;
30292   __pyx_t_3.data = NULL;
30293 
30294   /* "statsmodels/tsa/statespace/_representation.pyx":2337
30295  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
30296  *         self.collapse_design = state['collapse_design']
30297  *         self.collapse_obs_cov = state['collapse_obs_cov']             # <<<<<<<<<<<<<<
30298  *         self.collapse_cholesky = state['collapse_cholesky']
30299  *         self.t = state['t']
30300  */
30301   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2337, __pyx_L1_error)
30302   __Pyx_GOTREF(__pyx_t_1);
30303   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2337, __pyx_L1_error)
30304   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30305   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_cov, 0);
30306   __pyx_v_self->collapse_obs_cov = __pyx_t_3;
30307   __pyx_t_3.memview = NULL;
30308   __pyx_t_3.data = NULL;
30309 
30310   /* "statsmodels/tsa/statespace/_representation.pyx":2338
30311  *         self.collapse_design = state['collapse_design']
30312  *         self.collapse_obs_cov = state['collapse_obs_cov']
30313  *         self.collapse_cholesky = state['collapse_cholesky']             # <<<<<<<<<<<<<<
30314  *         self.t = state['t']
30315  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
30316  */
30317   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_cholesky); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2338, __pyx_L1_error)
30318   __Pyx_GOTREF(__pyx_t_1);
30319   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2338, __pyx_L1_error)
30320   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30321   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_cholesky, 0);
30322   __pyx_v_self->collapse_cholesky = __pyx_t_3;
30323   __pyx_t_3.memview = NULL;
30324   __pyx_t_3.data = NULL;
30325 
30326   /* "statsmodels/tsa/statespace/_representation.pyx":2339
30327  *         self.collapse_obs_cov = state['collapse_obs_cov']
30328  *         self.collapse_cholesky = state['collapse_cholesky']
30329  *         self.t = state['t']             # <<<<<<<<<<<<<<
30330  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
30331  *         self.companion_transition = state['companion_transition']
30332  */
30333   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2339, __pyx_L1_error)
30334   __Pyx_GOTREF(__pyx_t_1);
30335   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2339, __pyx_L1_error)
30336   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30337   __pyx_v_self->t = __pyx_t_4;
30338 
30339   /* "statsmodels/tsa/statespace/_representation.pyx":2340
30340  *         self.collapse_cholesky = state['collapse_cholesky']
30341  *         self.t = state['t']
30342  *         self.collapse_loglikelihood = state['collapse_loglikelihood']             # <<<<<<<<<<<<<<
30343  *         self.companion_transition = state['companion_transition']
30344  *         self.transform_determinant = state['transform_determinant']
30345  */
30346   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_loglikelihood); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2340, __pyx_L1_error)
30347   __Pyx_GOTREF(__pyx_t_1);
30348   __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_float_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2340, __pyx_L1_error)
30349   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30350   __pyx_v_self->collapse_loglikelihood = __pyx_t_8;
30351 
30352   /* "statsmodels/tsa/statespace/_representation.pyx":2341
30353  *         self.t = state['t']
30354  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
30355  *         self.companion_transition = state['companion_transition']             # <<<<<<<<<<<<<<
30356  *         self.transform_determinant = state['transform_determinant']
30357  *
30358  */
30359   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_companion_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2341, __pyx_L1_error)
30360   __Pyx_GOTREF(__pyx_t_1);
30361   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2341, __pyx_L1_error)
30362   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30363   __pyx_v_self->companion_transition = __pyx_t_4;
30364 
30365   /* "statsmodels/tsa/statespace/_representation.pyx":2342
30366  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
30367  *         self.companion_transition = state['companion_transition']
30368  *         self.transform_determinant = state['transform_determinant']             # <<<<<<<<<<<<<<
30369  *
30370  *     def initialize(self, init, offset=0, complex_step=False, clear=True):
30371  */
30372   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_determinant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2342, __pyx_L1_error)
30373   __Pyx_GOTREF(__pyx_t_1);
30374   __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_float_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2342, __pyx_L1_error)
30375   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30376   __pyx_v_self->transform_determinant = __pyx_t_8;
30377 
30378   /* "statsmodels/tsa/statespace/_representation.pyx":2315
30379  *         return (self.__class__, init, state)
30380  *
30381  *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
30382  *         self.initial_state = state['initial_state']
30383  *         self.initial_state_cov = state['initial_state_cov']
30384  */
30385 
30386   /* function exit code */
30387   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30388   goto __pyx_L0;
30389   __pyx_L1_error:;
30390   __Pyx_XDECREF(__pyx_t_1);
30391   __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
30392   __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
30393   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
30394   __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
30395   __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
30396   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30397   __pyx_r = NULL;
30398   __pyx_L0:;
30399   __Pyx_XGIVEREF(__pyx_r);
30400   __Pyx_RefNannyFinishContext();
30401   return __pyx_r;
30402 }
30403 
30404 /* "statsmodels/tsa/statespace/_representation.pyx":2344
30405  *         self.transform_determinant = state['transform_determinant']
30406  *
30407  *     def initialize(self, init, offset=0, complex_step=False, clear=True):             # <<<<<<<<<<<<<<
30408  *         cdef cInitialization _init
30409  *         # Clear initial arrays
30410  */
30411 
30412 /* Python wrapper */
30413 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7initialize(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)30414 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30415   PyObject *__pyx_v_init = 0;
30416   PyObject *__pyx_v_offset = 0;
30417   PyObject *__pyx_v_complex_step = 0;
30418   PyObject *__pyx_v_clear = 0;
30419   int __pyx_lineno = 0;
30420   const char *__pyx_filename = NULL;
30421   int __pyx_clineno = 0;
30422   PyObject *__pyx_r = 0;
30423   __Pyx_RefNannyDeclarations
30424   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
30425   {
30426     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init,&__pyx_n_s_offset,&__pyx_n_s_complex_step,&__pyx_n_s_clear,0};
30427     PyObject* values[4] = {0,0,0,0};
30428     values[1] = ((PyObject *)__pyx_int_0);
30429     values[2] = ((PyObject *)Py_False);
30430     values[3] = ((PyObject *)Py_True);
30431     if (unlikely(__pyx_kwds)) {
30432       Py_ssize_t kw_args;
30433       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
30434       switch (pos_args) {
30435         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30436         CYTHON_FALLTHROUGH;
30437         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30438         CYTHON_FALLTHROUGH;
30439         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30440         CYTHON_FALLTHROUGH;
30441         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30442         CYTHON_FALLTHROUGH;
30443         case  0: break;
30444         default: goto __pyx_L5_argtuple_error;
30445       }
30446       kw_args = PyDict_Size(__pyx_kwds);
30447       switch (pos_args) {
30448         case  0:
30449         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init)) != 0)) kw_args--;
30450         else goto __pyx_L5_argtuple_error;
30451         CYTHON_FALLTHROUGH;
30452         case  1:
30453         if (kw_args > 0) {
30454           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset);
30455           if (value) { values[1] = value; kw_args--; }
30456         }
30457         CYTHON_FALLTHROUGH;
30458         case  2:
30459         if (kw_args > 0) {
30460           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complex_step);
30461           if (value) { values[2] = value; kw_args--; }
30462         }
30463         CYTHON_FALLTHROUGH;
30464         case  3:
30465         if (kw_args > 0) {
30466           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_clear);
30467           if (value) { values[3] = value; kw_args--; }
30468         }
30469       }
30470       if (unlikely(kw_args > 0)) {
30471         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize") < 0)) __PYX_ERR(0, 2344, __pyx_L3_error)
30472       }
30473     } else {
30474       switch (PyTuple_GET_SIZE(__pyx_args)) {
30475         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
30476         CYTHON_FALLTHROUGH;
30477         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
30478         CYTHON_FALLTHROUGH;
30479         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30480         CYTHON_FALLTHROUGH;
30481         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30482         break;
30483         default: goto __pyx_L5_argtuple_error;
30484       }
30485     }
30486     __pyx_v_init = values[0];
30487     __pyx_v_offset = values[1];
30488     __pyx_v_complex_step = values[2];
30489     __pyx_v_clear = values[3];
30490   }
30491   goto __pyx_L4_argument_unpacking_done;
30492   __pyx_L5_argtuple_error:;
30493   __Pyx_RaiseArgtupleInvalid("initialize", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2344, __pyx_L3_error)
30494   __pyx_L3_error:;
30495   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
30496   __Pyx_RefNannyFinishContext();
30497   return NULL;
30498   __pyx_L4_argument_unpacking_done:;
30499   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6initialize(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), __pyx_v_init, __pyx_v_offset, __pyx_v_complex_step, __pyx_v_clear);
30500 
30501   /* function exit code */
30502   __Pyx_RefNannyFinishContext();
30503   return __pyx_r;
30504 }
30505 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,PyObject * __pyx_v_init,PyObject * __pyx_v_offset,PyObject * __pyx_v_complex_step,PyObject * __pyx_v_clear)30506 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_init, PyObject *__pyx_v_offset, PyObject *__pyx_v_complex_step, PyObject *__pyx_v_clear) {
30507   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *__pyx_v__init = 0;
30508   PyObject *__pyx_v_block_index = NULL;
30509   PyObject *__pyx_v_block_init = NULL;
30510   PyObject *__pyx_r = NULL;
30511   __Pyx_RefNannyDeclarations
30512   int __pyx_t_1;
30513   PyObject *__pyx_t_2 = NULL;
30514   int __pyx_t_3;
30515   PyObject *__pyx_t_4 = NULL;
30516   PyObject *__pyx_t_5 = NULL;
30517   int __pyx_t_6;
30518   int __pyx_t_7;
30519   int __pyx_t_8;
30520   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15cInitialization_initialize __pyx_t_9;
30521   Py_ssize_t __pyx_t_10;
30522   Py_ssize_t __pyx_t_11;
30523   PyObject *__pyx_t_12 = NULL;
30524   PyObject *__pyx_t_13 = NULL;
30525   PyObject *__pyx_t_14 = NULL;
30526   int __pyx_lineno = 0;
30527   const char *__pyx_filename = NULL;
30528   int __pyx_clineno = 0;
30529   __Pyx_RefNannySetupContext("initialize", 0);
30530 
30531   /* "statsmodels/tsa/statespace/_representation.pyx":2347
30532  *         cdef cInitialization _init
30533  *         # Clear initial arrays
30534  *         if clear:             # <<<<<<<<<<<<<<
30535  *             self.initial_state[:] = 0
30536  *             self.initial_diffuse_state_cov[:] = 0
30537  */
30538   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clear); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2347, __pyx_L1_error)
30539   if (__pyx_t_1) {
30540 
30541     /* "statsmodels/tsa/statespace/_representation.pyx":2348
30542  *         # Clear initial arrays
30543  *         if clear:
30544  *             self.initial_state[:] = 0             # <<<<<<<<<<<<<<
30545  *             self.initial_diffuse_state_cov[:] = 0
30546  *             self.initial_state_cov[:] = 0
30547  */
30548     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2348, __pyx_L1_error)}
30549     {
30550         __pyx_t_float_complex __pyx_temp_scalar = __pyx_t_float_complex_from_parts(0, 0);
30551         {
30552             Py_ssize_t __pyx_temp_extent_0 = __pyx_v_self->initial_state.shape[0];
30553             Py_ssize_t __pyx_temp_stride_0 = __pyx_v_self->initial_state.strides[0];
30554             char *__pyx_temp_pointer_0;
30555             Py_ssize_t __pyx_temp_idx_0;
30556             __pyx_temp_pointer_0 = __pyx_v_self->initial_state.data;
30557             for (__pyx_temp_idx_0 = 0; __pyx_temp_idx_0 < __pyx_temp_extent_0; __pyx_temp_idx_0++) {
30558               *((__pyx_t_float_complex *) __pyx_temp_pointer_0) = __pyx_temp_scalar;
30559               __pyx_temp_pointer_0 += __pyx_temp_stride_0;
30560             }
30561         }
30562     }
30563 
30564     /* "statsmodels/tsa/statespace/_representation.pyx":2349
30565  *         if clear:
30566  *             self.initial_state[:] = 0
30567  *             self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
30568  *             self.initial_state_cov[:] = 0
30569  *
30570  */
30571     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2349, __pyx_L1_error)}
30572     {
30573         __pyx_t_float_complex __pyx_temp_scalar = __pyx_t_float_complex_from_parts(0, 0);
30574         {
30575             Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
30576             Py_ssize_t __pyx_temp_idx;
30577             __pyx_t_float_complex *__pyx_temp_pointer = (__pyx_t_float_complex *) __pyx_v_self->initial_diffuse_state_cov.data;
30578             for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
30579               *((__pyx_t_float_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
30580               __pyx_temp_pointer += 1;
30581             }
30582         }
30583     }
30584 
30585     /* "statsmodels/tsa/statespace/_representation.pyx":2350
30586  *             self.initial_state[:] = 0
30587  *             self.initial_diffuse_state_cov[:] = 0
30588  *             self.initial_state_cov[:] = 0             # <<<<<<<<<<<<<<
30589  *
30590  *         # If using global initialization, compute the actual elements and
30591  */
30592     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2350, __pyx_L1_error)}
30593     {
30594         __pyx_t_float_complex __pyx_temp_scalar = __pyx_t_float_complex_from_parts(0, 0);
30595         {
30596             Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_state_cov.shape[0] * __pyx_v_self->initial_state_cov.shape[1];
30597             Py_ssize_t __pyx_temp_idx;
30598             __pyx_t_float_complex *__pyx_temp_pointer = (__pyx_t_float_complex *) __pyx_v_self->initial_state_cov.data;
30599             for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
30600               *((__pyx_t_float_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
30601               __pyx_temp_pointer += 1;
30602             }
30603         }
30604     }
30605 
30606     /* "statsmodels/tsa/statespace/_representation.pyx":2347
30607  *         cdef cInitialization _init
30608  *         # Clear initial arrays
30609  *         if clear:             # <<<<<<<<<<<<<<
30610  *             self.initial_state[:] = 0
30611  *             self.initial_diffuse_state_cov[:] = 0
30612  */
30613   }
30614 
30615   /* "statsmodels/tsa/statespace/_representation.pyx":2354
30616  *         # If using global initialization, compute the actual elements and
30617  *         # return them
30618  *         self.initialized_diffuse = False             # <<<<<<<<<<<<<<
30619  *         self.initialized_stationary = False
30620  *         if init.initialization_type is not None:
30621  */
30622   __pyx_v_self->initialized_diffuse = 0;
30623 
30624   /* "statsmodels/tsa/statespace/_representation.pyx":2355
30625  *         # return them
30626  *         self.initialized_diffuse = False
30627  *         self.initialized_stationary = False             # <<<<<<<<<<<<<<
30628  *         if init.initialization_type is not None:
30629  *             init._initialize_initialization(prefix='c')
30630  */
30631   __pyx_v_self->initialized_stationary = 0;
30632 
30633   /* "statsmodels/tsa/statespace/_representation.pyx":2356
30634  *         self.initialized_diffuse = False
30635  *         self.initialized_stationary = False
30636  *         if init.initialization_type is not None:             # <<<<<<<<<<<<<<
30637  *             init._initialize_initialization(prefix='c')
30638  *             _init = init._initializations['c']
30639  */
30640   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2356, __pyx_L1_error)
30641   __Pyx_GOTREF(__pyx_t_2);
30642   __pyx_t_1 = (__pyx_t_2 != Py_None);
30643   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30644   __pyx_t_3 = (__pyx_t_1 != 0);
30645   if (__pyx_t_3) {
30646 
30647     /* "statsmodels/tsa/statespace/_representation.pyx":2357
30648  *         self.initialized_stationary = False
30649  *         if init.initialization_type is not None:
30650  *             init._initialize_initialization(prefix='c')             # <<<<<<<<<<<<<<
30651  *             _init = init._initializations['c']
30652  *             _init.initialize(init.initialization_type, offset, self,
30653  */
30654     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialize_initialization); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2357, __pyx_L1_error)
30655     __Pyx_GOTREF(__pyx_t_2);
30656     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2357, __pyx_L1_error)
30657     __Pyx_GOTREF(__pyx_t_4);
30658     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_prefix, __pyx_n_u_c) < 0) __PYX_ERR(0, 2357, __pyx_L1_error)
30659     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2357, __pyx_L1_error)
30660     __Pyx_GOTREF(__pyx_t_5);
30661     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30662     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30663     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30664 
30665     /* "statsmodels/tsa/statespace/_representation.pyx":2358
30666  *         if init.initialization_type is not None:
30667  *             init._initialize_initialization(prefix='c')
30668  *             _init = init._initializations['c']             # <<<<<<<<<<<<<<
30669  *             _init.initialize(init.initialization_type, offset, self,
30670  *                              self.initial_state,
30671  */
30672     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initializations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2358, __pyx_L1_error)
30673     __Pyx_GOTREF(__pyx_t_5);
30674     __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2358, __pyx_L1_error)
30675     __Pyx_GOTREF(__pyx_t_4);
30676     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30677     if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_cInitialization))))) __PYX_ERR(0, 2358, __pyx_L1_error)
30678     __pyx_v__init = ((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *)__pyx_t_4);
30679     __pyx_t_4 = 0;
30680 
30681     /* "statsmodels/tsa/statespace/_representation.pyx":2359
30682  *             init._initialize_initialization(prefix='c')
30683  *             _init = init._initializations['c']
30684  *             _init.initialize(init.initialization_type, offset, self,             # <<<<<<<<<<<<<<
30685  *                              self.initial_state,
30686  *                              self.initial_diffuse_state_cov,
30687  */
30688     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2359, __pyx_L1_error)
30689     __Pyx_GOTREF(__pyx_t_4);
30690     __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_offset); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2359, __pyx_L1_error)
30691 
30692     /* "statsmodels/tsa/statespace/_representation.pyx":2360
30693  *             _init = init._initializations['c']
30694  *             _init.initialize(init.initialization_type, offset, self,
30695  *                              self.initial_state,             # <<<<<<<<<<<<<<
30696  *                              self.initial_diffuse_state_cov,
30697  *                              self.initial_state_cov, complex_step)
30698  */
30699     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2360, __pyx_L1_error)}
30700 
30701     /* "statsmodels/tsa/statespace/_representation.pyx":2361
30702  *             _init.initialize(init.initialization_type, offset, self,
30703  *                              self.initial_state,
30704  *                              self.initial_diffuse_state_cov,             # <<<<<<<<<<<<<<
30705  *                              self.initial_state_cov, complex_step)
30706  *             if init.initialization_type == 'diffuse':
30707  */
30708     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2361, __pyx_L1_error)}
30709 
30710     /* "statsmodels/tsa/statespace/_representation.pyx":2362
30711  *                              self.initial_state,
30712  *                              self.initial_diffuse_state_cov,
30713  *                              self.initial_state_cov, complex_step)             # <<<<<<<<<<<<<<
30714  *             if init.initialization_type == 'diffuse':
30715  *                 self.initialized_diffuse = True
30716  */
30717     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2362, __pyx_L1_error)}
30718     __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_complex_step); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2362, __pyx_L1_error)
30719 
30720     /* "statsmodels/tsa/statespace/_representation.pyx":2359
30721  *             init._initialize_initialization(prefix='c')
30722  *             _init = init._initializations['c']
30723  *             _init.initialize(init.initialization_type, offset, self,             # <<<<<<<<<<<<<<
30724  *                              self.initial_state,
30725  *                              self.initial_diffuse_state_cov,
30726  */
30727     __pyx_t_9.__pyx_n = 1;
30728     __pyx_t_9.complex_step = __pyx_t_7;
30729     __pyx_t_8 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_cInitialization *)__pyx_v__init->__pyx_vtab)->initialize(__pyx_v__init, __pyx_t_4, __pyx_t_6, __pyx_v_self, __pyx_v_self->initial_state, __pyx_v_self->initial_diffuse_state_cov, __pyx_v_self->initial_state_cov, 0, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)1))) __PYX_ERR(0, 2359, __pyx_L1_error)
30730     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30731 
30732     /* "statsmodels/tsa/statespace/_representation.pyx":2363
30733  *                              self.initial_diffuse_state_cov,
30734  *                              self.initial_state_cov, complex_step)
30735  *             if init.initialization_type == 'diffuse':             # <<<<<<<<<<<<<<
30736  *                 self.initialized_diffuse = True
30737  *             if init.initialization_type == 'stationary':
30738  */
30739     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2363, __pyx_L1_error)
30740     __Pyx_GOTREF(__pyx_t_4);
30741     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_diffuse, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2363, __pyx_L1_error)
30742     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30743     if (__pyx_t_3) {
30744 
30745       /* "statsmodels/tsa/statespace/_representation.pyx":2364
30746  *                              self.initial_state_cov, complex_step)
30747  *             if init.initialization_type == 'diffuse':
30748  *                 self.initialized_diffuse = True             # <<<<<<<<<<<<<<
30749  *             if init.initialization_type == 'stationary':
30750  *                 self.initialized_stationary = True
30751  */
30752       __pyx_v_self->initialized_diffuse = 1;
30753 
30754       /* "statsmodels/tsa/statespace/_representation.pyx":2363
30755  *                              self.initial_diffuse_state_cov,
30756  *                              self.initial_state_cov, complex_step)
30757  *             if init.initialization_type == 'diffuse':             # <<<<<<<<<<<<<<
30758  *                 self.initialized_diffuse = True
30759  *             if init.initialization_type == 'stationary':
30760  */
30761     }
30762 
30763     /* "statsmodels/tsa/statespace/_representation.pyx":2365
30764  *             if init.initialization_type == 'diffuse':
30765  *                 self.initialized_diffuse = True
30766  *             if init.initialization_type == 'stationary':             # <<<<<<<<<<<<<<
30767  *                 self.initialized_stationary = True
30768  *         # Otherwise, if using blocks, initialize each of the blocks
30769  */
30770     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2365, __pyx_L1_error)
30771     __Pyx_GOTREF(__pyx_t_4);
30772     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_stationary, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2365, __pyx_L1_error)
30773     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30774     if (__pyx_t_3) {
30775 
30776       /* "statsmodels/tsa/statespace/_representation.pyx":2366
30777  *                 self.initialized_diffuse = True
30778  *             if init.initialization_type == 'stationary':
30779  *                 self.initialized_stationary = True             # <<<<<<<<<<<<<<
30780  *         # Otherwise, if using blocks, initialize each of the blocks
30781  *         else:
30782  */
30783       __pyx_v_self->initialized_stationary = 1;
30784 
30785       /* "statsmodels/tsa/statespace/_representation.pyx":2365
30786  *             if init.initialization_type == 'diffuse':
30787  *                 self.initialized_diffuse = True
30788  *             if init.initialization_type == 'stationary':             # <<<<<<<<<<<<<<
30789  *                 self.initialized_stationary = True
30790  *         # Otherwise, if using blocks, initialize each of the blocks
30791  */
30792     }
30793 
30794     /* "statsmodels/tsa/statespace/_representation.pyx":2356
30795  *         self.initialized_diffuse = False
30796  *         self.initialized_stationary = False
30797  *         if init.initialization_type is not None:             # <<<<<<<<<<<<<<
30798  *             init._initialize_initialization(prefix='c')
30799  *             _init = init._initializations['c']
30800  */
30801     goto __pyx_L4;
30802   }
30803 
30804   /* "statsmodels/tsa/statespace/_representation.pyx":2369
30805  *         # Otherwise, if using blocks, initialize each of the blocks
30806  *         else:
30807  *             for block_index, block_init in init.blocks.items():             # <<<<<<<<<<<<<<
30808  *                 self.initialize(block_init, offset=offset + block_index[0],
30809  *                                 complex_step=complex_step, clear=False)
30810  */
30811   /*else*/ {
30812     __pyx_t_10 = 0;
30813     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_blocks); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2369, __pyx_L1_error)
30814     __Pyx_GOTREF(__pyx_t_5);
30815     if (unlikely(__pyx_t_5 == Py_None)) {
30816       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
30817       __PYX_ERR(0, 2369, __pyx_L1_error)
30818     }
30819     __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_items, (&__pyx_t_11), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2369, __pyx_L1_error)
30820     __Pyx_GOTREF(__pyx_t_2);
30821     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30822     __Pyx_XDECREF(__pyx_t_4);
30823     __pyx_t_4 = __pyx_t_2;
30824     __pyx_t_2 = 0;
30825     while (1) {
30826       __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_11, &__pyx_t_10, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_8);
30827       if (unlikely(__pyx_t_7 == 0)) break;
30828       if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 2369, __pyx_L1_error)
30829       __Pyx_GOTREF(__pyx_t_2);
30830       __Pyx_GOTREF(__pyx_t_5);
30831       __Pyx_XDECREF_SET(__pyx_v_block_index, __pyx_t_2);
30832       __pyx_t_2 = 0;
30833       __Pyx_XDECREF_SET(__pyx_v_block_init, __pyx_t_5);
30834       __pyx_t_5 = 0;
30835 
30836       /* "statsmodels/tsa/statespace/_representation.pyx":2370
30837  *         else:
30838  *             for block_index, block_init in init.blocks.items():
30839  *                 self.initialize(block_init, offset=offset + block_index[0],             # <<<<<<<<<<<<<<
30840  *                                 complex_step=complex_step, clear=False)
30841  *
30842  */
30843       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_initialize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2370, __pyx_L1_error)
30844       __Pyx_GOTREF(__pyx_t_5);
30845       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2370, __pyx_L1_error)
30846       __Pyx_GOTREF(__pyx_t_2);
30847       __Pyx_INCREF(__pyx_v_block_init);
30848       __Pyx_GIVEREF(__pyx_v_block_init);
30849       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_block_init);
30850       __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2370, __pyx_L1_error)
30851       __Pyx_GOTREF(__pyx_t_12);
30852       __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_block_index, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2370, __pyx_L1_error)
30853       __Pyx_GOTREF(__pyx_t_13);
30854       __pyx_t_14 = PyNumber_Add(__pyx_v_offset, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2370, __pyx_L1_error)
30855       __Pyx_GOTREF(__pyx_t_14);
30856       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
30857       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_offset, __pyx_t_14) < 0) __PYX_ERR(0, 2370, __pyx_L1_error)
30858       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
30859 
30860       /* "statsmodels/tsa/statespace/_representation.pyx":2371
30861  *             for block_index, block_init in init.blocks.items():
30862  *                 self.initialize(block_init, offset=offset + block_index[0],
30863  *                                 complex_step=complex_step, clear=False)             # <<<<<<<<<<<<<<
30864  *
30865  *         if not self.initialized:
30866  */
30867       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_complex_step, __pyx_v_complex_step) < 0) __PYX_ERR(0, 2370, __pyx_L1_error)
30868       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_clear, Py_False) < 0) __PYX_ERR(0, 2370, __pyx_L1_error)
30869 
30870       /* "statsmodels/tsa/statespace/_representation.pyx":2370
30871  *         else:
30872  *             for block_index, block_init in init.blocks.items():
30873  *                 self.initialize(block_init, offset=offset + block_index[0],             # <<<<<<<<<<<<<<
30874  *                                 complex_step=complex_step, clear=False)
30875  *
30876  */
30877       __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2370, __pyx_L1_error)
30878       __Pyx_GOTREF(__pyx_t_14);
30879       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30880       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30881       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
30882       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
30883     }
30884     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30885   }
30886   __pyx_L4:;
30887 
30888   /* "statsmodels/tsa/statespace/_representation.pyx":2373
30889  *                                 complex_step=complex_step, clear=False)
30890  *
30891  *         if not self.initialized:             # <<<<<<<<<<<<<<
30892  *             self.initialized = True
30893  *
30894  */
30895   __pyx_t_3 = ((!(__pyx_v_self->initialized != 0)) != 0);
30896   if (__pyx_t_3) {
30897 
30898     /* "statsmodels/tsa/statespace/_representation.pyx":2374
30899  *
30900  *         if not self.initialized:
30901  *             self.initialized = True             # <<<<<<<<<<<<<<
30902  *
30903  *     # ## Initialize: known values
30904  */
30905     __pyx_v_self->initialized = 1;
30906 
30907     /* "statsmodels/tsa/statespace/_representation.pyx":2373
30908  *                                 complex_step=complex_step, clear=False)
30909  *
30910  *         if not self.initialized:             # <<<<<<<<<<<<<<
30911  *             self.initialized = True
30912  *
30913  */
30914   }
30915 
30916   /* "statsmodels/tsa/statespace/_representation.pyx":2344
30917  *         self.transform_determinant = state['transform_determinant']
30918  *
30919  *     def initialize(self, init, offset=0, complex_step=False, clear=True):             # <<<<<<<<<<<<<<
30920  *         cdef cInitialization _init
30921  *         # Clear initial arrays
30922  */
30923 
30924   /* function exit code */
30925   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30926   goto __pyx_L0;
30927   __pyx_L1_error:;
30928   __Pyx_XDECREF(__pyx_t_2);
30929   __Pyx_XDECREF(__pyx_t_4);
30930   __Pyx_XDECREF(__pyx_t_5);
30931   __Pyx_XDECREF(__pyx_t_12);
30932   __Pyx_XDECREF(__pyx_t_13);
30933   __Pyx_XDECREF(__pyx_t_14);
30934   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
30935   __pyx_r = NULL;
30936   __pyx_L0:;
30937   __Pyx_XDECREF((PyObject *)__pyx_v__init);
30938   __Pyx_XDECREF(__pyx_v_block_index);
30939   __Pyx_XDECREF(__pyx_v_block_init);
30940   __Pyx_XGIVEREF(__pyx_r);
30941   __Pyx_RefNannyFinishContext();
30942   return __pyx_r;
30943 }
30944 
30945 /* "statsmodels/tsa/statespace/_representation.pyx":2381
30946  *     # certainty or else as filled with parameters from a maximum likelihood
30947  *     # estimation run.
30948  *     def initialize_known(self, np.complex64_t [:] initial_state, np.complex64_t [::1,:] initial_state_cov):             # <<<<<<<<<<<<<<
30949  *         """
30950  *         initialize_known(initial_state, initial_state_cov)
30951  */
30952 
30953 /* Python wrapper */
30954 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9initialize_known(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
30955 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8initialize_known[] = "\n        initialize_known(initial_state, initial_state_cov)\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9initialize_known(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)30956 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9initialize_known(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
30957   __Pyx_memviewslice __pyx_v_initial_state = { 0, 0, { 0 }, { 0 }, { 0 } };
30958   __Pyx_memviewslice __pyx_v_initial_state_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
30959   int __pyx_lineno = 0;
30960   const char *__pyx_filename = NULL;
30961   int __pyx_clineno = 0;
30962   PyObject *__pyx_r = 0;
30963   __Pyx_RefNannyDeclarations
30964   __Pyx_RefNannySetupContext("initialize_known (wrapper)", 0);
30965   {
30966     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_initial_state,&__pyx_n_s_initial_state_cov,0};
30967     PyObject* values[2] = {0,0};
30968     if (unlikely(__pyx_kwds)) {
30969       Py_ssize_t kw_args;
30970       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
30971       switch (pos_args) {
30972         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30973         CYTHON_FALLTHROUGH;
30974         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30975         CYTHON_FALLTHROUGH;
30976         case  0: break;
30977         default: goto __pyx_L5_argtuple_error;
30978       }
30979       kw_args = PyDict_Size(__pyx_kwds);
30980       switch (pos_args) {
30981         case  0:
30982         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial_state)) != 0)) kw_args--;
30983         else goto __pyx_L5_argtuple_error;
30984         CYTHON_FALLTHROUGH;
30985         case  1:
30986         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial_state_cov)) != 0)) kw_args--;
30987         else {
30988           __Pyx_RaiseArgtupleInvalid("initialize_known", 1, 2, 2, 1); __PYX_ERR(0, 2381, __pyx_L3_error)
30989         }
30990       }
30991       if (unlikely(kw_args > 0)) {
30992         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_known") < 0)) __PYX_ERR(0, 2381, __pyx_L3_error)
30993       }
30994     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
30995       goto __pyx_L5_argtuple_error;
30996     } else {
30997       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
30998       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
30999     }
31000     __pyx_v_initial_state = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_initial_state.memview)) __PYX_ERR(0, 2381, __pyx_L3_error)
31001     __pyx_v_initial_state_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_initial_state_cov.memview)) __PYX_ERR(0, 2381, __pyx_L3_error)
31002   }
31003   goto __pyx_L4_argument_unpacking_done;
31004   __pyx_L5_argtuple_error:;
31005   __Pyx_RaiseArgtupleInvalid("initialize_known", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2381, __pyx_L3_error)
31006   __pyx_L3_error:;
31007   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialize_known", __pyx_clineno, __pyx_lineno, __pyx_filename);
31008   __Pyx_RefNannyFinishContext();
31009   return NULL;
31010   __pyx_L4_argument_unpacking_done:;
31011   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8initialize_known(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), __pyx_v_initial_state, __pyx_v_initial_state_cov);
31012 
31013   /* function exit code */
31014   __Pyx_RefNannyFinishContext();
31015   return __pyx_r;
31016 }
31017 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,__Pyx_memviewslice __pyx_v_initial_state,__Pyx_memviewslice __pyx_v_initial_state_cov)31018 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_initial_state, __Pyx_memviewslice __pyx_v_initial_state_cov) {
31019   PyObject *__pyx_r = NULL;
31020   __Pyx_RefNannyDeclarations
31021   PyObject *__pyx_t_1 = NULL;
31022   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape __pyx_t_2;
31023   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape __pyx_t_3;
31024   int __pyx_lineno = 0;
31025   const char *__pyx_filename = NULL;
31026   int __pyx_clineno = 0;
31027   __Pyx_RefNannySetupContext("initialize_known", 0);
31028 
31029   /* "statsmodels/tsa/statespace/_representation.pyx":2385
31030  *         initialize_known(initial_state, initial_state_cov)
31031  *         """
31032  *         tools.validate_vector_shape('initial state', &initial_state.shape[0], self.k_states, None)             # <<<<<<<<<<<<<<
31033  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)
31034  *
31035  */
31036   __pyx_t_2.__pyx_n = 1;
31037   __pyx_t_2.nobs = Py_None;
31038   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_initial_state_2, (&(__pyx_v_initial_state.shape[0])), __pyx_v_self->k_states, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2385, __pyx_L1_error)
31039   __Pyx_GOTREF(__pyx_t_1);
31040   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31041 
31042   /* "statsmodels/tsa/statespace/_representation.pyx":2386
31043  *         """
31044  *         tools.validate_vector_shape('initial state', &initial_state.shape[0], self.k_states, None)
31045  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)             # <<<<<<<<<<<<<<
31046  *
31047  *         self.initial_state = initial_state
31048  */
31049   __pyx_t_3.__pyx_n = 1;
31050   __pyx_t_3.nobs = Py_None;
31051   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_initial_state_covariance, (&(__pyx_v_initial_state_cov.shape[0])), __pyx_v_self->k_states, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2386, __pyx_L1_error)
31052   __Pyx_GOTREF(__pyx_t_1);
31053   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31054 
31055   /* "statsmodels/tsa/statespace/_representation.pyx":2388
31056  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)
31057  *
31058  *         self.initial_state = initial_state             # <<<<<<<<<<<<<<
31059  *         self.initial_state_cov = initial_state_cov
31060  *         self.initial_diffuse_state_cov[:] = 0
31061  */
31062   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
31063   __PYX_INC_MEMVIEW(&__pyx_v_initial_state, 0);
31064   __pyx_v_self->initial_state = __pyx_v_initial_state;
31065 
31066   /* "statsmodels/tsa/statespace/_representation.pyx":2389
31067  *
31068  *         self.initial_state = initial_state
31069  *         self.initial_state_cov = initial_state_cov             # <<<<<<<<<<<<<<
31070  *         self.initial_diffuse_state_cov[:] = 0
31071  *
31072  */
31073   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
31074   __PYX_INC_MEMVIEW(&__pyx_v_initial_state_cov, 0);
31075   __pyx_v_self->initial_state_cov = __pyx_v_initial_state_cov;
31076 
31077   /* "statsmodels/tsa/statespace/_representation.pyx":2390
31078  *         self.initial_state = initial_state
31079  *         self.initial_state_cov = initial_state_cov
31080  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
31081  *
31082  *         self.initialized = True
31083  */
31084   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2390, __pyx_L1_error)}
31085   {
31086       __pyx_t_float_complex __pyx_temp_scalar = __pyx_t_float_complex_from_parts(0, 0);
31087       {
31088           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
31089           Py_ssize_t __pyx_temp_idx;
31090           __pyx_t_float_complex *__pyx_temp_pointer = (__pyx_t_float_complex *) __pyx_v_self->initial_diffuse_state_cov.data;
31091           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
31092             *((__pyx_t_float_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
31093             __pyx_temp_pointer += 1;
31094           }
31095       }
31096   }
31097 
31098   /* "statsmodels/tsa/statespace/_representation.pyx":2392
31099  *         self.initial_diffuse_state_cov[:] = 0
31100  *
31101  *         self.initialized = True             # <<<<<<<<<<<<<<
31102  *
31103  *     # ## Initialize: approximate diffuse priors
31104  */
31105   __pyx_v_self->initialized = 1;
31106 
31107   /* "statsmodels/tsa/statespace/_representation.pyx":2381
31108  *     # certainty or else as filled with parameters from a maximum likelihood
31109  *     # estimation run.
31110  *     def initialize_known(self, np.complex64_t [:] initial_state, np.complex64_t [::1,:] initial_state_cov):             # <<<<<<<<<<<<<<
31111  *         """
31112  *         initialize_known(initial_state, initial_state_cov)
31113  */
31114 
31115   /* function exit code */
31116   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31117   goto __pyx_L0;
31118   __pyx_L1_error:;
31119   __Pyx_XDECREF(__pyx_t_1);
31120   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialize_known", __pyx_clineno, __pyx_lineno, __pyx_filename);
31121   __pyx_r = NULL;
31122   __pyx_L0:;
31123   __PYX_XDEC_MEMVIEW(&__pyx_v_initial_state, 1);
31124   __PYX_XDEC_MEMVIEW(&__pyx_v_initial_state_cov, 1);
31125   __Pyx_XGIVEREF(__pyx_r);
31126   __Pyx_RefNannyFinishContext();
31127   return __pyx_r;
31128 }
31129 
31130 /* "statsmodels/tsa/statespace/_representation.pyx":2401
31131  *     #
31132  *     # *Note:* see Durbin and Koopman section 5.6.1
31133  *     def initialize_approximate_diffuse(self, np.complex64_t variance=1e2):             # <<<<<<<<<<<<<<
31134  *         """
31135  *         initialize_approximate_diffuse(variance=1e2)
31136  */
31137 
31138 /* Python wrapper */
31139 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialize_approximate_diffuse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31140 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10initialize_approximate_diffuse[] = "\n        initialize_approximate_diffuse(variance=1e2)\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialize_approximate_diffuse(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)31141 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialize_approximate_diffuse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31142   __pyx_t_float_complex __pyx_v_variance;
31143   int __pyx_lineno = 0;
31144   const char *__pyx_filename = NULL;
31145   int __pyx_clineno = 0;
31146   PyObject *__pyx_r = 0;
31147   __Pyx_RefNannyDeclarations
31148   __Pyx_RefNannySetupContext("initialize_approximate_diffuse (wrapper)", 0);
31149   {
31150     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variance,0};
31151     PyObject* values[1] = {0};
31152     if (unlikely(__pyx_kwds)) {
31153       Py_ssize_t kw_args;
31154       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
31155       switch (pos_args) {
31156         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31157         CYTHON_FALLTHROUGH;
31158         case  0: break;
31159         default: goto __pyx_L5_argtuple_error;
31160       }
31161       kw_args = PyDict_Size(__pyx_kwds);
31162       switch (pos_args) {
31163         case  0:
31164         if (kw_args > 0) {
31165           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variance);
31166           if (value) { values[0] = value; kw_args--; }
31167         }
31168       }
31169       if (unlikely(kw_args > 0)) {
31170         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_approximate_diffuse") < 0)) __PYX_ERR(0, 2401, __pyx_L3_error)
31171       }
31172     } else {
31173       switch (PyTuple_GET_SIZE(__pyx_args)) {
31174         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31175         CYTHON_FALLTHROUGH;
31176         case  0: break;
31177         default: goto __pyx_L5_argtuple_error;
31178       }
31179     }
31180     if (values[0]) {
31181       __pyx_v_variance = __Pyx_PyComplex_As___pyx_t_float_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2401, __pyx_L3_error)
31182     } else {
31183       __pyx_v_variance = __pyx_k__5;
31184     }
31185   }
31186   goto __pyx_L4_argument_unpacking_done;
31187   __pyx_L5_argtuple_error:;
31188   __Pyx_RaiseArgtupleInvalid("initialize_approximate_diffuse", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2401, __pyx_L3_error)
31189   __pyx_L3_error:;
31190   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialize_approximate_diffuse", __pyx_clineno, __pyx_lineno, __pyx_filename);
31191   __Pyx_RefNannyFinishContext();
31192   return NULL;
31193   __pyx_L4_argument_unpacking_done:;
31194   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10initialize_approximate_diffuse(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), __pyx_v_variance);
31195 
31196   /* function exit code */
31197   __Pyx_RefNannyFinishContext();
31198   return __pyx_r;
31199 }
31200 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,__pyx_t_float_complex __pyx_v_variance)31201 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, __pyx_t_float_complex __pyx_v_variance) {
31202   npy_intp __pyx_v_dim[1];
31203   PyObject *__pyx_r = NULL;
31204   __Pyx_RefNannyDeclarations
31205   int __pyx_t_1;
31206   PyObject *__pyx_t_2 = NULL;
31207   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
31208   PyObject *__pyx_t_4 = NULL;
31209   PyObject *__pyx_t_5 = NULL;
31210   PyObject *__pyx_t_6 = NULL;
31211   PyObject *__pyx_t_7 = NULL;
31212   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
31213   int __pyx_lineno = 0;
31214   const char *__pyx_filename = NULL;
31215   int __pyx_clineno = 0;
31216   __Pyx_RefNannySetupContext("initialize_approximate_diffuse", 0);
31217 
31218   /* "statsmodels/tsa/statespace/_representation.pyx":2406
31219  *         """
31220  *         cdef np.npy_intp dim[1]
31221  *         dim[0] = self.k_states             # <<<<<<<<<<<<<<
31222  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_COMPLEX64, FORTRAN)
31223  *         self.initial_state_cov = np.eye(self.k_states, dtype=np.complex64).T * variance
31224  */
31225   __pyx_t_1 = __pyx_v_self->k_states;
31226   (__pyx_v_dim[0]) = __pyx_t_1;
31227 
31228   /* "statsmodels/tsa/statespace/_representation.pyx":2407
31229  *         cdef np.npy_intp dim[1]
31230  *         dim[0] = self.k_states
31231  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
31232  *         self.initial_state_cov = np.eye(self.k_states, dtype=np.complex64).T * variance
31233  *         self.initial_diffuse_state_cov[:] = 0
31234  */
31235   __pyx_t_2 = PyArray_ZEROS(1, __pyx_v_dim, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2407, __pyx_L1_error)
31236   __Pyx_GOTREF(__pyx_t_2);
31237   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 2407, __pyx_L1_error)
31238   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31239   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
31240   __pyx_v_self->initial_state = __pyx_t_3;
31241   __pyx_t_3.memview = NULL;
31242   __pyx_t_3.data = NULL;
31243 
31244   /* "statsmodels/tsa/statespace/_representation.pyx":2408
31245  *         dim[0] = self.k_states
31246  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_COMPLEX64, FORTRAN)
31247  *         self.initial_state_cov = np.eye(self.k_states, dtype=np.complex64).T * variance             # <<<<<<<<<<<<<<
31248  *         self.initial_diffuse_state_cov[:] = 0
31249  *
31250  */
31251   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
31252   __Pyx_GOTREF(__pyx_t_2);
31253   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_eye); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2408, __pyx_L1_error)
31254   __Pyx_GOTREF(__pyx_t_4);
31255   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31256   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->k_states); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
31257   __Pyx_GOTREF(__pyx_t_2);
31258   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2408, __pyx_L1_error)
31259   __Pyx_GOTREF(__pyx_t_5);
31260   __Pyx_GIVEREF(__pyx_t_2);
31261   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
31262   __pyx_t_2 = 0;
31263   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
31264   __Pyx_GOTREF(__pyx_t_2);
31265   __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2408, __pyx_L1_error)
31266   __Pyx_GOTREF(__pyx_t_6);
31267   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_complex64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2408, __pyx_L1_error)
31268   __Pyx_GOTREF(__pyx_t_7);
31269   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
31270   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 2408, __pyx_L1_error)
31271   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
31272   __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2408, __pyx_L1_error)
31273   __Pyx_GOTREF(__pyx_t_7);
31274   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31275   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31276   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31277   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2408, __pyx_L1_error)
31278   __Pyx_GOTREF(__pyx_t_2);
31279   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
31280   __pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_variance); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2408, __pyx_L1_error)
31281   __Pyx_GOTREF(__pyx_t_7);
31282   __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2408, __pyx_L1_error)
31283   __Pyx_GOTREF(__pyx_t_5);
31284   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31285   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
31286   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 2408, __pyx_L1_error)
31287   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31288   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
31289   __pyx_v_self->initial_state_cov = __pyx_t_8;
31290   __pyx_t_8.memview = NULL;
31291   __pyx_t_8.data = NULL;
31292 
31293   /* "statsmodels/tsa/statespace/_representation.pyx":2409
31294  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_COMPLEX64, FORTRAN)
31295  *         self.initial_state_cov = np.eye(self.k_states, dtype=np.complex64).T * variance
31296  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
31297  *
31298  *         self.initialized = True
31299  */
31300   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2409, __pyx_L1_error)}
31301   {
31302       __pyx_t_float_complex __pyx_temp_scalar = __pyx_t_float_complex_from_parts(0, 0);
31303       {
31304           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
31305           Py_ssize_t __pyx_temp_idx;
31306           __pyx_t_float_complex *__pyx_temp_pointer = (__pyx_t_float_complex *) __pyx_v_self->initial_diffuse_state_cov.data;
31307           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
31308             *((__pyx_t_float_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
31309             __pyx_temp_pointer += 1;
31310           }
31311       }
31312   }
31313 
31314   /* "statsmodels/tsa/statespace/_representation.pyx":2411
31315  *         self.initial_diffuse_state_cov[:] = 0
31316  *
31317  *         self.initialized = True             # <<<<<<<<<<<<<<
31318  *
31319  *     # ## Initialize: stationary process
31320  */
31321   __pyx_v_self->initialized = 1;
31322 
31323   /* "statsmodels/tsa/statespace/_representation.pyx":2401
31324  *     #
31325  *     # *Note:* see Durbin and Koopman section 5.6.1
31326  *     def initialize_approximate_diffuse(self, np.complex64_t variance=1e2):             # <<<<<<<<<<<<<<
31327  *         """
31328  *         initialize_approximate_diffuse(variance=1e2)
31329  */
31330 
31331   /* function exit code */
31332   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31333   goto __pyx_L0;
31334   __pyx_L1_error:;
31335   __Pyx_XDECREF(__pyx_t_2);
31336   __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
31337   __Pyx_XDECREF(__pyx_t_4);
31338   __Pyx_XDECREF(__pyx_t_5);
31339   __Pyx_XDECREF(__pyx_t_6);
31340   __Pyx_XDECREF(__pyx_t_7);
31341   __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
31342   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialize_approximate_diffuse", __pyx_clineno, __pyx_lineno, __pyx_filename);
31343   __pyx_r = NULL;
31344   __pyx_L0:;
31345   __Pyx_XGIVEREF(__pyx_r);
31346   __Pyx_RefNannyFinishContext();
31347   return __pyx_r;
31348 }
31349 
31350 /* "statsmodels/tsa/statespace/_representation.pyx":2415
31351  *     # ## Initialize: stationary process
31352  *     # *Note:* see Durbin and Koopman section 5.6.2
31353  *     def initialize_stationary(self, complex_step=False):             # <<<<<<<<<<<<<<
31354  *         """
31355  *         initialize_stationary()
31356  */
31357 
31358 /* Python wrapper */
31359 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initialize_stationary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
31360 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12initialize_stationary[] = "\n        initialize_stationary()\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initialize_stationary(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)31361 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initialize_stationary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
31362   PyObject *__pyx_v_complex_step = 0;
31363   int __pyx_lineno = 0;
31364   const char *__pyx_filename = NULL;
31365   int __pyx_clineno = 0;
31366   PyObject *__pyx_r = 0;
31367   __Pyx_RefNannyDeclarations
31368   __Pyx_RefNannySetupContext("initialize_stationary (wrapper)", 0);
31369   {
31370     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_complex_step,0};
31371     PyObject* values[1] = {0};
31372     values[0] = ((PyObject *)Py_False);
31373     if (unlikely(__pyx_kwds)) {
31374       Py_ssize_t kw_args;
31375       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
31376       switch (pos_args) {
31377         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31378         CYTHON_FALLTHROUGH;
31379         case  0: break;
31380         default: goto __pyx_L5_argtuple_error;
31381       }
31382       kw_args = PyDict_Size(__pyx_kwds);
31383       switch (pos_args) {
31384         case  0:
31385         if (kw_args > 0) {
31386           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complex_step);
31387           if (value) { values[0] = value; kw_args--; }
31388         }
31389       }
31390       if (unlikely(kw_args > 0)) {
31391         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_stationary") < 0)) __PYX_ERR(0, 2415, __pyx_L3_error)
31392       }
31393     } else {
31394       switch (PyTuple_GET_SIZE(__pyx_args)) {
31395         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
31396         CYTHON_FALLTHROUGH;
31397         case  0: break;
31398         default: goto __pyx_L5_argtuple_error;
31399       }
31400     }
31401     __pyx_v_complex_step = values[0];
31402   }
31403   goto __pyx_L4_argument_unpacking_done;
31404   __pyx_L5_argtuple_error:;
31405   __Pyx_RaiseArgtupleInvalid("initialize_stationary", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2415, __pyx_L3_error)
31406   __pyx_L3_error:;
31407   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialize_stationary", __pyx_clineno, __pyx_lineno, __pyx_filename);
31408   __Pyx_RefNannyFinishContext();
31409   return NULL;
31410   __pyx_L4_argument_unpacking_done:;
31411   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12initialize_stationary(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), __pyx_v_complex_step);
31412 
31413   /* function exit code */
31414   __Pyx_RefNannyFinishContext();
31415   return __pyx_r;
31416 }
31417 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,PyObject * __pyx_v_complex_step)31418 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_complex_step) {
31419   npy_intp __pyx_v_dim1[1];
31420   npy_intp __pyx_v_dim2[2];
31421   int __pyx_v_i;
31422   int __pyx_v_info;
31423   int __pyx_v_inc;
31424   int __pyx_v_k_states2;
31425   __pyx_t_5numpy_float64_t __pyx_v_asum;
31426   __pyx_t_5numpy_float64_t __pyx_v_tol;
31427   __pyx_t_float_complex __pyx_v_scalar;
31428   __Pyx_memviewslice __pyx_v_ipiv = { 0, 0, { 0 }, { 0 }, { 0 } };
31429   PyObject *__pyx_r = NULL;
31430   __Pyx_RefNannyDeclarations
31431   Py_ssize_t __pyx_t_1;
31432   Py_ssize_t __pyx_t_2;
31433   Py_ssize_t __pyx_t_3;
31434   Py_ssize_t __pyx_t_4;
31435   Py_ssize_t __pyx_t_5;
31436   Py_ssize_t __pyx_t_6;
31437   Py_ssize_t __pyx_t_7;
31438   Py_ssize_t __pyx_t_8;
31439   Py_ssize_t __pyx_t_9;
31440   Py_ssize_t __pyx_t_10;
31441   Py_ssize_t __pyx_t_11;
31442   int __pyx_t_12;
31443   PyObject *__pyx_t_13 = NULL;
31444   __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } };
31445   int __pyx_t_15;
31446   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
31447   int __pyx_t_17;
31448   int __pyx_t_18;
31449   __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } };
31450   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__csolve_discrete_lyapunov __pyx_t_20;
31451   int __pyx_lineno = 0;
31452   const char *__pyx_filename = NULL;
31453   int __pyx_clineno = 0;
31454   __Pyx_RefNannySetupContext("initialize_stationary", 0);
31455 
31456   /* "statsmodels/tsa/statespace/_representation.pyx":2421
31457  *         cdef np.npy_intp dim1[1]
31458  *         cdef np.npy_intp dim2[2]
31459  *         cdef int i, info, inc = 1             # <<<<<<<<<<<<<<
31460  *         cdef int k_states2 = self.k_states**2
31461  *         cdef np.float64_t asum, tol = 1e-9
31462  */
31463   __pyx_v_inc = 1;
31464 
31465   /* "statsmodels/tsa/statespace/_representation.pyx":2422
31466  *         cdef np.npy_intp dim2[2]
31467  *         cdef int i, info, inc = 1
31468  *         cdef int k_states2 = self.k_states**2             # <<<<<<<<<<<<<<
31469  *         cdef np.float64_t asum, tol = 1e-9
31470  *         cdef np.complex64_t scalar
31471  */
31472   __pyx_v_k_states2 = __Pyx_pow_long(((long)__pyx_v_self->k_states), 2);
31473 
31474   /* "statsmodels/tsa/statespace/_representation.pyx":2423
31475  *         cdef int i, info, inc = 1
31476  *         cdef int k_states2 = self.k_states**2
31477  *         cdef np.float64_t asum, tol = 1e-9             # <<<<<<<<<<<<<<
31478  *         cdef np.complex64_t scalar
31479  *         cdef int [::1,:] ipiv
31480  */
31481   __pyx_v_tol = 1e-9;
31482 
31483   /* "statsmodels/tsa/statespace/_representation.pyx":2429
31484  *         # Create selected state covariance matrix
31485  *         cselect_cov(self.k_states, self.k_posdef,
31486  *                                    &self.tmp[0,0],             # <<<<<<<<<<<<<<
31487  *                                    &self.selection[0,0,0],
31488  *                                    &self.state_cov[0,0,0],
31489  */
31490   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2429, __pyx_L1_error)}
31491   __pyx_t_1 = 0;
31492   __pyx_t_2 = 0;
31493 
31494   /* "statsmodels/tsa/statespace/_representation.pyx":2430
31495  *         cselect_cov(self.k_states, self.k_posdef,
31496  *                                    &self.tmp[0,0],
31497  *                                    &self.selection[0,0,0],             # <<<<<<<<<<<<<<
31498  *                                    &self.state_cov[0,0,0],
31499  *                                    &self.selected_state_cov[0,0,0])
31500  */
31501   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2430, __pyx_L1_error)}
31502   __pyx_t_3 = 0;
31503   __pyx_t_4 = 0;
31504   __pyx_t_5 = 0;
31505 
31506   /* "statsmodels/tsa/statespace/_representation.pyx":2431
31507  *                                    &self.tmp[0,0],
31508  *                                    &self.selection[0,0,0],
31509  *                                    &self.state_cov[0,0,0],             # <<<<<<<<<<<<<<
31510  *                                    &self.selected_state_cov[0,0,0])
31511  *
31512  */
31513   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2431, __pyx_L1_error)}
31514   __pyx_t_6 = 0;
31515   __pyx_t_7 = 0;
31516   __pyx_t_8 = 0;
31517 
31518   /* "statsmodels/tsa/statespace/_representation.pyx":2432
31519  *                                    &self.selection[0,0,0],
31520  *                                    &self.state_cov[0,0,0],
31521  *                                    &self.selected_state_cov[0,0,0])             # <<<<<<<<<<<<<<
31522  *
31523  *         # Initial state mean
31524  */
31525   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2432, __pyx_L1_error)}
31526   __pyx_t_9 = 0;
31527   __pyx_t_10 = 0;
31528   __pyx_t_11 = 0;
31529 
31530   /* "statsmodels/tsa/statespace/_representation.pyx":2428
31531  *
31532  *         # Create selected state covariance matrix
31533  *         cselect_cov(self.k_states, self.k_posdef,             # <<<<<<<<<<<<<<
31534  *                                    &self.tmp[0,0],
31535  *                                    &self.selection[0,0,0],
31536  */
31537   (void)(__pyx_f_11statsmodels_3tsa_10statespace_15_representation_cselect_cov(__pyx_v_self->k_states, __pyx_v_self->k_posdef, (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_1)) ) + __pyx_t_2 * __pyx_v_self->tmp.strides[1]) )))), (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->selection.data) + __pyx_t_3)) ) + __pyx_t_4 * __pyx_v_self->selection.strides[1]) ) + __pyx_t_5 * __pyx_v_self->selection.strides[2]) )))), (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->state_cov.data) + __pyx_t_6)) ) + __pyx_t_7 * __pyx_v_self->state_cov.strides[1]) ) + __pyx_t_8 * __pyx_v_self->state_cov.strides[2]) )))), (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->selected_state_cov.data) + __pyx_t_9)) ) + __pyx_t_10 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_11 * __pyx_v_self->selected_state_cov.strides[2]) ))))));
31538 
31539   /* "statsmodels/tsa/statespace/_representation.pyx":2435
31540  *
31541  *         # Initial state mean
31542  *         asum = blas.scasum(&self.k_states, &self.state_intercept[0, 0], &inc)             # <<<<<<<<<<<<<<
31543  *
31544  *         dim1[0] = self.k_states
31545  */
31546   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2435, __pyx_L1_error)}
31547   __pyx_t_11 = 0;
31548   __pyx_t_10 = 0;
31549   __pyx_v_asum = __pyx_f_5scipy_6linalg_11cython_blas_scasum((&__pyx_v_self->k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->state_intercept.data) + __pyx_t_11)) ) + __pyx_t_10 * __pyx_v_self->state_intercept.strides[1]) )))), (&__pyx_v_inc));
31550 
31551   /* "statsmodels/tsa/statespace/_representation.pyx":2437
31552  *         asum = blas.scasum(&self.k_states, &self.state_intercept[0, 0], &inc)
31553  *
31554  *         dim1[0] = self.k_states             # <<<<<<<<<<<<<<
31555  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
31556  *         if asum > tol:
31557  */
31558   __pyx_t_12 = __pyx_v_self->k_states;
31559   (__pyx_v_dim1[0]) = __pyx_t_12;
31560 
31561   /* "statsmodels/tsa/statespace/_representation.pyx":2438
31562  *
31563  *         dim1[0] = self.k_states
31564  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
31565  *         if asum > tol:
31566  *             dim2[0] = self.k_states
31567  */
31568   __pyx_t_13 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2438, __pyx_L1_error)
31569   __Pyx_GOTREF(__pyx_t_13);
31570   __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 2438, __pyx_L1_error)
31571   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
31572   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
31573   __pyx_v_self->initial_state = __pyx_t_14;
31574   __pyx_t_14.memview = NULL;
31575   __pyx_t_14.data = NULL;
31576 
31577   /* "statsmodels/tsa/statespace/_representation.pyx":2439
31578  *         dim1[0] = self.k_states
31579  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
31580  *         if asum > tol:             # <<<<<<<<<<<<<<
31581  *             dim2[0] = self.k_states
31582  *             dim2[1] = self.k_states
31583  */
31584   __pyx_t_15 = ((__pyx_v_asum > __pyx_v_tol) != 0);
31585   if (__pyx_t_15) {
31586 
31587     /* "statsmodels/tsa/statespace/_representation.pyx":2440
31588  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
31589  *         if asum > tol:
31590  *             dim2[0] = self.k_states             # <<<<<<<<<<<<<<
31591  *             dim2[1] = self.k_states
31592  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)
31593  */
31594     __pyx_t_12 = __pyx_v_self->k_states;
31595     (__pyx_v_dim2[0]) = __pyx_t_12;
31596 
31597     /* "statsmodels/tsa/statespace/_representation.pyx":2441
31598  *         if asum > tol:
31599  *             dim2[0] = self.k_states
31600  *             dim2[1] = self.k_states             # <<<<<<<<<<<<<<
31601  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)
31602  *
31603  */
31604     __pyx_t_12 = __pyx_v_self->k_states;
31605     (__pyx_v_dim2[1]) = __pyx_t_12;
31606 
31607     /* "statsmodels/tsa/statespace/_representation.pyx":2442
31608  *             dim2[0] = self.k_states
31609  *             dim2[1] = self.k_states
31610  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)             # <<<<<<<<<<<<<<
31611  *
31612  *             # I - T
31613  */
31614     __pyx_t_13 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_INT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2442, __pyx_L1_error)
31615     __Pyx_GOTREF(__pyx_t_13);
31616     __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 2442, __pyx_L1_error)
31617     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
31618     __pyx_v_ipiv = __pyx_t_16;
31619     __pyx_t_16.memview = NULL;
31620     __pyx_t_16.data = NULL;
31621 
31622     /* "statsmodels/tsa/statespace/_representation.pyx":2445
31623  *
31624  *             # I - T
31625  *             blas.ccopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
31626  *                                             &self.tmp[0,0], &inc)
31627  *             scalar = -1.0
31628  */
31629     if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2445, __pyx_L1_error)}
31630     __pyx_t_10 = 0;
31631     __pyx_t_11 = 0;
31632     __pyx_t_9 = 0;
31633 
31634     /* "statsmodels/tsa/statespace/_representation.pyx":2446
31635  *             # I - T
31636  *             blas.ccopy(&k_states2, &self.transition[0,0,0], &inc,
31637  *                                             &self.tmp[0,0], &inc)             # <<<<<<<<<<<<<<
31638  *             scalar = -1.0
31639  *             blas.cscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
31640  */
31641     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2446, __pyx_L1_error)}
31642     __pyx_t_8 = 0;
31643     __pyx_t_7 = 0;
31644 
31645     /* "statsmodels/tsa/statespace/_representation.pyx":2445
31646  *
31647  *             # I - T
31648  *             blas.ccopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
31649  *                                             &self.tmp[0,0], &inc)
31650  *             scalar = -1.0
31651  */
31652     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_k_states2), (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transition.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_9 * __pyx_v_self->transition.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
31653 
31654     /* "statsmodels/tsa/statespace/_representation.pyx":2447
31655  *             blas.ccopy(&k_states2, &self.transition[0,0,0], &inc,
31656  *                                             &self.tmp[0,0], &inc)
31657  *             scalar = -1.0             # <<<<<<<<<<<<<<
31658  *             blas.cscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
31659  *             for i in range(self.k_states):
31660  */
31661     __pyx_v_scalar = __pyx_t_float_complex_from_parts(-1.0, 0);
31662 
31663     /* "statsmodels/tsa/statespace/_representation.pyx":2448
31664  *                                             &self.tmp[0,0], &inc)
31665  *             scalar = -1.0
31666  *             blas.cscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)             # <<<<<<<<<<<<<<
31667  *             for i in range(self.k_states):
31668  *                 self.tmp[i, i] = self.tmp[i, i] + 1
31669  */
31670     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2448, __pyx_L1_error)}
31671     __pyx_t_7 = 0;
31672     __pyx_t_8 = 0;
31673     __pyx_f_5scipy_6linalg_11cython_blas_cscal((&__pyx_v_k_states2), (&__pyx_v_scalar), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
31674 
31675     /* "statsmodels/tsa/statespace/_representation.pyx":2449
31676  *             scalar = -1.0
31677  *             blas.cscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
31678  *             for i in range(self.k_states):             # <<<<<<<<<<<<<<
31679  *                 self.tmp[i, i] = self.tmp[i, i] + 1
31680  *
31681  */
31682     __pyx_t_12 = __pyx_v_self->k_states;
31683     __pyx_t_17 = __pyx_t_12;
31684     for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
31685       __pyx_v_i = __pyx_t_18;
31686 
31687       /* "statsmodels/tsa/statespace/_representation.pyx":2450
31688  *             blas.cscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
31689  *             for i in range(self.k_states):
31690  *                 self.tmp[i, i] = self.tmp[i, i] + 1             # <<<<<<<<<<<<<<
31691  *
31692  *             # c
31693  */
31694       if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2450, __pyx_L1_error)}
31695       __pyx_t_8 = __pyx_v_i;
31696       __pyx_t_7 = __pyx_v_i;
31697       if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2450, __pyx_L1_error)}
31698       __pyx_t_9 = __pyx_v_i;
31699       __pyx_t_11 = __pyx_v_i;
31700       *((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_9)) ) + __pyx_t_11 * __pyx_v_self->tmp.strides[1]) )) = __Pyx_c_sum_float((*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) ))), __pyx_t_float_complex_from_parts(1, 0));
31701     }
31702 
31703     /* "statsmodels/tsa/statespace/_representation.pyx":2453
31704  *
31705  *             # c
31706  *             blas.ccopy(&self.k_states, &self.state_intercept[0,0], &inc,             # <<<<<<<<<<<<<<
31707  *                                                 &self.initial_state[0], &inc)
31708  *
31709  */
31710     if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2453, __pyx_L1_error)}
31711     __pyx_t_7 = 0;
31712     __pyx_t_8 = 0;
31713 
31714     /* "statsmodels/tsa/statespace/_representation.pyx":2454
31715  *             # c
31716  *             blas.ccopy(&self.k_states, &self.state_intercept[0,0], &inc,
31717  *                                                 &self.initial_state[0], &inc)             # <<<<<<<<<<<<<<
31718  *
31719  *             # Solve (I - T) x = c
31720  */
31721     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2454, __pyx_L1_error)}
31722     __pyx_t_11 = 0;
31723 
31724     /* "statsmodels/tsa/statespace/_representation.pyx":2453
31725  *
31726  *             # c
31727  *             blas.ccopy(&self.k_states, &self.state_intercept[0,0], &inc,             # <<<<<<<<<<<<<<
31728  *                                                 &self.initial_state[0], &inc)
31729  *
31730  */
31731     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->state_intercept.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->state_intercept.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_11 * __pyx_v_self->initial_state.strides[0]) )))), (&__pyx_v_inc));
31732 
31733     /* "statsmodels/tsa/statespace/_representation.pyx":2457
31734  *
31735  *             # Solve (I - T) x = c
31736  *             lapack.cgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
31737  *                                    &ipiv[0, 0], &info)
31738  *             lapack.cgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
31739  */
31740     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2457, __pyx_L1_error)}
31741     __pyx_t_11 = 0;
31742     __pyx_t_8 = 0;
31743 
31744     /* "statsmodels/tsa/statespace/_representation.pyx":2458
31745  *             # Solve (I - T) x = c
31746  *             lapack.cgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
31747  *                                    &ipiv[0, 0], &info)             # <<<<<<<<<<<<<<
31748  *             lapack.cgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
31749  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
31750  */
31751     __pyx_t_7 = 0;
31752     __pyx_t_9 = 0;
31753 
31754     /* "statsmodels/tsa/statespace/_representation.pyx":2457
31755  *
31756  *             # Solve (I - T) x = c
31757  *             lapack.cgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
31758  *                                    &ipiv[0, 0], &info)
31759  *             lapack.cgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
31760  */
31761     __pyx_f_5scipy_6linalg_13cython_lapack_cgetrf((&__pyx_v_self->k_states), (&__pyx_v_self->k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_11)) ) + __pyx_t_8 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_self->k_states), (&(*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_ipiv.data) + __pyx_t_7)) ) + __pyx_t_9 * __pyx_v_ipiv.strides[1]) )))), (&__pyx_v_info));
31762 
31763     /* "statsmodels/tsa/statespace/_representation.pyx":2459
31764  *             lapack.cgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
31765  *                                    &ipiv[0, 0], &info)
31766  *             lapack.cgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
31767  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
31768  *
31769  */
31770     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2459, __pyx_L1_error)}
31771     __pyx_t_9 = 0;
31772     __pyx_t_7 = 0;
31773 
31774     /* "statsmodels/tsa/statespace/_representation.pyx":2460
31775  *                                    &ipiv[0, 0], &info)
31776  *             lapack.cgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
31777  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)             # <<<<<<<<<<<<<<
31778  *
31779  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
31780  */
31781     __pyx_t_8 = 0;
31782     __pyx_t_11 = 0;
31783     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2460, __pyx_L1_error)}
31784     __pyx_t_10 = 0;
31785 
31786     /* "statsmodels/tsa/statespace/_representation.pyx":2459
31787  *             lapack.cgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
31788  *                                    &ipiv[0, 0], &info)
31789  *             lapack.cgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
31790  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
31791  *
31792  */
31793     __pyx_f_5scipy_6linalg_13cython_lapack_cgetrs(((char *)"N"), (&__pyx_v_self->k_states), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_9)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_self->k_states), (&(*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_ipiv.data) + __pyx_t_8)) ) + __pyx_t_11 * __pyx_v_ipiv.strides[1]) )))), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_10 * __pyx_v_self->initial_state.strides[0]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
31794 
31795     /* "statsmodels/tsa/statespace/_representation.pyx":2439
31796  *         dim1[0] = self.k_states
31797  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX64, FORTRAN)
31798  *         if asum > tol:             # <<<<<<<<<<<<<<
31799  *             dim2[0] = self.k_states
31800  *             dim2[1] = self.k_states
31801  */
31802   }
31803 
31804   /* "statsmodels/tsa/statespace/_representation.pyx":2462
31805  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
31806  *
31807  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
31808  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)
31809  *
31810  */
31811   __pyx_t_12 = __pyx_v_self->k_states;
31812   (__pyx_v_dim2[0]) = __pyx_t_12;
31813   __pyx_t_12 = __pyx_v_self->k_states;
31814   (__pyx_v_dim2[1]) = __pyx_t_12;
31815 
31816   /* "statsmodels/tsa/statespace/_representation.pyx":2463
31817  *
31818  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
31819  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX64, FORTRAN)             # <<<<<<<<<<<<<<
31820  *
31821  *         # Create a copy of the transition matrix (to avoid overwriting it)
31822  */
31823   __pyx_t_13 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX64, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2463, __pyx_L1_error)
31824   __Pyx_GOTREF(__pyx_t_13);
31825   __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 2463, __pyx_L1_error)
31826   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
31827   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
31828   __pyx_v_self->initial_state_cov = __pyx_t_19;
31829   __pyx_t_19.memview = NULL;
31830   __pyx_t_19.data = NULL;
31831 
31832   /* "statsmodels/tsa/statespace/_representation.pyx":2466
31833  *
31834  *         # Create a copy of the transition matrix (to avoid overwriting it)
31835  *         blas.ccopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
31836  *                                    &self.tmp[0,0], &inc)
31837  *
31838  */
31839   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2466, __pyx_L1_error)}
31840   __pyx_t_10 = 0;
31841   __pyx_t_11 = 0;
31842   __pyx_t_8 = 0;
31843 
31844   /* "statsmodels/tsa/statespace/_representation.pyx":2467
31845  *         # Create a copy of the transition matrix (to avoid overwriting it)
31846  *         blas.ccopy(&k_states2, &self.transition[0,0,0], &inc,
31847  *                                    &self.tmp[0,0], &inc)             # <<<<<<<<<<<<<<
31848  *
31849  *         # Copy the selected state covariance to the initial state covariance
31850  */
31851   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2467, __pyx_L1_error)}
31852   __pyx_t_7 = 0;
31853   __pyx_t_9 = 0;
31854 
31855   /* "statsmodels/tsa/statespace/_representation.pyx":2466
31856  *
31857  *         # Create a copy of the transition matrix (to avoid overwriting it)
31858  *         blas.ccopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
31859  *                                    &self.tmp[0,0], &inc)
31860  *
31861  */
31862   __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_k_states2), (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transition.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_8 * __pyx_v_self->transition.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_7)) ) + __pyx_t_9 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
31863 
31864   /* "statsmodels/tsa/statespace/_representation.pyx":2471
31865  *         # Copy the selected state covariance to the initial state covariance
31866  *         # (it will be overwritten with the appropriate matrix)
31867  *         blas.ccopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,             # <<<<<<<<<<<<<<
31868  *                                    &self.initial_state_cov[0,0], &inc)
31869  *
31870  */
31871   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2471, __pyx_L1_error)}
31872   __pyx_t_9 = 0;
31873   __pyx_t_7 = 0;
31874   __pyx_t_8 = 0;
31875 
31876   /* "statsmodels/tsa/statespace/_representation.pyx":2472
31877  *         # (it will be overwritten with the appropriate matrix)
31878  *         blas.ccopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,
31879  *                                    &self.initial_state_cov[0,0], &inc)             # <<<<<<<<<<<<<<
31880  *
31881  *         # Solve the discrete Lyapunov equation to the get initial state
31882  */
31883   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2472, __pyx_L1_error)}
31884   __pyx_t_11 = 0;
31885   __pyx_t_10 = 0;
31886 
31887   /* "statsmodels/tsa/statespace/_representation.pyx":2471
31888  *         # Copy the selected state covariance to the initial state covariance
31889  *         # (it will be overwritten with the appropriate matrix)
31890  *         blas.ccopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,             # <<<<<<<<<<<<<<
31891  *                                    &self.initial_state_cov[0,0], &inc)
31892  *
31893  */
31894   __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_k_states2), (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->selected_state_cov.data) + __pyx_t_9)) ) + __pyx_t_7 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_8 * __pyx_v_self->selected_state_cov.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->initial_state_cov.data) + __pyx_t_11)) ) + __pyx_t_10 * __pyx_v_self->initial_state_cov.strides[1]) )))), (&__pyx_v_inc));
31895 
31896   /* "statsmodels/tsa/statespace/_representation.pyx":2476
31897  *         # Solve the discrete Lyapunov equation to the get initial state
31898  *         # covariance matrix
31899  *         tools._csolve_discrete_lyapunov(&self.tmp[0,0], &self.initial_state_cov[0,0], self.k_states, complex_step)             # <<<<<<<<<<<<<<
31900  *
31901  *         self.initial_diffuse_state_cov[:] = 0
31902  */
31903   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2476, __pyx_L1_error)}
31904   __pyx_t_10 = 0;
31905   __pyx_t_11 = 0;
31906   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2476, __pyx_L1_error)}
31907   __pyx_t_8 = 0;
31908   __pyx_t_7 = 0;
31909   __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_complex_step); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2476, __pyx_L1_error)
31910   __pyx_t_20.__pyx_n = 1;
31911   __pyx_t_20.complex_step = __pyx_t_12;
31912   __pyx_f_11statsmodels_3tsa_10statespace_6_tools__csolve_discrete_lyapunov((&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->tmp.strides[1]) )))), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->initial_state_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->initial_state_cov.strides[1]) )))), __pyx_v_self->k_states, &__pyx_t_20); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2476, __pyx_L1_error)
31913 
31914   /* "statsmodels/tsa/statespace/_representation.pyx":2478
31915  *         tools._csolve_discrete_lyapunov(&self.tmp[0,0], &self.initial_state_cov[0,0], self.k_states, complex_step)
31916  *
31917  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
31918  *
31919  *         self.initialized = True
31920  */
31921   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2478, __pyx_L1_error)}
31922   {
31923       __pyx_t_float_complex __pyx_temp_scalar = __pyx_t_float_complex_from_parts(0, 0);
31924       {
31925           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
31926           Py_ssize_t __pyx_temp_idx;
31927           __pyx_t_float_complex *__pyx_temp_pointer = (__pyx_t_float_complex *) __pyx_v_self->initial_diffuse_state_cov.data;
31928           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
31929             *((__pyx_t_float_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
31930             __pyx_temp_pointer += 1;
31931           }
31932       }
31933   }
31934 
31935   /* "statsmodels/tsa/statespace/_representation.pyx":2480
31936  *         self.initial_diffuse_state_cov[:] = 0
31937  *
31938  *         self.initialized = True             # <<<<<<<<<<<<<<
31939  *
31940  *     def __iter__(self):
31941  */
31942   __pyx_v_self->initialized = 1;
31943 
31944   /* "statsmodels/tsa/statespace/_representation.pyx":2415
31945  *     # ## Initialize: stationary process
31946  *     # *Note:* see Durbin and Koopman section 5.6.2
31947  *     def initialize_stationary(self, complex_step=False):             # <<<<<<<<<<<<<<
31948  *         """
31949  *         initialize_stationary()
31950  */
31951 
31952   /* function exit code */
31953   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31954   goto __pyx_L0;
31955   __pyx_L1_error:;
31956   __Pyx_XDECREF(__pyx_t_13);
31957   __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
31958   __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
31959   __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
31960   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialize_stationary", __pyx_clineno, __pyx_lineno, __pyx_filename);
31961   __pyx_r = NULL;
31962   __pyx_L0:;
31963   __PYX_XDEC_MEMVIEW(&__pyx_v_ipiv, 1);
31964   __Pyx_XGIVEREF(__pyx_r);
31965   __Pyx_RefNannyFinishContext();
31966   return __pyx_r;
31967 }
31968 
31969 /* "statsmodels/tsa/statespace/_representation.pyx":2482
31970  *         self.initialized = True
31971  *
31972  *     def __iter__(self):             # <<<<<<<<<<<<<<
31973  *         return self
31974  *
31975  */
31976 
31977 /* Python wrapper */
31978 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15__iter__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15__iter__(PyObject * __pyx_v_self)31979 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15__iter__(PyObject *__pyx_v_self) {
31980   PyObject *__pyx_r = 0;
31981   __Pyx_RefNannyDeclarations
31982   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
31983   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14__iter__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
31984 
31985   /* function exit code */
31986   __Pyx_RefNannyFinishContext();
31987   return __pyx_r;
31988 }
31989 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)31990 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
31991   PyObject *__pyx_r = NULL;
31992   __Pyx_RefNannyDeclarations
31993   __Pyx_RefNannySetupContext("__iter__", 0);
31994 
31995   /* "statsmodels/tsa/statespace/_representation.pyx":2483
31996  *
31997  *     def __iter__(self):
31998  *         return self             # <<<<<<<<<<<<<<
31999  *
32000  *     def __next__(self):
32001  */
32002   __Pyx_XDECREF(__pyx_r);
32003   __Pyx_INCREF(((PyObject *)__pyx_v_self));
32004   __pyx_r = ((PyObject *)__pyx_v_self);
32005   goto __pyx_L0;
32006 
32007   /* "statsmodels/tsa/statespace/_representation.pyx":2482
32008  *         self.initialized = True
32009  *
32010  *     def __iter__(self):             # <<<<<<<<<<<<<<
32011  *         return self
32012  *
32013  */
32014 
32015   /* function exit code */
32016   __pyx_L0:;
32017   __Pyx_XGIVEREF(__pyx_r);
32018   __Pyx_RefNannyFinishContext();
32019   return __pyx_r;
32020 }
32021 
32022 /* "statsmodels/tsa/statespace/_representation.pyx":2485
32023  *         return self
32024  *
32025  *     def __next__(self):             # <<<<<<<<<<<<<<
32026  *         """
32027  *         Advance to the next location
32028  */
32029 
32030 /* Python wrapper */
32031 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17__next__(PyObject *__pyx_v_self); /*proto*/
32032 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__[] = "\n        Advance to the next location\n        ";
32033 #if CYTHON_COMPILING_IN_CPYTHON
32034 struct wrapperbase __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__;
32035 #endif
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17__next__(PyObject * __pyx_v_self)32036 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17__next__(PyObject *__pyx_v_self) {
32037   PyObject *__pyx_r = 0;
32038   __Pyx_RefNannyDeclarations
32039   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
32040   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
32041 
32042   /* function exit code */
32043   __Pyx_RefNannyFinishContext();
32044   return __pyx_r;
32045 }
32046 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)32047 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
32048   PyObject *__pyx_r = NULL;
32049   __Pyx_RefNannyDeclarations
32050   int __pyx_t_1;
32051   PyObject *__pyx_t_2 = NULL;
32052   int __pyx_lineno = 0;
32053   const char *__pyx_filename = NULL;
32054   int __pyx_clineno = 0;
32055   __Pyx_RefNannySetupContext("__next__", 0);
32056 
32057   /* "statsmodels/tsa/statespace/_representation.pyx":2489
32058  *         Advance to the next location
32059  *         """
32060  *         if self.t >= self.nobs:             # <<<<<<<<<<<<<<
32061  *             raise StopIteration
32062  *         else:
32063  */
32064   __pyx_t_1 = ((__pyx_v_self->t >= __pyx_v_self->nobs) != 0);
32065   if (unlikely(__pyx_t_1)) {
32066 
32067     /* "statsmodels/tsa/statespace/_representation.pyx":2490
32068  *         """
32069  *         if self.t >= self.nobs:
32070  *             raise StopIteration             # <<<<<<<<<<<<<<
32071  *         else:
32072  *             self.seek(self.t+1, 0, 0)
32073  */
32074     __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
32075     __PYX_ERR(0, 2490, __pyx_L1_error)
32076 
32077     /* "statsmodels/tsa/statespace/_representation.pyx":2489
32078  *         Advance to the next location
32079  *         """
32080  *         if self.t >= self.nobs:             # <<<<<<<<<<<<<<
32081  *             raise StopIteration
32082  *         else:
32083  */
32084   }
32085 
32086   /* "statsmodels/tsa/statespace/_representation.pyx":2492
32087  *             raise StopIteration
32088  *         else:
32089  *             self.seek(self.t+1, 0, 0)             # <<<<<<<<<<<<<<
32090  *
32091  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):
32092  */
32093   /*else*/ {
32094     __pyx_t_2 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->seek(__pyx_v_self, (__pyx_v_self->t + 1), 0, 0, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2492, __pyx_L1_error)
32095     __Pyx_GOTREF(__pyx_t_2);
32096     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
32097   }
32098 
32099   /* "statsmodels/tsa/statespace/_representation.pyx":2485
32100  *         return self
32101  *
32102  *     def __next__(self):             # <<<<<<<<<<<<<<
32103  *         """
32104  *         Advance to the next location
32105  */
32106 
32107   /* function exit code */
32108   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32109   goto __pyx_L0;
32110   __pyx_L1_error:;
32111   __Pyx_XDECREF(__pyx_t_2);
32112   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32113   __pyx_r = NULL;
32114   __pyx_L0:;
32115   __Pyx_XGIVEREF(__pyx_r);
32116   __Pyx_RefNannyFinishContext();
32117   return __pyx_r;
32118 }
32119 
32120 /* "statsmodels/tsa/statespace/_representation.pyx":2494
32121  *             self.seek(self.t+1, 0, 0)
32122  *
32123  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):             # <<<<<<<<<<<<<<
32124  *         self._previous_t = self.t
32125  *
32126  */
32127 
32128 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,int __pyx_skip_dispatch,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek * __pyx_optional_args)32129 static PyObject *__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek *__pyx_optional_args) {
32130   unsigned int __pyx_v_reset = ((unsigned int)0);
32131   int __pyx_v_k_endog;
32132   int __pyx_v_design_t;
32133   int __pyx_v_obs_intercept_t;
32134   int __pyx_v_obs_cov_t;
32135   int __pyx_v_transition_t;
32136   int __pyx_v_state_intercept_t;
32137   int __pyx_v_selection_t;
32138   int __pyx_v_state_cov_t;
32139   PyObject *__pyx_r = NULL;
32140   __Pyx_RefNannyDeclarations
32141   PyObject *__pyx_t_1 = NULL;
32142   PyObject *__pyx_t_2 = NULL;
32143   PyObject *__pyx_t_3 = NULL;
32144   PyObject *__pyx_t_4 = NULL;
32145   PyObject *__pyx_t_5 = NULL;
32146   PyObject *__pyx_t_6 = NULL;
32147   PyObject *__pyx_t_7 = NULL;
32148   PyObject *__pyx_t_8 = NULL;
32149   int __pyx_t_9;
32150   PyObject *__pyx_t_10 = NULL;
32151   int __pyx_t_11;
32152   Py_ssize_t __pyx_t_12;
32153   size_t __pyx_t_13;
32154   Py_ssize_t __pyx_t_14;
32155   Py_ssize_t __pyx_t_15;
32156   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform __pyx_t_16;
32157   int __pyx_lineno = 0;
32158   const char *__pyx_filename = NULL;
32159   int __pyx_clineno = 0;
32160   __Pyx_RefNannySetupContext("seek", 0);
32161   if (__pyx_optional_args) {
32162     if (__pyx_optional_args->__pyx_n > 0) {
32163       __pyx_v_reset = __pyx_optional_args->reset;
32164     }
32165   }
32166   /* Check if called by wrapper */
32167   if (unlikely(__pyx_skip_dispatch)) ;
32168   /* Check if overridden in Python */
32169   else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
32170     #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
32171     static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
32172     if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
32173       PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
32174       #endif
32175       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error)
32176       __Pyx_GOTREF(__pyx_t_1);
32177       if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19seek)) {
32178         __Pyx_XDECREF(__pyx_r);
32179         __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2494, __pyx_L1_error)
32180         __Pyx_GOTREF(__pyx_t_3);
32181         __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_transform_diagonalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2494, __pyx_L1_error)
32182         __Pyx_GOTREF(__pyx_t_4);
32183         __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_transform_generalized_collapse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2494, __pyx_L1_error)
32184         __Pyx_GOTREF(__pyx_t_5);
32185         __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_reset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2494, __pyx_L1_error)
32186         __Pyx_GOTREF(__pyx_t_6);
32187         __Pyx_INCREF(__pyx_t_1);
32188         __pyx_t_7 = __pyx_t_1; __pyx_t_8 = NULL;
32189         __pyx_t_9 = 0;
32190         if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
32191           __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
32192           if (likely(__pyx_t_8)) {
32193             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
32194             __Pyx_INCREF(__pyx_t_8);
32195             __Pyx_INCREF(function);
32196             __Pyx_DECREF_SET(__pyx_t_7, function);
32197             __pyx_t_9 = 1;
32198           }
32199         }
32200         #if CYTHON_FAST_PYCALL
32201         if (PyFunction_Check(__pyx_t_7)) {
32202           PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
32203           __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2494, __pyx_L1_error)
32204           __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
32205           __Pyx_GOTREF(__pyx_t_2);
32206           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
32207           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32208           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
32209           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32210         } else
32211         #endif
32212         #if CYTHON_FAST_PYCCALL
32213         if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
32214           PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
32215           __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2494, __pyx_L1_error)
32216           __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
32217           __Pyx_GOTREF(__pyx_t_2);
32218           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
32219           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
32220           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
32221           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32222         } else
32223         #endif
32224         {
32225           __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2494, __pyx_L1_error)
32226           __Pyx_GOTREF(__pyx_t_10);
32227           if (__pyx_t_8) {
32228             __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
32229           }
32230           __Pyx_GIVEREF(__pyx_t_3);
32231           PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
32232           __Pyx_GIVEREF(__pyx_t_4);
32233           PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
32234           __Pyx_GIVEREF(__pyx_t_5);
32235           PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
32236           __Pyx_GIVEREF(__pyx_t_6);
32237           PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
32238           __pyx_t_3 = 0;
32239           __pyx_t_4 = 0;
32240           __pyx_t_5 = 0;
32241           __pyx_t_6 = 0;
32242           __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2494, __pyx_L1_error)
32243           __Pyx_GOTREF(__pyx_t_2);
32244           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
32245         }
32246         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
32247         __pyx_r = __pyx_t_2;
32248         __pyx_t_2 = 0;
32249         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32250         goto __pyx_L0;
32251       }
32252       #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
32253       __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
32254       __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
32255       if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
32256         __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
32257       }
32258       #endif
32259       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32260       #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
32261     }
32262     #endif
32263   }
32264 
32265   /* "statsmodels/tsa/statespace/_representation.pyx":2495
32266  *
32267  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):
32268  *         self._previous_t = self.t             # <<<<<<<<<<<<<<
32269  *
32270  *         # Set the global time indicator, if valid
32271  */
32272   __pyx_t_9 = __pyx_v_self->t;
32273   __pyx_v_self->_previous_t = __pyx_t_9;
32274 
32275   /* "statsmodels/tsa/statespace/_representation.pyx":2498
32276  *
32277  *         # Set the global time indicator, if valid
32278  *         if t >= self.nobs:             # <<<<<<<<<<<<<<
32279  *             raise IndexError("Observation index out of range")
32280  *         self.t = t
32281  */
32282   __pyx_t_11 = ((__pyx_v_t >= __pyx_v_self->nobs) != 0);
32283   if (unlikely(__pyx_t_11)) {
32284 
32285     /* "statsmodels/tsa/statespace/_representation.pyx":2499
32286  *         # Set the global time indicator, if valid
32287  *         if t >= self.nobs:
32288  *             raise IndexError("Observation index out of range")             # <<<<<<<<<<<<<<
32289  *         self.t = t
32290  *
32291  */
32292     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2499, __pyx_L1_error)
32293     __Pyx_GOTREF(__pyx_t_1);
32294     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
32295     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32296     __PYX_ERR(0, 2499, __pyx_L1_error)
32297 
32298     /* "statsmodels/tsa/statespace/_representation.pyx":2498
32299  *
32300  *         # Set the global time indicator, if valid
32301  *         if t >= self.nobs:             # <<<<<<<<<<<<<<
32302  *             raise IndexError("Observation index out of range")
32303  *         self.t = t
32304  */
32305   }
32306 
32307   /* "statsmodels/tsa/statespace/_representation.pyx":2500
32308  *         if t >= self.nobs:
32309  *             raise IndexError("Observation index out of range")
32310  *         self.t = t             # <<<<<<<<<<<<<<
32311  *
32312  *         # Indices for possibly time-varying arrays
32313  */
32314   __pyx_v_self->t = __pyx_v_t;
32315 
32316   /* "statsmodels/tsa/statespace/_representation.pyx":2505
32317  *         cdef:
32318  *             int k_endog
32319  *             int design_t = 0             # <<<<<<<<<<<<<<
32320  *             int obs_intercept_t = 0
32321  *             int obs_cov_t = 0
32322  */
32323   __pyx_v_design_t = 0;
32324 
32325   /* "statsmodels/tsa/statespace/_representation.pyx":2506
32326  *             int k_endog
32327  *             int design_t = 0
32328  *             int obs_intercept_t = 0             # <<<<<<<<<<<<<<
32329  *             int obs_cov_t = 0
32330  *             int transition_t = 0
32331  */
32332   __pyx_v_obs_intercept_t = 0;
32333 
32334   /* "statsmodels/tsa/statespace/_representation.pyx":2507
32335  *             int design_t = 0
32336  *             int obs_intercept_t = 0
32337  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
32338  *             int transition_t = 0
32339  *             int state_intercept_t = 0
32340  */
32341   __pyx_v_obs_cov_t = 0;
32342 
32343   /* "statsmodels/tsa/statespace/_representation.pyx":2508
32344  *             int obs_intercept_t = 0
32345  *             int obs_cov_t = 0
32346  *             int transition_t = 0             # <<<<<<<<<<<<<<
32347  *             int state_intercept_t = 0
32348  *             int selection_t = 0
32349  */
32350   __pyx_v_transition_t = 0;
32351 
32352   /* "statsmodels/tsa/statespace/_representation.pyx":2509
32353  *             int obs_cov_t = 0
32354  *             int transition_t = 0
32355  *             int state_intercept_t = 0             # <<<<<<<<<<<<<<
32356  *             int selection_t = 0
32357  *             int state_cov_t = 0
32358  */
32359   __pyx_v_state_intercept_t = 0;
32360 
32361   /* "statsmodels/tsa/statespace/_representation.pyx":2510
32362  *             int transition_t = 0
32363  *             int state_intercept_t = 0
32364  *             int selection_t = 0             # <<<<<<<<<<<<<<
32365  *             int state_cov_t = 0
32366  *
32367  */
32368   __pyx_v_selection_t = 0;
32369 
32370   /* "statsmodels/tsa/statespace/_representation.pyx":2511
32371  *             int state_intercept_t = 0
32372  *             int selection_t = 0
32373  *             int state_cov_t = 0             # <<<<<<<<<<<<<<
32374  *
32375  *         # Get indices for possibly time-varying arrays
32376  */
32377   __pyx_v_state_cov_t = 0;
32378 
32379   /* "statsmodels/tsa/statespace/_representation.pyx":2514
32380  *
32381  *         # Get indices for possibly time-varying arrays
32382  *         if not self.time_invariant:             # <<<<<<<<<<<<<<
32383  *             if self.design.shape[2] > 1:             design_t = t
32384  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
32385  */
32386   __pyx_t_11 = ((!(__pyx_v_self->time_invariant != 0)) != 0);
32387   if (__pyx_t_11) {
32388 
32389     /* "statsmodels/tsa/statespace/_representation.pyx":2515
32390  *         # Get indices for possibly time-varying arrays
32391  *         if not self.time_invariant:
32392  *             if self.design.shape[2] > 1:             design_t = t             # <<<<<<<<<<<<<<
32393  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
32394  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
32395  */
32396     if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2515, __pyx_L1_error)}
32397     __pyx_t_11 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
32398     if (__pyx_t_11) {
32399       __pyx_v_design_t = __pyx_v_t;
32400     }
32401 
32402     /* "statsmodels/tsa/statespace/_representation.pyx":2516
32403  *         if not self.time_invariant:
32404  *             if self.design.shape[2] > 1:             design_t = t
32405  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t             # <<<<<<<<<<<<<<
32406  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
32407  *             if self.transition.shape[2] > 1:         transition_t = t
32408  */
32409     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2516, __pyx_L1_error)}
32410     __pyx_t_11 = (((__pyx_v_self->obs_intercept.shape[1]) > 1) != 0);
32411     if (__pyx_t_11) {
32412       __pyx_v_obs_intercept_t = __pyx_v_t;
32413     }
32414 
32415     /* "statsmodels/tsa/statespace/_representation.pyx":2517
32416  *             if self.design.shape[2] > 1:             design_t = t
32417  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
32418  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t             # <<<<<<<<<<<<<<
32419  *             if self.transition.shape[2] > 1:         transition_t = t
32420  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
32421  */
32422     if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2517, __pyx_L1_error)}
32423     __pyx_t_11 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
32424     if (__pyx_t_11) {
32425       __pyx_v_obs_cov_t = __pyx_v_t;
32426     }
32427 
32428     /* "statsmodels/tsa/statespace/_representation.pyx":2518
32429  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
32430  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
32431  *             if self.transition.shape[2] > 1:         transition_t = t             # <<<<<<<<<<<<<<
32432  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
32433  *             if self.selection.shape[2] > 1:          selection_t = t
32434  */
32435     if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2518, __pyx_L1_error)}
32436     __pyx_t_11 = (((__pyx_v_self->transition.shape[2]) > 1) != 0);
32437     if (__pyx_t_11) {
32438       __pyx_v_transition_t = __pyx_v_t;
32439     }
32440 
32441     /* "statsmodels/tsa/statespace/_representation.pyx":2519
32442  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
32443  *             if self.transition.shape[2] > 1:         transition_t = t
32444  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t             # <<<<<<<<<<<<<<
32445  *             if self.selection.shape[2] > 1:          selection_t = t
32446  *             if self.state_cov.shape[2] > 1:          state_cov_t = t
32447  */
32448     if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2519, __pyx_L1_error)}
32449     __pyx_t_11 = (((__pyx_v_self->state_intercept.shape[1]) > 1) != 0);
32450     if (__pyx_t_11) {
32451       __pyx_v_state_intercept_t = __pyx_v_t;
32452     }
32453 
32454     /* "statsmodels/tsa/statespace/_representation.pyx":2520
32455  *             if self.transition.shape[2] > 1:         transition_t = t
32456  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
32457  *             if self.selection.shape[2] > 1:          selection_t = t             # <<<<<<<<<<<<<<
32458  *             if self.state_cov.shape[2] > 1:          state_cov_t = t
32459  *
32460  */
32461     if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2520, __pyx_L1_error)}
32462     __pyx_t_11 = (((__pyx_v_self->selection.shape[2]) > 1) != 0);
32463     if (__pyx_t_11) {
32464       __pyx_v_selection_t = __pyx_v_t;
32465     }
32466 
32467     /* "statsmodels/tsa/statespace/_representation.pyx":2521
32468  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
32469  *             if self.selection.shape[2] > 1:          selection_t = t
32470  *             if self.state_cov.shape[2] > 1:          state_cov_t = t             # <<<<<<<<<<<<<<
32471  *
32472  *         # Initialize object-level pointers to statespace arrays
32473  */
32474     if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2521, __pyx_L1_error)}
32475     __pyx_t_11 = (((__pyx_v_self->state_cov.shape[2]) > 1) != 0);
32476     if (__pyx_t_11) {
32477       __pyx_v_state_cov_t = __pyx_v_t;
32478     }
32479 
32480     /* "statsmodels/tsa/statespace/_representation.pyx":2514
32481  *
32482  *         # Get indices for possibly time-varying arrays
32483  *         if not self.time_invariant:             # <<<<<<<<<<<<<<
32484  *             if self.design.shape[2] > 1:             design_t = t
32485  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
32486  */
32487   }
32488 
32489   /* "statsmodels/tsa/statespace/_representation.pyx":2524
32490  *
32491  *         # Initialize object-level pointers to statespace arrays
32492  *         self._obs = &self.obs[0, t]             # <<<<<<<<<<<<<<
32493  *         self._design = &self.design[0, 0, design_t]
32494  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
32495  */
32496   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2524, __pyx_L1_error)}
32497   __pyx_t_12 = 0;
32498   __pyx_t_13 = __pyx_v_t;
32499   __pyx_v_self->_obs = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->obs.data) + __pyx_t_12)) ) + __pyx_t_13 * __pyx_v_self->obs.strides[1]) ))));
32500 
32501   /* "statsmodels/tsa/statespace/_representation.pyx":2525
32502  *         # Initialize object-level pointers to statespace arrays
32503  *         self._obs = &self.obs[0, t]
32504  *         self._design = &self.design[0, 0, design_t]             # <<<<<<<<<<<<<<
32505  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
32506  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
32507  */
32508   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2525, __pyx_L1_error)}
32509   __pyx_t_12 = 0;
32510   __pyx_t_14 = 0;
32511   __pyx_t_15 = __pyx_v_design_t;
32512   __pyx_v_self->_design = (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->design.data) + __pyx_t_12)) ) + __pyx_t_14 * __pyx_v_self->design.strides[1]) ) + __pyx_t_15 * __pyx_v_self->design.strides[2]) ))));
32513 
32514   /* "statsmodels/tsa/statespace/_representation.pyx":2526
32515  *         self._obs = &self.obs[0, t]
32516  *         self._design = &self.design[0, 0, design_t]
32517  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]             # <<<<<<<<<<<<<<
32518  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
32519  *         self._transition = &self.transition[0, 0, transition_t]
32520  */
32521   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2526, __pyx_L1_error)}
32522   __pyx_t_15 = 0;
32523   __pyx_t_14 = __pyx_v_obs_intercept_t;
32524   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->obs_intercept.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->obs_intercept.strides[1]) ))));
32525 
32526   /* "statsmodels/tsa/statespace/_representation.pyx":2527
32527  *         self._design = &self.design[0, 0, design_t]
32528  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
32529  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]             # <<<<<<<<<<<<<<
32530  *         self._transition = &self.transition[0, 0, transition_t]
32531  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
32532  */
32533   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2527, __pyx_L1_error)}
32534   __pyx_t_14 = 0;
32535   __pyx_t_15 = 0;
32536   __pyx_t_12 = __pyx_v_obs_cov_t;
32537   __pyx_v_self->_obs_cov = (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->obs_cov.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->obs_cov.strides[1]) ) + __pyx_t_12 * __pyx_v_self->obs_cov.strides[2]) ))));
32538 
32539   /* "statsmodels/tsa/statespace/_representation.pyx":2528
32540  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
32541  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
32542  *         self._transition = &self.transition[0, 0, transition_t]             # <<<<<<<<<<<<<<
32543  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
32544  *         self._selection = &self.selection[0, 0, selection_t]
32545  */
32546   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2528, __pyx_L1_error)}
32547   __pyx_t_12 = 0;
32548   __pyx_t_15 = 0;
32549   __pyx_t_14 = __pyx_v_transition_t;
32550   __pyx_v_self->_transition = (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transition.data) + __pyx_t_12)) ) + __pyx_t_15 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_14 * __pyx_v_self->transition.strides[2]) ))));
32551 
32552   /* "statsmodels/tsa/statespace/_representation.pyx":2529
32553  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
32554  *         self._transition = &self.transition[0, 0, transition_t]
32555  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]             # <<<<<<<<<<<<<<
32556  *         self._selection = &self.selection[0, 0, selection_t]
32557  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]
32558  */
32559   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2529, __pyx_L1_error)}
32560   __pyx_t_14 = 0;
32561   __pyx_t_15 = __pyx_v_state_intercept_t;
32562   __pyx_v_self->_state_intercept = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->state_intercept.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->state_intercept.strides[1]) ))));
32563 
32564   /* "statsmodels/tsa/statespace/_representation.pyx":2530
32565  *         self._transition = &self.transition[0, 0, transition_t]
32566  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
32567  *         self._selection = &self.selection[0, 0, selection_t]             # <<<<<<<<<<<<<<
32568  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]
32569  *
32570  */
32571   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2530, __pyx_L1_error)}
32572   __pyx_t_15 = 0;
32573   __pyx_t_14 = 0;
32574   __pyx_t_12 = __pyx_v_selection_t;
32575   __pyx_v_self->_selection = (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->selection.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->selection.strides[1]) ) + __pyx_t_12 * __pyx_v_self->selection.strides[2]) ))));
32576 
32577   /* "statsmodels/tsa/statespace/_representation.pyx":2531
32578  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
32579  *         self._selection = &self.selection[0, 0, selection_t]
32580  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]             # <<<<<<<<<<<<<<
32581  *
32582  *         # Initialize object-level pointers to initialization
32583  */
32584   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2531, __pyx_L1_error)}
32585   __pyx_t_12 = 0;
32586   __pyx_t_14 = 0;
32587   __pyx_t_15 = __pyx_v_state_cov_t;
32588   __pyx_v_self->_state_cov = (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->state_cov.data) + __pyx_t_12)) ) + __pyx_t_14 * __pyx_v_self->state_cov.strides[1]) ) + __pyx_t_15 * __pyx_v_self->state_cov.strides[2]) ))));
32589 
32590   /* "statsmodels/tsa/statespace/_representation.pyx":2534
32591  *
32592  *         # Initialize object-level pointers to initialization
32593  *         if not self.initialized:             # <<<<<<<<<<<<<<
32594  *             raise RuntimeError("Statespace model not initialized.")
32595  *         self._initial_state = &self.initial_state[0]
32596  */
32597   __pyx_t_11 = ((!(__pyx_v_self->initialized != 0)) != 0);
32598   if (unlikely(__pyx_t_11)) {
32599 
32600     /* "statsmodels/tsa/statespace/_representation.pyx":2535
32601  *         # Initialize object-level pointers to initialization
32602  *         if not self.initialized:
32603  *             raise RuntimeError("Statespace model not initialized.")             # <<<<<<<<<<<<<<
32604  *         self._initial_state = &self.initial_state[0]
32605  *         self._initial_state_cov = &self.initial_state_cov[0,0]
32606  */
32607     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2535, __pyx_L1_error)
32608     __Pyx_GOTREF(__pyx_t_1);
32609     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
32610     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32611     __PYX_ERR(0, 2535, __pyx_L1_error)
32612 
32613     /* "statsmodels/tsa/statespace/_representation.pyx":2534
32614  *
32615  *         # Initialize object-level pointers to initialization
32616  *         if not self.initialized:             # <<<<<<<<<<<<<<
32617  *             raise RuntimeError("Statespace model not initialized.")
32618  *         self._initial_state = &self.initial_state[0]
32619  */
32620   }
32621 
32622   /* "statsmodels/tsa/statespace/_representation.pyx":2536
32623  *         if not self.initialized:
32624  *             raise RuntimeError("Statespace model not initialized.")
32625  *         self._initial_state = &self.initial_state[0]             # <<<<<<<<<<<<<<
32626  *         self._initial_state_cov = &self.initial_state_cov[0,0]
32627  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]
32628  */
32629   if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2536, __pyx_L1_error)}
32630   __pyx_t_15 = 0;
32631   __pyx_v_self->_initial_state = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_15 * __pyx_v_self->initial_state.strides[0]) ))));
32632 
32633   /* "statsmodels/tsa/statespace/_representation.pyx":2537
32634  *             raise RuntimeError("Statespace model not initialized.")
32635  *         self._initial_state = &self.initial_state[0]
32636  *         self._initial_state_cov = &self.initial_state_cov[0,0]             # <<<<<<<<<<<<<<
32637  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]
32638  *
32639  */
32640   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2537, __pyx_L1_error)}
32641   __pyx_t_15 = 0;
32642   __pyx_t_14 = 0;
32643   __pyx_v_self->_initial_state_cov = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->initial_state_cov.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->initial_state_cov.strides[1]) ))));
32644 
32645   /* "statsmodels/tsa/statespace/_representation.pyx":2538
32646  *         self._initial_state = &self.initial_state[0]
32647  *         self._initial_state_cov = &self.initial_state_cov[0,0]
32648  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]             # <<<<<<<<<<<<<<
32649  *
32650  *         # Create the selected state covariance matrix
32651  */
32652   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2538, __pyx_L1_error)}
32653   __pyx_t_14 = 0;
32654   __pyx_t_15 = 0;
32655   __pyx_v_self->_initial_diffuse_state_cov = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->initial_diffuse_state_cov.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->initial_diffuse_state_cov.strides[1]) ))));
32656 
32657   /* "statsmodels/tsa/statespace/_representation.pyx":2541
32658  *
32659  *         # Create the selected state covariance matrix
32660  *         self.select_state_cov(t)             # <<<<<<<<<<<<<<
32661  *
32662  *         # Handle missing data
32663  */
32664   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->select_state_cov(__pyx_v_self, __pyx_v_t);
32665 
32666   /* "statsmodels/tsa/statespace/_representation.pyx":2545
32667  *         # Handle missing data
32668  *         # Note: this modifies object pointers and _* dimensions
32669  *         k_endog = self.select_missing(t)             # <<<<<<<<<<<<<<
32670  *
32671  *         # Set dimensions
32672  */
32673   __pyx_v_k_endog = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->select_missing(__pyx_v_self, __pyx_v_t);
32674 
32675   /* "statsmodels/tsa/statespace/_representation.pyx":2548
32676  *
32677  *         # Set dimensions
32678  *         self.set_dimensions(k_endog, self.k_states, self.k_posdef)             # <<<<<<<<<<<<<<
32679  *
32680  *         # Handle transformations
32681  */
32682   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_k_endog, __pyx_v_self->k_states, __pyx_v_self->k_posdef);
32683 
32684   /* "statsmodels/tsa/statespace/_representation.pyx":2551
32685  *
32686  *         # Handle transformations
32687  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)             # <<<<<<<<<<<<<<
32688  *
32689  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
32690  */
32691   __pyx_t_16.__pyx_n = 1;
32692   __pyx_t_16.reset = __pyx_v_reset;
32693   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->transform(__pyx_v_self, __pyx_v_t, __pyx_v_self->_previous_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, &__pyx_t_16); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2551, __pyx_L1_error)
32694 
32695   /* "statsmodels/tsa/statespace/_representation.pyx":2494
32696  *             self.seek(self.t+1, 0, 0)
32697  *
32698  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):             # <<<<<<<<<<<<<<
32699  *         self._previous_t = self.t
32700  *
32701  */
32702 
32703   /* function exit code */
32704   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
32705   goto __pyx_L0;
32706   __pyx_L1_error:;
32707   __Pyx_XDECREF(__pyx_t_1);
32708   __Pyx_XDECREF(__pyx_t_2);
32709   __Pyx_XDECREF(__pyx_t_3);
32710   __Pyx_XDECREF(__pyx_t_4);
32711   __Pyx_XDECREF(__pyx_t_5);
32712   __Pyx_XDECREF(__pyx_t_6);
32713   __Pyx_XDECREF(__pyx_t_7);
32714   __Pyx_XDECREF(__pyx_t_8);
32715   __Pyx_XDECREF(__pyx_t_10);
32716   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
32717   __pyx_r = 0;
32718   __pyx_L0:;
32719   __Pyx_XGIVEREF(__pyx_r);
32720   __Pyx_RefNannyFinishContext();
32721   return __pyx_r;
32722 }
32723 
32724 /* Python wrapper */
32725 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19seek(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)32726 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
32727   unsigned int __pyx_v_t;
32728   unsigned int __pyx_v_transform_diagonalize;
32729   unsigned int __pyx_v_transform_generalized_collapse;
32730   unsigned int __pyx_v_reset;
32731   int __pyx_lineno = 0;
32732   const char *__pyx_filename = NULL;
32733   int __pyx_clineno = 0;
32734   PyObject *__pyx_r = 0;
32735   __Pyx_RefNannyDeclarations
32736   __Pyx_RefNannySetupContext("seek (wrapper)", 0);
32737   {
32738     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_transform_diagonalize,&__pyx_n_s_transform_generalized_collapse,&__pyx_n_s_reset,0};
32739     PyObject* values[4] = {0,0,0,0};
32740     if (unlikely(__pyx_kwds)) {
32741       Py_ssize_t kw_args;
32742       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
32743       switch (pos_args) {
32744         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32745         CYTHON_FALLTHROUGH;
32746         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32747         CYTHON_FALLTHROUGH;
32748         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32749         CYTHON_FALLTHROUGH;
32750         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32751         CYTHON_FALLTHROUGH;
32752         case  0: break;
32753         default: goto __pyx_L5_argtuple_error;
32754       }
32755       kw_args = PyDict_Size(__pyx_kwds);
32756       switch (pos_args) {
32757         case  0:
32758         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
32759         else goto __pyx_L5_argtuple_error;
32760         CYTHON_FALLTHROUGH;
32761         case  1:
32762         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_diagonalize)) != 0)) kw_args--;
32763         else {
32764           __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, 1); __PYX_ERR(0, 2494, __pyx_L3_error)
32765         }
32766         CYTHON_FALLTHROUGH;
32767         case  2:
32768         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_generalized_collapse)) != 0)) kw_args--;
32769         else {
32770           __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, 2); __PYX_ERR(0, 2494, __pyx_L3_error)
32771         }
32772         CYTHON_FALLTHROUGH;
32773         case  3:
32774         if (kw_args > 0) {
32775           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
32776           if (value) { values[3] = value; kw_args--; }
32777         }
32778       }
32779       if (unlikely(kw_args > 0)) {
32780         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) __PYX_ERR(0, 2494, __pyx_L3_error)
32781       }
32782     } else {
32783       switch (PyTuple_GET_SIZE(__pyx_args)) {
32784         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
32785         CYTHON_FALLTHROUGH;
32786         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
32787         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
32788         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
32789         break;
32790         default: goto __pyx_L5_argtuple_error;
32791       }
32792     }
32793     __pyx_v_t = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_t == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2494, __pyx_L3_error)
32794     __pyx_v_transform_diagonalize = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_transform_diagonalize == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2494, __pyx_L3_error)
32795     __pyx_v_transform_generalized_collapse = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_transform_generalized_collapse == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2494, __pyx_L3_error)
32796     if (values[3]) {
32797       __pyx_v_reset = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_reset == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2494, __pyx_L3_error)
32798     } else {
32799       __pyx_v_reset = ((unsigned int)0);
32800     }
32801   }
32802   goto __pyx_L4_argument_unpacking_done;
32803   __pyx_L5_argtuple_error:;
32804   __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2494, __pyx_L3_error)
32805   __pyx_L3_error:;
32806   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
32807   __Pyx_RefNannyFinishContext();
32808   return NULL;
32809   __pyx_L4_argument_unpacking_done:;
32810   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18seek(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), __pyx_v_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, __pyx_v_reset);
32811 
32812   /* function exit code */
32813   __Pyx_RefNannyFinishContext();
32814   return __pyx_r;
32815 }
32816 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,unsigned int __pyx_v_reset)32817 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, unsigned int __pyx_v_reset) {
32818   PyObject *__pyx_r = NULL;
32819   __Pyx_RefNannyDeclarations
32820   PyObject *__pyx_t_1 = NULL;
32821   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek __pyx_t_2;
32822   int __pyx_lineno = 0;
32823   const char *__pyx_filename = NULL;
32824   int __pyx_clineno = 0;
32825   __Pyx_RefNannySetupContext("seek", 0);
32826   __Pyx_XDECREF(__pyx_r);
32827   __pyx_t_2.__pyx_n = 1;
32828   __pyx_t_2.reset = __pyx_v_reset;
32829   __pyx_t_1 = __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_cStatespace->seek(__pyx_v_self, __pyx_v_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error)
32830   __Pyx_GOTREF(__pyx_t_1);
32831   __pyx_r = __pyx_t_1;
32832   __pyx_t_1 = 0;
32833   goto __pyx_L0;
32834 
32835   /* function exit code */
32836   __pyx_L1_error:;
32837   __Pyx_XDECREF(__pyx_t_1);
32838   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
32839   __pyx_r = NULL;
32840   __pyx_L0:;
32841   __Pyx_XGIVEREF(__pyx_r);
32842   __Pyx_RefNannyFinishContext();
32843   return __pyx_r;
32844 }
32845 
32846 /* "statsmodels/tsa/statespace/_representation.pyx":2553
32847  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)
32848  *
32849  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):             # <<<<<<<<<<<<<<
32850  *         self._k_endog = k_endog
32851  *         self._k_states = k_states
32852  */
32853 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_k_endog,unsigned int __pyx_v_k_states,unsigned int __pyx_v_k_posdef)32854 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_k_endog, unsigned int __pyx_v_k_states, unsigned int __pyx_v_k_posdef) {
32855   __Pyx_RefNannyDeclarations
32856   __Pyx_RefNannySetupContext("set_dimensions", 0);
32857 
32858   /* "statsmodels/tsa/statespace/_representation.pyx":2554
32859  *
32860  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
32861  *         self._k_endog = k_endog             # <<<<<<<<<<<<<<
32862  *         self._k_states = k_states
32863  *         self._k_posdef = k_posdef
32864  */
32865   __pyx_v_self->_k_endog = __pyx_v_k_endog;
32866 
32867   /* "statsmodels/tsa/statespace/_representation.pyx":2555
32868  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
32869  *         self._k_endog = k_endog
32870  *         self._k_states = k_states             # <<<<<<<<<<<<<<
32871  *         self._k_posdef = k_posdef
32872  *         self._k_endog2 = k_endog**2
32873  */
32874   __pyx_v_self->_k_states = __pyx_v_k_states;
32875 
32876   /* "statsmodels/tsa/statespace/_representation.pyx":2556
32877  *         self._k_endog = k_endog
32878  *         self._k_states = k_states
32879  *         self._k_posdef = k_posdef             # <<<<<<<<<<<<<<
32880  *         self._k_endog2 = k_endog**2
32881  *         self._k_states2 = k_states**2
32882  */
32883   __pyx_v_self->_k_posdef = __pyx_v_k_posdef;
32884 
32885   /* "statsmodels/tsa/statespace/_representation.pyx":2557
32886  *         self._k_states = k_states
32887  *         self._k_posdef = k_posdef
32888  *         self._k_endog2 = k_endog**2             # <<<<<<<<<<<<<<
32889  *         self._k_states2 = k_states**2
32890  *         self._k_posdef2 = k_posdef**2
32891  */
32892   __pyx_v_self->_k_endog2 = __Pyx_pow_long(((long)__pyx_v_k_endog), 2);
32893 
32894   /* "statsmodels/tsa/statespace/_representation.pyx":2558
32895  *         self._k_posdef = k_posdef
32896  *         self._k_endog2 = k_endog**2
32897  *         self._k_states2 = k_states**2             # <<<<<<<<<<<<<<
32898  *         self._k_posdef2 = k_posdef**2
32899  *         self._k_endogstates = k_endog * k_states
32900  */
32901   __pyx_v_self->_k_states2 = __Pyx_pow_long(((long)__pyx_v_k_states), 2);
32902 
32903   /* "statsmodels/tsa/statespace/_representation.pyx":2559
32904  *         self._k_endog2 = k_endog**2
32905  *         self._k_states2 = k_states**2
32906  *         self._k_posdef2 = k_posdef**2             # <<<<<<<<<<<<<<
32907  *         self._k_endogstates = k_endog * k_states
32908  *         self._k_statesposdef = k_states * k_posdef
32909  */
32910   __pyx_v_self->_k_posdef2 = __Pyx_pow_long(((long)__pyx_v_k_posdef), 2);
32911 
32912   /* "statsmodels/tsa/statespace/_representation.pyx":2560
32913  *         self._k_states2 = k_states**2
32914  *         self._k_posdef2 = k_posdef**2
32915  *         self._k_endogstates = k_endog * k_states             # <<<<<<<<<<<<<<
32916  *         self._k_statesposdef = k_states * k_posdef
32917  *
32918  */
32919   __pyx_v_self->_k_endogstates = (__pyx_v_k_endog * __pyx_v_k_states);
32920 
32921   /* "statsmodels/tsa/statespace/_representation.pyx":2561
32922  *         self._k_posdef2 = k_posdef**2
32923  *         self._k_endogstates = k_endog * k_states
32924  *         self._k_statesposdef = k_states * k_posdef             # <<<<<<<<<<<<<<
32925  *
32926  *     cdef void select_state_cov(self, unsigned int t):
32927  */
32928   __pyx_v_self->_k_statesposdef = (__pyx_v_k_states * __pyx_v_k_posdef);
32929 
32930   /* "statsmodels/tsa/statespace/_representation.pyx":2553
32931  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)
32932  *
32933  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):             # <<<<<<<<<<<<<<
32934  *         self._k_endog = k_endog
32935  *         self._k_states = k_states
32936  */
32937 
32938   /* function exit code */
32939   __Pyx_RefNannyFinishContext();
32940 }
32941 
32942 /* "statsmodels/tsa/statespace/_representation.pyx":2563
32943  *         self._k_statesposdef = k_states * k_posdef
32944  *
32945  *     cdef void select_state_cov(self, unsigned int t):             # <<<<<<<<<<<<<<
32946  *         cdef int selected_state_cov_t = 0
32947  *
32948  */
32949 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_t)32950 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
32951   int __pyx_v_selected_state_cov_t;
32952   __Pyx_RefNannyDeclarations
32953   int __pyx_t_1;
32954   int __pyx_t_2;
32955   Py_ssize_t __pyx_t_3;
32956   Py_ssize_t __pyx_t_4;
32957   Py_ssize_t __pyx_t_5;
32958   int __pyx_lineno = 0;
32959   const char *__pyx_filename = NULL;
32960   int __pyx_clineno = 0;
32961   __Pyx_RefNannySetupContext("select_state_cov", 0);
32962 
32963   /* "statsmodels/tsa/statespace/_representation.pyx":2564
32964  *
32965  *     cdef void select_state_cov(self, unsigned int t):
32966  *         cdef int selected_state_cov_t = 0             # <<<<<<<<<<<<<<
32967  *
32968  *         # ### Get selected state covariance matrix
32969  */
32970   __pyx_v_selected_state_cov_t = 0;
32971 
32972   /* "statsmodels/tsa/statespace/_representation.pyx":2567
32973  *
32974  *         # ### Get selected state covariance matrix
32975  *         if t == 0 or self.selected_state_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
32976  *             selected_state_cov_t = t
32977  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
32978  */
32979   __pyx_t_2 = ((__pyx_v_t == 0) != 0);
32980   if (!__pyx_t_2) {
32981   } else {
32982     __pyx_t_1 = __pyx_t_2;
32983     goto __pyx_L4_bool_binop_done;
32984   }
32985   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2567, __pyx_L1_error)}
32986   __pyx_t_2 = (((__pyx_v_self->selected_state_cov.shape[2]) > 1) != 0);
32987   __pyx_t_1 = __pyx_t_2;
32988   __pyx_L4_bool_binop_done:;
32989   if (__pyx_t_1) {
32990 
32991     /* "statsmodels/tsa/statespace/_representation.pyx":2568
32992  *         # ### Get selected state covariance matrix
32993  *         if t == 0 or self.selected_state_cov.shape[2] > 1:
32994  *             selected_state_cov_t = t             # <<<<<<<<<<<<<<
32995  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
32996  *
32997  */
32998     __pyx_v_selected_state_cov_t = __pyx_v_t;
32999 
33000     /* "statsmodels/tsa/statespace/_representation.pyx":2569
33001  *         if t == 0 or self.selected_state_cov.shape[2] > 1:
33002  *             selected_state_cov_t = t
33003  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]             # <<<<<<<<<<<<<<
33004  *
33005  *             cselect_cov(self.k_states, self.k_posdef,
33006  */
33007     if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2569, __pyx_L1_error)}
33008     __pyx_t_3 = 0;
33009     __pyx_t_4 = 0;
33010     __pyx_t_5 = __pyx_v_selected_state_cov_t;
33011     __pyx_v_self->_selected_state_cov = (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->selected_state_cov.data) + __pyx_t_3)) ) + __pyx_t_4 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_5 * __pyx_v_self->selected_state_cov.strides[2]) ))));
33012 
33013     /* "statsmodels/tsa/statespace/_representation.pyx":2572
33014  *
33015  *             cselect_cov(self.k_states, self.k_posdef,
33016  *                                        &self.tmp[0,0],             # <<<<<<<<<<<<<<
33017  *                                        self._selection,
33018  *                                        self._state_cov,
33019  */
33020     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2572, __pyx_L1_error)}
33021     __pyx_t_5 = 0;
33022     __pyx_t_4 = 0;
33023 
33024     /* "statsmodels/tsa/statespace/_representation.pyx":2571
33025  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
33026  *
33027  *             cselect_cov(self.k_states, self.k_posdef,             # <<<<<<<<<<<<<<
33028  *                                        &self.tmp[0,0],
33029  *                                        self._selection,
33030  */
33031     (void)(__pyx_f_11statsmodels_3tsa_10statespace_15_representation_cselect_cov(__pyx_v_self->k_states, __pyx_v_self->k_posdef, (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->tmp.data) + __pyx_t_5)) ) + __pyx_t_4 * __pyx_v_self->tmp.strides[1]) )))), __pyx_v_self->_selection, __pyx_v_self->_state_cov, __pyx_v_self->_selected_state_cov));
33032 
33033     /* "statsmodels/tsa/statespace/_representation.pyx":2567
33034  *
33035  *         # ### Get selected state covariance matrix
33036  *         if t == 0 or self.selected_state_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
33037  *             selected_state_cov_t = t
33038  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
33039  */
33040     goto __pyx_L3;
33041   }
33042 
33043   /* "statsmodels/tsa/statespace/_representation.pyx":2577
33044  *                                        self._selected_state_cov)
33045  *         else:
33046  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]             # <<<<<<<<<<<<<<
33047  *
33048  *     cdef int select_missing(self, unsigned int t):
33049  */
33050   /*else*/ {
33051     if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2577, __pyx_L1_error)}
33052     __pyx_t_4 = 0;
33053     __pyx_t_5 = 0;
33054     __pyx_t_3 = 0;
33055     __pyx_v_self->_selected_state_cov = (&(*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->selected_state_cov.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_3 * __pyx_v_self->selected_state_cov.strides[2]) ))));
33056   }
33057   __pyx_L3:;
33058 
33059   /* "statsmodels/tsa/statespace/_representation.pyx":2563
33060  *         self._k_statesposdef = k_states * k_posdef
33061  *
33062  *     cdef void select_state_cov(self, unsigned int t):             # <<<<<<<<<<<<<<
33063  *         cdef int selected_state_cov_t = 0
33064  *
33065  */
33066 
33067   /* function exit code */
33068   goto __pyx_L0;
33069   __pyx_L1_error:;
33070   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.cStatespace.select_state_cov", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
33071   __pyx_L0:;
33072   __Pyx_RefNannyFinishContext();
33073 }
33074 
33075 /* "statsmodels/tsa/statespace/_representation.pyx":2579
33076  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]
33077  *
33078  *     cdef int select_missing(self, unsigned int t):             # <<<<<<<<<<<<<<
33079  *         # Note: this assumes that object pointers are already initialized
33080  *         # Note: this assumes that transform_... will be done *later*
33081  */
33082 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_t)33083 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
33084   int __pyx_v_k_endog;
33085   int __pyx_r;
33086   __Pyx_RefNannyDeclarations
33087   int __pyx_t_1;
33088   size_t __pyx_t_2;
33089   int __pyx_t_3;
33090   int __pyx_lineno = 0;
33091   const char *__pyx_filename = NULL;
33092   int __pyx_clineno = 0;
33093   __Pyx_RefNannySetupContext("select_missing", 0);
33094 
33095   /* "statsmodels/tsa/statespace/_representation.pyx":2582
33096  *         # Note: this assumes that object pointers are already initialized
33097  *         # Note: this assumes that transform_... will be done *later*
33098  *         cdef int k_endog = self.k_endog             # <<<<<<<<<<<<<<
33099  *
33100  *         # Set the current iteration nmissing
33101  */
33102   __pyx_t_1 = __pyx_v_self->k_endog;
33103   __pyx_v_k_endog = __pyx_t_1;
33104 
33105   /* "statsmodels/tsa/statespace/_representation.pyx":2585
33106  *
33107  *         # Set the current iteration nmissing
33108  *         self._nmissing = self.nmissing[t]             # <<<<<<<<<<<<<<
33109  *
33110  *         # ### Perform missing selections
33111  */
33112   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2585, __pyx_L1_error)}
33113   __pyx_t_2 = __pyx_v_t;
33114   __pyx_v_self->_nmissing = (*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_2 * __pyx_v_self->nmissing.strides[0]) )));
33115 
33116   /* "statsmodels/tsa/statespace/_representation.pyx":2602
33117  *         # forecasting), we actually set do not change the dimension, but we set
33118  *         # the design matrix to the zeros array.
33119  *         if self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
33120  *             self._select_missing_entire_obs(t)
33121  *         elif self._nmissing > 0:
33122  */
33123   __pyx_t_3 = ((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0);
33124   if (__pyx_t_3) {
33125 
33126     /* "statsmodels/tsa/statespace/_representation.pyx":2603
33127  *         # the design matrix to the zeros array.
33128  *         if self._nmissing == self.k_endog:
33129  *             self._select_missing_entire_obs(t)             # <<<<<<<<<<<<<<
33130  *         elif self._nmissing > 0:
33131  *             self._select_missing_partial_obs(t)
33132  */
33133     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->_select_missing_entire_obs(__pyx_v_self, __pyx_v_t);
33134 
33135     /* "statsmodels/tsa/statespace/_representation.pyx":2602
33136  *         # forecasting), we actually set do not change the dimension, but we set
33137  *         # the design matrix to the zeros array.
33138  *         if self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
33139  *             self._select_missing_entire_obs(t)
33140  *         elif self._nmissing > 0:
33141  */
33142     goto __pyx_L3;
33143   }
33144 
33145   /* "statsmodels/tsa/statespace/_representation.pyx":2604
33146  *         if self._nmissing == self.k_endog:
33147  *             self._select_missing_entire_obs(t)
33148  *         elif self._nmissing > 0:             # <<<<<<<<<<<<<<
33149  *             self._select_missing_partial_obs(t)
33150  *             k_endog = self.k_endog - self._nmissing
33151  */
33152   __pyx_t_3 = ((__pyx_v_self->_nmissing > 0) != 0);
33153   if (__pyx_t_3) {
33154 
33155     /* "statsmodels/tsa/statespace/_representation.pyx":2605
33156  *             self._select_missing_entire_obs(t)
33157  *         elif self._nmissing > 0:
33158  *             self._select_missing_partial_obs(t)             # <<<<<<<<<<<<<<
33159  *             k_endog = self.k_endog - self._nmissing
33160  *
33161  */
33162     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->_select_missing_partial_obs(__pyx_v_self, __pyx_v_t);
33163 
33164     /* "statsmodels/tsa/statespace/_representation.pyx":2606
33165  *         elif self._nmissing > 0:
33166  *             self._select_missing_partial_obs(t)
33167  *             k_endog = self.k_endog - self._nmissing             # <<<<<<<<<<<<<<
33168  *
33169  *         # Return the number of non-missing endogenous variables
33170  */
33171     __pyx_v_k_endog = (__pyx_v_self->k_endog - __pyx_v_self->_nmissing);
33172 
33173     /* "statsmodels/tsa/statespace/_representation.pyx":2604
33174  *         if self._nmissing == self.k_endog:
33175  *             self._select_missing_entire_obs(t)
33176  *         elif self._nmissing > 0:             # <<<<<<<<<<<<<<
33177  *             self._select_missing_partial_obs(t)
33178  *             k_endog = self.k_endog - self._nmissing
33179  */
33180   }
33181   __pyx_L3:;
33182 
33183   /* "statsmodels/tsa/statespace/_representation.pyx":2609
33184  *
33185  *         # Return the number of non-missing endogenous variables
33186  *         return k_endog             # <<<<<<<<<<<<<<
33187  *
33188  *     cdef void _select_missing_entire_obs(self, unsigned int t):
33189  */
33190   __pyx_r = __pyx_v_k_endog;
33191   goto __pyx_L0;
33192 
33193   /* "statsmodels/tsa/statespace/_representation.pyx":2579
33194  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]
33195  *
33196  *     cdef int select_missing(self, unsigned int t):             # <<<<<<<<<<<<<<
33197  *         # Note: this assumes that object pointers are already initialized
33198  *         # Note: this assumes that transform_... will be done *later*
33199  */
33200 
33201   /* function exit code */
33202   __pyx_L1_error:;
33203   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.cStatespace.select_missing", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
33204   __pyx_r = 0;
33205   __pyx_L0:;
33206   __Pyx_RefNannyFinishContext();
33207   return __pyx_r;
33208 }
33209 
33210 /* "statsmodels/tsa/statespace/_representation.pyx":2611
33211  *         return k_endog
33212  *
33213  *     cdef void _select_missing_entire_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
33214  *         cdef:
33215  *             int i, j
33216  */
33217 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,CYTHON_UNUSED unsigned int __pyx_v_t)33218 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_t) {
33219   int __pyx_v_i;
33220   int __pyx_v_j;
33221   __Pyx_RefNannyDeclarations
33222   int __pyx_t_1;
33223   int __pyx_t_2;
33224   int __pyx_t_3;
33225   int __pyx_t_4;
33226   int __pyx_t_5;
33227   int __pyx_t_6;
33228   Py_ssize_t __pyx_t_7;
33229   int __pyx_lineno = 0;
33230   const char *__pyx_filename = NULL;
33231   int __pyx_clineno = 0;
33232   __Pyx_RefNannySetupContext("_select_missing_entire_obs", 0);
33233 
33234   /* "statsmodels/tsa/statespace/_representation.pyx":2616
33235  *
33236  *         # Design matrix is set to zeros
33237  *         for i in range(self.k_states):             # <<<<<<<<<<<<<<
33238  *             for j in range(self.k_endog):
33239  *                 self.selected_design[j + i*self.k_endog] = 0.0
33240  */
33241   __pyx_t_1 = __pyx_v_self->k_states;
33242   __pyx_t_2 = __pyx_t_1;
33243   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
33244     __pyx_v_i = __pyx_t_3;
33245 
33246     /* "statsmodels/tsa/statespace/_representation.pyx":2617
33247  *         # Design matrix is set to zeros
33248  *         for i in range(self.k_states):
33249  *             for j in range(self.k_endog):             # <<<<<<<<<<<<<<
33250  *                 self.selected_design[j + i*self.k_endog] = 0.0
33251  *         self._design = &self.selected_design[0]
33252  */
33253     __pyx_t_4 = __pyx_v_self->k_endog;
33254     __pyx_t_5 = __pyx_t_4;
33255     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
33256       __pyx_v_j = __pyx_t_6;
33257 
33258       /* "statsmodels/tsa/statespace/_representation.pyx":2618
33259  *         for i in range(self.k_states):
33260  *             for j in range(self.k_endog):
33261  *                 self.selected_design[j + i*self.k_endog] = 0.0             # <<<<<<<<<<<<<<
33262  *         self._design = &self.selected_design[0]
33263  *
33264  */
33265       if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2618, __pyx_L1_error)}
33266       __pyx_t_7 = (__pyx_v_j + (__pyx_v_i * __pyx_v_self->k_endog));
33267       *((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_7 * __pyx_v_self->selected_design.strides[0]) )) = __pyx_t_float_complex_from_parts(0.0, 0);
33268     }
33269   }
33270 
33271   /* "statsmodels/tsa/statespace/_representation.pyx":2619
33272  *             for j in range(self.k_endog):
33273  *                 self.selected_design[j + i*self.k_endog] = 0.0
33274  *         self._design = &self.selected_design[0]             # <<<<<<<<<<<<<<
33275  *
33276  *     cdef void _select_missing_partial_obs(self, unsigned int t):
33277  */
33278   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2619, __pyx_L1_error)}
33279   __pyx_t_7 = 0;
33280   __pyx_v_self->_design = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_7 * __pyx_v_self->selected_design.strides[0]) ))));
33281 
33282   /* "statsmodels/tsa/statespace/_representation.pyx":2611
33283  *         return k_endog
33284  *
33285  *     cdef void _select_missing_entire_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
33286  *         cdef:
33287  *             int i, j
33288  */
33289 
33290   /* function exit code */
33291   goto __pyx_L0;
33292   __pyx_L1_error:;
33293   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.cStatespace._select_missing_entire_obs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
33294   __pyx_L0:;
33295   __Pyx_RefNannyFinishContext();
33296 }
33297 
33298 /* "statsmodels/tsa/statespace/_representation.pyx":2621
33299  *         self._design = &self.selected_design[0]
33300  *
33301  *     cdef void _select_missing_partial_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
33302  *         cdef:
33303  *             int i, j, k, l
33304  */
33305 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_t)33306 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
33307   int __pyx_v_i;
33308   int __pyx_v_j;
33309   int __pyx_v_k;
33310   int __pyx_v_l;
33311   CYTHON_UNUSED int __pyx_v_inc;
33312   CYTHON_UNUSED int __pyx_v_design_t;
33313   CYTHON_UNUSED int __pyx_v_obs_cov_t;
33314   int __pyx_v_k_endog;
33315   __Pyx_RefNannyDeclarations
33316   int __pyx_t_1;
33317   int __pyx_t_2;
33318   int __pyx_t_3;
33319   Py_ssize_t __pyx_t_4;
33320   size_t __pyx_t_5;
33321   int __pyx_t_6;
33322   int __pyx_t_7;
33323   int __pyx_t_8;
33324   int __pyx_t_9;
33325   int __pyx_lineno = 0;
33326   const char *__pyx_filename = NULL;
33327   int __pyx_clineno = 0;
33328   __Pyx_RefNannySetupContext("_select_missing_partial_obs", 0);
33329 
33330   /* "statsmodels/tsa/statespace/_representation.pyx":2624
33331  *         cdef:
33332  *             int i, j, k, l
33333  *             int inc = 1             # <<<<<<<<<<<<<<
33334  *             int design_t = 0
33335  *             int obs_cov_t = 0
33336  */
33337   __pyx_v_inc = 1;
33338 
33339   /* "statsmodels/tsa/statespace/_representation.pyx":2625
33340  *             int i, j, k, l
33341  *             int inc = 1
33342  *             int design_t = 0             # <<<<<<<<<<<<<<
33343  *             int obs_cov_t = 0
33344  *             int k_endog = self.k_endog - self._nmissing
33345  */
33346   __pyx_v_design_t = 0;
33347 
33348   /* "statsmodels/tsa/statespace/_representation.pyx":2626
33349  *             int inc = 1
33350  *             int design_t = 0
33351  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
33352  *             int k_endog = self.k_endog - self._nmissing
33353  *
33354  */
33355   __pyx_v_obs_cov_t = 0;
33356 
33357   /* "statsmodels/tsa/statespace/_representation.pyx":2627
33358  *             int design_t = 0
33359  *             int obs_cov_t = 0
33360  *             int k_endog = self.k_endog - self._nmissing             # <<<<<<<<<<<<<<
33361  *
33362  *         k = 0
33363  */
33364   __pyx_v_k_endog = (__pyx_v_self->k_endog - __pyx_v_self->_nmissing);
33365 
33366   /* "statsmodels/tsa/statespace/_representation.pyx":2629
33367  *             int k_endog = self.k_endog - self._nmissing
33368  *
33369  *         k = 0             # <<<<<<<<<<<<<<
33370  *         for i in range(self.k_endog):
33371  *             if not self.missing[i, t]:
33372  */
33373   __pyx_v_k = 0;
33374 
33375   /* "statsmodels/tsa/statespace/_representation.pyx":2630
33376  *
33377  *         k = 0
33378  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
33379  *             if not self.missing[i, t]:
33380  *
33381  */
33382   __pyx_t_1 = __pyx_v_self->k_endog;
33383   __pyx_t_2 = __pyx_t_1;
33384   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
33385     __pyx_v_i = __pyx_t_3;
33386 
33387     /* "statsmodels/tsa/statespace/_representation.pyx":2631
33388  *         k = 0
33389  *         for i in range(self.k_endog):
33390  *             if not self.missing[i, t]:             # <<<<<<<<<<<<<<
33391  *
33392  *                 self.selected_obs[k] = self._obs[i]
33393  */
33394     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2631, __pyx_L1_error)}
33395     __pyx_t_4 = __pyx_v_i;
33396     __pyx_t_5 = __pyx_v_t;
33397     __pyx_t_6 = ((!((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->missing.strides[1]) ))) != 0)) != 0);
33398     if (__pyx_t_6) {
33399 
33400       /* "statsmodels/tsa/statespace/_representation.pyx":2633
33401  *             if not self.missing[i, t]:
33402  *
33403  *                 self.selected_obs[k] = self._obs[i]             # <<<<<<<<<<<<<<
33404  *                 self.selected_obs_intercept[k] = self._obs_intercept[i]
33405  *
33406  */
33407       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2633, __pyx_L1_error)}
33408       __pyx_t_4 = __pyx_v_k;
33409       *((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_4 * __pyx_v_self->selected_obs.strides[0]) )) = (__pyx_v_self->_obs[__pyx_v_i]);
33410 
33411       /* "statsmodels/tsa/statespace/_representation.pyx":2634
33412  *
33413  *                 self.selected_obs[k] = self._obs[i]
33414  *                 self.selected_obs_intercept[k] = self._obs_intercept[i]             # <<<<<<<<<<<<<<
33415  *
33416  *                 # i is rows, k is rows
33417  */
33418       if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2634, __pyx_L1_error)}
33419       __pyx_t_4 = __pyx_v_k;
33420       *((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs_intercept.data + __pyx_t_4 * __pyx_v_self->selected_obs_intercept.strides[0]) )) = (__pyx_v_self->_obs_intercept[__pyx_v_i]);
33421 
33422       /* "statsmodels/tsa/statespace/_representation.pyx":2639
33423  *                 blas.ccopy(&self.k_states,
33424  *                       &self._design[i], &self.k_endog,
33425  *                       &self.selected_design[k], &k_endog)             # <<<<<<<<<<<<<<
33426  *
33427  *                 # i, k is columns, j, l is rows
33428  */
33429       if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2639, __pyx_L1_error)}
33430       __pyx_t_4 = __pyx_v_k;
33431 
33432       /* "statsmodels/tsa/statespace/_representation.pyx":2637
33433  *
33434  *                 # i is rows, k is rows
33435  *                 blas.ccopy(&self.k_states,             # <<<<<<<<<<<<<<
33436  *                       &self._design[i], &self.k_endog,
33437  *                       &self.selected_design[k], &k_endog)
33438  */
33439       __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->k_states), (&(__pyx_v_self->_design[__pyx_v_i])), (&__pyx_v_self->k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_4 * __pyx_v_self->selected_design.strides[0]) )))), (&__pyx_v_k_endog));
33440 
33441       /* "statsmodels/tsa/statespace/_representation.pyx":2642
33442  *
33443  *                 # i, k is columns, j, l is rows
33444  *                 l = 0             # <<<<<<<<<<<<<<
33445  *                 for j in range(self.k_endog):
33446  *                     if not self.missing[j, t]:
33447  */
33448       __pyx_v_l = 0;
33449 
33450       /* "statsmodels/tsa/statespace/_representation.pyx":2643
33451  *                 # i, k is columns, j, l is rows
33452  *                 l = 0
33453  *                 for j in range(self.k_endog):             # <<<<<<<<<<<<<<
33454  *                     if not self.missing[j, t]:
33455  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
33456  */
33457       __pyx_t_7 = __pyx_v_self->k_endog;
33458       __pyx_t_8 = __pyx_t_7;
33459       for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
33460         __pyx_v_j = __pyx_t_9;
33461 
33462         /* "statsmodels/tsa/statespace/_representation.pyx":2644
33463  *                 l = 0
33464  *                 for j in range(self.k_endog):
33465  *                     if not self.missing[j, t]:             # <<<<<<<<<<<<<<
33466  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
33467  *                         l += 1
33468  */
33469         if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2644, __pyx_L1_error)}
33470         __pyx_t_4 = __pyx_v_j;
33471         __pyx_t_5 = __pyx_v_t;
33472         __pyx_t_6 = ((!((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->missing.strides[1]) ))) != 0)) != 0);
33473         if (__pyx_t_6) {
33474 
33475           /* "statsmodels/tsa/statespace/_representation.pyx":2645
33476  *                 for j in range(self.k_endog):
33477  *                     if not self.missing[j, t]:
33478  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]             # <<<<<<<<<<<<<<
33479  *                         l += 1
33480  *                 k += 1
33481  */
33482           if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2645, __pyx_L1_error)}
33483           __pyx_t_4 = (__pyx_v_l + (__pyx_v_k * __pyx_v_k_endog));
33484           *((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs_cov.data + __pyx_t_4 * __pyx_v_self->selected_obs_cov.strides[0]) )) = (__pyx_v_self->_obs_cov[(__pyx_v_j + (__pyx_v_i * __pyx_v_self->k_endog))]);
33485 
33486           /* "statsmodels/tsa/statespace/_representation.pyx":2646
33487  *                     if not self.missing[j, t]:
33488  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
33489  *                         l += 1             # <<<<<<<<<<<<<<
33490  *                 k += 1
33491  *         self._obs = &self.selected_obs[0]
33492  */
33493           __pyx_v_l = (__pyx_v_l + 1);
33494 
33495           /* "statsmodels/tsa/statespace/_representation.pyx":2644
33496  *                 l = 0
33497  *                 for j in range(self.k_endog):
33498  *                     if not self.missing[j, t]:             # <<<<<<<<<<<<<<
33499  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
33500  *                         l += 1
33501  */
33502         }
33503       }
33504 
33505       /* "statsmodels/tsa/statespace/_representation.pyx":2647
33506  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
33507  *                         l += 1
33508  *                 k += 1             # <<<<<<<<<<<<<<
33509  *         self._obs = &self.selected_obs[0]
33510  *         self._obs_intercept = &self.selected_obs_intercept[0]
33511  */
33512       __pyx_v_k = (__pyx_v_k + 1);
33513 
33514       /* "statsmodels/tsa/statespace/_representation.pyx":2631
33515  *         k = 0
33516  *         for i in range(self.k_endog):
33517  *             if not self.missing[i, t]:             # <<<<<<<<<<<<<<
33518  *
33519  *                 self.selected_obs[k] = self._obs[i]
33520  */
33521     }
33522   }
33523 
33524   /* "statsmodels/tsa/statespace/_representation.pyx":2648
33525  *                         l += 1
33526  *                 k += 1
33527  *         self._obs = &self.selected_obs[0]             # <<<<<<<<<<<<<<
33528  *         self._obs_intercept = &self.selected_obs_intercept[0]
33529  *         self._design = &self.selected_design[0]
33530  */
33531   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2648, __pyx_L1_error)}
33532   __pyx_t_4 = 0;
33533   __pyx_v_self->_obs = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_4 * __pyx_v_self->selected_obs.strides[0]) ))));
33534 
33535   /* "statsmodels/tsa/statespace/_representation.pyx":2649
33536  *                 k += 1
33537  *         self._obs = &self.selected_obs[0]
33538  *         self._obs_intercept = &self.selected_obs_intercept[0]             # <<<<<<<<<<<<<<
33539  *         self._design = &self.selected_design[0]
33540  *         self._obs_cov = &self.selected_obs_cov[0]
33541  */
33542   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2649, __pyx_L1_error)}
33543   __pyx_t_4 = 0;
33544   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs_intercept.data + __pyx_t_4 * __pyx_v_self->selected_obs_intercept.strides[0]) ))));
33545 
33546   /* "statsmodels/tsa/statespace/_representation.pyx":2650
33547  *         self._obs = &self.selected_obs[0]
33548  *         self._obs_intercept = &self.selected_obs_intercept[0]
33549  *         self._design = &self.selected_design[0]             # <<<<<<<<<<<<<<
33550  *         self._obs_cov = &self.selected_obs_cov[0]
33551  *
33552  */
33553   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2650, __pyx_L1_error)}
33554   __pyx_t_4 = 0;
33555   __pyx_v_self->_design = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_4 * __pyx_v_self->selected_design.strides[0]) ))));
33556 
33557   /* "statsmodels/tsa/statespace/_representation.pyx":2651
33558  *         self._obs_intercept = &self.selected_obs_intercept[0]
33559  *         self._design = &self.selected_design[0]
33560  *         self._obs_cov = &self.selected_obs_cov[0]             # <<<<<<<<<<<<<<
33561  *
33562  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:
33563  */
33564   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2651, __pyx_L1_error)}
33565   __pyx_t_4 = 0;
33566   __pyx_v_self->_obs_cov = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs_cov.data + __pyx_t_4 * __pyx_v_self->selected_obs_cov.strides[0]) ))));
33567 
33568   /* "statsmodels/tsa/statespace/_representation.pyx":2621
33569  *         self._design = &self.selected_design[0]
33570  *
33571  *     cdef void _select_missing_partial_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
33572  *         cdef:
33573  *             int i, j, k, l
33574  */
33575 
33576   /* function exit code */
33577   goto __pyx_L0;
33578   __pyx_L1_error:;
33579   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.cStatespace._select_missing_partial_obs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
33580   __pyx_L0:;
33581   __Pyx_RefNannyFinishContext();
33582 }
33583 
33584 /* "statsmodels/tsa/statespace/_representation.pyx":2653
33585  *         self._obs_cov = &self.selected_obs_cov[0]
33586  *
33587  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
33588  *         # Reset the collapsed loglikelihood
33589  *         self.collapse_loglikelihood = 0
33590  */
33591 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform * __pyx_optional_args)33592 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform *__pyx_optional_args) {
33593   unsigned int __pyx_v_reset = ((unsigned int)0);
33594   int __pyx_v_k_endog;
33595   __Pyx_RefNannyDeclarations
33596   int __pyx_t_1;
33597   int __pyx_t_2;
33598   int __pyx_t_3;
33599   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse __pyx_t_4;
33600   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize __pyx_t_5;
33601   int __pyx_lineno = 0;
33602   const char *__pyx_filename = NULL;
33603   int __pyx_clineno = 0;
33604   __Pyx_RefNannySetupContext("transform", 0);
33605   if (__pyx_optional_args) {
33606     if (__pyx_optional_args->__pyx_n > 0) {
33607       __pyx_v_reset = __pyx_optional_args->reset;
33608     }
33609   }
33610 
33611   /* "statsmodels/tsa/statespace/_representation.pyx":2655
33612  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:
33613  *         # Reset the collapsed loglikelihood
33614  *         self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
33615  *
33616  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:
33617  */
33618   __pyx_v_self->collapse_loglikelihood = __pyx_t_float_complex_from_parts(0, 0);
33619 
33620   /* "statsmodels/tsa/statespace/_representation.pyx":2657
33621  *         self.collapse_loglikelihood = 0
33622  *
33623  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:             # <<<<<<<<<<<<<<
33624  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
33625  *             # Reset dimensions
33626  */
33627   __pyx_t_2 = (__pyx_v_transform_generalized_collapse != 0);
33628   if (__pyx_t_2) {
33629   } else {
33630     __pyx_t_1 = __pyx_t_2;
33631     goto __pyx_L4_bool_binop_done;
33632   }
33633   __pyx_t_2 = ((!((__pyx_v_self->_k_endog <= __pyx_v_self->_k_states) != 0)) != 0);
33634   __pyx_t_1 = __pyx_t_2;
33635   __pyx_L4_bool_binop_done:;
33636   if (__pyx_t_1) {
33637 
33638     /* "statsmodels/tsa/statespace/_representation.pyx":2658
33639  *
33640  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:
33641  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)             # <<<<<<<<<<<<<<
33642  *             # Reset dimensions
33643  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
33644  */
33645     __pyx_t_4.__pyx_n = 1;
33646     __pyx_t_4.reset = __pyx_v_reset;
33647     __pyx_t_3 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->transform_generalized_collapse(__pyx_v_self, __pyx_v_t, __pyx_v_previous_t, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2658, __pyx_L1_error)
33648     __pyx_v_k_endog = __pyx_t_3;
33649 
33650     /* "statsmodels/tsa/statespace/_representation.pyx":2660
33651  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
33652  *             # Reset dimensions
33653  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)             # <<<<<<<<<<<<<<
33654  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):
33655  *             self.transform_diagonalize(t, previous_t, reset)
33656  */
33657     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_k_endog, __pyx_v_self->_k_states, __pyx_v_self->_k_posdef);
33658 
33659     /* "statsmodels/tsa/statespace/_representation.pyx":2657
33660  *         self.collapse_loglikelihood = 0
33661  *
33662  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:             # <<<<<<<<<<<<<<
33663  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
33664  *             # Reset dimensions
33665  */
33666     goto __pyx_L3;
33667   }
33668 
33669   /* "statsmodels/tsa/statespace/_representation.pyx":2661
33670  *             # Reset dimensions
33671  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
33672  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):             # <<<<<<<<<<<<<<
33673  *             self.transform_diagonalize(t, previous_t, reset)
33674  *
33675  */
33676   __pyx_t_2 = (__pyx_v_transform_diagonalize != 0);
33677   if (__pyx_t_2) {
33678   } else {
33679     __pyx_t_1 = __pyx_t_2;
33680     goto __pyx_L6_bool_binop_done;
33681   }
33682   __pyx_t_2 = ((!((__pyx_v_self->diagonal_obs_cov == 1) != 0)) != 0);
33683   __pyx_t_1 = __pyx_t_2;
33684   __pyx_L6_bool_binop_done:;
33685   if (__pyx_t_1) {
33686 
33687     /* "statsmodels/tsa/statespace/_representation.pyx":2662
33688  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
33689  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):
33690  *             self.transform_diagonalize(t, previous_t, reset)             # <<<<<<<<<<<<<<
33691  *
33692  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:
33693  */
33694     __pyx_t_5.__pyx_n = 1;
33695     __pyx_t_5.reset = __pyx_v_reset;
33696     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self->__pyx_vtab)->transform_diagonalize(__pyx_v_self, __pyx_v_t, __pyx_v_previous_t, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2662, __pyx_L1_error)
33697 
33698     /* "statsmodels/tsa/statespace/_representation.pyx":2661
33699  *             # Reset dimensions
33700  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
33701  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):             # <<<<<<<<<<<<<<
33702  *             self.transform_diagonalize(t, previous_t, reset)
33703  *
33704  */
33705   }
33706   __pyx_L3:;
33707 
33708   /* "statsmodels/tsa/statespace/_representation.pyx":2653
33709  *         self._obs_cov = &self.selected_obs_cov[0]
33710  *
33711  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
33712  *         # Reset the collapsed loglikelihood
33713  *         self.collapse_loglikelihood = 0
33714  */
33715 
33716   /* function exit code */
33717   goto __pyx_L0;
33718   __pyx_L1_error:;
33719   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
33720   __pyx_L0:;
33721   __Pyx_RefNannyFinishContext();
33722 }
33723 
33724 /* "statsmodels/tsa/statespace/_representation.pyx":2664
33725  *             self.transform_diagonalize(t, previous_t, reset)
33726  *
33727  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
33728  *         # Note: this assumes that initialize_object_pointers has *already* been done
33729  *         # Note: this assumes that select_missing has *already* been done
33730  */
33731 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize * __pyx_optional_args)33732 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize *__pyx_optional_args) {
33733   unsigned int __pyx_v_reset = ((unsigned int)0);
33734   int __pyx_v_i;
33735   int __pyx_v_j;
33736   int __pyx_v_inc;
33737   int __pyx_v_obs_cov_t;
33738   int __pyx_v_info;
33739   int __pyx_v_reset_missing;
33740   int __pyx_v_diagonal_obs_cov;
33741   __pyx_t_float_complex *__pyx_v__transform_obs_cov;
33742   __pyx_t_float_complex *__pyx_v__transform_cholesky;
33743   __Pyx_RefNannyDeclarations
33744   Py_ssize_t __pyx_t_1;
33745   Py_ssize_t __pyx_t_2;
33746   int __pyx_t_3;
33747   size_t __pyx_t_4;
33748   int __pyx_t_5;
33749   int __pyx_t_6;
33750   int __pyx_t_7;
33751   size_t __pyx_t_8;
33752   int __pyx_t_9;
33753   int __pyx_t_10;
33754   int __pyx_t_11;
33755   int __pyx_t_12;
33756   Py_ssize_t __pyx_t_13;
33757   __pyx_t_float_complex __pyx_t_14;
33758   PyObject *__pyx_t_15 = NULL;
33759   PyObject *__pyx_t_16 = NULL;
33760   PyObject *__pyx_t_17 = NULL;
33761   PyObject *__pyx_t_18 = NULL;
33762   int __pyx_lineno = 0;
33763   const char *__pyx_filename = NULL;
33764   int __pyx_clineno = 0;
33765   __Pyx_RefNannySetupContext("transform_diagonalize", 0);
33766   if (__pyx_optional_args) {
33767     if (__pyx_optional_args->__pyx_n > 0) {
33768       __pyx_v_reset = __pyx_optional_args->reset;
33769     }
33770   }
33771 
33772   /* "statsmodels/tsa/statespace/_representation.pyx":2670
33773  *         # TODO need to also transform observation intercept
33774  *         cdef:
33775  *             int i, j, inc=1             # <<<<<<<<<<<<<<
33776  *             int obs_cov_t = 0
33777  *             int info
33778  */
33779   __pyx_v_inc = 1;
33780 
33781   /* "statsmodels/tsa/statespace/_representation.pyx":2671
33782  *         cdef:
33783  *             int i, j, inc=1
33784  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
33785  *             int info
33786  *             int reset_missing
33787  */
33788   __pyx_v_obs_cov_t = 0;
33789 
33790   /* "statsmodels/tsa/statespace/_representation.pyx":2675
33791  *             int reset_missing
33792  *             int diagonal_obs_cov
33793  *             np.complex64_t * _transform_obs_cov = &self.transform_obs_cov[0, 0]             # <<<<<<<<<<<<<<
33794  *             np.complex64_t * _transform_cholesky = &self.transform_cholesky[0, 0]
33795  *
33796  */
33797   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2675, __pyx_L1_error)}
33798   __pyx_t_1 = 0;
33799   __pyx_t_2 = 0;
33800   __pyx_v__transform_obs_cov = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_obs_cov.data) + __pyx_t_1)) ) + __pyx_t_2 * __pyx_v_self->transform_obs_cov.strides[1]) ))));
33801 
33802   /* "statsmodels/tsa/statespace/_representation.pyx":2676
33803  *             int diagonal_obs_cov
33804  *             np.complex64_t * _transform_obs_cov = &self.transform_obs_cov[0, 0]
33805  *             np.complex64_t * _transform_cholesky = &self.transform_cholesky[0, 0]             # <<<<<<<<<<<<<<
33806  *
33807  *         if self.obs_cov.shape[2] > 1:
33808  */
33809   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2676, __pyx_L1_error)}
33810   __pyx_t_2 = 0;
33811   __pyx_t_1 = 0;
33812   __pyx_v__transform_cholesky = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_2)) ) + __pyx_t_1 * __pyx_v_self->transform_cholesky.strides[1]) ))));
33813 
33814   /* "statsmodels/tsa/statespace/_representation.pyx":2678
33815  *             np.complex64_t * _transform_cholesky = &self.transform_cholesky[0, 0]
33816  *
33817  *         if self.obs_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
33818  *             obs_cov_t = t
33819  *
33820  */
33821   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2678, __pyx_L1_error)}
33822   __pyx_t_3 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
33823   if (__pyx_t_3) {
33824 
33825     /* "statsmodels/tsa/statespace/_representation.pyx":2679
33826  *
33827  *         if self.obs_cov.shape[2] > 1:
33828  *             obs_cov_t = t             # <<<<<<<<<<<<<<
33829  *
33830  *         # Handle missing data
33831  */
33832     __pyx_v_obs_cov_t = __pyx_v_t;
33833 
33834     /* "statsmodels/tsa/statespace/_representation.pyx":2678
33835  *             np.complex64_t * _transform_cholesky = &self.transform_cholesky[0, 0]
33836  *
33837  *         if self.obs_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
33838  *             obs_cov_t = t
33839  *
33840  */
33841   }
33842 
33843   /* "statsmodels/tsa/statespace/_representation.pyx":2682
33844  *
33845  *         # Handle missing data
33846  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
33847  *             return
33848  *         reset_missing = 0
33849  */
33850   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2682, __pyx_L1_error)}
33851   __pyx_t_4 = __pyx_v_t;
33852   __pyx_t_3 = (((*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_4 * __pyx_v_self->nmissing.strides[0]) ))) == __pyx_v_self->k_endog) != 0);
33853   if (__pyx_t_3) {
33854 
33855     /* "statsmodels/tsa/statespace/_representation.pyx":2683
33856  *         # Handle missing data
33857  *         if self.nmissing[t] == self.k_endog:
33858  *             return             # <<<<<<<<<<<<<<
33859  *         reset_missing = 0
33860  *         for i in range(self.k_endog):
33861  */
33862     goto __pyx_L0;
33863 
33864     /* "statsmodels/tsa/statespace/_representation.pyx":2682
33865  *
33866  *         # Handle missing data
33867  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
33868  *             return
33869  *         reset_missing = 0
33870  */
33871   }
33872 
33873   /* "statsmodels/tsa/statespace/_representation.pyx":2684
33874  *         if self.nmissing[t] == self.k_endog:
33875  *             return
33876  *         reset_missing = 0             # <<<<<<<<<<<<<<
33877  *         for i in range(self.k_endog):
33878  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
33879  */
33880   __pyx_v_reset_missing = 0;
33881 
33882   /* "statsmodels/tsa/statespace/_representation.pyx":2685
33883  *             return
33884  *         reset_missing = 0
33885  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
33886  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
33887  *
33888  */
33889   __pyx_t_5 = __pyx_v_self->k_endog;
33890   __pyx_t_6 = __pyx_t_5;
33891   for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
33892     __pyx_v_i = __pyx_t_7;
33893 
33894     /* "statsmodels/tsa/statespace/_representation.pyx":2686
33895  *         reset_missing = 0
33896  *         for i in range(self.k_endog):
33897  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])             # <<<<<<<<<<<<<<
33898  *
33899  *         # If the flag for a diagonal covariancem matrix is not set globally in
33900  */
33901     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2686, __pyx_L1_error)}
33902     __pyx_t_1 = __pyx_v_i;
33903     __pyx_t_4 = __pyx_v_t;
33904     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2686, __pyx_L1_error)}
33905     __pyx_t_2 = __pyx_v_i;
33906     __pyx_t_8 = __pyx_v_previous_t;
33907     __pyx_v_reset_missing = (__pyx_v_reset_missing + (!(((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_1)) ) + __pyx_t_4 * __pyx_v_self->missing.strides[1]) ))) == (*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_2)) ) + __pyx_t_8 * __pyx_v_self->missing.strides[1]) )))) != 0)));
33908   }
33909 
33910   /* "statsmodels/tsa/statespace/_representation.pyx":2690
33911  *         # If the flag for a diagonal covariancem matrix is not set globally in
33912  *         # the model one way or the other, then we need to check
33913  *         diagonal_obs_cov = self.diagonal_obs_cov             # <<<<<<<<<<<<<<
33914  *         if diagonal_obs_cov == -1:
33915  *             # We don't need to check for a diagonal covariance matrix each t,
33916  */
33917   __pyx_t_5 = __pyx_v_self->diagonal_obs_cov;
33918   __pyx_v_diagonal_obs_cov = __pyx_t_5;
33919 
33920   /* "statsmodels/tsa/statespace/_representation.pyx":2691
33921  *         # the model one way or the other, then we need to check
33922  *         diagonal_obs_cov = self.diagonal_obs_cov
33923  *         if diagonal_obs_cov == -1:             # <<<<<<<<<<<<<<
33924  *             # We don't need to check for a diagonal covariance matrix each t,
33925  *             # except in the following cases:
33926  */
33927   __pyx_t_3 = ((__pyx_v_diagonal_obs_cov == -1L) != 0);
33928   if (__pyx_t_3) {
33929 
33930     /* "statsmodels/tsa/statespace/_representation.pyx":2694
33931  *             # We don't need to check for a diagonal covariance matrix each t,
33932  *             # except in the following cases:
33933  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
33934  *                 diagonal_obs_cov = 1
33935  *                 for i in range(self.k_endog):
33936  */
33937     __pyx_t_9 = ((__pyx_v_self->_diagonal_obs_cov == -1L) != 0);
33938     if (!__pyx_t_9) {
33939     } else {
33940       __pyx_t_3 = __pyx_t_9;
33941       goto __pyx_L9_bool_binop_done;
33942     }
33943     __pyx_t_9 = ((__pyx_v_t == 0) != 0);
33944     if (!__pyx_t_9) {
33945     } else {
33946       __pyx_t_3 = __pyx_t_9;
33947       goto __pyx_L9_bool_binop_done;
33948     }
33949     if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2694, __pyx_L1_error)}
33950     __pyx_t_9 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
33951     if (!__pyx_t_9) {
33952     } else {
33953       __pyx_t_3 = __pyx_t_9;
33954       goto __pyx_L9_bool_binop_done;
33955     }
33956     __pyx_t_9 = (__pyx_v_reset_missing != 0);
33957     if (!__pyx_t_9) {
33958     } else {
33959       __pyx_t_3 = __pyx_t_9;
33960       goto __pyx_L9_bool_binop_done;
33961     }
33962     __pyx_t_9 = (__pyx_v_reset != 0);
33963     __pyx_t_3 = __pyx_t_9;
33964     __pyx_L9_bool_binop_done:;
33965     if (__pyx_t_3) {
33966 
33967       /* "statsmodels/tsa/statespace/_representation.pyx":2695
33968  *             # except in the following cases:
33969  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
33970  *                 diagonal_obs_cov = 1             # <<<<<<<<<<<<<<
33971  *                 for i in range(self.k_endog):
33972  *                     for j in range(self.k_endog):
33973  */
33974       __pyx_v_diagonal_obs_cov = 1;
33975 
33976       /* "statsmodels/tsa/statespace/_representation.pyx":2696
33977  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
33978  *                 diagonal_obs_cov = 1
33979  *                 for i in range(self.k_endog):             # <<<<<<<<<<<<<<
33980  *                     for j in range(self.k_endog):
33981  *                         if i == j:
33982  */
33983       __pyx_t_5 = __pyx_v_self->k_endog;
33984       __pyx_t_6 = __pyx_t_5;
33985       for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
33986         __pyx_v_i = __pyx_t_7;
33987 
33988         /* "statsmodels/tsa/statespace/_representation.pyx":2697
33989  *                 diagonal_obs_cov = 1
33990  *                 for i in range(self.k_endog):
33991  *                     for j in range(self.k_endog):             # <<<<<<<<<<<<<<
33992  *                         if i == j:
33993  *                             continue
33994  */
33995         __pyx_t_10 = __pyx_v_self->k_endog;
33996         __pyx_t_11 = __pyx_t_10;
33997         for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
33998           __pyx_v_j = __pyx_t_12;
33999 
34000           /* "statsmodels/tsa/statespace/_representation.pyx":2698
34001  *                 for i in range(self.k_endog):
34002  *                     for j in range(self.k_endog):
34003  *                         if i == j:             # <<<<<<<<<<<<<<
34004  *                             continue
34005  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
34006  */
34007           __pyx_t_3 = ((__pyx_v_i == __pyx_v_j) != 0);
34008           if (__pyx_t_3) {
34009 
34010             /* "statsmodels/tsa/statespace/_representation.pyx":2699
34011  *                     for j in range(self.k_endog):
34012  *                         if i == j:
34013  *                             continue             # <<<<<<<<<<<<<<
34014  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
34015  *                             diagonal_obs_cov = 0
34016  */
34017             goto __pyx_L16_continue;
34018 
34019             /* "statsmodels/tsa/statespace/_representation.pyx":2698
34020  *                 for i in range(self.k_endog):
34021  *                     for j in range(self.k_endog):
34022  *                         if i == j:             # <<<<<<<<<<<<<<
34023  *                             continue
34024  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
34025  */
34026           }
34027 
34028           /* "statsmodels/tsa/statespace/_representation.pyx":2700
34029  *                         if i == j:
34030  *                             continue
34031  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):             # <<<<<<<<<<<<<<
34032  *                             diagonal_obs_cov = 0
34033  *                             break
34034  */
34035           if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2700, __pyx_L1_error)}
34036           __pyx_t_2 = __pyx_v_i;
34037           __pyx_t_1 = __pyx_v_j;
34038           __pyx_t_13 = __pyx_v_obs_cov_t;
34039           __pyx_t_14 = (*((__pyx_t_float_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->obs_cov.data) + __pyx_t_2)) ) + __pyx_t_1 * __pyx_v_self->obs_cov.strides[1]) ) + __pyx_t_13 * __pyx_v_self->obs_cov.strides[2]) )));
34040           __pyx_t_3 = ((!((__pyx_f_11statsmodels_3src_4math_zabs(__pyx_t_double_complex_from_parts(__Pyx_CREAL(__pyx_t_14), __Pyx_CIMAG(__pyx_t_14))) < 1e-9) != 0)) != 0);
34041           if (__pyx_t_3) {
34042 
34043             /* "statsmodels/tsa/statespace/_representation.pyx":2701
34044  *                             continue
34045  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
34046  *                             diagonal_obs_cov = 0             # <<<<<<<<<<<<<<
34047  *                             break
34048  *             # Otherwise, we use whatever value was produced last period
34049  */
34050             __pyx_v_diagonal_obs_cov = 0;
34051 
34052             /* "statsmodels/tsa/statespace/_representation.pyx":2702
34053  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
34054  *                             diagonal_obs_cov = 0
34055  *                             break             # <<<<<<<<<<<<<<
34056  *             # Otherwise, we use whatever value was produced last period
34057  *             else:
34058  */
34059             goto __pyx_L17_break;
34060 
34061             /* "statsmodels/tsa/statespace/_representation.pyx":2700
34062  *                         if i == j:
34063  *                             continue
34064  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):             # <<<<<<<<<<<<<<
34065  *                             diagonal_obs_cov = 0
34066  *                             break
34067  */
34068           }
34069           __pyx_L16_continue:;
34070         }
34071         __pyx_L17_break:;
34072       }
34073 
34074       /* "statsmodels/tsa/statespace/_representation.pyx":2694
34075  *             # We don't need to check for a diagonal covariance matrix each t,
34076  *             # except in the following cases:
34077  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
34078  *                 diagonal_obs_cov = 1
34079  *                 for i in range(self.k_endog):
34080  */
34081       goto __pyx_L8;
34082     }
34083 
34084     /* "statsmodels/tsa/statespace/_representation.pyx":2705
34085  *             # Otherwise, we use whatever value was produced last period
34086  *             else:
34087  *                 diagonal_obs_cov = self._diagonal_obs_cov             # <<<<<<<<<<<<<<
34088  *         self._diagonal_obs_cov = diagonal_obs_cov
34089  *         if diagonal_obs_cov == 1:
34090  */
34091     /*else*/ {
34092       __pyx_t_5 = __pyx_v_self->_diagonal_obs_cov;
34093       __pyx_v_diagonal_obs_cov = __pyx_t_5;
34094     }
34095     __pyx_L8:;
34096 
34097     /* "statsmodels/tsa/statespace/_representation.pyx":2691
34098  *         # the model one way or the other, then we need to check
34099  *         diagonal_obs_cov = self.diagonal_obs_cov
34100  *         if diagonal_obs_cov == -1:             # <<<<<<<<<<<<<<
34101  *             # We don't need to check for a diagonal covariance matrix each t,
34102  *             # except in the following cases:
34103  */
34104   }
34105 
34106   /* "statsmodels/tsa/statespace/_representation.pyx":2706
34107  *             else:
34108  *                 diagonal_obs_cov = self._diagonal_obs_cov
34109  *         self._diagonal_obs_cov = diagonal_obs_cov             # <<<<<<<<<<<<<<
34110  *         if diagonal_obs_cov == 1:
34111  *             return
34112  */
34113   __pyx_v_self->_diagonal_obs_cov = __pyx_v_diagonal_obs_cov;
34114 
34115   /* "statsmodels/tsa/statespace/_representation.pyx":2707
34116  *                 diagonal_obs_cov = self._diagonal_obs_cov
34117  *         self._diagonal_obs_cov = diagonal_obs_cov
34118  *         if diagonal_obs_cov == 1:             # <<<<<<<<<<<<<<
34119  *             return
34120  *
34121  */
34122   __pyx_t_3 = ((__pyx_v_diagonal_obs_cov == 1) != 0);
34123   if (__pyx_t_3) {
34124 
34125     /* "statsmodels/tsa/statespace/_representation.pyx":2708
34126  *         self._diagonal_obs_cov = diagonal_obs_cov
34127  *         if diagonal_obs_cov == 1:
34128  *             return             # <<<<<<<<<<<<<<
34129  *
34130  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
34131  */
34132     goto __pyx_L0;
34133 
34134     /* "statsmodels/tsa/statespace/_representation.pyx":2707
34135  *                 diagonal_obs_cov = self._diagonal_obs_cov
34136  *         self._diagonal_obs_cov = diagonal_obs_cov
34137  *         if diagonal_obs_cov == 1:             # <<<<<<<<<<<<<<
34138  *             return
34139  *
34140  */
34141   }
34142 
34143   /* "statsmodels/tsa/statespace/_representation.pyx":2712
34144  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
34145  *         # decomposition of *self._obs_cov
34146  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
34147  *             # LDL decomposition
34148  *             blas.ccopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
34149  */
34150   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
34151   if (!__pyx_t_9) {
34152   } else {
34153     __pyx_t_3 = __pyx_t_9;
34154     goto __pyx_L22_bool_binop_done;
34155   }
34156   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2712, __pyx_L1_error)}
34157   __pyx_t_9 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
34158   if (!__pyx_t_9) {
34159   } else {
34160     __pyx_t_3 = __pyx_t_9;
34161     goto __pyx_L22_bool_binop_done;
34162   }
34163   __pyx_t_9 = (__pyx_v_reset_missing != 0);
34164   if (!__pyx_t_9) {
34165   } else {
34166     __pyx_t_3 = __pyx_t_9;
34167     goto __pyx_L22_bool_binop_done;
34168   }
34169   __pyx_t_9 = (__pyx_v_reset != 0);
34170   __pyx_t_3 = __pyx_t_9;
34171   __pyx_L22_bool_binop_done:;
34172   if (__pyx_t_3) {
34173 
34174     /* "statsmodels/tsa/statespace/_representation.pyx":2714
34175  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
34176  *             # LDL decomposition
34177  *             blas.ccopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)             # <<<<<<<<<<<<<<
34178  *             info = tools._cldl(_transform_cholesky, self._k_endog)
34179  *
34180  */
34181     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->_k_endog2), __pyx_v_self->_obs_cov, (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_inc));
34182 
34183     /* "statsmodels/tsa/statespace/_representation.pyx":2715
34184  *             # LDL decomposition
34185  *             blas.ccopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
34186  *             info = tools._cldl(_transform_cholesky, self._k_endog)             # <<<<<<<<<<<<<<
34187  *
34188  *             # Check for errors
34189  */
34190     __pyx_t_5 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools__cldl(__pyx_v__transform_cholesky, __pyx_v_self->_k_endog); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2715, __pyx_L1_error)
34191     __pyx_v_info = __pyx_t_5;
34192 
34193     /* "statsmodels/tsa/statespace/_representation.pyx":2718
34194  *
34195  *             # Check for errors
34196  *             if info > 0:             # <<<<<<<<<<<<<<
34197  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
34198  *             elif info < 0:
34199  */
34200     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
34201     if (__pyx_t_3) {
34202 
34203       /* "statsmodels/tsa/statespace/_representation.pyx":2719
34204  *             # Check for errors
34205  *             if info > 0:
34206  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)             # <<<<<<<<<<<<<<
34207  *             elif info < 0:
34208  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
34209  */
34210       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_warnings); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2719, __pyx_L1_error)
34211       __Pyx_GOTREF(__pyx_t_16);
34212       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_warn); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2719, __pyx_L1_error)
34213       __Pyx_GOTREF(__pyx_t_17);
34214       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34215       __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2719, __pyx_L1_error)
34216       __Pyx_GOTREF(__pyx_t_16);
34217       __pyx_t_18 = PyUnicode_Format(__pyx_kp_u_Positive_semi_definite_observati, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2719, __pyx_L1_error)
34218       __Pyx_GOTREF(__pyx_t_18);
34219       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34220       __pyx_t_16 = NULL;
34221       if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) {
34222         __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
34223         if (likely(__pyx_t_16)) {
34224           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
34225           __Pyx_INCREF(__pyx_t_16);
34226           __Pyx_INCREF(function);
34227           __Pyx_DECREF_SET(__pyx_t_17, function);
34228         }
34229       }
34230       __pyx_t_15 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_16, __pyx_t_18) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_18);
34231       __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
34232       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34233       if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2719, __pyx_L1_error)
34234       __Pyx_GOTREF(__pyx_t_15);
34235       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34236       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
34237 
34238       /* "statsmodels/tsa/statespace/_representation.pyx":2718
34239  *
34240  *             # Check for errors
34241  *             if info > 0:             # <<<<<<<<<<<<<<
34242  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
34243  *             elif info < 0:
34244  */
34245       goto __pyx_L26;
34246     }
34247 
34248     /* "statsmodels/tsa/statespace/_representation.pyx":2720
34249  *             if info > 0:
34250  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
34251  *             elif info < 0:             # <<<<<<<<<<<<<<
34252  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
34253  *
34254  */
34255     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
34256     if (unlikely(__pyx_t_3)) {
34257 
34258       /* "statsmodels/tsa/statespace/_representation.pyx":2721
34259  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
34260  *             elif info < 0:
34261  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
34262  *
34263  *             # Currently both L and D are stored in transform_cholesky
34264  */
34265       __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2721, __pyx_L1_error)
34266       __Pyx_GOTREF(__pyx_t_17);
34267       __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_linalg); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2721, __pyx_L1_error)
34268       __Pyx_GOTREF(__pyx_t_18);
34269       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34270       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2721, __pyx_L1_error)
34271       __Pyx_GOTREF(__pyx_t_17);
34272       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34273       __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2721, __pyx_L1_error)
34274       __Pyx_GOTREF(__pyx_t_18);
34275       __pyx_t_16 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_LDL_factorizati, __pyx_t_18); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2721, __pyx_L1_error)
34276       __Pyx_GOTREF(__pyx_t_16);
34277       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34278       __pyx_t_18 = NULL;
34279       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
34280         __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_17);
34281         if (likely(__pyx_t_18)) {
34282           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
34283           __Pyx_INCREF(__pyx_t_18);
34284           __Pyx_INCREF(function);
34285           __Pyx_DECREF_SET(__pyx_t_17, function);
34286         }
34287       }
34288       __pyx_t_15 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_18, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_16);
34289       __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
34290       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34291       if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2721, __pyx_L1_error)
34292       __Pyx_GOTREF(__pyx_t_15);
34293       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34294       __Pyx_Raise(__pyx_t_15, 0, 0, 0);
34295       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
34296       __PYX_ERR(0, 2721, __pyx_L1_error)
34297 
34298       /* "statsmodels/tsa/statespace/_representation.pyx":2720
34299  *             if info > 0:
34300  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
34301  *             elif info < 0:             # <<<<<<<<<<<<<<
34302  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
34303  *
34304  */
34305     }
34306     __pyx_L26:;
34307 
34308     /* "statsmodels/tsa/statespace/_representation.pyx":2724
34309  *
34310  *             # Currently both L and D are stored in transform_cholesky
34311  *             for i in range(self._k_endog): # i is rows             # <<<<<<<<<<<<<<
34312  *                 for j in range(self._k_endog): # j is columns
34313  *                     # Diagonal elements come from the diagonal
34314  */
34315     __pyx_t_5 = __pyx_v_self->_k_endog;
34316     __pyx_t_6 = __pyx_t_5;
34317     for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
34318       __pyx_v_i = __pyx_t_7;
34319 
34320       /* "statsmodels/tsa/statespace/_representation.pyx":2725
34321  *             # Currently both L and D are stored in transform_cholesky
34322  *             for i in range(self._k_endog): # i is rows
34323  *                 for j in range(self._k_endog): # j is columns             # <<<<<<<<<<<<<<
34324  *                     # Diagonal elements come from the diagonal
34325  *                     if i == j:
34326  */
34327       __pyx_t_10 = __pyx_v_self->_k_endog;
34328       __pyx_t_11 = __pyx_t_10;
34329       for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
34330         __pyx_v_j = __pyx_t_12;
34331 
34332         /* "statsmodels/tsa/statespace/_representation.pyx":2727
34333  *                 for j in range(self._k_endog): # j is columns
34334  *                     # Diagonal elements come from the diagonal
34335  *                     if i == j:             # <<<<<<<<<<<<<<
34336  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]
34337  *                     # Other elements are zero
34338  */
34339         __pyx_t_3 = ((__pyx_v_i == __pyx_v_j) != 0);
34340         if (__pyx_t_3) {
34341 
34342           /* "statsmodels/tsa/statespace/_representation.pyx":2728
34343  *                     # Diagonal elements come from the diagonal
34344  *                     if i == j:
34345  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]             # <<<<<<<<<<<<<<
34346  *                     # Other elements are zero
34347  *                     else:
34348  */
34349           (__pyx_v__transform_obs_cov[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]) = (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]);
34350 
34351           /* "statsmodels/tsa/statespace/_representation.pyx":2727
34352  *                 for j in range(self._k_endog): # j is columns
34353  *                     # Diagonal elements come from the diagonal
34354  *                     if i == j:             # <<<<<<<<<<<<<<
34355  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]
34356  *                     # Other elements are zero
34357  */
34358           goto __pyx_L31;
34359         }
34360 
34361         /* "statsmodels/tsa/statespace/_representation.pyx":2731
34362  *                     # Other elements are zero
34363  *                     else:
34364  *                         _transform_obs_cov[i + j * self._k_endog] = 0             # <<<<<<<<<<<<<<
34365  *
34366  *                     # Zero out the upper triangle of the cholesky
34367  */
34368         /*else*/ {
34369           (__pyx_v__transform_obs_cov[(__pyx_v_i + (__pyx_v_j * __pyx_v_self->_k_endog))]) = __pyx_t_float_complex_from_parts(0, 0);
34370         }
34371         __pyx_L31:;
34372 
34373         /* "statsmodels/tsa/statespace/_representation.pyx":2734
34374  *
34375  *                     # Zero out the upper triangle of the cholesky
34376  *                     if j > i:             # <<<<<<<<<<<<<<
34377  *                         _transform_cholesky[i + j * self._k_endog] = 0
34378  *
34379  */
34380         __pyx_t_3 = ((__pyx_v_j > __pyx_v_i) != 0);
34381         if (__pyx_t_3) {
34382 
34383           /* "statsmodels/tsa/statespace/_representation.pyx":2735
34384  *                     # Zero out the upper triangle of the cholesky
34385  *                     if j > i:
34386  *                         _transform_cholesky[i + j * self._k_endog] = 0             # <<<<<<<<<<<<<<
34387  *
34388  *                 # Convert from L to C simply by setting the diagonal elements to ones
34389  */
34390           (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_j * __pyx_v_self->_k_endog))]) = __pyx_t_float_complex_from_parts(0, 0);
34391 
34392           /* "statsmodels/tsa/statespace/_representation.pyx":2734
34393  *
34394  *                     # Zero out the upper triangle of the cholesky
34395  *                     if j > i:             # <<<<<<<<<<<<<<
34396  *                         _transform_cholesky[i + j * self._k_endog] = 0
34397  *
34398  */
34399         }
34400       }
34401 
34402       /* "statsmodels/tsa/statespace/_representation.pyx":2738
34403  *
34404  *                 # Convert from L to C simply by setting the diagonal elements to ones
34405  *                 _transform_cholesky[i + i * self._k_endog] = 1             # <<<<<<<<<<<<<<
34406  *
34407  *         # Solve for y_t^*
34408  */
34409       (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]) = __pyx_t_float_complex_from_parts(1, 0);
34410     }
34411 
34412     /* "statsmodels/tsa/statespace/_representation.pyx":2712
34413  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
34414  *         # decomposition of *self._obs_cov
34415  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
34416  *             # LDL decomposition
34417  *             blas.ccopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
34418  */
34419   }
34420 
34421   /* "statsmodels/tsa/statespace/_representation.pyx":2743
34422  *         # (unless this is a completely missing observation)
34423  *         # TODO: note that this can cause problems if this function is run twice
34424  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
34425  *             # If we have some missing elements, selected_obs is already populated
34426  *             if self._nmissing == 0:
34427  */
34428   __pyx_t_3 = ((!((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0)) != 0);
34429   if (__pyx_t_3) {
34430 
34431     /* "statsmodels/tsa/statespace/_representation.pyx":2745
34432  *         if not self._nmissing == self.k_endog:
34433  *             # If we have some missing elements, selected_obs is already populated
34434  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
34435  *                 blas.ccopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
34436  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,
34437  */
34438     __pyx_t_3 = ((__pyx_v_self->_nmissing == 0) != 0);
34439     if (__pyx_t_3) {
34440 
34441       /* "statsmodels/tsa/statespace/_representation.pyx":2746
34442  *             # If we have some missing elements, selected_obs is already populated
34443  *             if self._nmissing == 0:
34444  *                 blas.ccopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
34445  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,
34446  *                         _transform_cholesky, &self.k_endog,
34447  */
34448       if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2746, __pyx_L1_error)}
34449       __pyx_t_13 = 0;
34450       __pyx_t_8 = __pyx_v_t;
34451       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2746, __pyx_L1_error)}
34452       __pyx_t_1 = 0;
34453       __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->_k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->obs.data) + __pyx_t_13)) ) + __pyx_t_8 * __pyx_v_self->obs.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
34454 
34455       /* "statsmodels/tsa/statespace/_representation.pyx":2745
34456  *         if not self._nmissing == self.k_endog:
34457  *             # If we have some missing elements, selected_obs is already populated
34458  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
34459  *                 blas.ccopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
34460  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,
34461  */
34462     }
34463 
34464     /* "statsmodels/tsa/statespace/_representation.pyx":2749
34465  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,
34466  *                         _transform_cholesky, &self.k_endog,
34467  *                         &self.selected_obs[0], &self._k_endog, &info)             # <<<<<<<<<<<<<<
34468  *
34469  *             # Check for errors
34470  */
34471     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2749, __pyx_L1_error)}
34472     __pyx_t_1 = 0;
34473 
34474     /* "statsmodels/tsa/statespace/_representation.pyx":2747
34475  *             if self._nmissing == 0:
34476  *                 blas.ccopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
34477  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
34478  *                         _transform_cholesky, &self.k_endog,
34479  *                         &self.selected_obs[0], &self._k_endog, &info)
34480  */
34481     __pyx_f_5scipy_6linalg_13cython_lapack_ctrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
34482 
34483     /* "statsmodels/tsa/statespace/_representation.pyx":2752
34484  *
34485  *             # Check for errors
34486  *             if info > 0:             # <<<<<<<<<<<<<<
34487  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34488  *             elif info < 0:
34489  */
34490     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
34491     if (unlikely(__pyx_t_3)) {
34492 
34493       /* "statsmodels/tsa/statespace/_representation.pyx":2753
34494  *             # Check for errors
34495  *             if info > 0:
34496  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
34497  *             elif info < 0:
34498  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
34499  */
34500       __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2753, __pyx_L1_error)
34501       __Pyx_GOTREF(__pyx_t_17);
34502       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_linalg); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2753, __pyx_L1_error)
34503       __Pyx_GOTREF(__pyx_t_16);
34504       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34505       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2753, __pyx_L1_error)
34506       __Pyx_GOTREF(__pyx_t_17);
34507       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34508       __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2753, __pyx_L1_error)
34509       __Pyx_GOTREF(__pyx_t_16);
34510       __pyx_t_18 = PyUnicode_Format(__pyx_kp_u_Singular_factorization_of_observ, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2753, __pyx_L1_error)
34511       __Pyx_GOTREF(__pyx_t_18);
34512       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34513       __pyx_t_16 = NULL;
34514       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
34515         __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
34516         if (likely(__pyx_t_16)) {
34517           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
34518           __Pyx_INCREF(__pyx_t_16);
34519           __Pyx_INCREF(function);
34520           __Pyx_DECREF_SET(__pyx_t_17, function);
34521         }
34522       }
34523       __pyx_t_15 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_16, __pyx_t_18) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_18);
34524       __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
34525       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34526       if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2753, __pyx_L1_error)
34527       __Pyx_GOTREF(__pyx_t_15);
34528       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34529       __Pyx_Raise(__pyx_t_15, 0, 0, 0);
34530       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
34531       __PYX_ERR(0, 2753, __pyx_L1_error)
34532 
34533       /* "statsmodels/tsa/statespace/_representation.pyx":2752
34534  *
34535  *             # Check for errors
34536  *             if info > 0:             # <<<<<<<<<<<<<<
34537  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34538  *             elif info < 0:
34539  */
34540     }
34541 
34542     /* "statsmodels/tsa/statespace/_representation.pyx":2754
34543  *             if info > 0:
34544  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34545  *             elif info < 0:             # <<<<<<<<<<<<<<
34546  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
34547  *
34548  */
34549     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
34550     if (unlikely(__pyx_t_3)) {
34551 
34552       /* "statsmodels/tsa/statespace/_representation.pyx":2755
34553  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34554  *             elif info < 0:
34555  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
34556  *
34557  *             # Setup the pointer
34558  */
34559       __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2755, __pyx_L1_error)
34560       __Pyx_GOTREF(__pyx_t_17);
34561       __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_linalg); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2755, __pyx_L1_error)
34562       __Pyx_GOTREF(__pyx_t_18);
34563       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34564       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2755, __pyx_L1_error)
34565       __Pyx_GOTREF(__pyx_t_17);
34566       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34567       __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2755, __pyx_L1_error)
34568       __Pyx_GOTREF(__pyx_t_18);
34569       __pyx_t_16 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_t_18); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2755, __pyx_L1_error)
34570       __Pyx_GOTREF(__pyx_t_16);
34571       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34572       __pyx_t_18 = NULL;
34573       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
34574         __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_17);
34575         if (likely(__pyx_t_18)) {
34576           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
34577           __Pyx_INCREF(__pyx_t_18);
34578           __Pyx_INCREF(function);
34579           __Pyx_DECREF_SET(__pyx_t_17, function);
34580         }
34581       }
34582       __pyx_t_15 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_18, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_16);
34583       __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
34584       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34585       if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2755, __pyx_L1_error)
34586       __Pyx_GOTREF(__pyx_t_15);
34587       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34588       __Pyx_Raise(__pyx_t_15, 0, 0, 0);
34589       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
34590       __PYX_ERR(0, 2755, __pyx_L1_error)
34591 
34592       /* "statsmodels/tsa/statespace/_representation.pyx":2754
34593  *             if info > 0:
34594  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34595  *             elif info < 0:             # <<<<<<<<<<<<<<
34596  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
34597  *
34598  */
34599     }
34600 
34601     /* "statsmodels/tsa/statespace/_representation.pyx":2758
34602  *
34603  *             # Setup the pointer
34604  *             self._obs = &self.selected_obs[0]             # <<<<<<<<<<<<<<
34605  *
34606  *         # Solve for d_t^*, if necessary
34607  */
34608     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2758, __pyx_L1_error)}
34609     __pyx_t_1 = 0;
34610     __pyx_v_self->_obs = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) ))));
34611 
34612     /* "statsmodels/tsa/statespace/_representation.pyx":2743
34613  *         # (unless this is a completely missing observation)
34614  *         # TODO: note that this can cause problems if this function is run twice
34615  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
34616  *             # If we have some missing elements, selected_obs is already populated
34617  *             if self._nmissing == 0:
34618  */
34619   }
34620 
34621   /* "statsmodels/tsa/statespace/_representation.pyx":2761
34622  *
34623  *         # Solve for d_t^*, if necessary
34624  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
34625  *             blas.ccopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
34626  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,
34627  */
34628   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
34629   if (!__pyx_t_9) {
34630   } else {
34631     __pyx_t_3 = __pyx_t_9;
34632     goto __pyx_L37_bool_binop_done;
34633   }
34634   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2761, __pyx_L1_error)}
34635   __pyx_t_9 = (((__pyx_v_self->obs_intercept.shape[1]) > 1) != 0);
34636   if (!__pyx_t_9) {
34637   } else {
34638     __pyx_t_3 = __pyx_t_9;
34639     goto __pyx_L37_bool_binop_done;
34640   }
34641   __pyx_t_9 = (__pyx_v_reset_missing != 0);
34642   if (!__pyx_t_9) {
34643   } else {
34644     __pyx_t_3 = __pyx_t_9;
34645     goto __pyx_L37_bool_binop_done;
34646   }
34647   __pyx_t_9 = (__pyx_v_reset != 0);
34648   __pyx_t_3 = __pyx_t_9;
34649   __pyx_L37_bool_binop_done:;
34650   if (__pyx_t_3) {
34651 
34652     /* "statsmodels/tsa/statespace/_representation.pyx":2762
34653  *         # Solve for d_t^*, if necessary
34654  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:
34655  *             blas.ccopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)             # <<<<<<<<<<<<<<
34656  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,
34657  *                         _transform_cholesky, &self.k_endog,
34658  */
34659     if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2762, __pyx_L1_error)}
34660     __pyx_t_1 = 0;
34661     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->_k_endog), __pyx_v_self->_obs_intercept, (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) )))), (&__pyx_v_inc));
34662 
34663     /* "statsmodels/tsa/statespace/_representation.pyx":2765
34664  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,
34665  *                         _transform_cholesky, &self.k_endog,
34666  *                         &self.transform_obs_intercept[0], &self._k_endog,             # <<<<<<<<<<<<<<
34667  *                         &info)
34668  *
34669  */
34670     if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2765, __pyx_L1_error)}
34671     __pyx_t_1 = 0;
34672 
34673     /* "statsmodels/tsa/statespace/_representation.pyx":2763
34674  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:
34675  *             blas.ccopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
34676  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
34677  *                         _transform_cholesky, &self.k_endog,
34678  *                         &self.transform_obs_intercept[0], &self._k_endog,
34679  */
34680     __pyx_f_5scipy_6linalg_13cython_lapack_ctrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
34681 
34682     /* "statsmodels/tsa/statespace/_representation.pyx":2761
34683  *
34684  *         # Solve for d_t^*, if necessary
34685  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
34686  *             blas.ccopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
34687  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &inc,
34688  */
34689   }
34690 
34691   /* "statsmodels/tsa/statespace/_representation.pyx":2769
34692  *
34693  *         # Solve for Z_t^*, if necessary
34694  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
34695  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
34696  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &self._k_states,
34697  */
34698   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
34699   if (!__pyx_t_9) {
34700   } else {
34701     __pyx_t_3 = __pyx_t_9;
34702     goto __pyx_L42_bool_binop_done;
34703   }
34704   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2769, __pyx_L1_error)}
34705   __pyx_t_9 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
34706   if (!__pyx_t_9) {
34707   } else {
34708     __pyx_t_3 = __pyx_t_9;
34709     goto __pyx_L42_bool_binop_done;
34710   }
34711   __pyx_t_9 = (__pyx_v_reset_missing != 0);
34712   if (!__pyx_t_9) {
34713   } else {
34714     __pyx_t_3 = __pyx_t_9;
34715     goto __pyx_L42_bool_binop_done;
34716   }
34717   __pyx_t_9 = (__pyx_v_reset != 0);
34718   __pyx_t_3 = __pyx_t_9;
34719   __pyx_L42_bool_binop_done:;
34720   if (__pyx_t_3) {
34721 
34722     /* "statsmodels/tsa/statespace/_representation.pyx":2770
34723  *         # Solve for Z_t^*, if necessary
34724  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:
34725  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)             # <<<<<<<<<<<<<<
34726  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &self._k_states,
34727  *                         _transform_cholesky, &self.k_endog,
34728  */
34729     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2770, __pyx_L1_error)}
34730     __pyx_t_1 = 0;
34731     __pyx_t_13 = 0;
34732     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->_k_endogstates), __pyx_v_self->_design, (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_design.data) + __pyx_t_1)) ) + __pyx_t_13 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_inc));
34733 
34734     /* "statsmodels/tsa/statespace/_representation.pyx":2773
34735  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &self._k_states,
34736  *                         _transform_cholesky, &self.k_endog,
34737  *                         &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
34738  *                         &info)
34739  *
34740  */
34741     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2773, __pyx_L1_error)}
34742     __pyx_t_13 = 0;
34743     __pyx_t_1 = 0;
34744 
34745     /* "statsmodels/tsa/statespace/_representation.pyx":2771
34746  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:
34747  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
34748  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &self._k_states,             # <<<<<<<<<<<<<<
34749  *                         _transform_cholesky, &self.k_endog,
34750  *                         &self.transform_design[0,0], &self._k_endog,
34751  */
34752     __pyx_f_5scipy_6linalg_13cython_lapack_ctrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_self->_k_states), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_design.data) + __pyx_t_13)) ) + __pyx_t_1 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
34753 
34754     /* "statsmodels/tsa/statespace/_representation.pyx":2777
34755  *
34756  *             # Check for errors
34757  *             if info > 0:             # <<<<<<<<<<<<<<
34758  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34759  *             elif info < 0:
34760  */
34761     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
34762     if (unlikely(__pyx_t_3)) {
34763 
34764       /* "statsmodels/tsa/statespace/_representation.pyx":2778
34765  *             # Check for errors
34766  *             if info > 0:
34767  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
34768  *             elif info < 0:
34769  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
34770  */
34771       __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2778, __pyx_L1_error)
34772       __Pyx_GOTREF(__pyx_t_17);
34773       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_linalg); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2778, __pyx_L1_error)
34774       __Pyx_GOTREF(__pyx_t_16);
34775       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34776       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2778, __pyx_L1_error)
34777       __Pyx_GOTREF(__pyx_t_17);
34778       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34779       __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2778, __pyx_L1_error)
34780       __Pyx_GOTREF(__pyx_t_16);
34781       __pyx_t_18 = PyUnicode_Format(__pyx_kp_u_Singular_factorization_of_observ, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2778, __pyx_L1_error)
34782       __Pyx_GOTREF(__pyx_t_18);
34783       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34784       __pyx_t_16 = NULL;
34785       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
34786         __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_17);
34787         if (likely(__pyx_t_16)) {
34788           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
34789           __Pyx_INCREF(__pyx_t_16);
34790           __Pyx_INCREF(function);
34791           __Pyx_DECREF_SET(__pyx_t_17, function);
34792         }
34793       }
34794       __pyx_t_15 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_16, __pyx_t_18) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_18);
34795       __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
34796       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34797       if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2778, __pyx_L1_error)
34798       __Pyx_GOTREF(__pyx_t_15);
34799       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34800       __Pyx_Raise(__pyx_t_15, 0, 0, 0);
34801       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
34802       __PYX_ERR(0, 2778, __pyx_L1_error)
34803 
34804       /* "statsmodels/tsa/statespace/_representation.pyx":2777
34805  *
34806  *             # Check for errors
34807  *             if info > 0:             # <<<<<<<<<<<<<<
34808  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34809  *             elif info < 0:
34810  */
34811     }
34812 
34813     /* "statsmodels/tsa/statespace/_representation.pyx":2779
34814  *             if info > 0:
34815  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34816  *             elif info < 0:             # <<<<<<<<<<<<<<
34817  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
34818  *
34819  */
34820     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
34821     if (unlikely(__pyx_t_3)) {
34822 
34823       /* "statsmodels/tsa/statespace/_representation.pyx":2780
34824  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34825  *             elif info < 0:
34826  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
34827  *
34828  *         # Setup final pointers
34829  */
34830       __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_np); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2780, __pyx_L1_error)
34831       __Pyx_GOTREF(__pyx_t_17);
34832       __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_linalg); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2780, __pyx_L1_error)
34833       __Pyx_GOTREF(__pyx_t_18);
34834       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34835       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2780, __pyx_L1_error)
34836       __Pyx_GOTREF(__pyx_t_17);
34837       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34838       __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2780, __pyx_L1_error)
34839       __Pyx_GOTREF(__pyx_t_18);
34840       __pyx_t_16 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_t_18); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2780, __pyx_L1_error)
34841       __Pyx_GOTREF(__pyx_t_16);
34842       __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
34843       __pyx_t_18 = NULL;
34844       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
34845         __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_17);
34846         if (likely(__pyx_t_18)) {
34847           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
34848           __Pyx_INCREF(__pyx_t_18);
34849           __Pyx_INCREF(function);
34850           __Pyx_DECREF_SET(__pyx_t_17, function);
34851         }
34852       }
34853       __pyx_t_15 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_18, __pyx_t_16) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_16);
34854       __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
34855       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
34856       if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2780, __pyx_L1_error)
34857       __Pyx_GOTREF(__pyx_t_15);
34858       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
34859       __Pyx_Raise(__pyx_t_15, 0, 0, 0);
34860       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
34861       __PYX_ERR(0, 2780, __pyx_L1_error)
34862 
34863       /* "statsmodels/tsa/statespace/_representation.pyx":2779
34864  *             if info > 0:
34865  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
34866  *             elif info < 0:             # <<<<<<<<<<<<<<
34867  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
34868  *
34869  */
34870     }
34871 
34872     /* "statsmodels/tsa/statespace/_representation.pyx":2769
34873  *
34874  *         # Solve for Z_t^*, if necessary
34875  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
34876  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
34877  *             lapack.ctrtrs("L", "N", "U", &self._k_endog, &self._k_states,
34878  */
34879   }
34880 
34881   /* "statsmodels/tsa/statespace/_representation.pyx":2783
34882  *
34883  *         # Setup final pointers
34884  *         self._design = &self.transform_design[0,0]             # <<<<<<<<<<<<<<
34885  *         self._obs_cov = &self.transform_obs_cov[0,0]
34886  *         self._obs_intercept = &self.transform_obs_intercept[0]
34887  */
34888   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2783, __pyx_L1_error)}
34889   __pyx_t_1 = 0;
34890   __pyx_t_13 = 0;
34891   __pyx_v_self->_design = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_design.data) + __pyx_t_1)) ) + __pyx_t_13 * __pyx_v_self->transform_design.strides[1]) ))));
34892 
34893   /* "statsmodels/tsa/statespace/_representation.pyx":2784
34894  *         # Setup final pointers
34895  *         self._design = &self.transform_design[0,0]
34896  *         self._obs_cov = &self.transform_obs_cov[0,0]             # <<<<<<<<<<<<<<
34897  *         self._obs_intercept = &self.transform_obs_intercept[0]
34898  *
34899  */
34900   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2784, __pyx_L1_error)}
34901   __pyx_t_13 = 0;
34902   __pyx_t_1 = 0;
34903   __pyx_v_self->_obs_cov = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_obs_cov.data) + __pyx_t_13)) ) + __pyx_t_1 * __pyx_v_self->transform_obs_cov.strides[1]) ))));
34904 
34905   /* "statsmodels/tsa/statespace/_representation.pyx":2785
34906  *         self._design = &self.transform_design[0,0]
34907  *         self._obs_cov = &self.transform_obs_cov[0,0]
34908  *         self._obs_intercept = &self.transform_obs_intercept[0]             # <<<<<<<<<<<<<<
34909  *
34910  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:
34911  */
34912   if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2785, __pyx_L1_error)}
34913   __pyx_t_1 = 0;
34914   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) ))));
34915 
34916   /* "statsmodels/tsa/statespace/_representation.pyx":2664
34917  *             self.transform_diagonalize(t, previous_t, reset)
34918  *
34919  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
34920  *         # Note: this assumes that initialize_object_pointers has *already* been done
34921  *         # Note: this assumes that select_missing has *already* been done
34922  */
34923 
34924   /* function exit code */
34925   goto __pyx_L0;
34926   __pyx_L1_error:;
34927   __Pyx_XDECREF(__pyx_t_15);
34928   __Pyx_XDECREF(__pyx_t_16);
34929   __Pyx_XDECREF(__pyx_t_17);
34930   __Pyx_XDECREF(__pyx_t_18);
34931   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transform_diagonalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
34932   __pyx_L0:;
34933   __Pyx_RefNannyFinishContext();
34934 }
34935 
34936 /* "statsmodels/tsa/statespace/_representation.pyx":2787
34937  *         self._obs_intercept = &self.transform_obs_intercept[0]
34938  *
34939  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:             # <<<<<<<<<<<<<<
34940  *         # Note: this assumes that initialize_object_pointers has *already* been done
34941  *         # Note: this assumes that select_missing has *already* been done
34942  */
34943 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse * __pyx_optional_args)34944 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse *__pyx_optional_args) {
34945   unsigned int __pyx_v_reset = ((unsigned int)1);
34946   int __pyx_v_i;
34947   int __pyx_v_j;
34948   int __pyx_v_k;
34949   int __pyx_v_l;
34950   int __pyx_v_inc;
34951   int __pyx_v_info;
34952   int __pyx_v_reset_missing;
34953   __pyx_t_float_complex __pyx_v_alpha;
34954   __pyx_t_float_complex __pyx_v_beta;
34955   __pyx_t_float_complex __pyx_v_gamma;
34956   int __pyx_v_k_states;
34957   CYTHON_UNUSED int __pyx_v_k_states2;
34958   CYTHON_UNUSED int __pyx_v_k_endogstates;
34959   int __pyx_r;
34960   __Pyx_RefNannyDeclarations
34961   int __pyx_t_1;
34962   int __pyx_t_2;
34963   PyObject *__pyx_t_3 = NULL;
34964   size_t __pyx_t_4;
34965   int __pyx_t_5;
34966   int __pyx_t_6;
34967   Py_ssize_t __pyx_t_7;
34968   Py_ssize_t __pyx_t_8;
34969   size_t __pyx_t_9;
34970   PyObject *__pyx_t_10 = NULL;
34971   PyObject *__pyx_t_11 = NULL;
34972   PyObject *__pyx_t_12 = NULL;
34973   int __pyx_t_13;
34974   int __pyx_t_14;
34975   __pyx_t_float_complex __pyx_t_15;
34976   __pyx_t_double_complex __pyx_t_16;
34977   Py_ssize_t __pyx_t_17;
34978   Py_ssize_t __pyx_t_18;
34979   int __pyx_lineno = 0;
34980   const char *__pyx_filename = NULL;
34981   int __pyx_clineno = 0;
34982   __Pyx_RefNannySetupContext("transform_generalized_collapse", 0);
34983   if (__pyx_optional_args) {
34984     if (__pyx_optional_args->__pyx_n > 0) {
34985       __pyx_v_reset = __pyx_optional_args->reset;
34986     }
34987   }
34988 
34989   /* "statsmodels/tsa/statespace/_representation.pyx":2792
34990  *         # TODO need unit tests, especially for the missing case
34991  *         cdef:
34992  *             int i, j, k, l, inc=1             # <<<<<<<<<<<<<<
34993  *             int obs_cov_t, design_t
34994  *             int info
34995  */
34996   __pyx_v_inc = 1;
34997 
34998   /* "statsmodels/tsa/statespace/_representation.pyx":2796
34999  *             int info
35000  *             int reset_missing
35001  *             np.complex64_t alpha = 1.0             # <<<<<<<<<<<<<<
35002  *             np.complex64_t beta = 0.0
35003  *             np.complex64_t gamma = -1.0
35004  */
35005   __pyx_v_alpha = __pyx_t_float_complex_from_parts(1.0, 0);
35006 
35007   /* "statsmodels/tsa/statespace/_representation.pyx":2797
35008  *             int reset_missing
35009  *             np.complex64_t alpha = 1.0
35010  *             np.complex64_t beta = 0.0             # <<<<<<<<<<<<<<
35011  *             np.complex64_t gamma = -1.0
35012  *             int k_states = self._k_states
35013  */
35014   __pyx_v_beta = __pyx_t_float_complex_from_parts(0.0, 0);
35015 
35016   /* "statsmodels/tsa/statespace/_representation.pyx":2798
35017  *             np.complex64_t alpha = 1.0
35018  *             np.complex64_t beta = 0.0
35019  *             np.complex64_t gamma = -1.0             # <<<<<<<<<<<<<<
35020  *             int k_states = self._k_states
35021  *             int k_states2 = self._k_states2
35022  */
35023   __pyx_v_gamma = __pyx_t_float_complex_from_parts(-1.0, 0);
35024 
35025   /* "statsmodels/tsa/statespace/_representation.pyx":2799
35026  *             np.complex64_t beta = 0.0
35027  *             np.complex64_t gamma = -1.0
35028  *             int k_states = self._k_states             # <<<<<<<<<<<<<<
35029  *             int k_states2 = self._k_states2
35030  *             int k_endogstates = self._k_endogstates
35031  */
35032   __pyx_t_1 = __pyx_v_self->_k_states;
35033   __pyx_v_k_states = __pyx_t_1;
35034 
35035   /* "statsmodels/tsa/statespace/_representation.pyx":2800
35036  *             np.complex64_t gamma = -1.0
35037  *             int k_states = self._k_states
35038  *             int k_states2 = self._k_states2             # <<<<<<<<<<<<<<
35039  *             int k_endogstates = self._k_endogstates
35040  *
35041  */
35042   __pyx_t_1 = __pyx_v_self->_k_states2;
35043   __pyx_v_k_states2 = __pyx_t_1;
35044 
35045   /* "statsmodels/tsa/statespace/_representation.pyx":2801
35046  *             int k_states = self._k_states
35047  *             int k_states2 = self._k_states2
35048  *             int k_endogstates = self._k_endogstates             # <<<<<<<<<<<<<<
35049  *
35050  *         # $y_t^* = \bar A^* y_t = C_t Z_t' H_t^{-1} y_t$
35051  */
35052   __pyx_t_1 = __pyx_v_self->_k_endogstates;
35053   __pyx_v_k_endogstates = __pyx_t_1;
35054 
35055   /* "statsmodels/tsa/statespace/_representation.pyx":2808
35056  *
35057  *         # Make sure we have enough observations to perform collapse
35058  *         if self.k_endog < self.k_states:             # <<<<<<<<<<<<<<
35059  *             raise RuntimeError('Cannot collapse observation vector it the'
35060  *                                ' state dimension is larger than the dimension'
35061  */
35062   __pyx_t_2 = ((__pyx_v_self->k_endog < __pyx_v_self->k_states) != 0);
35063   if (unlikely(__pyx_t_2)) {
35064 
35065     /* "statsmodels/tsa/statespace/_representation.pyx":2809
35066  *         # Make sure we have enough observations to perform collapse
35067  *         if self.k_endog < self.k_states:
35068  *             raise RuntimeError('Cannot collapse observation vector it the'             # <<<<<<<<<<<<<<
35069  *                                ' state dimension is larger than the dimension'
35070  *                                ' of the observation vector.')
35071  */
35072     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2809, __pyx_L1_error)
35073     __Pyx_GOTREF(__pyx_t_3);
35074     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
35075     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35076     __PYX_ERR(0, 2809, __pyx_L1_error)
35077 
35078     /* "statsmodels/tsa/statespace/_representation.pyx":2808
35079  *
35080  *         # Make sure we have enough observations to perform collapse
35081  *         if self.k_endog < self.k_states:             # <<<<<<<<<<<<<<
35082  *             raise RuntimeError('Cannot collapse observation vector it the'
35083  *                                ' state dimension is larger than the dimension'
35084  */
35085   }
35086 
35087   /* "statsmodels/tsa/statespace/_representation.pyx":2815
35088  *         # Adjust for a VAR transition (i.e. design = [#, 0], where the zeros
35089  *         # correspond to all states except the first k_posdef states)
35090  *         if self.subset_design:             # <<<<<<<<<<<<<<
35091  *             k_states = self._k_posdef
35092  *             k_states2 = self._k_posdef2
35093  */
35094   __pyx_t_2 = (__pyx_v_self->subset_design != 0);
35095   if (__pyx_t_2) {
35096 
35097     /* "statsmodels/tsa/statespace/_representation.pyx":2816
35098  *         # correspond to all states except the first k_posdef states)
35099  *         if self.subset_design:
35100  *             k_states = self._k_posdef             # <<<<<<<<<<<<<<
35101  *             k_states2 = self._k_posdef2
35102  *             k_endogstates = self._k_endog * self._k_posdef
35103  */
35104     __pyx_t_1 = __pyx_v_self->_k_posdef;
35105     __pyx_v_k_states = __pyx_t_1;
35106 
35107     /* "statsmodels/tsa/statespace/_representation.pyx":2817
35108  *         if self.subset_design:
35109  *             k_states = self._k_posdef
35110  *             k_states2 = self._k_posdef2             # <<<<<<<<<<<<<<
35111  *             k_endogstates = self._k_endog * self._k_posdef
35112  *
35113  */
35114     __pyx_t_1 = __pyx_v_self->_k_posdef2;
35115     __pyx_v_k_states2 = __pyx_t_1;
35116 
35117     /* "statsmodels/tsa/statespace/_representation.pyx":2818
35118  *             k_states = self._k_posdef
35119  *             k_states2 = self._k_posdef2
35120  *             k_endogstates = self._k_endog * self._k_posdef             # <<<<<<<<<<<<<<
35121  *
35122  *         # Handle missing data
35123  */
35124     __pyx_v_k_endogstates = (__pyx_v_self->_k_endog * __pyx_v_self->_k_posdef);
35125 
35126     /* "statsmodels/tsa/statespace/_representation.pyx":2815
35127  *         # Adjust for a VAR transition (i.e. design = [#, 0], where the zeros
35128  *         # correspond to all states except the first k_posdef states)
35129  *         if self.subset_design:             # <<<<<<<<<<<<<<
35130  *             k_states = self._k_posdef
35131  *             k_states2 = self._k_posdef2
35132  */
35133   }
35134 
35135   /* "statsmodels/tsa/statespace/_representation.pyx":2821
35136  *
35137  *         # Handle missing data
35138  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
35139  *             return self.k_states
35140  *         reset_missing = 0
35141  */
35142   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2821, __pyx_L1_error)}
35143   __pyx_t_4 = __pyx_v_t;
35144   __pyx_t_2 = (((*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_4 * __pyx_v_self->nmissing.strides[0]) ))) == __pyx_v_self->k_endog) != 0);
35145   if (__pyx_t_2) {
35146 
35147     /* "statsmodels/tsa/statespace/_representation.pyx":2822
35148  *         # Handle missing data
35149  *         if self.nmissing[t] == self.k_endog:
35150  *             return self.k_states             # <<<<<<<<<<<<<<
35151  *         reset_missing = 0
35152  *         for i in range(self.k_endog):
35153  */
35154     __pyx_r = __pyx_v_self->k_states;
35155     goto __pyx_L0;
35156 
35157     /* "statsmodels/tsa/statespace/_representation.pyx":2821
35158  *
35159  *         # Handle missing data
35160  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
35161  *             return self.k_states
35162  *         reset_missing = 0
35163  */
35164   }
35165 
35166   /* "statsmodels/tsa/statespace/_representation.pyx":2823
35167  *         if self.nmissing[t] == self.k_endog:
35168  *             return self.k_states
35169  *         reset_missing = 0             # <<<<<<<<<<<<<<
35170  *         for i in range(self.k_endog):
35171  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
35172  */
35173   __pyx_v_reset_missing = 0;
35174 
35175   /* "statsmodels/tsa/statespace/_representation.pyx":2824
35176  *             return self.k_states
35177  *         reset_missing = 0
35178  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
35179  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
35180  *
35181  */
35182   __pyx_t_1 = __pyx_v_self->k_endog;
35183   __pyx_t_5 = __pyx_t_1;
35184   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
35185     __pyx_v_i = __pyx_t_6;
35186 
35187     /* "statsmodels/tsa/statespace/_representation.pyx":2825
35188  *         reset_missing = 0
35189  *         for i in range(self.k_endog):
35190  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])             # <<<<<<<<<<<<<<
35191  *
35192  *         # Initialize the transformation
35193  */
35194     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2825, __pyx_L1_error)}
35195     __pyx_t_7 = __pyx_v_i;
35196     __pyx_t_4 = __pyx_v_t;
35197     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2825, __pyx_L1_error)}
35198     __pyx_t_8 = __pyx_v_i;
35199     __pyx_t_9 = __pyx_v_previous_t;
35200     __pyx_v_reset_missing = (__pyx_v_reset_missing + (!(((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_7)) ) + __pyx_t_4 * __pyx_v_self->missing.strides[1]) ))) == (*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_8)) ) + __pyx_t_9 * __pyx_v_self->missing.strides[1]) )))) != 0)));
35201   }
35202 
35203   /* "statsmodels/tsa/statespace/_representation.pyx":2828
35204  *
35205  *         # Initialize the transformation
35206  *         if self.collapse_obs_cov[0,0] == 0:             # <<<<<<<<<<<<<<
35207  *             # Set H_t^* to identity
35208  *             for i in range(k_states):
35209  */
35210   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2828, __pyx_L1_error)}
35211   __pyx_t_8 = 0;
35212   __pyx_t_7 = 0;
35213   __pyx_t_2 = ((__Pyx_c_eq_float((*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_obs_cov.strides[1]) ))), __pyx_t_float_complex_from_parts(0, 0))) != 0);
35214   if (__pyx_t_2) {
35215 
35216     /* "statsmodels/tsa/statespace/_representation.pyx":2830
35217  *         if self.collapse_obs_cov[0,0] == 0:
35218  *             # Set H_t^* to identity
35219  *             for i in range(k_states):             # <<<<<<<<<<<<<<
35220  *                 self.collapse_obs_cov[i,i] = 1
35221  *
35222  */
35223     __pyx_t_1 = __pyx_v_k_states;
35224     __pyx_t_5 = __pyx_t_1;
35225     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
35226       __pyx_v_i = __pyx_t_6;
35227 
35228       /* "statsmodels/tsa/statespace/_representation.pyx":2831
35229  *             # Set H_t^* to identity
35230  *             for i in range(k_states):
35231  *                 self.collapse_obs_cov[i,i] = 1             # <<<<<<<<<<<<<<
35232  *
35233  *             # Make sure we do not have an observation intercept
35234  */
35235       if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2831, __pyx_L1_error)}
35236       __pyx_t_7 = __pyx_v_i;
35237       __pyx_t_8 = __pyx_v_i;
35238       *((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_obs_cov.strides[1]) )) = __pyx_t_float_complex_from_parts(1, 0);
35239     }
35240 
35241     /* "statsmodels/tsa/statespace/_representation.pyx":2834
35242  *
35243  *             # Make sure we do not have an observation intercept
35244  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:             # <<<<<<<<<<<<<<
35245  *                 raise RuntimeError('The observation collapse transformation'
35246  *                                    ' does not currently support an observation'
35247  */
35248     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2834, __pyx_L1_error)
35249     __Pyx_GOTREF(__pyx_t_10);
35250     __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2834, __pyx_L1_error)
35251     __Pyx_GOTREF(__pyx_t_11);
35252     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35253     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2834, __pyx_L1_error)}
35254     __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2834, __pyx_L1_error)
35255     __Pyx_GOTREF(__pyx_t_10);
35256     __pyx_t_12 = NULL;
35257     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
35258       __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
35259       if (likely(__pyx_t_12)) {
35260         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
35261         __Pyx_INCREF(__pyx_t_12);
35262         __Pyx_INCREF(function);
35263         __Pyx_DECREF_SET(__pyx_t_11, function);
35264       }
35265     }
35266     __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10);
35267     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
35268     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35269     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2834, __pyx_L1_error)
35270     __Pyx_GOTREF(__pyx_t_3);
35271     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35272     __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2834, __pyx_L1_error)
35273     __Pyx_GOTREF(__pyx_t_11);
35274     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35275     __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 2834, __pyx_L1_error)
35276     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35277     __pyx_t_14 = ((!__pyx_t_13) != 0);
35278     if (!__pyx_t_14) {
35279     } else {
35280       __pyx_t_2 = __pyx_t_14;
35281       goto __pyx_L12_bool_binop_done;
35282     }
35283     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2834, __pyx_L1_error)}
35284     __pyx_t_14 = (((__pyx_v_self->obs_intercept.shape[2]) > 1) != 0);
35285     __pyx_t_2 = __pyx_t_14;
35286     __pyx_L12_bool_binop_done:;
35287     if (unlikely(__pyx_t_2)) {
35288 
35289       /* "statsmodels/tsa/statespace/_representation.pyx":2835
35290  *             # Make sure we do not have an observation intercept
35291  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:
35292  *                 raise RuntimeError('The observation collapse transformation'             # <<<<<<<<<<<<<<
35293  *                                    ' does not currently support an observation'
35294  *                                    ' intercept.')
35295  */
35296       __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2835, __pyx_L1_error)
35297       __Pyx_GOTREF(__pyx_t_11);
35298       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
35299       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35300       __PYX_ERR(0, 2835, __pyx_L1_error)
35301 
35302       /* "statsmodels/tsa/statespace/_representation.pyx":2834
35303  *
35304  *             # Make sure we do not have an observation intercept
35305  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:             # <<<<<<<<<<<<<<
35306  *                 raise RuntimeError('The observation collapse transformation'
35307  *                                    ' does not currently support an observation'
35308  */
35309     }
35310 
35311     /* "statsmodels/tsa/statespace/_representation.pyx":2828
35312  *
35313  *         # Initialize the transformation
35314  *         if self.collapse_obs_cov[0,0] == 0:             # <<<<<<<<<<<<<<
35315  *             # Set H_t^* to identity
35316  *             for i in range(k_states):
35317  */
35318   }
35319 
35320   /* "statsmodels/tsa/statespace/_representation.pyx":2840
35321  *
35322  *         # Perform the Cholesky decomposition of H_t, if necessary
35323  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
35324  *             # Cholesky decomposition: $H = L L'$
35325  *             blas.ccopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
35326  */
35327   __pyx_t_14 = ((__pyx_v_t == 0) != 0);
35328   if (!__pyx_t_14) {
35329   } else {
35330     __pyx_t_2 = __pyx_t_14;
35331     goto __pyx_L15_bool_binop_done;
35332   }
35333   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2840, __pyx_L1_error)}
35334   __pyx_t_14 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
35335   if (!__pyx_t_14) {
35336   } else {
35337     __pyx_t_2 = __pyx_t_14;
35338     goto __pyx_L15_bool_binop_done;
35339   }
35340   __pyx_t_14 = (__pyx_v_reset_missing != 0);
35341   if (!__pyx_t_14) {
35342   } else {
35343     __pyx_t_2 = __pyx_t_14;
35344     goto __pyx_L15_bool_binop_done;
35345   }
35346   __pyx_t_14 = (__pyx_v_reset != 0);
35347   __pyx_t_2 = __pyx_t_14;
35348   __pyx_L15_bool_binop_done:;
35349   if (__pyx_t_2) {
35350 
35351     /* "statsmodels/tsa/statespace/_representation.pyx":2842
35352  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
35353  *             # Cholesky decomposition: $H = L L'$
35354  *             blas.ccopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)             # <<<<<<<<<<<<<<
35355  *             lapack.cpotrf("L", &self._k_endog, &self.transform_cholesky[0,0], &self._k_endog, &info)
35356  *
35357  */
35358     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2842, __pyx_L1_error)}
35359     __pyx_t_8 = 0;
35360     __pyx_t_7 = 0;
35361     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->_k_endog2), __pyx_v_self->_obs_cov, (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_inc));
35362 
35363     /* "statsmodels/tsa/statespace/_representation.pyx":2843
35364  *             # Cholesky decomposition: $H = L L'$
35365  *             blas.ccopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
35366  *             lapack.cpotrf("L", &self._k_endog, &self.transform_cholesky[0,0], &self._k_endog, &info)             # <<<<<<<<<<<<<<
35367  *
35368  *             # Check for errors
35369  */
35370     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2843, __pyx_L1_error)}
35371     __pyx_t_7 = 0;
35372     __pyx_t_8 = 0;
35373     __pyx_f_5scipy_6linalg_13cython_lapack_cpotrf(((char *)"L"), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
35374 
35375     /* "statsmodels/tsa/statespace/_representation.pyx":2846
35376  *
35377  *             # Check for errors
35378  *             if info > 0:             # <<<<<<<<<<<<<<
35379  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
35380  *             elif info < 0:
35381  */
35382     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
35383     if (unlikely(__pyx_t_2)) {
35384 
35385       /* "statsmodels/tsa/statespace/_representation.pyx":2847
35386  *             # Check for errors
35387  *             if info > 0:
35388  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
35389  *             elif info < 0:
35390  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
35391  */
35392       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2847, __pyx_L1_error)
35393       __Pyx_GOTREF(__pyx_t_3);
35394       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2847, __pyx_L1_error)
35395       __Pyx_GOTREF(__pyx_t_10);
35396       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35397       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2847, __pyx_L1_error)
35398       __Pyx_GOTREF(__pyx_t_3);
35399       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35400       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2847, __pyx_L1_error)
35401       __Pyx_GOTREF(__pyx_t_10);
35402       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_observatio, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2847, __pyx_L1_error)
35403       __Pyx_GOTREF(__pyx_t_12);
35404       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35405       __pyx_t_10 = NULL;
35406       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
35407         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
35408         if (likely(__pyx_t_10)) {
35409           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
35410           __Pyx_INCREF(__pyx_t_10);
35411           __Pyx_INCREF(function);
35412           __Pyx_DECREF_SET(__pyx_t_3, function);
35413         }
35414       }
35415       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
35416       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
35417       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35418       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2847, __pyx_L1_error)
35419       __Pyx_GOTREF(__pyx_t_11);
35420       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35421       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
35422       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35423       __PYX_ERR(0, 2847, __pyx_L1_error)
35424 
35425       /* "statsmodels/tsa/statespace/_representation.pyx":2846
35426  *
35427  *             # Check for errors
35428  *             if info > 0:             # <<<<<<<<<<<<<<
35429  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
35430  *             elif info < 0:
35431  */
35432     }
35433 
35434     /* "statsmodels/tsa/statespace/_representation.pyx":2848
35435  *             if info > 0:
35436  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
35437  *             elif info < 0:             # <<<<<<<<<<<<<<
35438  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
35439  *
35440  */
35441     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
35442     if (unlikely(__pyx_t_2)) {
35443 
35444       /* "statsmodels/tsa/statespace/_representation.pyx":2849
35445  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
35446  *             elif info < 0:
35447  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
35448  *
35449  *             # Calculate the determinant (just the squared product of the
35450  */
35451       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2849, __pyx_L1_error)
35452       __Pyx_GOTREF(__pyx_t_3);
35453       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2849, __pyx_L1_error)
35454       __Pyx_GOTREF(__pyx_t_12);
35455       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35456       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2849, __pyx_L1_error)
35457       __Pyx_GOTREF(__pyx_t_3);
35458       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35459       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2849, __pyx_L1_error)
35460       __Pyx_GOTREF(__pyx_t_12);
35461       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_observation_cov, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2849, __pyx_L1_error)
35462       __Pyx_GOTREF(__pyx_t_10);
35463       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35464       __pyx_t_12 = NULL;
35465       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
35466         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
35467         if (likely(__pyx_t_12)) {
35468           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
35469           __Pyx_INCREF(__pyx_t_12);
35470           __Pyx_INCREF(function);
35471           __Pyx_DECREF_SET(__pyx_t_3, function);
35472         }
35473       }
35474       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
35475       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
35476       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35477       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2849, __pyx_L1_error)
35478       __Pyx_GOTREF(__pyx_t_11);
35479       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35480       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
35481       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35482       __PYX_ERR(0, 2849, __pyx_L1_error)
35483 
35484       /* "statsmodels/tsa/statespace/_representation.pyx":2848
35485  *             if info > 0:
35486  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
35487  *             elif info < 0:             # <<<<<<<<<<<<<<
35488  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
35489  *
35490  */
35491     }
35492 
35493     /* "statsmodels/tsa/statespace/_representation.pyx":2853
35494  *             # Calculate the determinant (just the squared product of the
35495  *             # diagonals, in the Cholesky decomposition case)
35496  *             self.transform_determinant = 0.             # <<<<<<<<<<<<<<
35497  *             for i in range(self._k_endog):
35498  *                 j = i * (self._k_endog + 1)
35499  */
35500     __pyx_v_self->transform_determinant = __pyx_t_float_complex_from_parts(0., 0);
35501 
35502     /* "statsmodels/tsa/statespace/_representation.pyx":2854
35503  *             # diagonals, in the Cholesky decomposition case)
35504  *             self.transform_determinant = 0.
35505  *             for i in range(self._k_endog):             # <<<<<<<<<<<<<<
35506  *                 j = i * (self._k_endog + 1)
35507  *                 k = j % self.k_endog
35508  */
35509     __pyx_t_1 = __pyx_v_self->_k_endog;
35510     __pyx_t_5 = __pyx_t_1;
35511     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
35512       __pyx_v_i = __pyx_t_6;
35513 
35514       /* "statsmodels/tsa/statespace/_representation.pyx":2855
35515  *             self.transform_determinant = 0.
35516  *             for i in range(self._k_endog):
35517  *                 j = i * (self._k_endog + 1)             # <<<<<<<<<<<<<<
35518  *                 k = j % self.k_endog
35519  *                 l = j // self.k_endog
35520  */
35521       __pyx_v_j = (__pyx_v_i * (__pyx_v_self->_k_endog + 1));
35522 
35523       /* "statsmodels/tsa/statespace/_representation.pyx":2856
35524  *             for i in range(self._k_endog):
35525  *                 j = i * (self._k_endog + 1)
35526  *                 k = j % self.k_endog             # <<<<<<<<<<<<<<
35527  *                 l = j // self.k_endog
35528  *                 if not self.transform_cholesky[k, l] == 0:
35529  */
35530       if (unlikely(__pyx_v_self->k_endog == 0)) {
35531         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
35532         __PYX_ERR(0, 2856, __pyx_L1_error)
35533       }
35534       __pyx_v_k = __Pyx_mod_int(__pyx_v_j, __pyx_v_self->k_endog);
35535 
35536       /* "statsmodels/tsa/statespace/_representation.pyx":2857
35537  *                 j = i * (self._k_endog + 1)
35538  *                 k = j % self.k_endog
35539  *                 l = j // self.k_endog             # <<<<<<<<<<<<<<
35540  *                 if not self.transform_cholesky[k, l] == 0:
35541  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])
35542  */
35543       if (unlikely(__pyx_v_self->k_endog == 0)) {
35544         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
35545         __PYX_ERR(0, 2857, __pyx_L1_error)
35546       }
35547       else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_self->k_endog == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_j))) {
35548         PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
35549         __PYX_ERR(0, 2857, __pyx_L1_error)
35550       }
35551       __pyx_v_l = __Pyx_div_int(__pyx_v_j, __pyx_v_self->k_endog);
35552 
35553       /* "statsmodels/tsa/statespace/_representation.pyx":2858
35554  *                 k = j % self.k_endog
35555  *                 l = j // self.k_endog
35556  *                 if not self.transform_cholesky[k, l] == 0:             # <<<<<<<<<<<<<<
35557  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])
35558  *             self.transform_determinant = 2 * self.transform_determinant
35559  */
35560       if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2858, __pyx_L1_error)}
35561       __pyx_t_8 = __pyx_v_k;
35562       __pyx_t_7 = __pyx_v_l;
35563       __pyx_t_2 = ((!((__Pyx_c_eq_float((*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_cholesky.strides[1]) ))), __pyx_t_float_complex_from_parts(0, 0))) != 0)) != 0);
35564       if (__pyx_t_2) {
35565 
35566         /* "statsmodels/tsa/statespace/_representation.pyx":2859
35567  *                 l = j // self.k_endog
35568  *                 if not self.transform_cholesky[k, l] == 0:
35569  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])             # <<<<<<<<<<<<<<
35570  *             self.transform_determinant = 2 * self.transform_determinant
35571  *
35572  */
35573         if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2859, __pyx_L1_error)}
35574         __pyx_t_7 = __pyx_v_k;
35575         __pyx_t_8 = __pyx_v_l;
35576         __pyx_t_15 = (*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )));
35577         __pyx_t_16 = __Pyx_c_sum_double(__pyx_t_double_complex_from_parts(__Pyx_CREAL(__pyx_v_self->transform_determinant), __Pyx_CIMAG(__pyx_v_self->transform_determinant)), __pyx_f_11statsmodels_3src_4math_zlog(__pyx_t_double_complex_from_parts(__Pyx_CREAL(__pyx_t_15), __Pyx_CIMAG(__pyx_t_15))));
35578         __pyx_v_self->transform_determinant = __pyx_t_float_complex_from_parts(__Pyx_CREAL(__pyx_t_16), __Pyx_CIMAG(__pyx_t_16));
35579 
35580         /* "statsmodels/tsa/statespace/_representation.pyx":2858
35581  *                 k = j % self.k_endog
35582  *                 l = j // self.k_endog
35583  *                 if not self.transform_cholesky[k, l] == 0:             # <<<<<<<<<<<<<<
35584  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])
35585  *             self.transform_determinant = 2 * self.transform_determinant
35586  */
35587       }
35588     }
35589 
35590     /* "statsmodels/tsa/statespace/_representation.pyx":2860
35591  *                 if not self.transform_cholesky[k, l] == 0:
35592  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])
35593  *             self.transform_determinant = 2 * self.transform_determinant             # <<<<<<<<<<<<<<
35594  *
35595  *         # Get $Z_t \equiv C^{-1}$, if necessary
35596  */
35597     __pyx_v_self->transform_determinant = __Pyx_c_prod_float(__pyx_t_float_complex_from_parts(2, 0), __pyx_v_self->transform_determinant);
35598 
35599     /* "statsmodels/tsa/statespace/_representation.pyx":2840
35600  *
35601  *         # Perform the Cholesky decomposition of H_t, if necessary
35602  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
35603  *             # Cholesky decomposition: $H = L L'$
35604  *             blas.ccopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
35605  */
35606   }
35607 
35608   /* "statsmodels/tsa/statespace/_representation.pyx":2863
35609  *
35610  *         # Get $Z_t \equiv C^{-1}$, if necessary
35611  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
35612  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
35613  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
35614  */
35615   __pyx_t_14 = ((__pyx_v_t == 0) != 0);
35616   if (!__pyx_t_14) {
35617   } else {
35618     __pyx_t_2 = __pyx_t_14;
35619     goto __pyx_L24_bool_binop_done;
35620   }
35621   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2863, __pyx_L1_error)}
35622   __pyx_t_14 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
35623   if (!__pyx_t_14) {
35624   } else {
35625     __pyx_t_2 = __pyx_t_14;
35626     goto __pyx_L24_bool_binop_done;
35627   }
35628   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2863, __pyx_L1_error)}
35629   __pyx_t_14 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
35630   if (!__pyx_t_14) {
35631   } else {
35632     __pyx_t_2 = __pyx_t_14;
35633     goto __pyx_L24_bool_binop_done;
35634   }
35635   __pyx_t_14 = (__pyx_v_reset_missing != 0);
35636   if (!__pyx_t_14) {
35637   } else {
35638     __pyx_t_2 = __pyx_t_14;
35639     goto __pyx_L24_bool_binop_done;
35640   }
35641   __pyx_t_14 = (__pyx_v_reset != 0);
35642   __pyx_t_2 = __pyx_t_14;
35643   __pyx_L24_bool_binop_done:;
35644   if (__pyx_t_2) {
35645 
35646     /* "statsmodels/tsa/statespace/_representation.pyx":2865
35647  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:
35648  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
35649  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)             # <<<<<<<<<<<<<<
35650  *             lapack.cpotrs("L", &self._k_endog, &k_states,
35651  *                             &self.transform_cholesky[0,0], &self._k_endog,
35652  */
35653     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2865, __pyx_L1_error)}
35654     __pyx_t_8 = 0;
35655     __pyx_t_7 = 0;
35656     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->_k_endogstates), __pyx_v_self->_design, (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_design.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_inc));
35657 
35658     /* "statsmodels/tsa/statespace/_representation.pyx":2867
35659  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
35660  *             lapack.cpotrs("L", &self._k_endog, &k_states,
35661  *                             &self.transform_cholesky[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
35662  *                             &self.transform_design[0,0], &self._k_endog,
35663  *                             &info)
35664  */
35665     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2867, __pyx_L1_error)}
35666     __pyx_t_7 = 0;
35667     __pyx_t_8 = 0;
35668 
35669     /* "statsmodels/tsa/statespace/_representation.pyx":2868
35670  *             lapack.cpotrs("L", &self._k_endog, &k_states,
35671  *                             &self.transform_cholesky[0,0], &self._k_endog,
35672  *                             &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
35673  *                             &info)
35674  *
35675  */
35676     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2868, __pyx_L1_error)}
35677     __pyx_t_17 = 0;
35678     __pyx_t_18 = 0;
35679 
35680     /* "statsmodels/tsa/statespace/_representation.pyx":2866
35681  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
35682  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
35683  *             lapack.cpotrs("L", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
35684  *                             &self.transform_cholesky[0,0], &self._k_endog,
35685  *                             &self.transform_design[0,0], &self._k_endog,
35686  */
35687     __pyx_f_5scipy_6linalg_13cython_lapack_cpotrs(((char *)"L"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_design.data) + __pyx_t_17)) ) + __pyx_t_18 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
35688 
35689     /* "statsmodels/tsa/statespace/_representation.pyx":2872
35690  *
35691  *             # Check for errors
35692  *             if not info == 0:             # <<<<<<<<<<<<<<
35693  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)
35694  *
35695  */
35696     __pyx_t_2 = ((!((__pyx_v_info == 0) != 0)) != 0);
35697     if (unlikely(__pyx_t_2)) {
35698 
35699       /* "statsmodels/tsa/statespace/_representation.pyx":2873
35700  *             # Check for errors
35701  *             if not info == 0:
35702  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
35703  *
35704  *             # Calculate $(H_t^{-1} Z_t)' Z_t$
35705  */
35706       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2873, __pyx_L1_error)
35707       __Pyx_GOTREF(__pyx_t_3);
35708       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2873, __pyx_L1_error)
35709       __Pyx_GOTREF(__pyx_t_10);
35710       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35711       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2873, __pyx_L1_error)
35712       __Pyx_GOTREF(__pyx_t_3);
35713       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35714       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2873, __pyx_L1_error)
35715       __Pyx_GOTREF(__pyx_t_10);
35716       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_calculation_of, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2873, __pyx_L1_error)
35717       __Pyx_GOTREF(__pyx_t_12);
35718       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35719       __pyx_t_10 = NULL;
35720       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
35721         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
35722         if (likely(__pyx_t_10)) {
35723           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
35724           __Pyx_INCREF(__pyx_t_10);
35725           __Pyx_INCREF(function);
35726           __Pyx_DECREF_SET(__pyx_t_3, function);
35727         }
35728       }
35729       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
35730       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
35731       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35732       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2873, __pyx_L1_error)
35733       __Pyx_GOTREF(__pyx_t_11);
35734       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35735       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
35736       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35737       __PYX_ERR(0, 2873, __pyx_L1_error)
35738 
35739       /* "statsmodels/tsa/statespace/_representation.pyx":2872
35740  *
35741  *             # Check for errors
35742  *             if not info == 0:             # <<<<<<<<<<<<<<
35743  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)
35744  *
35745  */
35746     }
35747 
35748     /* "statsmodels/tsa/statespace/_representation.pyx":2879
35749  *             blas.cgemm("T", "N", &k_states, &k_states, &self._k_endog,
35750  *                    &alpha, self._design, &self._k_endog,
35751  *                            &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
35752  *                    &beta, &self.collapse_cholesky[0,0], &self._k_states)
35753  *
35754  */
35755     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2879, __pyx_L1_error)}
35756     __pyx_t_18 = 0;
35757     __pyx_t_17 = 0;
35758 
35759     /* "statsmodels/tsa/statespace/_representation.pyx":2880
35760  *                    &alpha, self._design, &self._k_endog,
35761  *                            &self.transform_design[0,0], &self._k_endog,
35762  *                    &beta, &self.collapse_cholesky[0,0], &self._k_states)             # <<<<<<<<<<<<<<
35763  *
35764  *             # Calculate $(Z_t' H_t^{-1} Z_t)^{-1}$ via Cholesky inversion
35765  */
35766     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2880, __pyx_L1_error)}
35767     __pyx_t_8 = 0;
35768     __pyx_t_7 = 0;
35769 
35770     /* "statsmodels/tsa/statespace/_representation.pyx":2877
35771  *             # Calculate $(H_t^{-1} Z_t)' Z_t$
35772  *             # $(m \times m) = (m \times p) (p \times p) (p \times m)$
35773  *             blas.cgemm("T", "N", &k_states, &k_states, &self._k_endog,             # <<<<<<<<<<<<<<
35774  *                    &alpha, self._design, &self._k_endog,
35775  *                            &self.transform_design[0,0], &self._k_endog,
35776  */
35777     __pyx_f_5scipy_6linalg_11cython_blas_cgemm(((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&__pyx_v_k_states), (&__pyx_v_self->_k_endog), (&__pyx_v_alpha), __pyx_v_self->_design, (&__pyx_v_self->_k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_design.data) + __pyx_t_18)) ) + __pyx_t_17 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_beta), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states));
35778 
35779     /* "statsmodels/tsa/statespace/_representation.pyx":2883
35780  *
35781  *             # Calculate $(Z_t' H_t^{-1} Z_t)^{-1}$ via Cholesky inversion
35782  *             lapack.cpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
35783  *             # Check for errors
35784  *             if info > 0:
35785  */
35786     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2883, __pyx_L1_error)}
35787     __pyx_t_7 = 0;
35788     __pyx_t_8 = 0;
35789     __pyx_f_5scipy_6linalg_13cython_lapack_cpotrf(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
35790 
35791     /* "statsmodels/tsa/statespace/_representation.pyx":2885
35792  *             lapack.cpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
35793  *             # Check for errors
35794  *             if info > 0:             # <<<<<<<<<<<<<<
35795  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
35796  *             elif info < 0:
35797  */
35798     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
35799     if (unlikely(__pyx_t_2)) {
35800 
35801       /* "statsmodels/tsa/statespace/_representation.pyx":2886
35802  *             # Check for errors
35803  *             if info > 0:
35804  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
35805  *             elif info < 0:
35806  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
35807  */
35808       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2886, __pyx_L1_error)
35809       __Pyx_GOTREF(__pyx_t_3);
35810       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2886, __pyx_L1_error)
35811       __Pyx_GOTREF(__pyx_t_12);
35812       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35813       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2886, __pyx_L1_error)
35814       __Pyx_GOTREF(__pyx_t_3);
35815       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35816       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2886, __pyx_L1_error)
35817       __Pyx_GOTREF(__pyx_t_12);
35818       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_ZHZ_matrix, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2886, __pyx_L1_error)
35819       __Pyx_GOTREF(__pyx_t_10);
35820       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35821       __pyx_t_12 = NULL;
35822       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
35823         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
35824         if (likely(__pyx_t_12)) {
35825           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
35826           __Pyx_INCREF(__pyx_t_12);
35827           __Pyx_INCREF(function);
35828           __Pyx_DECREF_SET(__pyx_t_3, function);
35829         }
35830       }
35831       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
35832       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
35833       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35834       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2886, __pyx_L1_error)
35835       __Pyx_GOTREF(__pyx_t_11);
35836       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35837       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
35838       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35839       __PYX_ERR(0, 2886, __pyx_L1_error)
35840 
35841       /* "statsmodels/tsa/statespace/_representation.pyx":2885
35842  *             lapack.cpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
35843  *             # Check for errors
35844  *             if info > 0:             # <<<<<<<<<<<<<<
35845  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
35846  *             elif info < 0:
35847  */
35848     }
35849 
35850     /* "statsmodels/tsa/statespace/_representation.pyx":2887
35851  *             if info > 0:
35852  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
35853  *             elif info < 0:             # <<<<<<<<<<<<<<
35854  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
35855  *             lapack.cpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
35856  */
35857     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
35858     if (unlikely(__pyx_t_2)) {
35859 
35860       /* "statsmodels/tsa/statespace/_representation.pyx":2888
35861  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
35862  *             elif info < 0:
35863  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
35864  *             lapack.cpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
35865  *
35866  */
35867       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2888, __pyx_L1_error)
35868       __Pyx_GOTREF(__pyx_t_3);
35869       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2888, __pyx_L1_error)
35870       __Pyx_GOTREF(__pyx_t_10);
35871       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35872       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2888, __pyx_L1_error)
35873       __Pyx_GOTREF(__pyx_t_3);
35874       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35875       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2888, __pyx_L1_error)
35876       __Pyx_GOTREF(__pyx_t_10);
35877       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_ZHZ_matrix_enco, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2888, __pyx_L1_error)
35878       __Pyx_GOTREF(__pyx_t_12);
35879       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35880       __pyx_t_10 = NULL;
35881       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
35882         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
35883         if (likely(__pyx_t_10)) {
35884           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
35885           __Pyx_INCREF(__pyx_t_10);
35886           __Pyx_INCREF(function);
35887           __Pyx_DECREF_SET(__pyx_t_3, function);
35888         }
35889       }
35890       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
35891       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
35892       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35893       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2888, __pyx_L1_error)
35894       __Pyx_GOTREF(__pyx_t_11);
35895       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35896       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
35897       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35898       __PYX_ERR(0, 2888, __pyx_L1_error)
35899 
35900       /* "statsmodels/tsa/statespace/_representation.pyx":2887
35901  *             if info > 0:
35902  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
35903  *             elif info < 0:             # <<<<<<<<<<<<<<
35904  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
35905  *             lapack.cpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
35906  */
35907     }
35908 
35909     /* "statsmodels/tsa/statespace/_representation.pyx":2889
35910  *             elif info < 0:
35911  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
35912  *             lapack.cpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
35913  *
35914  *             # Calculate $C_t$ (the upper triangular cholesky decomposition of $(Z_t' H_t^{-1} Z_t)^{-1}$)
35915  */
35916     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2889, __pyx_L1_error)}
35917     __pyx_t_8 = 0;
35918     __pyx_t_7 = 0;
35919     __pyx_f_5scipy_6linalg_13cython_lapack_cpotri(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
35920 
35921     /* "statsmodels/tsa/statespace/_representation.pyx":2892
35922  *
35923  *             # Calculate $C_t$ (the upper triangular cholesky decomposition of $(Z_t' H_t^{-1} Z_t)^{-1}$)
35924  *             lapack.cpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
35925  *
35926  *             # Check for errors
35927  */
35928     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2892, __pyx_L1_error)}
35929     __pyx_t_7 = 0;
35930     __pyx_t_8 = 0;
35931     __pyx_f_5scipy_6linalg_13cython_lapack_cpotrf(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
35932 
35933     /* "statsmodels/tsa/statespace/_representation.pyx":2895
35934  *
35935  *             # Check for errors
35936  *             if info > 0:             # <<<<<<<<<<<<<<
35937  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
35938  *             elif info < 0:
35939  */
35940     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
35941     if (unlikely(__pyx_t_2)) {
35942 
35943       /* "statsmodels/tsa/statespace/_representation.pyx":2896
35944  *             # Check for errors
35945  *             if info > 0:
35946  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
35947  *             elif info < 0:
35948  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
35949  */
35950       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2896, __pyx_L1_error)
35951       __Pyx_GOTREF(__pyx_t_3);
35952       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2896, __pyx_L1_error)
35953       __Pyx_GOTREF(__pyx_t_12);
35954       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35955       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2896, __pyx_L1_error)
35956       __Pyx_GOTREF(__pyx_t_3);
35957       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35958       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2896, __pyx_L1_error)
35959       __Pyx_GOTREF(__pyx_t_12);
35960       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_C_matrix_e, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2896, __pyx_L1_error)
35961       __Pyx_GOTREF(__pyx_t_10);
35962       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
35963       __pyx_t_12 = NULL;
35964       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
35965         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
35966         if (likely(__pyx_t_12)) {
35967           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
35968           __Pyx_INCREF(__pyx_t_12);
35969           __Pyx_INCREF(function);
35970           __Pyx_DECREF_SET(__pyx_t_3, function);
35971         }
35972       }
35973       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
35974       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
35975       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
35976       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2896, __pyx_L1_error)
35977       __Pyx_GOTREF(__pyx_t_11);
35978       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
35979       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
35980       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
35981       __PYX_ERR(0, 2896, __pyx_L1_error)
35982 
35983       /* "statsmodels/tsa/statespace/_representation.pyx":2895
35984  *
35985  *             # Check for errors
35986  *             if info > 0:             # <<<<<<<<<<<<<<
35987  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
35988  *             elif info < 0:
35989  */
35990     }
35991 
35992     /* "statsmodels/tsa/statespace/_representation.pyx":2897
35993  *             if info > 0:
35994  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
35995  *             elif info < 0:             # <<<<<<<<<<<<<<
35996  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
35997  *
35998  */
35999     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
36000     if (unlikely(__pyx_t_2)) {
36001 
36002       /* "statsmodels/tsa/statespace/_representation.pyx":2898
36003  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
36004  *             elif info < 0:
36005  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
36006  *
36007  *             # Calculate $C_t'^{-1} \equiv Z_t$
36008  */
36009       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2898, __pyx_L1_error)
36010       __Pyx_GOTREF(__pyx_t_3);
36011       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2898, __pyx_L1_error)
36012       __Pyx_GOTREF(__pyx_t_10);
36013       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
36014       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2898, __pyx_L1_error)
36015       __Pyx_GOTREF(__pyx_t_3);
36016       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
36017       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2898, __pyx_L1_error)
36018       __Pyx_GOTREF(__pyx_t_10);
36019       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_C_matrix_encoun, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2898, __pyx_L1_error)
36020       __Pyx_GOTREF(__pyx_t_12);
36021       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
36022       __pyx_t_10 = NULL;
36023       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
36024         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
36025         if (likely(__pyx_t_10)) {
36026           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
36027           __Pyx_INCREF(__pyx_t_10);
36028           __Pyx_INCREF(function);
36029           __Pyx_DECREF_SET(__pyx_t_3, function);
36030         }
36031       }
36032       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
36033       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
36034       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
36035       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2898, __pyx_L1_error)
36036       __Pyx_GOTREF(__pyx_t_11);
36037       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
36038       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
36039       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
36040       __PYX_ERR(0, 2898, __pyx_L1_error)
36041 
36042       /* "statsmodels/tsa/statespace/_representation.pyx":2897
36043  *             if info > 0:
36044  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
36045  *             elif info < 0:             # <<<<<<<<<<<<<<
36046  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
36047  *
36048  */
36049     }
36050 
36051     /* "statsmodels/tsa/statespace/_representation.pyx":2903
36052  *             # Do so by solving the system: $C_t' x = I$
36053  *             # (Recall that collapse_obs_cov is an identity matrix)
36054  *             blas.ccopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)             # <<<<<<<<<<<<<<
36055  *             lapack.ctrtrs("U", "T", "N", &k_states, &k_states,
36056  *                         &self.collapse_cholesky[0,0], &self._k_states,
36057  */
36058     if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2903, __pyx_L1_error)}
36059     __pyx_t_8 = 0;
36060     __pyx_t_7 = 0;
36061     if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2903, __pyx_L1_error)}
36062     __pyx_t_17 = 0;
36063     __pyx_t_18 = 0;
36064     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->_k_states2), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_obs_cov.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_design.data) + __pyx_t_17)) ) + __pyx_t_18 * __pyx_v_self->collapse_design.strides[1]) )))), (&__pyx_v_inc));
36065 
36066     /* "statsmodels/tsa/statespace/_representation.pyx":2905
36067  *             blas.ccopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)
36068  *             lapack.ctrtrs("U", "T", "N", &k_states, &k_states,
36069  *                         &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
36070  *                         &self.collapse_design[0,0], &self._k_states,
36071  *                         &info)
36072  */
36073     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2905, __pyx_L1_error)}
36074     __pyx_t_18 = 0;
36075     __pyx_t_17 = 0;
36076 
36077     /* "statsmodels/tsa/statespace/_representation.pyx":2906
36078  *             lapack.ctrtrs("U", "T", "N", &k_states, &k_states,
36079  *                         &self.collapse_cholesky[0,0], &self._k_states,
36080  *                         &self.collapse_design[0,0], &self._k_states,             # <<<<<<<<<<<<<<
36081  *                         &info)
36082  *
36083  */
36084     if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2906, __pyx_L1_error)}
36085     __pyx_t_7 = 0;
36086     __pyx_t_8 = 0;
36087 
36088     /* "statsmodels/tsa/statespace/_representation.pyx":2904
36089  *             # (Recall that collapse_obs_cov is an identity matrix)
36090  *             blas.ccopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)
36091  *             lapack.ctrtrs("U", "T", "N", &k_states, &k_states,             # <<<<<<<<<<<<<<
36092  *                         &self.collapse_cholesky[0,0], &self._k_states,
36093  *                         &self.collapse_design[0,0], &self._k_states,
36094  */
36095     __pyx_f_5scipy_6linalg_13cython_lapack_ctrtrs(((char *)"U"), ((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&__pyx_v_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_18)) ) + __pyx_t_17 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_design.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_design.strides[1]) )))), (&__pyx_v_self->_k_states), (&__pyx_v_info));
36096 
36097     /* "statsmodels/tsa/statespace/_representation.pyx":2863
36098  *
36099  *         # Get $Z_t \equiv C^{-1}$, if necessary
36100  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
36101  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
36102  *             blas.ccopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
36103  */
36104   }
36105 
36106   /* "statsmodels/tsa/statespace/_representation.pyx":2911
36107  *         # Calculate $\bar y_t^* = \bar A_t^* y_t = C_t Z_t' H_t^{-1} y_t$
36108  *         # (unless this is a completely missing observation)
36109  *         self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
36110  *         if not self._nmissing == self.k_endog:
36111  *             # If we have some missing elements, selected_obs is already populated
36112  */
36113   __pyx_v_self->collapse_loglikelihood = __pyx_t_float_complex_from_parts(0, 0);
36114 
36115   /* "statsmodels/tsa/statespace/_representation.pyx":2912
36116  *         # (unless this is a completely missing observation)
36117  *         self.collapse_loglikelihood = 0
36118  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
36119  *             # If we have some missing elements, selected_obs is already populated
36120  *             if self._nmissing == 0:
36121  */
36122   __pyx_t_2 = ((!((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0)) != 0);
36123   if (__pyx_t_2) {
36124 
36125     /* "statsmodels/tsa/statespace/_representation.pyx":2914
36126  *         if not self._nmissing == self.k_endog:
36127  *             # If we have some missing elements, selected_obs is already populated
36128  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
36129  *                 blas.ccopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
36130  *             # $\\# = Z_t' H_t^{-1} y_t$
36131  */
36132     __pyx_t_2 = ((__pyx_v_self->_nmissing == 0) != 0);
36133     if (__pyx_t_2) {
36134 
36135       /* "statsmodels/tsa/statespace/_representation.pyx":2915
36136  *             # If we have some missing elements, selected_obs is already populated
36137  *             if self._nmissing == 0:
36138  *                 blas.ccopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
36139  *             # $\\# = Z_t' H_t^{-1} y_t$
36140  *             blas.cgemv("T", &self._k_endog, &k_states,
36141  */
36142       if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2915, __pyx_L1_error)}
36143       __pyx_t_8 = 0;
36144       __pyx_t_9 = __pyx_v_t;
36145       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2915, __pyx_L1_error)}
36146       __pyx_t_7 = 0;
36147       __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_self->k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->obs.data) + __pyx_t_8)) ) + __pyx_t_9 * __pyx_v_self->obs.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_7 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
36148 
36149       /* "statsmodels/tsa/statespace/_representation.pyx":2914
36150  *         if not self._nmissing == self.k_endog:
36151  *             # If we have some missing elements, selected_obs is already populated
36152  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
36153  *                 blas.ccopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
36154  *             # $\\# = Z_t' H_t^{-1} y_t$
36155  */
36156     }
36157 
36158     /* "statsmodels/tsa/statespace/_representation.pyx":2918
36159  *             # $\\# = Z_t' H_t^{-1} y_t$
36160  *             blas.cgemv("T", &self._k_endog, &k_states,
36161  *                   &alpha, &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
36162  *                           &self.selected_obs[0], &inc,
36163  *                   &beta, &self.collapse_obs[0], &inc)
36164  */
36165     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2918, __pyx_L1_error)}
36166     __pyx_t_7 = 0;
36167     __pyx_t_8 = 0;
36168 
36169     /* "statsmodels/tsa/statespace/_representation.pyx":2919
36170  *             blas.cgemv("T", &self._k_endog, &k_states,
36171  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
36172  *                           &self.selected_obs[0], &inc,             # <<<<<<<<<<<<<<
36173  *                   &beta, &self.collapse_obs[0], &inc)
36174  *             # $y_t^* = C_t \\#$
36175  */
36176     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2919, __pyx_L1_error)}
36177     __pyx_t_17 = 0;
36178 
36179     /* "statsmodels/tsa/statespace/_representation.pyx":2920
36180  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
36181  *                           &self.selected_obs[0], &inc,
36182  *                   &beta, &self.collapse_obs[0], &inc)             # <<<<<<<<<<<<<<
36183  *             # $y_t^* = C_t \\#$
36184  *             blas.ctrmv("U", "N", "N", &k_states,
36185  */
36186     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2920, __pyx_L1_error)}
36187     __pyx_t_18 = 0;
36188 
36189     /* "statsmodels/tsa/statespace/_representation.pyx":2917
36190  *                 blas.ccopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
36191  *             # $\\# = Z_t' H_t^{-1} y_t$
36192  *             blas.cgemv("T", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
36193  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
36194  *                           &self.selected_obs[0], &inc,
36195  */
36196     __pyx_f_5scipy_6linalg_11cython_blas_cgemv(((char *)"T"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&__pyx_v_alpha), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_design.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_17 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc), (&__pyx_v_beta), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_18 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc));
36197 
36198     /* "statsmodels/tsa/statespace/_representation.pyx":2923
36199  *             # $y_t^* = C_t \\#$
36200  *             blas.ctrmv("U", "N", "N", &k_states,
36201  *                                 &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
36202  *                                 &self.collapse_obs[0], &inc)
36203  *
36204  */
36205     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2923, __pyx_L1_error)}
36206     __pyx_t_18 = 0;
36207     __pyx_t_17 = 0;
36208 
36209     /* "statsmodels/tsa/statespace/_representation.pyx":2924
36210  *             blas.ctrmv("U", "N", "N", &k_states,
36211  *                                 &self.collapse_cholesky[0,0], &self._k_states,
36212  *                                 &self.collapse_obs[0], &inc)             # <<<<<<<<<<<<<<
36213  *
36214  *             # Get residuals for loglikelihood calculation
36215  */
36216     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2924, __pyx_L1_error)}
36217     __pyx_t_8 = 0;
36218 
36219     /* "statsmodels/tsa/statespace/_representation.pyx":2922
36220  *                   &beta, &self.collapse_obs[0], &inc)
36221  *             # $y_t^* = C_t \\#$
36222  *             blas.ctrmv("U", "N", "N", &k_states,             # <<<<<<<<<<<<<<
36223  *                                 &self.collapse_cholesky[0,0], &self._k_states,
36224  *                                 &self.collapse_obs[0], &inc)
36225  */
36226     __pyx_f_5scipy_6linalg_11cython_blas_ctrmv(((char *)"U"), ((char *)"N"), ((char *)"N"), (&__pyx_v_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_18)) ) + __pyx_t_17 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_8 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc));
36227 
36228     /* "statsmodels/tsa/statespace/_representation.pyx":2936
36229  *
36230  *             # $ \\# = C_t' y_t^*$
36231  *             blas.ccopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)             # <<<<<<<<<<<<<<
36232  *             blas.ctrmv("U", "T", "N", &k_states,
36233  *                                 &self.collapse_cholesky[0,0], &self._k_states,
36234  */
36235     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2936, __pyx_L1_error)}
36236     __pyx_t_8 = 0;
36237     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2936, __pyx_L1_error)}
36238     __pyx_t_17 = 0;
36239     __pyx_f_5scipy_6linalg_11cython_blas_ccopy((&__pyx_v_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_8 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_17 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc));
36240 
36241     /* "statsmodels/tsa/statespace/_representation.pyx":2938
36242  *             blas.ccopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)
36243  *             blas.ctrmv("U", "T", "N", &k_states,
36244  *                                 &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
36245  *                                 &self.collapse_obs_tmp[0], &inc)
36246  *
36247  */
36248     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2938, __pyx_L1_error)}
36249     __pyx_t_17 = 0;
36250     __pyx_t_8 = 0;
36251 
36252     /* "statsmodels/tsa/statespace/_representation.pyx":2939
36253  *             blas.ctrmv("U", "T", "N", &k_states,
36254  *                                 &self.collapse_cholesky[0,0], &self._k_states,
36255  *                                 &self.collapse_obs_tmp[0], &inc)             # <<<<<<<<<<<<<<
36256  *
36257  *             # $e_t = - Z_t C_t' y_t^* + y_t$
36258  */
36259     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2939, __pyx_L1_error)}
36260     __pyx_t_18 = 0;
36261 
36262     /* "statsmodels/tsa/statespace/_representation.pyx":2937
36263  *             # $ \\# = C_t' y_t^*$
36264  *             blas.ccopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)
36265  *             blas.ctrmv("U", "T", "N", &k_states,             # <<<<<<<<<<<<<<
36266  *                                 &self.collapse_cholesky[0,0], &self._k_states,
36267  *                                 &self.collapse_obs_tmp[0], &inc)
36268  */
36269     __pyx_f_5scipy_6linalg_11cython_blas_ctrmv(((char *)"U"), ((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_17)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_18 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc));
36270 
36271     /* "statsmodels/tsa/statespace/_representation.pyx":2944
36272  *             blas.cgemv("N", &self._k_endog, &k_states,
36273  *                   &gamma, self._design, &self._k_endog,
36274  *                           &self.collapse_obs_tmp[0], &inc,             # <<<<<<<<<<<<<<
36275  *                   &alpha, &self.selected_obs[0], &inc)
36276  *
36277  */
36278     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2944, __pyx_L1_error)}
36279     __pyx_t_18 = 0;
36280 
36281     /* "statsmodels/tsa/statespace/_representation.pyx":2945
36282  *                   &gamma, self._design, &self._k_endog,
36283  *                           &self.collapse_obs_tmp[0], &inc,
36284  *                   &alpha, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
36285  *
36286  *             # Calculate e_t' H_t^{-1} e_t via Cholesky solver
36287  */
36288     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2945, __pyx_L1_error)}
36289     __pyx_t_8 = 0;
36290 
36291     /* "statsmodels/tsa/statespace/_representation.pyx":2942
36292  *
36293  *             # $e_t = - Z_t C_t' y_t^* + y_t$
36294  *             blas.cgemv("N", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
36295  *                   &gamma, self._design, &self._k_endog,
36296  *                           &self.collapse_obs_tmp[0], &inc,
36297  */
36298     __pyx_f_5scipy_6linalg_11cython_blas_cgemv(((char *)"N"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&__pyx_v_gamma), __pyx_v_self->_design, (&__pyx_v_self->_k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_18 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc), (&__pyx_v_alpha), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_8 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
36299 
36300     /* "statsmodels/tsa/statespace/_representation.pyx":2953
36301  *             # solve of $L x = e_t$  where L is lower triangular
36302  *             lapack.ctrtrs("L", "N", "N", &self._k_endog, &inc,
36303  *                         &self.transform_cholesky[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
36304  *                         &self.selected_obs[0], &self._k_endog,
36305  *                         &info)
36306  */
36307     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2953, __pyx_L1_error)}
36308     __pyx_t_8 = 0;
36309     __pyx_t_18 = 0;
36310 
36311     /* "statsmodels/tsa/statespace/_representation.pyx":2954
36312  *             lapack.ctrtrs("L", "N", "N", &self._k_endog, &inc,
36313  *                         &self.transform_cholesky[0,0], &self._k_endog,
36314  *                         &self.selected_obs[0], &self._k_endog,             # <<<<<<<<<<<<<<
36315  *                         &info)
36316  *
36317  */
36318     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2954, __pyx_L1_error)}
36319     __pyx_t_17 = 0;
36320 
36321     /* "statsmodels/tsa/statespace/_representation.pyx":2952
36322  *             # We have $L$ in `transform_cholesky`, so we want to do a linear
36323  *             # solve of $L x = e_t$  where L is lower triangular
36324  *             lapack.ctrtrs("L", "N", "N", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
36325  *                         &self.transform_cholesky[0,0], &self._k_endog,
36326  *                         &self.selected_obs[0], &self._k_endog,
36327  */
36328     __pyx_f_5scipy_6linalg_13cython_lapack_ctrtrs(((char *)"L"), ((char *)"N"), ((char *)"N"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_18 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_17 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
36329 
36330     /* "statsmodels/tsa/statespace/_representation.pyx":2960
36331  *
36332  *             # $e_t' H_t^{-1} e_t = (L^{-1} e_t)' L^{-1} e_t = \sum_i e_{i,t}**2$
36333  *             self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
36334  *             for i in range(self._k_endog):
36335  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2
36336  */
36337     __pyx_v_self->collapse_loglikelihood = __pyx_t_float_complex_from_parts(0, 0);
36338 
36339     /* "statsmodels/tsa/statespace/_representation.pyx":2961
36340  *             # $e_t' H_t^{-1} e_t = (L^{-1} e_t)' L^{-1} e_t = \sum_i e_{i,t}**2$
36341  *             self.collapse_loglikelihood = 0
36342  *             for i in range(self._k_endog):             # <<<<<<<<<<<<<<
36343  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2
36344  *
36345  */
36346     __pyx_t_1 = __pyx_v_self->_k_endog;
36347     __pyx_t_5 = __pyx_t_1;
36348     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
36349       __pyx_v_i = __pyx_t_6;
36350 
36351       /* "statsmodels/tsa/statespace/_representation.pyx":2962
36352  *             self.collapse_loglikelihood = 0
36353  *             for i in range(self._k_endog):
36354  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2             # <<<<<<<<<<<<<<
36355  *
36356  *             # (p-m) log( 2*pi) + log( |H_t| )
36357  */
36358       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2962, __pyx_L1_error)}
36359       __pyx_t_17 = __pyx_v_i;
36360       __pyx_v_self->collapse_loglikelihood = __Pyx_c_sum_float(__pyx_v_self->collapse_loglikelihood, __Pyx_c_pow_float((*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_17 * __pyx_v_self->selected_obs.strides[0]) ))), __pyx_t_float_complex_from_parts(2, 0)));
36361     }
36362 
36363     /* "statsmodels/tsa/statespace/_representation.pyx":2967
36364  *             self.collapse_loglikelihood = (
36365  *                 self.collapse_loglikelihood +
36366  *                 (self._k_endog - k_states)*zlog(2*NPY_PI) +             # <<<<<<<<<<<<<<
36367  *                 self.transform_determinant
36368  *             )
36369  */
36370     __pyx_t_16 = __Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_t_double_complex_from_parts(__Pyx_CREAL(__pyx_v_self->collapse_loglikelihood), __Pyx_CIMAG(__pyx_v_self->collapse_loglikelihood)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts((__pyx_v_self->_k_endog - __pyx_v_k_states), 0), __pyx_f_11statsmodels_3src_4math_zlog(__pyx_t_double_complex_from_parts((2.0 * NPY_PI), 0)))), __pyx_t_double_complex_from_parts(__Pyx_CREAL(__pyx_v_self->transform_determinant), __Pyx_CIMAG(__pyx_v_self->transform_determinant)));
36371 
36372     /* "statsmodels/tsa/statespace/_representation.pyx":2965
36373  *
36374  *             # (p-m) log( 2*pi) + log( |H_t| )
36375  *             self.collapse_loglikelihood = (             # <<<<<<<<<<<<<<
36376  *                 self.collapse_loglikelihood +
36377  *                 (self._k_endog - k_states)*zlog(2*NPY_PI) +
36378  */
36379     __pyx_v_self->collapse_loglikelihood = __pyx_t_float_complex_from_parts(__Pyx_CREAL(__pyx_t_16), __Pyx_CIMAG(__pyx_t_16));
36380 
36381     /* "statsmodels/tsa/statespace/_representation.pyx":2972
36382  *
36383  *             # -0.5 * ...
36384  *             self.collapse_loglikelihood = -0.5 * self.collapse_loglikelihood             # <<<<<<<<<<<<<<
36385  *
36386  *         # Set pointers
36387  */
36388     __pyx_t_16 = __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(-0.5, 0), __pyx_t_double_complex_from_parts(__Pyx_CREAL(__pyx_v_self->collapse_loglikelihood), __Pyx_CIMAG(__pyx_v_self->collapse_loglikelihood)));
36389     __pyx_v_self->collapse_loglikelihood = __pyx_t_float_complex_from_parts(__Pyx_CREAL(__pyx_t_16), __Pyx_CIMAG(__pyx_t_16));
36390 
36391     /* "statsmodels/tsa/statespace/_representation.pyx":2912
36392  *         # (unless this is a completely missing observation)
36393  *         self.collapse_loglikelihood = 0
36394  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
36395  *             # If we have some missing elements, selected_obs is already populated
36396  *             if self._nmissing == 0:
36397  */
36398   }
36399 
36400   /* "statsmodels/tsa/statespace/_representation.pyx":2975
36401  *
36402  *         # Set pointers
36403  *         self._obs = &self.collapse_obs[0]             # <<<<<<<<<<<<<<
36404  *         self._design = &self.collapse_design[0,0]
36405  *         self._obs_cov = &self.collapse_obs_cov[0,0]
36406  */
36407   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2975, __pyx_L1_error)}
36408   __pyx_t_17 = 0;
36409   __pyx_v_self->_obs = (&(*((__pyx_t_float_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_17 * __pyx_v_self->collapse_obs.strides[0]) ))));
36410 
36411   /* "statsmodels/tsa/statespace/_representation.pyx":2976
36412  *         # Set pointers
36413  *         self._obs = &self.collapse_obs[0]
36414  *         self._design = &self.collapse_design[0,0]             # <<<<<<<<<<<<<<
36415  *         self._obs_cov = &self.collapse_obs_cov[0,0]
36416  *
36417  */
36418   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2976, __pyx_L1_error)}
36419   __pyx_t_17 = 0;
36420   __pyx_t_18 = 0;
36421   __pyx_v_self->_design = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_design.data) + __pyx_t_17)) ) + __pyx_t_18 * __pyx_v_self->collapse_design.strides[1]) ))));
36422 
36423   /* "statsmodels/tsa/statespace/_representation.pyx":2977
36424  *         self._obs = &self.collapse_obs[0]
36425  *         self._design = &self.collapse_design[0,0]
36426  *         self._obs_cov = &self.collapse_obs_cov[0,0]             # <<<<<<<<<<<<<<
36427  *
36428  *         # TODO can I replace this with k_states? I think I should be able to
36429  */
36430   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2977, __pyx_L1_error)}
36431   __pyx_t_18 = 0;
36432   __pyx_t_17 = 0;
36433   __pyx_v_self->_obs_cov = (&(*((__pyx_t_float_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_float_complex *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_18)) ) + __pyx_t_17 * __pyx_v_self->collapse_obs_cov.strides[1]) ))));
36434 
36435   /* "statsmodels/tsa/statespace/_representation.pyx":2980
36436  *
36437  *         # TODO can I replace this with k_states? I think I should be able to
36438  *         return self._k_states             # <<<<<<<<<<<<<<
36439  *
36440  * # ### Selected covariance matrice
36441  */
36442   __pyx_r = __pyx_v_self->_k_states;
36443   goto __pyx_L0;
36444 
36445   /* "statsmodels/tsa/statespace/_representation.pyx":2787
36446  *         self._obs_intercept = &self.transform_obs_intercept[0]
36447  *
36448  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:             # <<<<<<<<<<<<<<
36449  *         # Note: this assumes that initialize_object_pointers has *already* been done
36450  *         # Note: this assumes that select_missing has *already* been done
36451  */
36452 
36453   /* function exit code */
36454   __pyx_L1_error:;
36455   __Pyx_XDECREF(__pyx_t_3);
36456   __Pyx_XDECREF(__pyx_t_10);
36457   __Pyx_XDECREF(__pyx_t_11);
36458   __Pyx_XDECREF(__pyx_t_12);
36459   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transform_generalized_collapse", __pyx_clineno, __pyx_lineno, __pyx_filename);
36460   __pyx_r = 0;
36461   __pyx_L0:;
36462   __Pyx_RefNannyFinishContext();
36463   return __pyx_r;
36464 }
36465 
36466 /* "statsmodels/tsa/statespace/_representation.pxd":169
36467  * cdef class cStatespace(object):
36468  *     # Statespace dimensions
36469  *     cdef readonly int nobs, k_endog, k_states, k_posdef             # <<<<<<<<<<<<<<
36470  *
36471  *     # Statespace representation matrices
36472  */
36473 
36474 /* Python wrapper */
36475 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4nobs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4nobs_1__get__(PyObject * __pyx_v_self)36476 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4nobs_1__get__(PyObject *__pyx_v_self) {
36477   PyObject *__pyx_r = 0;
36478   __Pyx_RefNannyDeclarations
36479   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36480   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4nobs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36481 
36482   /* function exit code */
36483   __Pyx_RefNannyFinishContext();
36484   return __pyx_r;
36485 }
36486 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36487 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36488   PyObject *__pyx_r = NULL;
36489   __Pyx_RefNannyDeclarations
36490   PyObject *__pyx_t_1 = NULL;
36491   int __pyx_lineno = 0;
36492   const char *__pyx_filename = NULL;
36493   int __pyx_clineno = 0;
36494   __Pyx_RefNannySetupContext("__get__", 0);
36495   __Pyx_XDECREF(__pyx_r);
36496   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 169, __pyx_L1_error)
36497   __Pyx_GOTREF(__pyx_t_1);
36498   __pyx_r = __pyx_t_1;
36499   __pyx_t_1 = 0;
36500   goto __pyx_L0;
36501 
36502   /* function exit code */
36503   __pyx_L1_error:;
36504   __Pyx_XDECREF(__pyx_t_1);
36505   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.nobs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36506   __pyx_r = NULL;
36507   __pyx_L0:;
36508   __Pyx_XGIVEREF(__pyx_r);
36509   __Pyx_RefNannyFinishContext();
36510   return __pyx_r;
36511 }
36512 
36513 /* Python wrapper */
36514 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7k_endog_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7k_endog_1__get__(PyObject * __pyx_v_self)36515 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7k_endog_1__get__(PyObject *__pyx_v_self) {
36516   PyObject *__pyx_r = 0;
36517   __Pyx_RefNannyDeclarations
36518   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36519   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7k_endog___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36520 
36521   /* function exit code */
36522   __Pyx_RefNannyFinishContext();
36523   return __pyx_r;
36524 }
36525 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36526 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36527   PyObject *__pyx_r = NULL;
36528   __Pyx_RefNannyDeclarations
36529   PyObject *__pyx_t_1 = NULL;
36530   int __pyx_lineno = 0;
36531   const char *__pyx_filename = NULL;
36532   int __pyx_clineno = 0;
36533   __Pyx_RefNannySetupContext("__get__", 0);
36534   __Pyx_XDECREF(__pyx_r);
36535   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_endog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 169, __pyx_L1_error)
36536   __Pyx_GOTREF(__pyx_t_1);
36537   __pyx_r = __pyx_t_1;
36538   __pyx_t_1 = 0;
36539   goto __pyx_L0;
36540 
36541   /* function exit code */
36542   __pyx_L1_error:;
36543   __Pyx_XDECREF(__pyx_t_1);
36544   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.k_endog.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36545   __pyx_r = NULL;
36546   __pyx_L0:;
36547   __Pyx_XGIVEREF(__pyx_r);
36548   __Pyx_RefNannyFinishContext();
36549   return __pyx_r;
36550 }
36551 
36552 /* Python wrapper */
36553 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_states_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_states_1__get__(PyObject * __pyx_v_self)36554 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_states_1__get__(PyObject *__pyx_v_self) {
36555   PyObject *__pyx_r = 0;
36556   __Pyx_RefNannyDeclarations
36557   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36558   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_states___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36559 
36560   /* function exit code */
36561   __Pyx_RefNannyFinishContext();
36562   return __pyx_r;
36563 }
36564 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36565 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36566   PyObject *__pyx_r = NULL;
36567   __Pyx_RefNannyDeclarations
36568   PyObject *__pyx_t_1 = NULL;
36569   int __pyx_lineno = 0;
36570   const char *__pyx_filename = NULL;
36571   int __pyx_clineno = 0;
36572   __Pyx_RefNannySetupContext("__get__", 0);
36573   __Pyx_XDECREF(__pyx_r);
36574   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 169, __pyx_L1_error)
36575   __Pyx_GOTREF(__pyx_t_1);
36576   __pyx_r = __pyx_t_1;
36577   __pyx_t_1 = 0;
36578   goto __pyx_L0;
36579 
36580   /* function exit code */
36581   __pyx_L1_error:;
36582   __Pyx_XDECREF(__pyx_t_1);
36583   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.k_states.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36584   __pyx_r = NULL;
36585   __pyx_L0:;
36586   __Pyx_XGIVEREF(__pyx_r);
36587   __Pyx_RefNannyFinishContext();
36588   return __pyx_r;
36589 }
36590 
36591 /* Python wrapper */
36592 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_posdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_posdef_1__get__(PyObject * __pyx_v_self)36593 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_posdef_1__get__(PyObject *__pyx_v_self) {
36594   PyObject *__pyx_r = 0;
36595   __Pyx_RefNannyDeclarations
36596   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36597   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_posdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36598 
36599   /* function exit code */
36600   __Pyx_RefNannyFinishContext();
36601   return __pyx_r;
36602 }
36603 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36604 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36605   PyObject *__pyx_r = NULL;
36606   __Pyx_RefNannyDeclarations
36607   PyObject *__pyx_t_1 = NULL;
36608   int __pyx_lineno = 0;
36609   const char *__pyx_filename = NULL;
36610   int __pyx_clineno = 0;
36611   __Pyx_RefNannySetupContext("__get__", 0);
36612   __Pyx_XDECREF(__pyx_r);
36613   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_posdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 169, __pyx_L1_error)
36614   __Pyx_GOTREF(__pyx_t_1);
36615   __pyx_r = __pyx_t_1;
36616   __pyx_t_1 = 0;
36617   goto __pyx_L0;
36618 
36619   /* function exit code */
36620   __pyx_L1_error:;
36621   __Pyx_XDECREF(__pyx_t_1);
36622   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.k_posdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36623   __pyx_r = NULL;
36624   __pyx_L0:;
36625   __Pyx_XGIVEREF(__pyx_r);
36626   __Pyx_RefNannyFinishContext();
36627   return __pyx_r;
36628 }
36629 
36630 /* "statsmodels/tsa/statespace/_representation.pxd":172
36631  *
36632  *     # Statespace representation matrices
36633  *     cdef readonly np.complex64_t [::1,:] obs, obs_intercept, state_intercept             # <<<<<<<<<<<<<<
36634  *     cdef readonly np.complex64_t [:] initial_state
36635  *     cdef readonly np.complex64_t [::1,:] initial_state_cov, initial_diffuse_state_cov
36636  */
36637 
36638 /* Python wrapper */
36639 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3obs_1__get__(PyObject * __pyx_v_self)36640 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3obs_1__get__(PyObject *__pyx_v_self) {
36641   PyObject *__pyx_r = 0;
36642   __Pyx_RefNannyDeclarations
36643   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36644   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36645 
36646   /* function exit code */
36647   __Pyx_RefNannyFinishContext();
36648   return __pyx_r;
36649 }
36650 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36651 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36652   PyObject *__pyx_r = NULL;
36653   __Pyx_RefNannyDeclarations
36654   PyObject *__pyx_t_1 = NULL;
36655   int __pyx_lineno = 0;
36656   const char *__pyx_filename = NULL;
36657   int __pyx_clineno = 0;
36658   __Pyx_RefNannySetupContext("__get__", 0);
36659   __Pyx_XDECREF(__pyx_r);
36660   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 172, __pyx_L1_error)}
36661   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 172, __pyx_L1_error)
36662   __Pyx_GOTREF(__pyx_t_1);
36663   __pyx_r = __pyx_t_1;
36664   __pyx_t_1 = 0;
36665   goto __pyx_L0;
36666 
36667   /* function exit code */
36668   __pyx_L1_error:;
36669   __Pyx_XDECREF(__pyx_t_1);
36670   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36671   __pyx_r = NULL;
36672   __pyx_L0:;
36673   __Pyx_XGIVEREF(__pyx_r);
36674   __Pyx_RefNannyFinishContext();
36675   return __pyx_r;
36676 }
36677 
36678 /* Python wrapper */
36679 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13obs_intercept_1__get__(PyObject * __pyx_v_self)36680 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13obs_intercept_1__get__(PyObject *__pyx_v_self) {
36681   PyObject *__pyx_r = 0;
36682   __Pyx_RefNannyDeclarations
36683   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36684   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36685 
36686   /* function exit code */
36687   __Pyx_RefNannyFinishContext();
36688   return __pyx_r;
36689 }
36690 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36691 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36692   PyObject *__pyx_r = NULL;
36693   __Pyx_RefNannyDeclarations
36694   PyObject *__pyx_t_1 = NULL;
36695   int __pyx_lineno = 0;
36696   const char *__pyx_filename = NULL;
36697   int __pyx_clineno = 0;
36698   __Pyx_RefNannySetupContext("__get__", 0);
36699   __Pyx_XDECREF(__pyx_r);
36700   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 172, __pyx_L1_error)}
36701   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 172, __pyx_L1_error)
36702   __Pyx_GOTREF(__pyx_t_1);
36703   __pyx_r = __pyx_t_1;
36704   __pyx_t_1 = 0;
36705   goto __pyx_L0;
36706 
36707   /* function exit code */
36708   __pyx_L1_error:;
36709   __Pyx_XDECREF(__pyx_t_1);
36710   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36711   __pyx_r = NULL;
36712   __pyx_L0:;
36713   __Pyx_XGIVEREF(__pyx_r);
36714   __Pyx_RefNannyFinishContext();
36715   return __pyx_r;
36716 }
36717 
36718 /* Python wrapper */
36719 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15state_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15state_intercept_1__get__(PyObject * __pyx_v_self)36720 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15state_intercept_1__get__(PyObject *__pyx_v_self) {
36721   PyObject *__pyx_r = 0;
36722   __Pyx_RefNannyDeclarations
36723   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36724   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15state_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36725 
36726   /* function exit code */
36727   __Pyx_RefNannyFinishContext();
36728   return __pyx_r;
36729 }
36730 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36731 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36732   PyObject *__pyx_r = NULL;
36733   __Pyx_RefNannyDeclarations
36734   PyObject *__pyx_t_1 = NULL;
36735   int __pyx_lineno = 0;
36736   const char *__pyx_filename = NULL;
36737   int __pyx_clineno = 0;
36738   __Pyx_RefNannySetupContext("__get__", 0);
36739   __Pyx_XDECREF(__pyx_r);
36740   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 172, __pyx_L1_error)}
36741   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 172, __pyx_L1_error)
36742   __Pyx_GOTREF(__pyx_t_1);
36743   __pyx_r = __pyx_t_1;
36744   __pyx_t_1 = 0;
36745   goto __pyx_L0;
36746 
36747   /* function exit code */
36748   __pyx_L1_error:;
36749   __Pyx_XDECREF(__pyx_t_1);
36750   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.state_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36751   __pyx_r = NULL;
36752   __pyx_L0:;
36753   __Pyx_XGIVEREF(__pyx_r);
36754   __Pyx_RefNannyFinishContext();
36755   return __pyx_r;
36756 }
36757 
36758 /* "statsmodels/tsa/statespace/_representation.pxd":173
36759  *     # Statespace representation matrices
36760  *     cdef readonly np.complex64_t [::1,:] obs, obs_intercept, state_intercept
36761  *     cdef readonly np.complex64_t [:] initial_state             # <<<<<<<<<<<<<<
36762  *     cdef readonly np.complex64_t [::1,:] initial_state_cov, initial_diffuse_state_cov
36763  *     cdef readonly np.complex64_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
36764  */
36765 
36766 /* Python wrapper */
36767 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initial_state_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initial_state_1__get__(PyObject * __pyx_v_self)36768 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initial_state_1__get__(PyObject *__pyx_v_self) {
36769   PyObject *__pyx_r = 0;
36770   __Pyx_RefNannyDeclarations
36771   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36772   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initial_state___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36773 
36774   /* function exit code */
36775   __Pyx_RefNannyFinishContext();
36776   return __pyx_r;
36777 }
36778 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36779 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36780   PyObject *__pyx_r = NULL;
36781   __Pyx_RefNannyDeclarations
36782   PyObject *__pyx_t_1 = NULL;
36783   int __pyx_lineno = 0;
36784   const char *__pyx_filename = NULL;
36785   int __pyx_clineno = 0;
36786   __Pyx_RefNannySetupContext("__get__", 0);
36787   __Pyx_XDECREF(__pyx_r);
36788   if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 173, __pyx_L1_error)}
36789   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 173, __pyx_L1_error)
36790   __Pyx_GOTREF(__pyx_t_1);
36791   __pyx_r = __pyx_t_1;
36792   __pyx_t_1 = 0;
36793   goto __pyx_L0;
36794 
36795   /* function exit code */
36796   __pyx_L1_error:;
36797   __Pyx_XDECREF(__pyx_t_1);
36798   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initial_state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36799   __pyx_r = NULL;
36800   __pyx_L0:;
36801   __Pyx_XGIVEREF(__pyx_r);
36802   __Pyx_RefNannyFinishContext();
36803   return __pyx_r;
36804 }
36805 
36806 /* "statsmodels/tsa/statespace/_representation.pxd":174
36807  *     cdef readonly np.complex64_t [::1,:] obs, obs_intercept, state_intercept
36808  *     cdef readonly np.complex64_t [:] initial_state
36809  *     cdef readonly np.complex64_t [::1,:] initial_state_cov, initial_diffuse_state_cov             # <<<<<<<<<<<<<<
36810  *     cdef readonly np.complex64_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
36811  *
36812  */
36813 
36814 /* Python wrapper */
36815 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17initial_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17initial_state_cov_1__get__(PyObject * __pyx_v_self)36816 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17initial_state_cov_1__get__(PyObject *__pyx_v_self) {
36817   PyObject *__pyx_r = 0;
36818   __Pyx_RefNannyDeclarations
36819   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36820   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17initial_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36821 
36822   /* function exit code */
36823   __Pyx_RefNannyFinishContext();
36824   return __pyx_r;
36825 }
36826 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36827 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36828   PyObject *__pyx_r = NULL;
36829   __Pyx_RefNannyDeclarations
36830   PyObject *__pyx_t_1 = NULL;
36831   int __pyx_lineno = 0;
36832   const char *__pyx_filename = NULL;
36833   int __pyx_clineno = 0;
36834   __Pyx_RefNannySetupContext("__get__", 0);
36835   __Pyx_XDECREF(__pyx_r);
36836   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 174, __pyx_L1_error)}
36837   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 174, __pyx_L1_error)
36838   __Pyx_GOTREF(__pyx_t_1);
36839   __pyx_r = __pyx_t_1;
36840   __pyx_t_1 = 0;
36841   goto __pyx_L0;
36842 
36843   /* function exit code */
36844   __pyx_L1_error:;
36845   __Pyx_XDECREF(__pyx_t_1);
36846   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initial_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36847   __pyx_r = NULL;
36848   __pyx_L0:;
36849   __Pyx_XGIVEREF(__pyx_r);
36850   __Pyx_RefNannyFinishContext();
36851   return __pyx_r;
36852 }
36853 
36854 /* Python wrapper */
36855 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_25initial_diffuse_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_25initial_diffuse_state_cov_1__get__(PyObject * __pyx_v_self)36856 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_25initial_diffuse_state_cov_1__get__(PyObject *__pyx_v_self) {
36857   PyObject *__pyx_r = 0;
36858   __Pyx_RefNannyDeclarations
36859   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36860   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_25initial_diffuse_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36861 
36862   /* function exit code */
36863   __Pyx_RefNannyFinishContext();
36864   return __pyx_r;
36865 }
36866 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36867 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36868   PyObject *__pyx_r = NULL;
36869   __Pyx_RefNannyDeclarations
36870   PyObject *__pyx_t_1 = NULL;
36871   int __pyx_lineno = 0;
36872   const char *__pyx_filename = NULL;
36873   int __pyx_clineno = 0;
36874   __Pyx_RefNannySetupContext("__get__", 0);
36875   __Pyx_XDECREF(__pyx_r);
36876   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 174, __pyx_L1_error)}
36877   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_diffuse_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 174, __pyx_L1_error)
36878   __Pyx_GOTREF(__pyx_t_1);
36879   __pyx_r = __pyx_t_1;
36880   __pyx_t_1 = 0;
36881   goto __pyx_L0;
36882 
36883   /* function exit code */
36884   __pyx_L1_error:;
36885   __Pyx_XDECREF(__pyx_t_1);
36886   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initial_diffuse_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36887   __pyx_r = NULL;
36888   __pyx_L0:;
36889   __Pyx_XGIVEREF(__pyx_r);
36890   __Pyx_RefNannyFinishContext();
36891   return __pyx_r;
36892 }
36893 
36894 /* "statsmodels/tsa/statespace/_representation.pxd":175
36895  *     cdef readonly np.complex64_t [:] initial_state
36896  *     cdef readonly np.complex64_t [::1,:] initial_state_cov, initial_diffuse_state_cov
36897  *     cdef readonly np.complex64_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov             # <<<<<<<<<<<<<<
36898  *
36899  *     cdef readonly int [::1,:] missing
36900  */
36901 
36902 /* Python wrapper */
36903 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6design_1__get__(PyObject * __pyx_v_self)36904 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6design_1__get__(PyObject *__pyx_v_self) {
36905   PyObject *__pyx_r = 0;
36906   __Pyx_RefNannyDeclarations
36907   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36908   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36909 
36910   /* function exit code */
36911   __Pyx_RefNannyFinishContext();
36912   return __pyx_r;
36913 }
36914 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36915 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36916   PyObject *__pyx_r = NULL;
36917   __Pyx_RefNannyDeclarations
36918   PyObject *__pyx_t_1 = NULL;
36919   int __pyx_lineno = 0;
36920   const char *__pyx_filename = NULL;
36921   int __pyx_clineno = 0;
36922   __Pyx_RefNannySetupContext("__get__", 0);
36923   __Pyx_XDECREF(__pyx_r);
36924   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 175, __pyx_L1_error)}
36925   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->design, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 175, __pyx_L1_error)
36926   __Pyx_GOTREF(__pyx_t_1);
36927   __pyx_r = __pyx_t_1;
36928   __pyx_t_1 = 0;
36929   goto __pyx_L0;
36930 
36931   /* function exit code */
36932   __pyx_L1_error:;
36933   __Pyx_XDECREF(__pyx_t_1);
36934   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36935   __pyx_r = NULL;
36936   __pyx_L0:;
36937   __Pyx_XGIVEREF(__pyx_r);
36938   __Pyx_RefNannyFinishContext();
36939   return __pyx_r;
36940 }
36941 
36942 /* Python wrapper */
36943 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7obs_cov_1__get__(PyObject * __pyx_v_self)36944 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7obs_cov_1__get__(PyObject *__pyx_v_self) {
36945   PyObject *__pyx_r = 0;
36946   __Pyx_RefNannyDeclarations
36947   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36948   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36949 
36950   /* function exit code */
36951   __Pyx_RefNannyFinishContext();
36952   return __pyx_r;
36953 }
36954 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36955 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36956   PyObject *__pyx_r = NULL;
36957   __Pyx_RefNannyDeclarations
36958   PyObject *__pyx_t_1 = NULL;
36959   int __pyx_lineno = 0;
36960   const char *__pyx_filename = NULL;
36961   int __pyx_clineno = 0;
36962   __Pyx_RefNannySetupContext("__get__", 0);
36963   __Pyx_XDECREF(__pyx_r);
36964   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 175, __pyx_L1_error)}
36965   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 175, __pyx_L1_error)
36966   __Pyx_GOTREF(__pyx_t_1);
36967   __pyx_r = __pyx_t_1;
36968   __pyx_t_1 = 0;
36969   goto __pyx_L0;
36970 
36971   /* function exit code */
36972   __pyx_L1_error:;
36973   __Pyx_XDECREF(__pyx_t_1);
36974   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36975   __pyx_r = NULL;
36976   __pyx_L0:;
36977   __Pyx_XGIVEREF(__pyx_r);
36978   __Pyx_RefNannyFinishContext();
36979   return __pyx_r;
36980 }
36981 
36982 /* Python wrapper */
36983 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10transition_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10transition_1__get__(PyObject * __pyx_v_self)36984 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10transition_1__get__(PyObject *__pyx_v_self) {
36985   PyObject *__pyx_r = 0;
36986   __Pyx_RefNannyDeclarations
36987   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36988   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10transition___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
36989 
36990   /* function exit code */
36991   __Pyx_RefNannyFinishContext();
36992   return __pyx_r;
36993 }
36994 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)36995 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
36996   PyObject *__pyx_r = NULL;
36997   __Pyx_RefNannyDeclarations
36998   PyObject *__pyx_t_1 = NULL;
36999   int __pyx_lineno = 0;
37000   const char *__pyx_filename = NULL;
37001   int __pyx_clineno = 0;
37002   __Pyx_RefNannySetupContext("__get__", 0);
37003   __Pyx_XDECREF(__pyx_r);
37004   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 175, __pyx_L1_error)}
37005   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transition, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 175, __pyx_L1_error)
37006   __Pyx_GOTREF(__pyx_t_1);
37007   __pyx_r = __pyx_t_1;
37008   __pyx_t_1 = 0;
37009   goto __pyx_L0;
37010 
37011   /* function exit code */
37012   __pyx_L1_error:;
37013   __Pyx_XDECREF(__pyx_t_1);
37014   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37015   __pyx_r = NULL;
37016   __pyx_L0:;
37017   __Pyx_XGIVEREF(__pyx_r);
37018   __Pyx_RefNannyFinishContext();
37019   return __pyx_r;
37020 }
37021 
37022 /* Python wrapper */
37023 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9selection_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9selection_1__get__(PyObject * __pyx_v_self)37024 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9selection_1__get__(PyObject *__pyx_v_self) {
37025   PyObject *__pyx_r = 0;
37026   __Pyx_RefNannyDeclarations
37027   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37028   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9selection___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37029 
37030   /* function exit code */
37031   __Pyx_RefNannyFinishContext();
37032   return __pyx_r;
37033 }
37034 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37035 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37036   PyObject *__pyx_r = NULL;
37037   __Pyx_RefNannyDeclarations
37038   PyObject *__pyx_t_1 = NULL;
37039   int __pyx_lineno = 0;
37040   const char *__pyx_filename = NULL;
37041   int __pyx_clineno = 0;
37042   __Pyx_RefNannySetupContext("__get__", 0);
37043   __Pyx_XDECREF(__pyx_r);
37044   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 175, __pyx_L1_error)}
37045   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selection, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 175, __pyx_L1_error)
37046   __Pyx_GOTREF(__pyx_t_1);
37047   __pyx_r = __pyx_t_1;
37048   __pyx_t_1 = 0;
37049   goto __pyx_L0;
37050 
37051   /* function exit code */
37052   __pyx_L1_error:;
37053   __Pyx_XDECREF(__pyx_t_1);
37054   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.selection.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37055   __pyx_r = NULL;
37056   __pyx_L0:;
37057   __Pyx_XGIVEREF(__pyx_r);
37058   __Pyx_RefNannyFinishContext();
37059   return __pyx_r;
37060 }
37061 
37062 /* Python wrapper */
37063 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9state_cov_1__get__(PyObject * __pyx_v_self)37064 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9state_cov_1__get__(PyObject *__pyx_v_self) {
37065   PyObject *__pyx_r = 0;
37066   __Pyx_RefNannyDeclarations
37067   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37068   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37069 
37070   /* function exit code */
37071   __Pyx_RefNannyFinishContext();
37072   return __pyx_r;
37073 }
37074 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37075 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37076   PyObject *__pyx_r = NULL;
37077   __Pyx_RefNannyDeclarations
37078   PyObject *__pyx_t_1 = NULL;
37079   int __pyx_lineno = 0;
37080   const char *__pyx_filename = NULL;
37081   int __pyx_clineno = 0;
37082   __Pyx_RefNannySetupContext("__get__", 0);
37083   __Pyx_XDECREF(__pyx_r);
37084   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 175, __pyx_L1_error)}
37085   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 175, __pyx_L1_error)
37086   __Pyx_GOTREF(__pyx_t_1);
37087   __pyx_r = __pyx_t_1;
37088   __pyx_t_1 = 0;
37089   goto __pyx_L0;
37090 
37091   /* function exit code */
37092   __pyx_L1_error:;
37093   __Pyx_XDECREF(__pyx_t_1);
37094   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37095   __pyx_r = NULL;
37096   __pyx_L0:;
37097   __Pyx_XGIVEREF(__pyx_r);
37098   __Pyx_RefNannyFinishContext();
37099   return __pyx_r;
37100 }
37101 
37102 /* Python wrapper */
37103 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18selected_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18selected_state_cov_1__get__(PyObject * __pyx_v_self)37104 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18selected_state_cov_1__get__(PyObject *__pyx_v_self) {
37105   PyObject *__pyx_r = 0;
37106   __Pyx_RefNannyDeclarations
37107   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37108   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18selected_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37109 
37110   /* function exit code */
37111   __Pyx_RefNannyFinishContext();
37112   return __pyx_r;
37113 }
37114 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37115 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37116   PyObject *__pyx_r = NULL;
37117   __Pyx_RefNannyDeclarations
37118   PyObject *__pyx_t_1 = NULL;
37119   int __pyx_lineno = 0;
37120   const char *__pyx_filename = NULL;
37121   int __pyx_clineno = 0;
37122   __Pyx_RefNannySetupContext("__get__", 0);
37123   __Pyx_XDECREF(__pyx_r);
37124   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 175, __pyx_L1_error)}
37125   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 175, __pyx_L1_error)
37126   __Pyx_GOTREF(__pyx_t_1);
37127   __pyx_r = __pyx_t_1;
37128   __pyx_t_1 = 0;
37129   goto __pyx_L0;
37130 
37131   /* function exit code */
37132   __pyx_L1_error:;
37133   __Pyx_XDECREF(__pyx_t_1);
37134   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.selected_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37135   __pyx_r = NULL;
37136   __pyx_L0:;
37137   __Pyx_XGIVEREF(__pyx_r);
37138   __Pyx_RefNannyFinishContext();
37139   return __pyx_r;
37140 }
37141 
37142 /* "statsmodels/tsa/statespace/_representation.pxd":177
37143  *     cdef readonly np.complex64_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
37144  *
37145  *     cdef readonly int [::1,:] missing             # <<<<<<<<<<<<<<
37146  *     cdef readonly int [:] nmissing
37147  *     cdef readonly int has_missing
37148  */
37149 
37150 /* Python wrapper */
37151 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7missing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7missing_1__get__(PyObject * __pyx_v_self)37152 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7missing_1__get__(PyObject *__pyx_v_self) {
37153   PyObject *__pyx_r = 0;
37154   __Pyx_RefNannyDeclarations
37155   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37156   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7missing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37157 
37158   /* function exit code */
37159   __Pyx_RefNannyFinishContext();
37160   return __pyx_r;
37161 }
37162 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37163 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37164   PyObject *__pyx_r = NULL;
37165   __Pyx_RefNannyDeclarations
37166   PyObject *__pyx_t_1 = NULL;
37167   int __pyx_lineno = 0;
37168   const char *__pyx_filename = NULL;
37169   int __pyx_clineno = 0;
37170   __Pyx_RefNannySetupContext("__get__", 0);
37171   __Pyx_XDECREF(__pyx_r);
37172   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 177, __pyx_L1_error)}
37173   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 177, __pyx_L1_error)
37174   __Pyx_GOTREF(__pyx_t_1);
37175   __pyx_r = __pyx_t_1;
37176   __pyx_t_1 = 0;
37177   goto __pyx_L0;
37178 
37179   /* function exit code */
37180   __pyx_L1_error:;
37181   __Pyx_XDECREF(__pyx_t_1);
37182   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.missing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37183   __pyx_r = NULL;
37184   __pyx_L0:;
37185   __Pyx_XGIVEREF(__pyx_r);
37186   __Pyx_RefNannyFinishContext();
37187   return __pyx_r;
37188 }
37189 
37190 /* "statsmodels/tsa/statespace/_representation.pxd":178
37191  *
37192  *     cdef readonly int [::1,:] missing
37193  *     cdef readonly int [:] nmissing             # <<<<<<<<<<<<<<
37194  *     cdef readonly int has_missing
37195  *
37196  */
37197 
37198 /* Python wrapper */
37199 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8nmissing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8nmissing_1__get__(PyObject * __pyx_v_self)37200 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8nmissing_1__get__(PyObject *__pyx_v_self) {
37201   PyObject *__pyx_r = 0;
37202   __Pyx_RefNannyDeclarations
37203   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37204   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8nmissing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37205 
37206   /* function exit code */
37207   __Pyx_RefNannyFinishContext();
37208   return __pyx_r;
37209 }
37210 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37211 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37212   PyObject *__pyx_r = NULL;
37213   __Pyx_RefNannyDeclarations
37214   PyObject *__pyx_t_1 = NULL;
37215   int __pyx_lineno = 0;
37216   const char *__pyx_filename = NULL;
37217   int __pyx_clineno = 0;
37218   __Pyx_RefNannySetupContext("__get__", 0);
37219   __Pyx_XDECREF(__pyx_r);
37220   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 178, __pyx_L1_error)}
37221   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 178, __pyx_L1_error)
37222   __Pyx_GOTREF(__pyx_t_1);
37223   __pyx_r = __pyx_t_1;
37224   __pyx_t_1 = 0;
37225   goto __pyx_L0;
37226 
37227   /* function exit code */
37228   __pyx_L1_error:;
37229   __Pyx_XDECREF(__pyx_t_1);
37230   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.nmissing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37231   __pyx_r = NULL;
37232   __pyx_L0:;
37233   __Pyx_XGIVEREF(__pyx_r);
37234   __Pyx_RefNannyFinishContext();
37235   return __pyx_r;
37236 }
37237 
37238 /* "statsmodels/tsa/statespace/_representation.pxd":179
37239  *     cdef readonly int [::1,:] missing
37240  *     cdef readonly int [:] nmissing
37241  *     cdef readonly int has_missing             # <<<<<<<<<<<<<<
37242  *
37243  *     # Flags
37244  */
37245 
37246 /* Python wrapper */
37247 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11has_missing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11has_missing_1__get__(PyObject * __pyx_v_self)37248 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11has_missing_1__get__(PyObject *__pyx_v_self) {
37249   PyObject *__pyx_r = 0;
37250   __Pyx_RefNannyDeclarations
37251   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37252   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11has_missing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37253 
37254   /* function exit code */
37255   __Pyx_RefNannyFinishContext();
37256   return __pyx_r;
37257 }
37258 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37259 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37260   PyObject *__pyx_r = NULL;
37261   __Pyx_RefNannyDeclarations
37262   PyObject *__pyx_t_1 = NULL;
37263   int __pyx_lineno = 0;
37264   const char *__pyx_filename = NULL;
37265   int __pyx_clineno = 0;
37266   __Pyx_RefNannySetupContext("__get__", 0);
37267   __Pyx_XDECREF(__pyx_r);
37268   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->has_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 179, __pyx_L1_error)
37269   __Pyx_GOTREF(__pyx_t_1);
37270   __pyx_r = __pyx_t_1;
37271   __pyx_t_1 = 0;
37272   goto __pyx_L0;
37273 
37274   /* function exit code */
37275   __pyx_L1_error:;
37276   __Pyx_XDECREF(__pyx_t_1);
37277   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.has_missing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37278   __pyx_r = NULL;
37279   __pyx_L0:;
37280   __Pyx_XGIVEREF(__pyx_r);
37281   __Pyx_RefNannyFinishContext();
37282   return __pyx_r;
37283 }
37284 
37285 /* "statsmodels/tsa/statespace/_representation.pxd":182
37286  *
37287  *     # Flags
37288  *     cdef readonly int time_invariant             # <<<<<<<<<<<<<<
37289  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
37290  *     cdef public int diagonal_obs_cov
37291  */
37292 
37293 /* Python wrapper */
37294 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14time_invariant_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14time_invariant_1__get__(PyObject * __pyx_v_self)37295 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14time_invariant_1__get__(PyObject *__pyx_v_self) {
37296   PyObject *__pyx_r = 0;
37297   __Pyx_RefNannyDeclarations
37298   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37299   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14time_invariant___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37300 
37301   /* function exit code */
37302   __Pyx_RefNannyFinishContext();
37303   return __pyx_r;
37304 }
37305 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37306 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37307   PyObject *__pyx_r = NULL;
37308   __Pyx_RefNannyDeclarations
37309   PyObject *__pyx_t_1 = NULL;
37310   int __pyx_lineno = 0;
37311   const char *__pyx_filename = NULL;
37312   int __pyx_clineno = 0;
37313   __Pyx_RefNannySetupContext("__get__", 0);
37314   __Pyx_XDECREF(__pyx_r);
37315   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time_invariant); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 182, __pyx_L1_error)
37316   __Pyx_GOTREF(__pyx_t_1);
37317   __pyx_r = __pyx_t_1;
37318   __pyx_t_1 = 0;
37319   goto __pyx_L0;
37320 
37321   /* function exit code */
37322   __pyx_L1_error:;
37323   __Pyx_XDECREF(__pyx_t_1);
37324   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.time_invariant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37325   __pyx_r = NULL;
37326   __pyx_L0:;
37327   __Pyx_XGIVEREF(__pyx_r);
37328   __Pyx_RefNannyFinishContext();
37329   return __pyx_r;
37330 }
37331 
37332 /* "statsmodels/tsa/statespace/_representation.pxd":183
37333  *     # Flags
37334  *     cdef readonly int time_invariant
37335  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary             # <<<<<<<<<<<<<<
37336  *     cdef public int diagonal_obs_cov
37337  *     cdef readonly int _diagonal_obs_cov
37338  */
37339 
37340 /* Python wrapper */
37341 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialized_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialized_1__get__(PyObject * __pyx_v_self)37342 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialized_1__get__(PyObject *__pyx_v_self) {
37343   PyObject *__pyx_r = 0;
37344   __Pyx_RefNannyDeclarations
37345   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37346   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialized___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37347 
37348   /* function exit code */
37349   __Pyx_RefNannyFinishContext();
37350   return __pyx_r;
37351 }
37352 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37353 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37354   PyObject *__pyx_r = NULL;
37355   __Pyx_RefNannyDeclarations
37356   PyObject *__pyx_t_1 = NULL;
37357   int __pyx_lineno = 0;
37358   const char *__pyx_filename = NULL;
37359   int __pyx_clineno = 0;
37360   __Pyx_RefNannySetupContext("__get__", 0);
37361   __Pyx_XDECREF(__pyx_r);
37362   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 183, __pyx_L1_error)
37363   __Pyx_GOTREF(__pyx_t_1);
37364   __pyx_r = __pyx_t_1;
37365   __pyx_t_1 = 0;
37366   goto __pyx_L0;
37367 
37368   /* function exit code */
37369   __pyx_L1_error:;
37370   __Pyx_XDECREF(__pyx_t_1);
37371   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37372   __pyx_r = NULL;
37373   __pyx_L0:;
37374   __Pyx_XGIVEREF(__pyx_r);
37375   __Pyx_RefNannyFinishContext();
37376   return __pyx_r;
37377 }
37378 
37379 /* Python wrapper */
37380 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19initialized_diffuse_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19initialized_diffuse_1__get__(PyObject * __pyx_v_self)37381 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19initialized_diffuse_1__get__(PyObject *__pyx_v_self) {
37382   PyObject *__pyx_r = 0;
37383   __Pyx_RefNannyDeclarations
37384   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37385   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19initialized_diffuse___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37386 
37387   /* function exit code */
37388   __Pyx_RefNannyFinishContext();
37389   return __pyx_r;
37390 }
37391 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37392 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37393   PyObject *__pyx_r = NULL;
37394   __Pyx_RefNannyDeclarations
37395   PyObject *__pyx_t_1 = NULL;
37396   int __pyx_lineno = 0;
37397   const char *__pyx_filename = NULL;
37398   int __pyx_clineno = 0;
37399   __Pyx_RefNannySetupContext("__get__", 0);
37400   __Pyx_XDECREF(__pyx_r);
37401   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 183, __pyx_L1_error)
37402   __Pyx_GOTREF(__pyx_t_1);
37403   __pyx_r = __pyx_t_1;
37404   __pyx_t_1 = 0;
37405   goto __pyx_L0;
37406 
37407   /* function exit code */
37408   __pyx_L1_error:;
37409   __Pyx_XDECREF(__pyx_t_1);
37410   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialized_diffuse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37411   __pyx_r = NULL;
37412   __pyx_L0:;
37413   __Pyx_XGIVEREF(__pyx_r);
37414   __Pyx_RefNannyFinishContext();
37415   return __pyx_r;
37416 }
37417 
37418 /* Python wrapper */
37419 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22initialized_stationary_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22initialized_stationary_1__get__(PyObject * __pyx_v_self)37420 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22initialized_stationary_1__get__(PyObject *__pyx_v_self) {
37421   PyObject *__pyx_r = 0;
37422   __Pyx_RefNannyDeclarations
37423   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37424   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22initialized_stationary___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37425 
37426   /* function exit code */
37427   __Pyx_RefNannyFinishContext();
37428   return __pyx_r;
37429 }
37430 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37431 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37432   PyObject *__pyx_r = NULL;
37433   __Pyx_RefNannyDeclarations
37434   PyObject *__pyx_t_1 = NULL;
37435   int __pyx_lineno = 0;
37436   const char *__pyx_filename = NULL;
37437   int __pyx_clineno = 0;
37438   __Pyx_RefNannySetupContext("__get__", 0);
37439   __Pyx_XDECREF(__pyx_r);
37440   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 183, __pyx_L1_error)
37441   __Pyx_GOTREF(__pyx_t_1);
37442   __pyx_r = __pyx_t_1;
37443   __pyx_t_1 = 0;
37444   goto __pyx_L0;
37445 
37446   /* function exit code */
37447   __pyx_L1_error:;
37448   __Pyx_XDECREF(__pyx_t_1);
37449   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.initialized_stationary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37450   __pyx_r = NULL;
37451   __pyx_L0:;
37452   __Pyx_XGIVEREF(__pyx_r);
37453   __Pyx_RefNannyFinishContext();
37454   return __pyx_r;
37455 }
37456 
37457 /* "statsmodels/tsa/statespace/_representation.pxd":184
37458  *     cdef readonly int time_invariant
37459  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
37460  *     cdef public int diagonal_obs_cov             # <<<<<<<<<<<<<<
37461  *     cdef readonly int _diagonal_obs_cov
37462  *     cdef public int subset_design
37463  */
37464 
37465 /* Python wrapper */
37466 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_1__get__(PyObject * __pyx_v_self)37467 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_1__get__(PyObject *__pyx_v_self) {
37468   PyObject *__pyx_r = 0;
37469   __Pyx_RefNannyDeclarations
37470   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37471   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37472 
37473   /* function exit code */
37474   __Pyx_RefNannyFinishContext();
37475   return __pyx_r;
37476 }
37477 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37478 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37479   PyObject *__pyx_r = NULL;
37480   __Pyx_RefNannyDeclarations
37481   PyObject *__pyx_t_1 = NULL;
37482   int __pyx_lineno = 0;
37483   const char *__pyx_filename = NULL;
37484   int __pyx_clineno = 0;
37485   __Pyx_RefNannySetupContext("__get__", 0);
37486   __Pyx_XDECREF(__pyx_r);
37487   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 184, __pyx_L1_error)
37488   __Pyx_GOTREF(__pyx_t_1);
37489   __pyx_r = __pyx_t_1;
37490   __pyx_t_1 = 0;
37491   goto __pyx_L0;
37492 
37493   /* function exit code */
37494   __pyx_L1_error:;
37495   __Pyx_XDECREF(__pyx_t_1);
37496   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.diagonal_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37497   __pyx_r = NULL;
37498   __pyx_L0:;
37499   __Pyx_XGIVEREF(__pyx_r);
37500   __Pyx_RefNannyFinishContext();
37501   return __pyx_r;
37502 }
37503 
37504 /* Python wrapper */
37505 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)37506 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
37507   int __pyx_r;
37508   __Pyx_RefNannyDeclarations
37509   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
37510   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
37511 
37512   /* function exit code */
37513   __Pyx_RefNannyFinishContext();
37514   return __pyx_r;
37515 }
37516 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,PyObject * __pyx_v_value)37517 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
37518   int __pyx_r;
37519   __Pyx_RefNannyDeclarations
37520   int __pyx_t_1;
37521   int __pyx_lineno = 0;
37522   const char *__pyx_filename = NULL;
37523   int __pyx_clineno = 0;
37524   __Pyx_RefNannySetupContext("__set__", 0);
37525   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 184, __pyx_L1_error)
37526   __pyx_v_self->diagonal_obs_cov = __pyx_t_1;
37527 
37528   /* function exit code */
37529   __pyx_r = 0;
37530   goto __pyx_L0;
37531   __pyx_L1_error:;
37532   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.diagonal_obs_cov.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37533   __pyx_r = -1;
37534   __pyx_L0:;
37535   __Pyx_RefNannyFinishContext();
37536   return __pyx_r;
37537 }
37538 
37539 /* "statsmodels/tsa/statespace/_representation.pxd":185
37540  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
37541  *     cdef public int diagonal_obs_cov
37542  *     cdef readonly int _diagonal_obs_cov             # <<<<<<<<<<<<<<
37543  *     cdef public int subset_design
37544  *     cdef public int companion_transition
37545  */
37546 
37547 /* Python wrapper */
37548 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17_diagonal_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17_diagonal_obs_cov_1__get__(PyObject * __pyx_v_self)37549 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17_diagonal_obs_cov_1__get__(PyObject *__pyx_v_self) {
37550   PyObject *__pyx_r = 0;
37551   __Pyx_RefNannyDeclarations
37552   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37553   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17_diagonal_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37554 
37555   /* function exit code */
37556   __Pyx_RefNannyFinishContext();
37557   return __pyx_r;
37558 }
37559 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37560 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37561   PyObject *__pyx_r = NULL;
37562   __Pyx_RefNannyDeclarations
37563   PyObject *__pyx_t_1 = NULL;
37564   int __pyx_lineno = 0;
37565   const char *__pyx_filename = NULL;
37566   int __pyx_clineno = 0;
37567   __Pyx_RefNannySetupContext("__get__", 0);
37568   __Pyx_XDECREF(__pyx_r);
37569   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 185, __pyx_L1_error)
37570   __Pyx_GOTREF(__pyx_t_1);
37571   __pyx_r = __pyx_t_1;
37572   __pyx_t_1 = 0;
37573   goto __pyx_L0;
37574 
37575   /* function exit code */
37576   __pyx_L1_error:;
37577   __Pyx_XDECREF(__pyx_t_1);
37578   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._diagonal_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37579   __pyx_r = NULL;
37580   __pyx_L0:;
37581   __Pyx_XGIVEREF(__pyx_r);
37582   __Pyx_RefNannyFinishContext();
37583   return __pyx_r;
37584 }
37585 
37586 /* "statsmodels/tsa/statespace/_representation.pxd":186
37587  *     cdef public int diagonal_obs_cov
37588  *     cdef readonly int _diagonal_obs_cov
37589  *     cdef public int subset_design             # <<<<<<<<<<<<<<
37590  *     cdef public int companion_transition
37591  *
37592  */
37593 
37594 /* Python wrapper */
37595 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_1__get__(PyObject * __pyx_v_self)37596 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_1__get__(PyObject *__pyx_v_self) {
37597   PyObject *__pyx_r = 0;
37598   __Pyx_RefNannyDeclarations
37599   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37600   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37601 
37602   /* function exit code */
37603   __Pyx_RefNannyFinishContext();
37604   return __pyx_r;
37605 }
37606 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37607 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37608   PyObject *__pyx_r = NULL;
37609   __Pyx_RefNannyDeclarations
37610   PyObject *__pyx_t_1 = NULL;
37611   int __pyx_lineno = 0;
37612   const char *__pyx_filename = NULL;
37613   int __pyx_clineno = 0;
37614   __Pyx_RefNannySetupContext("__get__", 0);
37615   __Pyx_XDECREF(__pyx_r);
37616   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->subset_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 186, __pyx_L1_error)
37617   __Pyx_GOTREF(__pyx_t_1);
37618   __pyx_r = __pyx_t_1;
37619   __pyx_t_1 = 0;
37620   goto __pyx_L0;
37621 
37622   /* function exit code */
37623   __pyx_L1_error:;
37624   __Pyx_XDECREF(__pyx_t_1);
37625   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.subset_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37626   __pyx_r = NULL;
37627   __pyx_L0:;
37628   __Pyx_XGIVEREF(__pyx_r);
37629   __Pyx_RefNannyFinishContext();
37630   return __pyx_r;
37631 }
37632 
37633 /* Python wrapper */
37634 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)37635 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
37636   int __pyx_r;
37637   __Pyx_RefNannyDeclarations
37638   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
37639   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
37640 
37641   /* function exit code */
37642   __Pyx_RefNannyFinishContext();
37643   return __pyx_r;
37644 }
37645 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,PyObject * __pyx_v_value)37646 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
37647   int __pyx_r;
37648   __Pyx_RefNannyDeclarations
37649   int __pyx_t_1;
37650   int __pyx_lineno = 0;
37651   const char *__pyx_filename = NULL;
37652   int __pyx_clineno = 0;
37653   __Pyx_RefNannySetupContext("__set__", 0);
37654   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 186, __pyx_L1_error)
37655   __pyx_v_self->subset_design = __pyx_t_1;
37656 
37657   /* function exit code */
37658   __pyx_r = 0;
37659   goto __pyx_L0;
37660   __pyx_L1_error:;
37661   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.subset_design.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37662   __pyx_r = -1;
37663   __pyx_L0:;
37664   __Pyx_RefNannyFinishContext();
37665   return __pyx_r;
37666 }
37667 
37668 /* "statsmodels/tsa/statespace/_representation.pxd":187
37669  *     cdef readonly int _diagonal_obs_cov
37670  *     cdef public int subset_design
37671  *     cdef public int companion_transition             # <<<<<<<<<<<<<<
37672  *
37673  *     # Temporary arrays
37674  */
37675 
37676 /* Python wrapper */
37677 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_1__get__(PyObject * __pyx_v_self)37678 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_1__get__(PyObject *__pyx_v_self) {
37679   PyObject *__pyx_r = 0;
37680   __Pyx_RefNannyDeclarations
37681   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37682   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37683 
37684   /* function exit code */
37685   __Pyx_RefNannyFinishContext();
37686   return __pyx_r;
37687 }
37688 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37689 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37690   PyObject *__pyx_r = NULL;
37691   __Pyx_RefNannyDeclarations
37692   PyObject *__pyx_t_1 = NULL;
37693   int __pyx_lineno = 0;
37694   const char *__pyx_filename = NULL;
37695   int __pyx_clineno = 0;
37696   __Pyx_RefNannySetupContext("__get__", 0);
37697   __Pyx_XDECREF(__pyx_r);
37698   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->companion_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 187, __pyx_L1_error)
37699   __Pyx_GOTREF(__pyx_t_1);
37700   __pyx_r = __pyx_t_1;
37701   __pyx_t_1 = 0;
37702   goto __pyx_L0;
37703 
37704   /* function exit code */
37705   __pyx_L1_error:;
37706   __Pyx_XDECREF(__pyx_t_1);
37707   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.companion_transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37708   __pyx_r = NULL;
37709   __pyx_L0:;
37710   __Pyx_XGIVEREF(__pyx_r);
37711   __Pyx_RefNannyFinishContext();
37712   return __pyx_r;
37713 }
37714 
37715 /* Python wrapper */
37716 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)37717 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
37718   int __pyx_r;
37719   __Pyx_RefNannyDeclarations
37720   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
37721   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
37722 
37723   /* function exit code */
37724   __Pyx_RefNannyFinishContext();
37725   return __pyx_r;
37726 }
37727 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self,PyObject * __pyx_v_value)37728 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
37729   int __pyx_r;
37730   __Pyx_RefNannyDeclarations
37731   int __pyx_t_1;
37732   int __pyx_lineno = 0;
37733   const char *__pyx_filename = NULL;
37734   int __pyx_clineno = 0;
37735   __Pyx_RefNannySetupContext("__set__", 0);
37736   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 187, __pyx_L1_error)
37737   __pyx_v_self->companion_transition = __pyx_t_1;
37738 
37739   /* function exit code */
37740   __pyx_r = 0;
37741   goto __pyx_L0;
37742   __pyx_L1_error:;
37743   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.companion_transition.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37744   __pyx_r = -1;
37745   __pyx_L0:;
37746   __Pyx_RefNannyFinishContext();
37747   return __pyx_r;
37748 }
37749 
37750 /* "statsmodels/tsa/statespace/_representation.pxd":193
37751  *
37752  *     # Temporary selection arrays
37753  *     cdef readonly np.complex64_t [:] selected_obs             # <<<<<<<<<<<<<<
37754  *     cdef readonly np.complex64_t [:] selected_obs_intercept
37755  *     cdef readonly np.complex64_t [:] selected_design
37756  */
37757 
37758 /* Python wrapper */
37759 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12selected_obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12selected_obs_1__get__(PyObject * __pyx_v_self)37760 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12selected_obs_1__get__(PyObject *__pyx_v_self) {
37761   PyObject *__pyx_r = 0;
37762   __Pyx_RefNannyDeclarations
37763   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37764   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12selected_obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37765 
37766   /* function exit code */
37767   __Pyx_RefNannyFinishContext();
37768   return __pyx_r;
37769 }
37770 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37771 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37772   PyObject *__pyx_r = NULL;
37773   __Pyx_RefNannyDeclarations
37774   PyObject *__pyx_t_1 = NULL;
37775   int __pyx_lineno = 0;
37776   const char *__pyx_filename = NULL;
37777   int __pyx_clineno = 0;
37778   __Pyx_RefNannySetupContext("__get__", 0);
37779   __Pyx_XDECREF(__pyx_r);
37780   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 193, __pyx_L1_error)}
37781   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 193, __pyx_L1_error)
37782   __Pyx_GOTREF(__pyx_t_1);
37783   __pyx_r = __pyx_t_1;
37784   __pyx_t_1 = 0;
37785   goto __pyx_L0;
37786 
37787   /* function exit code */
37788   __pyx_L1_error:;
37789   __Pyx_XDECREF(__pyx_t_1);
37790   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.selected_obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37791   __pyx_r = NULL;
37792   __pyx_L0:;
37793   __Pyx_XGIVEREF(__pyx_r);
37794   __Pyx_RefNannyFinishContext();
37795   return __pyx_r;
37796 }
37797 
37798 /* "statsmodels/tsa/statespace/_representation.pxd":194
37799  *     # Temporary selection arrays
37800  *     cdef readonly np.complex64_t [:] selected_obs
37801  *     cdef readonly np.complex64_t [:] selected_obs_intercept             # <<<<<<<<<<<<<<
37802  *     cdef readonly np.complex64_t [:] selected_design
37803  *     cdef readonly np.complex64_t [:] selected_obs_cov
37804  */
37805 
37806 /* Python wrapper */
37807 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22selected_obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22selected_obs_intercept_1__get__(PyObject * __pyx_v_self)37808 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22selected_obs_intercept_1__get__(PyObject *__pyx_v_self) {
37809   PyObject *__pyx_r = 0;
37810   __Pyx_RefNannyDeclarations
37811   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37812   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22selected_obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37813 
37814   /* function exit code */
37815   __Pyx_RefNannyFinishContext();
37816   return __pyx_r;
37817 }
37818 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37819 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37820   PyObject *__pyx_r = NULL;
37821   __Pyx_RefNannyDeclarations
37822   PyObject *__pyx_t_1 = NULL;
37823   int __pyx_lineno = 0;
37824   const char *__pyx_filename = NULL;
37825   int __pyx_clineno = 0;
37826   __Pyx_RefNannySetupContext("__get__", 0);
37827   __Pyx_XDECREF(__pyx_r);
37828   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 194, __pyx_L1_error)}
37829   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 194, __pyx_L1_error)
37830   __Pyx_GOTREF(__pyx_t_1);
37831   __pyx_r = __pyx_t_1;
37832   __pyx_t_1 = 0;
37833   goto __pyx_L0;
37834 
37835   /* function exit code */
37836   __pyx_L1_error:;
37837   __Pyx_XDECREF(__pyx_t_1);
37838   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.selected_obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37839   __pyx_r = NULL;
37840   __pyx_L0:;
37841   __Pyx_XGIVEREF(__pyx_r);
37842   __Pyx_RefNannyFinishContext();
37843   return __pyx_r;
37844 }
37845 
37846 /* "statsmodels/tsa/statespace/_representation.pxd":195
37847  *     cdef readonly np.complex64_t [:] selected_obs
37848  *     cdef readonly np.complex64_t [:] selected_obs_intercept
37849  *     cdef readonly np.complex64_t [:] selected_design             # <<<<<<<<<<<<<<
37850  *     cdef readonly np.complex64_t [:] selected_obs_cov
37851  *
37852  */
37853 
37854 /* Python wrapper */
37855 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15selected_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15selected_design_1__get__(PyObject * __pyx_v_self)37856 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15selected_design_1__get__(PyObject *__pyx_v_self) {
37857   PyObject *__pyx_r = 0;
37858   __Pyx_RefNannyDeclarations
37859   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37860   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15selected_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37861 
37862   /* function exit code */
37863   __Pyx_RefNannyFinishContext();
37864   return __pyx_r;
37865 }
37866 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37867 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37868   PyObject *__pyx_r = NULL;
37869   __Pyx_RefNannyDeclarations
37870   PyObject *__pyx_t_1 = NULL;
37871   int __pyx_lineno = 0;
37872   const char *__pyx_filename = NULL;
37873   int __pyx_clineno = 0;
37874   __Pyx_RefNannySetupContext("__get__", 0);
37875   __Pyx_XDECREF(__pyx_r);
37876   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 195, __pyx_L1_error)}
37877   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_design, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 195, __pyx_L1_error)
37878   __Pyx_GOTREF(__pyx_t_1);
37879   __pyx_r = __pyx_t_1;
37880   __pyx_t_1 = 0;
37881   goto __pyx_L0;
37882 
37883   /* function exit code */
37884   __pyx_L1_error:;
37885   __Pyx_XDECREF(__pyx_t_1);
37886   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.selected_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37887   __pyx_r = NULL;
37888   __pyx_L0:;
37889   __Pyx_XGIVEREF(__pyx_r);
37890   __Pyx_RefNannyFinishContext();
37891   return __pyx_r;
37892 }
37893 
37894 /* "statsmodels/tsa/statespace/_representation.pxd":196
37895  *     cdef readonly np.complex64_t [:] selected_obs_intercept
37896  *     cdef readonly np.complex64_t [:] selected_design
37897  *     cdef readonly np.complex64_t [:] selected_obs_cov             # <<<<<<<<<<<<<<
37898  *
37899  *     # Temporary transformation arrays
37900  */
37901 
37902 /* Python wrapper */
37903 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16selected_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16selected_obs_cov_1__get__(PyObject * __pyx_v_self)37904 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16selected_obs_cov_1__get__(PyObject *__pyx_v_self) {
37905   PyObject *__pyx_r = 0;
37906   __Pyx_RefNannyDeclarations
37907   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37908   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16selected_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37909 
37910   /* function exit code */
37911   __Pyx_RefNannyFinishContext();
37912   return __pyx_r;
37913 }
37914 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37915 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37916   PyObject *__pyx_r = NULL;
37917   __Pyx_RefNannyDeclarations
37918   PyObject *__pyx_t_1 = NULL;
37919   int __pyx_lineno = 0;
37920   const char *__pyx_filename = NULL;
37921   int __pyx_clineno = 0;
37922   __Pyx_RefNannySetupContext("__get__", 0);
37923   __Pyx_XDECREF(__pyx_r);
37924   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 196, __pyx_L1_error)}
37925   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_cov, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 196, __pyx_L1_error)
37926   __Pyx_GOTREF(__pyx_t_1);
37927   __pyx_r = __pyx_t_1;
37928   __pyx_t_1 = 0;
37929   goto __pyx_L0;
37930 
37931   /* function exit code */
37932   __pyx_L1_error:;
37933   __Pyx_XDECREF(__pyx_t_1);
37934   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.selected_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37935   __pyx_r = NULL;
37936   __pyx_L0:;
37937   __Pyx_XGIVEREF(__pyx_r);
37938   __Pyx_RefNannyFinishContext();
37939   return __pyx_r;
37940 }
37941 
37942 /* "statsmodels/tsa/statespace/_representation.pxd":199
37943  *
37944  *     # Temporary transformation arrays
37945  *     cdef readonly np.complex64_t [::1,:] transform_cholesky             # <<<<<<<<<<<<<<
37946  *     cdef readonly np.complex64_t [::1,:] transform_obs_cov
37947  *     cdef readonly np.complex64_t [::1,:] transform_design
37948  */
37949 
37950 /* Python wrapper */
37951 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18transform_cholesky_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18transform_cholesky_1__get__(PyObject * __pyx_v_self)37952 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18transform_cholesky_1__get__(PyObject *__pyx_v_self) {
37953   PyObject *__pyx_r = 0;
37954   __Pyx_RefNannyDeclarations
37955   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37956   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18transform_cholesky___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
37957 
37958   /* function exit code */
37959   __Pyx_RefNannyFinishContext();
37960   return __pyx_r;
37961 }
37962 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)37963 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
37964   PyObject *__pyx_r = NULL;
37965   __Pyx_RefNannyDeclarations
37966   PyObject *__pyx_t_1 = NULL;
37967   int __pyx_lineno = 0;
37968   const char *__pyx_filename = NULL;
37969   int __pyx_clineno = 0;
37970   __Pyx_RefNannySetupContext("__get__", 0);
37971   __Pyx_XDECREF(__pyx_r);
37972   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 199, __pyx_L1_error)}
37973   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 199, __pyx_L1_error)
37974   __Pyx_GOTREF(__pyx_t_1);
37975   __pyx_r = __pyx_t_1;
37976   __pyx_t_1 = 0;
37977   goto __pyx_L0;
37978 
37979   /* function exit code */
37980   __pyx_L1_error:;
37981   __Pyx_XDECREF(__pyx_t_1);
37982   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transform_cholesky.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37983   __pyx_r = NULL;
37984   __pyx_L0:;
37985   __Pyx_XGIVEREF(__pyx_r);
37986   __Pyx_RefNannyFinishContext();
37987   return __pyx_r;
37988 }
37989 
37990 /* "statsmodels/tsa/statespace/_representation.pxd":200
37991  *     # Temporary transformation arrays
37992  *     cdef readonly np.complex64_t [::1,:] transform_cholesky
37993  *     cdef readonly np.complex64_t [::1,:] transform_obs_cov             # <<<<<<<<<<<<<<
37994  *     cdef readonly np.complex64_t [::1,:] transform_design
37995  *     cdef readonly np.complex64_t [:] transform_obs_intercept
37996  */
37997 
37998 /* Python wrapper */
37999 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17transform_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17transform_obs_cov_1__get__(PyObject * __pyx_v_self)38000 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17transform_obs_cov_1__get__(PyObject *__pyx_v_self) {
38001   PyObject *__pyx_r = 0;
38002   __Pyx_RefNannyDeclarations
38003   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38004   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17transform_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38005 
38006   /* function exit code */
38007   __Pyx_RefNannyFinishContext();
38008   return __pyx_r;
38009 }
38010 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38011 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38012   PyObject *__pyx_r = NULL;
38013   __Pyx_RefNannyDeclarations
38014   PyObject *__pyx_t_1 = NULL;
38015   int __pyx_lineno = 0;
38016   const char *__pyx_filename = NULL;
38017   int __pyx_clineno = 0;
38018   __Pyx_RefNannySetupContext("__get__", 0);
38019   __Pyx_XDECREF(__pyx_r);
38020   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 200, __pyx_L1_error)}
38021   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
38022   __Pyx_GOTREF(__pyx_t_1);
38023   __pyx_r = __pyx_t_1;
38024   __pyx_t_1 = 0;
38025   goto __pyx_L0;
38026 
38027   /* function exit code */
38028   __pyx_L1_error:;
38029   __Pyx_XDECREF(__pyx_t_1);
38030   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transform_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38031   __pyx_r = NULL;
38032   __pyx_L0:;
38033   __Pyx_XGIVEREF(__pyx_r);
38034   __Pyx_RefNannyFinishContext();
38035   return __pyx_r;
38036 }
38037 
38038 /* "statsmodels/tsa/statespace/_representation.pxd":201
38039  *     cdef readonly np.complex64_t [::1,:] transform_cholesky
38040  *     cdef readonly np.complex64_t [::1,:] transform_obs_cov
38041  *     cdef readonly np.complex64_t [::1,:] transform_design             # <<<<<<<<<<<<<<
38042  *     cdef readonly np.complex64_t [:] transform_obs_intercept
38043  *     cdef readonly np.complex64_t transform_determinant
38044  */
38045 
38046 /* Python wrapper */
38047 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16transform_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16transform_design_1__get__(PyObject * __pyx_v_self)38048 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16transform_design_1__get__(PyObject *__pyx_v_self) {
38049   PyObject *__pyx_r = 0;
38050   __Pyx_RefNannyDeclarations
38051   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38052   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16transform_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38053 
38054   /* function exit code */
38055   __Pyx_RefNannyFinishContext();
38056   return __pyx_r;
38057 }
38058 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38059 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38060   PyObject *__pyx_r = NULL;
38061   __Pyx_RefNannyDeclarations
38062   PyObject *__pyx_t_1 = NULL;
38063   int __pyx_lineno = 0;
38064   const char *__pyx_filename = NULL;
38065   int __pyx_clineno = 0;
38066   __Pyx_RefNannySetupContext("__get__", 0);
38067   __Pyx_XDECREF(__pyx_r);
38068   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 201, __pyx_L1_error)}
38069   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_design, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 201, __pyx_L1_error)
38070   __Pyx_GOTREF(__pyx_t_1);
38071   __pyx_r = __pyx_t_1;
38072   __pyx_t_1 = 0;
38073   goto __pyx_L0;
38074 
38075   /* function exit code */
38076   __pyx_L1_error:;
38077   __Pyx_XDECREF(__pyx_t_1);
38078   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transform_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38079   __pyx_r = NULL;
38080   __pyx_L0:;
38081   __Pyx_XGIVEREF(__pyx_r);
38082   __Pyx_RefNannyFinishContext();
38083   return __pyx_r;
38084 }
38085 
38086 /* "statsmodels/tsa/statespace/_representation.pxd":202
38087  *     cdef readonly np.complex64_t [::1,:] transform_obs_cov
38088  *     cdef readonly np.complex64_t [::1,:] transform_design
38089  *     cdef readonly np.complex64_t [:] transform_obs_intercept             # <<<<<<<<<<<<<<
38090  *     cdef readonly np.complex64_t transform_determinant
38091  *
38092  */
38093 
38094 /* Python wrapper */
38095 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_23transform_obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_23transform_obs_intercept_1__get__(PyObject * __pyx_v_self)38096 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_23transform_obs_intercept_1__get__(PyObject *__pyx_v_self) {
38097   PyObject *__pyx_r = 0;
38098   __Pyx_RefNannyDeclarations
38099   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38100   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_23transform_obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38101 
38102   /* function exit code */
38103   __Pyx_RefNannyFinishContext();
38104   return __pyx_r;
38105 }
38106 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38107 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38108   PyObject *__pyx_r = NULL;
38109   __Pyx_RefNannyDeclarations
38110   PyObject *__pyx_t_1 = NULL;
38111   int __pyx_lineno = 0;
38112   const char *__pyx_filename = NULL;
38113   int __pyx_clineno = 0;
38114   __Pyx_RefNannySetupContext("__get__", 0);
38115   __Pyx_XDECREF(__pyx_r);
38116   if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 202, __pyx_L1_error)}
38117   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L1_error)
38118   __Pyx_GOTREF(__pyx_t_1);
38119   __pyx_r = __pyx_t_1;
38120   __pyx_t_1 = 0;
38121   goto __pyx_L0;
38122 
38123   /* function exit code */
38124   __pyx_L1_error:;
38125   __Pyx_XDECREF(__pyx_t_1);
38126   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transform_obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38127   __pyx_r = NULL;
38128   __pyx_L0:;
38129   __Pyx_XGIVEREF(__pyx_r);
38130   __Pyx_RefNannyFinishContext();
38131   return __pyx_r;
38132 }
38133 
38134 /* "statsmodels/tsa/statespace/_representation.pxd":203
38135  *     cdef readonly np.complex64_t [::1,:] transform_design
38136  *     cdef readonly np.complex64_t [:] transform_obs_intercept
38137  *     cdef readonly np.complex64_t transform_determinant             # <<<<<<<<<<<<<<
38138  *
38139  *     cdef readonly np.complex64_t [:] collapse_obs
38140  */
38141 
38142 /* Python wrapper */
38143 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_21transform_determinant_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_21transform_determinant_1__get__(PyObject * __pyx_v_self)38144 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_21transform_determinant_1__get__(PyObject *__pyx_v_self) {
38145   PyObject *__pyx_r = 0;
38146   __Pyx_RefNannyDeclarations
38147   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38148   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_21transform_determinant___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38149 
38150   /* function exit code */
38151   __Pyx_RefNannyFinishContext();
38152   return __pyx_r;
38153 }
38154 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38155 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38156   PyObject *__pyx_r = NULL;
38157   __Pyx_RefNannyDeclarations
38158   PyObject *__pyx_t_1 = NULL;
38159   int __pyx_lineno = 0;
38160   const char *__pyx_filename = NULL;
38161   int __pyx_clineno = 0;
38162   __Pyx_RefNannySetupContext("__get__", 0);
38163   __Pyx_XDECREF(__pyx_r);
38164   __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_self->transform_determinant); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 203, __pyx_L1_error)
38165   __Pyx_GOTREF(__pyx_t_1);
38166   __pyx_r = __pyx_t_1;
38167   __pyx_t_1 = 0;
38168   goto __pyx_L0;
38169 
38170   /* function exit code */
38171   __pyx_L1_error:;
38172   __Pyx_XDECREF(__pyx_t_1);
38173   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.transform_determinant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38174   __pyx_r = NULL;
38175   __pyx_L0:;
38176   __Pyx_XGIVEREF(__pyx_r);
38177   __Pyx_RefNannyFinishContext();
38178   return __pyx_r;
38179 }
38180 
38181 /* "statsmodels/tsa/statespace/_representation.pxd":205
38182  *     cdef readonly np.complex64_t transform_determinant
38183  *
38184  *     cdef readonly np.complex64_t [:] collapse_obs             # <<<<<<<<<<<<<<
38185  *     cdef readonly np.complex64_t [:] collapse_obs_tmp
38186  *     cdef readonly np.complex64_t [::1,:] collapse_design
38187  */
38188 
38189 /* Python wrapper */
38190 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12collapse_obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12collapse_obs_1__get__(PyObject * __pyx_v_self)38191 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12collapse_obs_1__get__(PyObject *__pyx_v_self) {
38192   PyObject *__pyx_r = 0;
38193   __Pyx_RefNannyDeclarations
38194   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38195   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12collapse_obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38196 
38197   /* function exit code */
38198   __Pyx_RefNannyFinishContext();
38199   return __pyx_r;
38200 }
38201 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38202 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38203   PyObject *__pyx_r = NULL;
38204   __Pyx_RefNannyDeclarations
38205   PyObject *__pyx_t_1 = NULL;
38206   int __pyx_lineno = 0;
38207   const char *__pyx_filename = NULL;
38208   int __pyx_clineno = 0;
38209   __Pyx_RefNannySetupContext("__get__", 0);
38210   __Pyx_XDECREF(__pyx_r);
38211   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 205, __pyx_L1_error)}
38212   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 205, __pyx_L1_error)
38213   __Pyx_GOTREF(__pyx_t_1);
38214   __pyx_r = __pyx_t_1;
38215   __pyx_t_1 = 0;
38216   goto __pyx_L0;
38217 
38218   /* function exit code */
38219   __pyx_L1_error:;
38220   __Pyx_XDECREF(__pyx_t_1);
38221   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.collapse_obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38222   __pyx_r = NULL;
38223   __pyx_L0:;
38224   __Pyx_XGIVEREF(__pyx_r);
38225   __Pyx_RefNannyFinishContext();
38226   return __pyx_r;
38227 }
38228 
38229 /* "statsmodels/tsa/statespace/_representation.pxd":206
38230  *
38231  *     cdef readonly np.complex64_t [:] collapse_obs
38232  *     cdef readonly np.complex64_t [:] collapse_obs_tmp             # <<<<<<<<<<<<<<
38233  *     cdef readonly np.complex64_t [::1,:] collapse_design
38234  *     cdef readonly np.complex64_t [::1,:] collapse_obs_cov
38235  */
38236 
38237 /* Python wrapper */
38238 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_tmp_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_tmp_1__get__(PyObject * __pyx_v_self)38239 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_tmp_1__get__(PyObject *__pyx_v_self) {
38240   PyObject *__pyx_r = 0;
38241   __Pyx_RefNannyDeclarations
38242   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38243   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_tmp___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38244 
38245   /* function exit code */
38246   __Pyx_RefNannyFinishContext();
38247   return __pyx_r;
38248 }
38249 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38250 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38251   PyObject *__pyx_r = NULL;
38252   __Pyx_RefNannyDeclarations
38253   PyObject *__pyx_t_1 = NULL;
38254   int __pyx_lineno = 0;
38255   const char *__pyx_filename = NULL;
38256   int __pyx_clineno = 0;
38257   __Pyx_RefNannySetupContext("__get__", 0);
38258   __Pyx_XDECREF(__pyx_r);
38259   if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 206, __pyx_L1_error)}
38260   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_tmp, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error)
38261   __Pyx_GOTREF(__pyx_t_1);
38262   __pyx_r = __pyx_t_1;
38263   __pyx_t_1 = 0;
38264   goto __pyx_L0;
38265 
38266   /* function exit code */
38267   __pyx_L1_error:;
38268   __Pyx_XDECREF(__pyx_t_1);
38269   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.collapse_obs_tmp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38270   __pyx_r = NULL;
38271   __pyx_L0:;
38272   __Pyx_XGIVEREF(__pyx_r);
38273   __Pyx_RefNannyFinishContext();
38274   return __pyx_r;
38275 }
38276 
38277 /* "statsmodels/tsa/statespace/_representation.pxd":207
38278  *     cdef readonly np.complex64_t [:] collapse_obs
38279  *     cdef readonly np.complex64_t [:] collapse_obs_tmp
38280  *     cdef readonly np.complex64_t [::1,:] collapse_design             # <<<<<<<<<<<<<<
38281  *     cdef readonly np.complex64_t [::1,:] collapse_obs_cov
38282  *     cdef readonly np.complex64_t [::1,:] collapse_cholesky
38283  */
38284 
38285 /* Python wrapper */
38286 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15collapse_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15collapse_design_1__get__(PyObject * __pyx_v_self)38287 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15collapse_design_1__get__(PyObject *__pyx_v_self) {
38288   PyObject *__pyx_r = 0;
38289   __Pyx_RefNannyDeclarations
38290   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38291   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15collapse_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38292 
38293   /* function exit code */
38294   __Pyx_RefNannyFinishContext();
38295   return __pyx_r;
38296 }
38297 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38298 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38299   PyObject *__pyx_r = NULL;
38300   __Pyx_RefNannyDeclarations
38301   PyObject *__pyx_t_1 = NULL;
38302   int __pyx_lineno = 0;
38303   const char *__pyx_filename = NULL;
38304   int __pyx_clineno = 0;
38305   __Pyx_RefNannySetupContext("__get__", 0);
38306   __Pyx_XDECREF(__pyx_r);
38307   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 207, __pyx_L1_error)}
38308   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_design, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 207, __pyx_L1_error)
38309   __Pyx_GOTREF(__pyx_t_1);
38310   __pyx_r = __pyx_t_1;
38311   __pyx_t_1 = 0;
38312   goto __pyx_L0;
38313 
38314   /* function exit code */
38315   __pyx_L1_error:;
38316   __Pyx_XDECREF(__pyx_t_1);
38317   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.collapse_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38318   __pyx_r = NULL;
38319   __pyx_L0:;
38320   __Pyx_XGIVEREF(__pyx_r);
38321   __Pyx_RefNannyFinishContext();
38322   return __pyx_r;
38323 }
38324 
38325 /* "statsmodels/tsa/statespace/_representation.pxd":208
38326  *     cdef readonly np.complex64_t [:] collapse_obs_tmp
38327  *     cdef readonly np.complex64_t [::1,:] collapse_design
38328  *     cdef readonly np.complex64_t [::1,:] collapse_obs_cov             # <<<<<<<<<<<<<<
38329  *     cdef readonly np.complex64_t [::1,:] collapse_cholesky
38330  *     cdef readonly np.complex64_t collapse_loglikelihood
38331  */
38332 
38333 /* Python wrapper */
38334 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_cov_1__get__(PyObject * __pyx_v_self)38335 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_cov_1__get__(PyObject *__pyx_v_self) {
38336   PyObject *__pyx_r = 0;
38337   __Pyx_RefNannyDeclarations
38338   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38339   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38340 
38341   /* function exit code */
38342   __Pyx_RefNannyFinishContext();
38343   return __pyx_r;
38344 }
38345 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38346 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38347   PyObject *__pyx_r = NULL;
38348   __Pyx_RefNannyDeclarations
38349   PyObject *__pyx_t_1 = NULL;
38350   int __pyx_lineno = 0;
38351   const char *__pyx_filename = NULL;
38352   int __pyx_clineno = 0;
38353   __Pyx_RefNannySetupContext("__get__", 0);
38354   __Pyx_XDECREF(__pyx_r);
38355   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 208, __pyx_L1_error)}
38356   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 208, __pyx_L1_error)
38357   __Pyx_GOTREF(__pyx_t_1);
38358   __pyx_r = __pyx_t_1;
38359   __pyx_t_1 = 0;
38360   goto __pyx_L0;
38361 
38362   /* function exit code */
38363   __pyx_L1_error:;
38364   __Pyx_XDECREF(__pyx_t_1);
38365   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.collapse_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38366   __pyx_r = NULL;
38367   __pyx_L0:;
38368   __Pyx_XGIVEREF(__pyx_r);
38369   __Pyx_RefNannyFinishContext();
38370   return __pyx_r;
38371 }
38372 
38373 /* "statsmodels/tsa/statespace/_representation.pxd":209
38374  *     cdef readonly np.complex64_t [::1,:] collapse_design
38375  *     cdef readonly np.complex64_t [::1,:] collapse_obs_cov
38376  *     cdef readonly np.complex64_t [::1,:] collapse_cholesky             # <<<<<<<<<<<<<<
38377  *     cdef readonly np.complex64_t collapse_loglikelihood
38378  *
38379  */
38380 
38381 /* Python wrapper */
38382 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17collapse_cholesky_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17collapse_cholesky_1__get__(PyObject * __pyx_v_self)38383 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17collapse_cholesky_1__get__(PyObject *__pyx_v_self) {
38384   PyObject *__pyx_r = 0;
38385   __Pyx_RefNannyDeclarations
38386   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38387   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17collapse_cholesky___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38388 
38389   /* function exit code */
38390   __Pyx_RefNannyFinishContext();
38391   return __pyx_r;
38392 }
38393 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38394 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38395   PyObject *__pyx_r = NULL;
38396   __Pyx_RefNannyDeclarations
38397   PyObject *__pyx_t_1 = NULL;
38398   int __pyx_lineno = 0;
38399   const char *__pyx_filename = NULL;
38400   int __pyx_clineno = 0;
38401   __Pyx_RefNannySetupContext("__get__", 0);
38402   __Pyx_XDECREF(__pyx_r);
38403   if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 209, __pyx_L1_error)}
38404   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_float_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_float_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error)
38405   __Pyx_GOTREF(__pyx_t_1);
38406   __pyx_r = __pyx_t_1;
38407   __pyx_t_1 = 0;
38408   goto __pyx_L0;
38409 
38410   /* function exit code */
38411   __pyx_L1_error:;
38412   __Pyx_XDECREF(__pyx_t_1);
38413   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.collapse_cholesky.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38414   __pyx_r = NULL;
38415   __pyx_L0:;
38416   __Pyx_XGIVEREF(__pyx_r);
38417   __Pyx_RefNannyFinishContext();
38418   return __pyx_r;
38419 }
38420 
38421 /* "statsmodels/tsa/statespace/_representation.pxd":210
38422  *     cdef readonly np.complex64_t [::1,:] collapse_obs_cov
38423  *     cdef readonly np.complex64_t [::1,:] collapse_cholesky
38424  *     cdef readonly np.complex64_t collapse_loglikelihood             # <<<<<<<<<<<<<<
38425  *
38426  *     # Pointers
38427  */
38428 
38429 /* Python wrapper */
38430 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22collapse_loglikelihood_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22collapse_loglikelihood_1__get__(PyObject * __pyx_v_self)38431 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22collapse_loglikelihood_1__get__(PyObject *__pyx_v_self) {
38432   PyObject *__pyx_r = 0;
38433   __Pyx_RefNannyDeclarations
38434   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38435   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22collapse_loglikelihood___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38436 
38437   /* function exit code */
38438   __Pyx_RefNannyFinishContext();
38439   return __pyx_r;
38440 }
38441 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38442 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38443   PyObject *__pyx_r = NULL;
38444   __Pyx_RefNannyDeclarations
38445   PyObject *__pyx_t_1 = NULL;
38446   int __pyx_lineno = 0;
38447   const char *__pyx_filename = NULL;
38448   int __pyx_clineno = 0;
38449   __Pyx_RefNannySetupContext("__get__", 0);
38450   __Pyx_XDECREF(__pyx_r);
38451   __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_self->collapse_loglikelihood); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 210, __pyx_L1_error)
38452   __Pyx_GOTREF(__pyx_t_1);
38453   __pyx_r = __pyx_t_1;
38454   __pyx_t_1 = 0;
38455   goto __pyx_L0;
38456 
38457   /* function exit code */
38458   __pyx_L1_error:;
38459   __Pyx_XDECREF(__pyx_t_1);
38460   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.collapse_loglikelihood.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38461   __pyx_r = NULL;
38462   __pyx_L0:;
38463   __Pyx_XGIVEREF(__pyx_r);
38464   __Pyx_RefNannyFinishContext();
38465   return __pyx_r;
38466 }
38467 
38468 /* "statsmodels/tsa/statespace/_representation.pxd":227
38469  *
38470  *     # Current location
38471  *     cdef readonly int t             # <<<<<<<<<<<<<<
38472  *     cdef readonly int _previous_t
38473  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
38474  */
38475 
38476 /* Python wrapper */
38477 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1t_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1t_1__get__(PyObject * __pyx_v_self)38478 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1t_1__get__(PyObject *__pyx_v_self) {
38479   PyObject *__pyx_r = 0;
38480   __Pyx_RefNannyDeclarations
38481   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38482   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1t___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38483 
38484   /* function exit code */
38485   __Pyx_RefNannyFinishContext();
38486   return __pyx_r;
38487 }
38488 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38489 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38490   PyObject *__pyx_r = NULL;
38491   __Pyx_RefNannyDeclarations
38492   PyObject *__pyx_t_1 = NULL;
38493   int __pyx_lineno = 0;
38494   const char *__pyx_filename = NULL;
38495   int __pyx_clineno = 0;
38496   __Pyx_RefNannySetupContext("__get__", 0);
38497   __Pyx_XDECREF(__pyx_r);
38498   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 227, __pyx_L1_error)
38499   __Pyx_GOTREF(__pyx_t_1);
38500   __pyx_r = __pyx_t_1;
38501   __pyx_t_1 = 0;
38502   goto __pyx_L0;
38503 
38504   /* function exit code */
38505   __pyx_L1_error:;
38506   __Pyx_XDECREF(__pyx_t_1);
38507   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace.t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38508   __pyx_r = NULL;
38509   __pyx_L0:;
38510   __Pyx_XGIVEREF(__pyx_r);
38511   __Pyx_RefNannyFinishContext();
38512   return __pyx_r;
38513 }
38514 
38515 /* "statsmodels/tsa/statespace/_representation.pxd":228
38516  *     # Current location
38517  *     cdef readonly int t
38518  *     cdef readonly int _previous_t             # <<<<<<<<<<<<<<
38519  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
38520  *     cdef readonly int _nmissing
38521  */
38522 
38523 /* Python wrapper */
38524 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11_previous_t_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11_previous_t_1__get__(PyObject * __pyx_v_self)38525 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11_previous_t_1__get__(PyObject *__pyx_v_self) {
38526   PyObject *__pyx_r = 0;
38527   __Pyx_RefNannyDeclarations
38528   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38529   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11_previous_t___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38530 
38531   /* function exit code */
38532   __Pyx_RefNannyFinishContext();
38533   return __pyx_r;
38534 }
38535 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38536 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38537   PyObject *__pyx_r = NULL;
38538   __Pyx_RefNannyDeclarations
38539   PyObject *__pyx_t_1 = NULL;
38540   int __pyx_lineno = 0;
38541   const char *__pyx_filename = NULL;
38542   int __pyx_clineno = 0;
38543   __Pyx_RefNannySetupContext("__get__", 0);
38544   __Pyx_XDECREF(__pyx_r);
38545   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_previous_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)
38546   __Pyx_GOTREF(__pyx_t_1);
38547   __pyx_r = __pyx_t_1;
38548   __pyx_t_1 = 0;
38549   goto __pyx_L0;
38550 
38551   /* function exit code */
38552   __pyx_L1_error:;
38553   __Pyx_XDECREF(__pyx_t_1);
38554   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._previous_t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38555   __pyx_r = NULL;
38556   __pyx_L0:;
38557   __Pyx_XGIVEREF(__pyx_r);
38558   __Pyx_RefNannyFinishContext();
38559   return __pyx_r;
38560 }
38561 
38562 /* "statsmodels/tsa/statespace/_representation.pxd":229
38563  *     cdef readonly int t
38564  *     cdef readonly int _previous_t
38565  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef             # <<<<<<<<<<<<<<
38566  *     cdef readonly int _nmissing
38567  *
38568  */
38569 
38570 /* Python wrapper */
38571 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8_k_endog_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8_k_endog_1__get__(PyObject * __pyx_v_self)38572 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8_k_endog_1__get__(PyObject *__pyx_v_self) {
38573   PyObject *__pyx_r = 0;
38574   __Pyx_RefNannyDeclarations
38575   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38576   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8_k_endog___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38577 
38578   /* function exit code */
38579   __Pyx_RefNannyFinishContext();
38580   return __pyx_r;
38581 }
38582 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38583 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38584   PyObject *__pyx_r = NULL;
38585   __Pyx_RefNannyDeclarations
38586   PyObject *__pyx_t_1 = NULL;
38587   int __pyx_lineno = 0;
38588   const char *__pyx_filename = NULL;
38589   int __pyx_clineno = 0;
38590   __Pyx_RefNannySetupContext("__get__", 0);
38591   __Pyx_XDECREF(__pyx_r);
38592   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
38593   __Pyx_GOTREF(__pyx_t_1);
38594   __pyx_r = __pyx_t_1;
38595   __pyx_t_1 = 0;
38596   goto __pyx_L0;
38597 
38598   /* function exit code */
38599   __pyx_L1_error:;
38600   __Pyx_XDECREF(__pyx_t_1);
38601   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._k_endog.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38602   __pyx_r = NULL;
38603   __pyx_L0:;
38604   __Pyx_XGIVEREF(__pyx_r);
38605   __Pyx_RefNannyFinishContext();
38606   return __pyx_r;
38607 }
38608 
38609 /* Python wrapper */
38610 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_states_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_states_1__get__(PyObject * __pyx_v_self)38611 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_states_1__get__(PyObject *__pyx_v_self) {
38612   PyObject *__pyx_r = 0;
38613   __Pyx_RefNannyDeclarations
38614   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38615   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_states___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38616 
38617   /* function exit code */
38618   __Pyx_RefNannyFinishContext();
38619   return __pyx_r;
38620 }
38621 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38622 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38623   PyObject *__pyx_r = NULL;
38624   __Pyx_RefNannyDeclarations
38625   PyObject *__pyx_t_1 = NULL;
38626   int __pyx_lineno = 0;
38627   const char *__pyx_filename = NULL;
38628   int __pyx_clineno = 0;
38629   __Pyx_RefNannySetupContext("__get__", 0);
38630   __Pyx_XDECREF(__pyx_r);
38631   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
38632   __Pyx_GOTREF(__pyx_t_1);
38633   __pyx_r = __pyx_t_1;
38634   __pyx_t_1 = 0;
38635   goto __pyx_L0;
38636 
38637   /* function exit code */
38638   __pyx_L1_error:;
38639   __Pyx_XDECREF(__pyx_t_1);
38640   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._k_states.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38641   __pyx_r = NULL;
38642   __pyx_L0:;
38643   __Pyx_XGIVEREF(__pyx_r);
38644   __Pyx_RefNannyFinishContext();
38645   return __pyx_r;
38646 }
38647 
38648 /* Python wrapper */
38649 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_posdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_posdef_1__get__(PyObject * __pyx_v_self)38650 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_posdef_1__get__(PyObject *__pyx_v_self) {
38651   PyObject *__pyx_r = 0;
38652   __Pyx_RefNannyDeclarations
38653   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38654   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_posdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38655 
38656   /* function exit code */
38657   __Pyx_RefNannyFinishContext();
38658   return __pyx_r;
38659 }
38660 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38661 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38662   PyObject *__pyx_r = NULL;
38663   __Pyx_RefNannyDeclarations
38664   PyObject *__pyx_t_1 = NULL;
38665   int __pyx_lineno = 0;
38666   const char *__pyx_filename = NULL;
38667   int __pyx_clineno = 0;
38668   __Pyx_RefNannySetupContext("__get__", 0);
38669   __Pyx_XDECREF(__pyx_r);
38670   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_posdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
38671   __Pyx_GOTREF(__pyx_t_1);
38672   __pyx_r = __pyx_t_1;
38673   __pyx_t_1 = 0;
38674   goto __pyx_L0;
38675 
38676   /* function exit code */
38677   __pyx_L1_error:;
38678   __Pyx_XDECREF(__pyx_t_1);
38679   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._k_posdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38680   __pyx_r = NULL;
38681   __pyx_L0:;
38682   __Pyx_XGIVEREF(__pyx_r);
38683   __Pyx_RefNannyFinishContext();
38684   return __pyx_r;
38685 }
38686 
38687 /* Python wrapper */
38688 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_endog2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_endog2_1__get__(PyObject * __pyx_v_self)38689 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_endog2_1__get__(PyObject *__pyx_v_self) {
38690   PyObject *__pyx_r = 0;
38691   __Pyx_RefNannyDeclarations
38692   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38693   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_endog2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38694 
38695   /* function exit code */
38696   __Pyx_RefNannyFinishContext();
38697   return __pyx_r;
38698 }
38699 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38700 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38701   PyObject *__pyx_r = NULL;
38702   __Pyx_RefNannyDeclarations
38703   PyObject *__pyx_t_1 = NULL;
38704   int __pyx_lineno = 0;
38705   const char *__pyx_filename = NULL;
38706   int __pyx_clineno = 0;
38707   __Pyx_RefNannySetupContext("__get__", 0);
38708   __Pyx_XDECREF(__pyx_r);
38709   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endog2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
38710   __Pyx_GOTREF(__pyx_t_1);
38711   __pyx_r = __pyx_t_1;
38712   __pyx_t_1 = 0;
38713   goto __pyx_L0;
38714 
38715   /* function exit code */
38716   __pyx_L1_error:;
38717   __Pyx_XDECREF(__pyx_t_1);
38718   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._k_endog2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38719   __pyx_r = NULL;
38720   __pyx_L0:;
38721   __Pyx_XGIVEREF(__pyx_r);
38722   __Pyx_RefNannyFinishContext();
38723   return __pyx_r;
38724 }
38725 
38726 /* Python wrapper */
38727 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_states2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_states2_1__get__(PyObject * __pyx_v_self)38728 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_states2_1__get__(PyObject *__pyx_v_self) {
38729   PyObject *__pyx_r = 0;
38730   __Pyx_RefNannyDeclarations
38731   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38732   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_states2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38733 
38734   /* function exit code */
38735   __Pyx_RefNannyFinishContext();
38736   return __pyx_r;
38737 }
38738 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38739 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38740   PyObject *__pyx_r = NULL;
38741   __Pyx_RefNannyDeclarations
38742   PyObject *__pyx_t_1 = NULL;
38743   int __pyx_lineno = 0;
38744   const char *__pyx_filename = NULL;
38745   int __pyx_clineno = 0;
38746   __Pyx_RefNannySetupContext("__get__", 0);
38747   __Pyx_XDECREF(__pyx_r);
38748   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_states2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
38749   __Pyx_GOTREF(__pyx_t_1);
38750   __pyx_r = __pyx_t_1;
38751   __pyx_t_1 = 0;
38752   goto __pyx_L0;
38753 
38754   /* function exit code */
38755   __pyx_L1_error:;
38756   __Pyx_XDECREF(__pyx_t_1);
38757   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._k_states2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38758   __pyx_r = NULL;
38759   __pyx_L0:;
38760   __Pyx_XGIVEREF(__pyx_r);
38761   __Pyx_RefNannyFinishContext();
38762   return __pyx_r;
38763 }
38764 
38765 /* Python wrapper */
38766 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_posdef2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_posdef2_1__get__(PyObject * __pyx_v_self)38767 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_posdef2_1__get__(PyObject *__pyx_v_self) {
38768   PyObject *__pyx_r = 0;
38769   __Pyx_RefNannyDeclarations
38770   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38771   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_posdef2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38772 
38773   /* function exit code */
38774   __Pyx_RefNannyFinishContext();
38775   return __pyx_r;
38776 }
38777 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38778 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38779   PyObject *__pyx_r = NULL;
38780   __Pyx_RefNannyDeclarations
38781   PyObject *__pyx_t_1 = NULL;
38782   int __pyx_lineno = 0;
38783   const char *__pyx_filename = NULL;
38784   int __pyx_clineno = 0;
38785   __Pyx_RefNannySetupContext("__get__", 0);
38786   __Pyx_XDECREF(__pyx_r);
38787   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_posdef2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
38788   __Pyx_GOTREF(__pyx_t_1);
38789   __pyx_r = __pyx_t_1;
38790   __pyx_t_1 = 0;
38791   goto __pyx_L0;
38792 
38793   /* function exit code */
38794   __pyx_L1_error:;
38795   __Pyx_XDECREF(__pyx_t_1);
38796   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._k_posdef2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38797   __pyx_r = NULL;
38798   __pyx_L0:;
38799   __Pyx_XGIVEREF(__pyx_r);
38800   __Pyx_RefNannyFinishContext();
38801   return __pyx_r;
38802 }
38803 
38804 /* Python wrapper */
38805 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14_k_endogstates_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14_k_endogstates_1__get__(PyObject * __pyx_v_self)38806 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14_k_endogstates_1__get__(PyObject *__pyx_v_self) {
38807   PyObject *__pyx_r = 0;
38808   __Pyx_RefNannyDeclarations
38809   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38810   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14_k_endogstates___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38811 
38812   /* function exit code */
38813   __Pyx_RefNannyFinishContext();
38814   return __pyx_r;
38815 }
38816 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38817 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38818   PyObject *__pyx_r = NULL;
38819   __Pyx_RefNannyDeclarations
38820   PyObject *__pyx_t_1 = NULL;
38821   int __pyx_lineno = 0;
38822   const char *__pyx_filename = NULL;
38823   int __pyx_clineno = 0;
38824   __Pyx_RefNannySetupContext("__get__", 0);
38825   __Pyx_XDECREF(__pyx_r);
38826   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endogstates); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
38827   __Pyx_GOTREF(__pyx_t_1);
38828   __pyx_r = __pyx_t_1;
38829   __pyx_t_1 = 0;
38830   goto __pyx_L0;
38831 
38832   /* function exit code */
38833   __pyx_L1_error:;
38834   __Pyx_XDECREF(__pyx_t_1);
38835   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._k_endogstates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38836   __pyx_r = NULL;
38837   __pyx_L0:;
38838   __Pyx_XGIVEREF(__pyx_r);
38839   __Pyx_RefNannyFinishContext();
38840   return __pyx_r;
38841 }
38842 
38843 /* Python wrapper */
38844 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15_k_statesposdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15_k_statesposdef_1__get__(PyObject * __pyx_v_self)38845 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15_k_statesposdef_1__get__(PyObject *__pyx_v_self) {
38846   PyObject *__pyx_r = 0;
38847   __Pyx_RefNannyDeclarations
38848   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38849   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15_k_statesposdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38850 
38851   /* function exit code */
38852   __Pyx_RefNannyFinishContext();
38853   return __pyx_r;
38854 }
38855 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38856 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38857   PyObject *__pyx_r = NULL;
38858   __Pyx_RefNannyDeclarations
38859   PyObject *__pyx_t_1 = NULL;
38860   int __pyx_lineno = 0;
38861   const char *__pyx_filename = NULL;
38862   int __pyx_clineno = 0;
38863   __Pyx_RefNannySetupContext("__get__", 0);
38864   __Pyx_XDECREF(__pyx_r);
38865   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_statesposdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
38866   __Pyx_GOTREF(__pyx_t_1);
38867   __pyx_r = __pyx_t_1;
38868   __pyx_t_1 = 0;
38869   goto __pyx_L0;
38870 
38871   /* function exit code */
38872   __pyx_L1_error:;
38873   __Pyx_XDECREF(__pyx_t_1);
38874   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._k_statesposdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38875   __pyx_r = NULL;
38876   __pyx_L0:;
38877   __Pyx_XGIVEREF(__pyx_r);
38878   __Pyx_RefNannyFinishContext();
38879   return __pyx_r;
38880 }
38881 
38882 /* "statsmodels/tsa/statespace/_representation.pxd":230
38883  *     cdef readonly int _previous_t
38884  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
38885  *     cdef readonly int _nmissing             # <<<<<<<<<<<<<<
38886  *
38887  *     # Functions
38888  */
38889 
38890 /* Python wrapper */
38891 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_nmissing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_nmissing_1__get__(PyObject * __pyx_v_self)38892 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_nmissing_1__get__(PyObject *__pyx_v_self) {
38893   PyObject *__pyx_r = 0;
38894   __Pyx_RefNannyDeclarations
38895   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
38896   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_nmissing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)__pyx_v_self));
38897 
38898   /* function exit code */
38899   __Pyx_RefNannyFinishContext();
38900   return __pyx_r;
38901 }
38902 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace * __pyx_v_self)38903 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *__pyx_v_self) {
38904   PyObject *__pyx_r = NULL;
38905   __Pyx_RefNannyDeclarations
38906   PyObject *__pyx_t_1 = NULL;
38907   int __pyx_lineno = 0;
38908   const char *__pyx_filename = NULL;
38909   int __pyx_clineno = 0;
38910   __Pyx_RefNannySetupContext("__get__", 0);
38911   __Pyx_XDECREF(__pyx_r);
38912   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nmissing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L1_error)
38913   __Pyx_GOTREF(__pyx_t_1);
38914   __pyx_r = __pyx_t_1;
38915   __pyx_t_1 = 0;
38916   goto __pyx_L0;
38917 
38918   /* function exit code */
38919   __pyx_L1_error:;
38920   __Pyx_XDECREF(__pyx_t_1);
38921   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.cStatespace._nmissing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38922   __pyx_r = NULL;
38923   __pyx_L0:;
38924   __Pyx_XGIVEREF(__pyx_r);
38925   __Pyx_RefNannyFinishContext();
38926   return __pyx_r;
38927 }
38928 
38929 /* "statsmodels/tsa/statespace/_representation.pyx":2983
38930  *
38931  * # ### Selected covariance matrice
38932  * cdef int cselect_cov(int k, int k_posdef,             # <<<<<<<<<<<<<<
38933  *                               np.complex64_t * tmp,
38934  *                               np.complex64_t * selection,
38935  */
38936 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_cselect_cov(int __pyx_v_k,int __pyx_v_k_posdef,__pyx_t_float_complex * __pyx_v_tmp,__pyx_t_float_complex * __pyx_v_selection,__pyx_t_float_complex * __pyx_v_cov,__pyx_t_float_complex * __pyx_v_selected_cov)38937 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_cselect_cov(int __pyx_v_k, int __pyx_v_k_posdef, __pyx_t_float_complex *__pyx_v_tmp, __pyx_t_float_complex *__pyx_v_selection, __pyx_t_float_complex *__pyx_v_cov, __pyx_t_float_complex *__pyx_v_selected_cov) {
38938   __pyx_t_float_complex __pyx_v_alpha;
38939   __pyx_t_float_complex __pyx_v_beta;
38940   int __pyx_r;
38941   __Pyx_RefNannyDeclarations
38942   int __pyx_t_1;
38943   __Pyx_RefNannySetupContext("cselect_cov", 0);
38944 
38945   /* "statsmodels/tsa/statespace/_representation.pyx":2989
38946  *                               np.complex64_t * selected_cov):
38947  *     cdef:
38948  *         np.complex64_t alpha = 1.0             # <<<<<<<<<<<<<<
38949  *         np.complex64_t beta = 0.0
38950  *
38951  */
38952   __pyx_v_alpha = __pyx_t_float_complex_from_parts(1.0, 0);
38953 
38954   /* "statsmodels/tsa/statespace/_representation.pyx":2990
38955  *     cdef:
38956  *         np.complex64_t alpha = 1.0
38957  *         np.complex64_t beta = 0.0             # <<<<<<<<<<<<<<
38958  *
38959  *     # Only need to do something if there is a covariance matrix
38960  */
38961   __pyx_v_beta = __pyx_t_float_complex_from_parts(0.0, 0);
38962 
38963   /* "statsmodels/tsa/statespace/_representation.pyx":2994
38964  *     # Only need to do something if there is a covariance matrix
38965  *     # (i.e k_posdof == 0)
38966  *     if k_posdef > 0:             # <<<<<<<<<<<<<<
38967  *
38968  *         # #### Calculate selected state covariance matrix
38969  */
38970   __pyx_t_1 = ((__pyx_v_k_posdef > 0) != 0);
38971   if (__pyx_t_1) {
38972 
38973     /* "statsmodels/tsa/statespace/_representation.pyx":3010
38974  *         # $\\#_0 = 1.0 * R_t Q_t$
38975  *         # $(m \times r) = (m \times r) (r \times r)$
38976  *         blas.cgemm("N", "N", &k, &k_posdef, &k_posdef,             # <<<<<<<<<<<<<<
38977  *               &alpha, selection, &k,
38978  *                       cov, &k_posdef,
38979  */
38980     __pyx_f_5scipy_6linalg_11cython_blas_cgemm(((char *)"N"), ((char *)"N"), (&__pyx_v_k), (&__pyx_v_k_posdef), (&__pyx_v_k_posdef), (&__pyx_v_alpha), __pyx_v_selection, (&__pyx_v_k), __pyx_v_cov, (&__pyx_v_k_posdef), (&__pyx_v_beta), __pyx_v_tmp, (&__pyx_v_k));
38981 
38982     /* "statsmodels/tsa/statespace/_representation.pyx":3016
38983  *         # $Q_t^* = 1.0 * \\#_0 R_t'$
38984  *         # $(m \times m) = (m \times r) (m \times r)'$
38985  *         blas.cgemm("N", "T", &k, &k, &k_posdef,             # <<<<<<<<<<<<<<
38986  *               &alpha, tmp, &k,
38987  *                       selection, &k,
38988  */
38989     __pyx_f_5scipy_6linalg_11cython_blas_cgemm(((char *)"N"), ((char *)"T"), (&__pyx_v_k), (&__pyx_v_k), (&__pyx_v_k_posdef), (&__pyx_v_alpha), __pyx_v_tmp, (&__pyx_v_k), __pyx_v_selection, (&__pyx_v_k), (&__pyx_v_beta), __pyx_v_selected_cov, (&__pyx_v_k));
38990 
38991     /* "statsmodels/tsa/statespace/_representation.pyx":2994
38992  *     # Only need to do something if there is a covariance matrix
38993  *     # (i.e k_posdof == 0)
38994  *     if k_posdef > 0:             # <<<<<<<<<<<<<<
38995  *
38996  *         # #### Calculate selected state covariance matrix
38997  */
38998   }
38999 
39000   /* "statsmodels/tsa/statespace/_representation.pyx":2983
39001  *
39002  * # ### Selected covariance matrice
39003  * cdef int cselect_cov(int k, int k_posdef,             # <<<<<<<<<<<<<<
39004  *                               np.complex64_t * tmp,
39005  *                               np.complex64_t * selection,
39006  */
39007 
39008   /* function exit code */
39009   __pyx_r = 0;
39010   __Pyx_RefNannyFinishContext();
39011   return __pyx_r;
39012 }
39013 
39014 /* "statsmodels/tsa/statespace/_representation.pyx":3141
39015  *     # ### Initialize state space model
39016  *     # *Note*: The initial state and state covariance matrix must be provided.
39017  *     def __init__(self,             # <<<<<<<<<<<<<<
39018  *                  np.complex128_t [::1,:]   obs,
39019  *                  np.complex128_t [::1,:,:] design,
39020  */
39021 
39022 /* Python wrapper */
39023 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1__init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)39024 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
39025   __Pyx_memviewslice __pyx_v_obs = { 0, 0, { 0 }, { 0 }, { 0 } };
39026   __Pyx_memviewslice __pyx_v_design = { 0, 0, { 0 }, { 0 }, { 0 } };
39027   __Pyx_memviewslice __pyx_v_obs_intercept = { 0, 0, { 0 }, { 0 }, { 0 } };
39028   __Pyx_memviewslice __pyx_v_obs_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
39029   __Pyx_memviewslice __pyx_v_transition = { 0, 0, { 0 }, { 0 }, { 0 } };
39030   __Pyx_memviewslice __pyx_v_state_intercept = { 0, 0, { 0 }, { 0 }, { 0 } };
39031   __Pyx_memviewslice __pyx_v_selection = { 0, 0, { 0 }, { 0 }, { 0 } };
39032   __Pyx_memviewslice __pyx_v_state_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
39033   PyObject *__pyx_v_diagonal_obs_cov = 0;
39034   int __pyx_lineno = 0;
39035   const char *__pyx_filename = NULL;
39036   int __pyx_clineno = 0;
39037   int __pyx_r;
39038   __Pyx_RefNannyDeclarations
39039   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
39040   {
39041     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obs,&__pyx_n_s_design,&__pyx_n_s_obs_intercept,&__pyx_n_s_obs_cov,&__pyx_n_s_transition,&__pyx_n_s_state_intercept,&__pyx_n_s_selection,&__pyx_n_s_state_cov,&__pyx_n_s_diagonal_obs_cov,0};
39042     PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
39043     values[8] = ((PyObject *)__pyx_int_neg_1);
39044     if (unlikely(__pyx_kwds)) {
39045       Py_ssize_t kw_args;
39046       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
39047       switch (pos_args) {
39048         case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
39049         CYTHON_FALLTHROUGH;
39050         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
39051         CYTHON_FALLTHROUGH;
39052         case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39053         CYTHON_FALLTHROUGH;
39054         case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39055         CYTHON_FALLTHROUGH;
39056         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39057         CYTHON_FALLTHROUGH;
39058         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39059         CYTHON_FALLTHROUGH;
39060         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39061         CYTHON_FALLTHROUGH;
39062         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39063         CYTHON_FALLTHROUGH;
39064         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39065         CYTHON_FALLTHROUGH;
39066         case  0: break;
39067         default: goto __pyx_L5_argtuple_error;
39068       }
39069       kw_args = PyDict_Size(__pyx_kwds);
39070       switch (pos_args) {
39071         case  0:
39072         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs)) != 0)) kw_args--;
39073         else goto __pyx_L5_argtuple_error;
39074         CYTHON_FALLTHROUGH;
39075         case  1:
39076         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_design)) != 0)) kw_args--;
39077         else {
39078           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 1); __PYX_ERR(0, 3141, __pyx_L3_error)
39079         }
39080         CYTHON_FALLTHROUGH;
39081         case  2:
39082         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs_intercept)) != 0)) kw_args--;
39083         else {
39084           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 2); __PYX_ERR(0, 3141, __pyx_L3_error)
39085         }
39086         CYTHON_FALLTHROUGH;
39087         case  3:
39088         if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obs_cov)) != 0)) kw_args--;
39089         else {
39090           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 3); __PYX_ERR(0, 3141, __pyx_L3_error)
39091         }
39092         CYTHON_FALLTHROUGH;
39093         case  4:
39094         if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transition)) != 0)) kw_args--;
39095         else {
39096           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 4); __PYX_ERR(0, 3141, __pyx_L3_error)
39097         }
39098         CYTHON_FALLTHROUGH;
39099         case  5:
39100         if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_intercept)) != 0)) kw_args--;
39101         else {
39102           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 5); __PYX_ERR(0, 3141, __pyx_L3_error)
39103         }
39104         CYTHON_FALLTHROUGH;
39105         case  6:
39106         if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_selection)) != 0)) kw_args--;
39107         else {
39108           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 6); __PYX_ERR(0, 3141, __pyx_L3_error)
39109         }
39110         CYTHON_FALLTHROUGH;
39111         case  7:
39112         if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state_cov)) != 0)) kw_args--;
39113         else {
39114           __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 7); __PYX_ERR(0, 3141, __pyx_L3_error)
39115         }
39116         CYTHON_FALLTHROUGH;
39117         case  8:
39118         if (kw_args > 0) {
39119           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_diagonal_obs_cov);
39120           if (value) { values[8] = value; kw_args--; }
39121         }
39122       }
39123       if (unlikely(kw_args > 0)) {
39124         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3141, __pyx_L3_error)
39125       }
39126     } else {
39127       switch (PyTuple_GET_SIZE(__pyx_args)) {
39128         case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
39129         CYTHON_FALLTHROUGH;
39130         case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
39131         values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
39132         values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
39133         values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
39134         values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
39135         values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
39136         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39137         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39138         break;
39139         default: goto __pyx_L5_argtuple_error;
39140       }
39141     }
39142     __pyx_v_obs = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs.memview)) __PYX_ERR(0, 3142, __pyx_L3_error)
39143     __pyx_v_design = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_design.memview)) __PYX_ERR(0, 3143, __pyx_L3_error)
39144     __pyx_v_obs_intercept = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs_intercept.memview)) __PYX_ERR(0, 3144, __pyx_L3_error)
39145     __pyx_v_obs_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_obs_cov.memview)) __PYX_ERR(0, 3145, __pyx_L3_error)
39146     __pyx_v_transition = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_transition.memview)) __PYX_ERR(0, 3146, __pyx_L3_error)
39147     __pyx_v_state_intercept = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_state_intercept.memview)) __PYX_ERR(0, 3147, __pyx_L3_error)
39148     __pyx_v_selection = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_selection.memview)) __PYX_ERR(0, 3148, __pyx_L3_error)
39149     __pyx_v_state_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(values[7], PyBUF_WRITABLE); if (unlikely(!__pyx_v_state_cov.memview)) __PYX_ERR(0, 3149, __pyx_L3_error)
39150     __pyx_v_diagonal_obs_cov = values[8];
39151   }
39152   goto __pyx_L4_argument_unpacking_done;
39153   __pyx_L5_argtuple_error:;
39154   __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3141, __pyx_L3_error)
39155   __pyx_L3_error:;
39156   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
39157   __Pyx_RefNannyFinishContext();
39158   return -1;
39159   __pyx_L4_argument_unpacking_done:;
39160   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace___init__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), __pyx_v_obs, __pyx_v_design, __pyx_v_obs_intercept, __pyx_v_obs_cov, __pyx_v_transition, __pyx_v_state_intercept, __pyx_v_selection, __pyx_v_state_cov, __pyx_v_diagonal_obs_cov);
39161 
39162   /* function exit code */
39163   __Pyx_RefNannyFinishContext();
39164   return __pyx_r;
39165 }
39166 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,__Pyx_memviewslice __pyx_v_obs,__Pyx_memviewslice __pyx_v_design,__Pyx_memviewslice __pyx_v_obs_intercept,__Pyx_memviewslice __pyx_v_obs_cov,__Pyx_memviewslice __pyx_v_transition,__Pyx_memviewslice __pyx_v_state_intercept,__Pyx_memviewslice __pyx_v_selection,__Pyx_memviewslice __pyx_v_state_cov,PyObject * __pyx_v_diagonal_obs_cov)39167 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace___init__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_obs, __Pyx_memviewslice __pyx_v_design, __Pyx_memviewslice __pyx_v_obs_intercept, __Pyx_memviewslice __pyx_v_obs_cov, __Pyx_memviewslice __pyx_v_transition, __Pyx_memviewslice __pyx_v_state_intercept, __Pyx_memviewslice __pyx_v_selection, __Pyx_memviewslice __pyx_v_state_cov, PyObject *__pyx_v_diagonal_obs_cov) {
39168   npy_intp __pyx_v_dim1[1];
39169   npy_intp __pyx_v_dim2[2];
39170   npy_intp __pyx_v_dim3[3];
39171   int __pyx_r;
39172   __Pyx_RefNannyDeclarations
39173   PyObject *__pyx_t_1 = NULL;
39174   PyObject *__pyx_t_2 = NULL;
39175   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape __pyx_t_3;
39176   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape __pyx_t_4;
39177   int __pyx_t_5;
39178   int __pyx_t_6;
39179   int __pyx_t_7;
39180   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
39181   PyObject *__pyx_t_9 = NULL;
39182   PyObject *__pyx_t_10 = NULL;
39183   PyObject *__pyx_t_11 = NULL;
39184   __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
39185   __Pyx_memviewslice __pyx_t_13 = { 0, 0, { 0 }, { 0 }, { 0 } };
39186   int __pyx_t_14;
39187   int __pyx_t_15;
39188   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
39189   __Pyx_memviewslice __pyx_t_17 = { 0, 0, { 0 }, { 0 }, { 0 } };
39190   int __pyx_lineno = 0;
39191   const char *__pyx_filename = NULL;
39192   int __pyx_clineno = 0;
39193   __Pyx_RefNannySetupContext("__init__", 0);
39194 
39195   /* "statsmodels/tsa/statespace/_representation.pyx":3163
39196  *         # Python and passed to this constructor, so if they are updated in
39197  *         # Python they will also be updated here.
39198  *         self.obs = obs             # <<<<<<<<<<<<<<
39199  *         self.design = design
39200  *         self.obs_intercept = obs_intercept
39201  */
39202   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs, 0);
39203   __PYX_INC_MEMVIEW(&__pyx_v_obs, 0);
39204   __pyx_v_self->obs = __pyx_v_obs;
39205 
39206   /* "statsmodels/tsa/statespace/_representation.pyx":3164
39207  *         # Python they will also be updated here.
39208  *         self.obs = obs
39209  *         self.design = design             # <<<<<<<<<<<<<<
39210  *         self.obs_intercept = obs_intercept
39211  *         self.obs_cov = obs_cov
39212  */
39213   __PYX_XDEC_MEMVIEW(&__pyx_v_self->design, 0);
39214   __PYX_INC_MEMVIEW(&__pyx_v_design, 0);
39215   __pyx_v_self->design = __pyx_v_design;
39216 
39217   /* "statsmodels/tsa/statespace/_representation.pyx":3165
39218  *         self.obs = obs
39219  *         self.design = design
39220  *         self.obs_intercept = obs_intercept             # <<<<<<<<<<<<<<
39221  *         self.obs_cov = obs_cov
39222  *         self.transition = transition
39223  */
39224   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs_intercept, 0);
39225   __PYX_INC_MEMVIEW(&__pyx_v_obs_intercept, 0);
39226   __pyx_v_self->obs_intercept = __pyx_v_obs_intercept;
39227 
39228   /* "statsmodels/tsa/statespace/_representation.pyx":3166
39229  *         self.design = design
39230  *         self.obs_intercept = obs_intercept
39231  *         self.obs_cov = obs_cov             # <<<<<<<<<<<<<<
39232  *         self.transition = transition
39233  *         self.state_intercept = state_intercept
39234  */
39235   __PYX_XDEC_MEMVIEW(&__pyx_v_self->obs_cov, 0);
39236   __PYX_INC_MEMVIEW(&__pyx_v_obs_cov, 0);
39237   __pyx_v_self->obs_cov = __pyx_v_obs_cov;
39238 
39239   /* "statsmodels/tsa/statespace/_representation.pyx":3167
39240  *         self.obs_intercept = obs_intercept
39241  *         self.obs_cov = obs_cov
39242  *         self.transition = transition             # <<<<<<<<<<<<<<
39243  *         self.state_intercept = state_intercept
39244  *         self.selection = selection
39245  */
39246   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transition, 0);
39247   __PYX_INC_MEMVIEW(&__pyx_v_transition, 0);
39248   __pyx_v_self->transition = __pyx_v_transition;
39249 
39250   /* "statsmodels/tsa/statespace/_representation.pyx":3168
39251  *         self.obs_cov = obs_cov
39252  *         self.transition = transition
39253  *         self.state_intercept = state_intercept             # <<<<<<<<<<<<<<
39254  *         self.selection = selection
39255  *         self.state_cov = state_cov
39256  */
39257   __PYX_XDEC_MEMVIEW(&__pyx_v_self->state_intercept, 0);
39258   __PYX_INC_MEMVIEW(&__pyx_v_state_intercept, 0);
39259   __pyx_v_self->state_intercept = __pyx_v_state_intercept;
39260 
39261   /* "statsmodels/tsa/statespace/_representation.pyx":3169
39262  *         self.transition = transition
39263  *         self.state_intercept = state_intercept
39264  *         self.selection = selection             # <<<<<<<<<<<<<<
39265  *         self.state_cov = state_cov
39266  *
39267  */
39268   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selection, 0);
39269   __PYX_INC_MEMVIEW(&__pyx_v_selection, 0);
39270   __pyx_v_self->selection = __pyx_v_selection;
39271 
39272   /* "statsmodels/tsa/statespace/_representation.pyx":3170
39273  *         self.state_intercept = state_intercept
39274  *         self.selection = selection
39275  *         self.state_cov = state_cov             # <<<<<<<<<<<<<<
39276  *
39277  *         # Dimensions
39278  */
39279   __PYX_XDEC_MEMVIEW(&__pyx_v_self->state_cov, 0);
39280   __PYX_INC_MEMVIEW(&__pyx_v_state_cov, 0);
39281   __pyx_v_self->state_cov = __pyx_v_state_cov;
39282 
39283   /* "statsmodels/tsa/statespace/_representation.pyx":3173
39284  *
39285  *         # Dimensions
39286  *         self.k_endog = obs.shape[0]             # <<<<<<<<<<<<<<
39287  *         self.k_states = selection.shape[0]
39288  *         self.k_posdef = selection.shape[1]
39289  */
39290   __pyx_v_self->k_endog = (__pyx_v_obs.shape[0]);
39291 
39292   /* "statsmodels/tsa/statespace/_representation.pyx":3174
39293  *         # Dimensions
39294  *         self.k_endog = obs.shape[0]
39295  *         self.k_states = selection.shape[0]             # <<<<<<<<<<<<<<
39296  *         self.k_posdef = selection.shape[1]
39297  *         self.nobs = obs.shape[1]
39298  */
39299   __pyx_v_self->k_states = (__pyx_v_selection.shape[0]);
39300 
39301   /* "statsmodels/tsa/statespace/_representation.pyx":3175
39302  *         self.k_endog = obs.shape[0]
39303  *         self.k_states = selection.shape[0]
39304  *         self.k_posdef = selection.shape[1]             # <<<<<<<<<<<<<<
39305  *         self.nobs = obs.shape[1]
39306  *
39307  */
39308   __pyx_v_self->k_posdef = (__pyx_v_selection.shape[1]);
39309 
39310   /* "statsmodels/tsa/statespace/_representation.pyx":3176
39311  *         self.k_states = selection.shape[0]
39312  *         self.k_posdef = selection.shape[1]
39313  *         self.nobs = obs.shape[1]             # <<<<<<<<<<<<<<
39314  *
39315  *         # #### Validate matrix dimensions
39316  */
39317   __pyx_v_self->nobs = (__pyx_v_obs.shape[1]);
39318 
39319   /* "statsmodels/tsa/statespace/_representation.pyx":3181
39320  *         #
39321  *         # Make sure that the given state-space matrices have consistent sizes
39322  *         tools.validate_matrix_shape('design', &self.design.shape[0],             # <<<<<<<<<<<<<<
39323  *                               self.k_endog, self.k_states, self.nobs)
39324  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
39325  */
39326   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3181, __pyx_L1_error)}
39327 
39328   /* "statsmodels/tsa/statespace/_representation.pyx":3182
39329  *         # Make sure that the given state-space matrices have consistent sizes
39330  *         tools.validate_matrix_shape('design', &self.design.shape[0],
39331  *                               self.k_endog, self.k_states, self.nobs)             # <<<<<<<<<<<<<<
39332  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
39333  *                               self.k_endog, self.nobs)
39334  */
39335   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error)
39336   __Pyx_GOTREF(__pyx_t_1);
39337 
39338   /* "statsmodels/tsa/statespace/_representation.pyx":3181
39339  *         #
39340  *         # Make sure that the given state-space matrices have consistent sizes
39341  *         tools.validate_matrix_shape('design', &self.design.shape[0],             # <<<<<<<<<<<<<<
39342  *                               self.k_endog, self.k_states, self.nobs)
39343  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
39344  */
39345   __pyx_t_3.__pyx_n = 1;
39346   __pyx_t_3.nobs = __pyx_t_1;
39347   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_n_u_design, (&(__pyx_v_self->design.shape[0])), __pyx_v_self->k_endog, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3181, __pyx_L1_error)
39348   __Pyx_GOTREF(__pyx_t_2);
39349   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39350   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39351 
39352   /* "statsmodels/tsa/statespace/_representation.pyx":3183
39353  *         tools.validate_matrix_shape('design', &self.design.shape[0],
39354  *                               self.k_endog, self.k_states, self.nobs)
39355  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],             # <<<<<<<<<<<<<<
39356  *                               self.k_endog, self.nobs)
39357  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
39358  */
39359   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3183, __pyx_L1_error)}
39360 
39361   /* "statsmodels/tsa/statespace/_representation.pyx":3184
39362  *                               self.k_endog, self.k_states, self.nobs)
39363  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
39364  *                               self.k_endog, self.nobs)             # <<<<<<<<<<<<<<
39365  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
39366  *                               self.k_endog, self.k_endog, self.nobs)
39367  */
39368   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3184, __pyx_L1_error)
39369   __Pyx_GOTREF(__pyx_t_2);
39370 
39371   /* "statsmodels/tsa/statespace/_representation.pyx":3183
39372  *         tools.validate_matrix_shape('design', &self.design.shape[0],
39373  *                               self.k_endog, self.k_states, self.nobs)
39374  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],             # <<<<<<<<<<<<<<
39375  *                               self.k_endog, self.nobs)
39376  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
39377  */
39378   __pyx_t_4.__pyx_n = 1;
39379   __pyx_t_4.nobs = __pyx_t_2;
39380   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_observation_intercept, (&(__pyx_v_self->obs_intercept.shape[0])), __pyx_v_self->k_endog, &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3183, __pyx_L1_error)
39381   __Pyx_GOTREF(__pyx_t_1);
39382   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39383   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39384 
39385   /* "statsmodels/tsa/statespace/_representation.pyx":3185
39386  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
39387  *                               self.k_endog, self.nobs)
39388  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],             # <<<<<<<<<<<<<<
39389  *                               self.k_endog, self.k_endog, self.nobs)
39390  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
39391  */
39392   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3185, __pyx_L1_error)}
39393 
39394   /* "statsmodels/tsa/statespace/_representation.pyx":3186
39395  *                               self.k_endog, self.nobs)
39396  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
39397  *                               self.k_endog, self.k_endog, self.nobs)             # <<<<<<<<<<<<<<
39398  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
39399  *                               self.k_states, self.k_states, self.nobs)
39400  */
39401   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3186, __pyx_L1_error)
39402   __Pyx_GOTREF(__pyx_t_1);
39403 
39404   /* "statsmodels/tsa/statespace/_representation.pyx":3185
39405  *         tools.validate_vector_shape('observation intercept', &self.obs_intercept.shape[0],
39406  *                               self.k_endog, self.nobs)
39407  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],             # <<<<<<<<<<<<<<
39408  *                               self.k_endog, self.k_endog, self.nobs)
39409  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
39410  */
39411   __pyx_t_3.__pyx_n = 1;
39412   __pyx_t_3.nobs = __pyx_t_1;
39413   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_observation_covariance_matrix, (&(__pyx_v_self->obs_cov.shape[0])), __pyx_v_self->k_endog, __pyx_v_self->k_endog, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3185, __pyx_L1_error)
39414   __Pyx_GOTREF(__pyx_t_2);
39415   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39416   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39417 
39418   /* "statsmodels/tsa/statespace/_representation.pyx":3187
39419  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
39420  *                               self.k_endog, self.k_endog, self.nobs)
39421  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],             # <<<<<<<<<<<<<<
39422  *                               self.k_states, self.k_states, self.nobs)
39423  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
39424  */
39425   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3187, __pyx_L1_error)}
39426 
39427   /* "statsmodels/tsa/statespace/_representation.pyx":3188
39428  *                               self.k_endog, self.k_endog, self.nobs)
39429  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
39430  *                               self.k_states, self.k_states, self.nobs)             # <<<<<<<<<<<<<<
39431  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
39432  *                               self.k_states, self.nobs)
39433  */
39434   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3188, __pyx_L1_error)
39435   __Pyx_GOTREF(__pyx_t_2);
39436 
39437   /* "statsmodels/tsa/statespace/_representation.pyx":3187
39438  *         tools.validate_matrix_shape('observation covariance matrix', &self.obs_cov.shape[0],
39439  *                               self.k_endog, self.k_endog, self.nobs)
39440  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],             # <<<<<<<<<<<<<<
39441  *                               self.k_states, self.k_states, self.nobs)
39442  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
39443  */
39444   __pyx_t_3.__pyx_n = 1;
39445   __pyx_t_3.nobs = __pyx_t_2;
39446   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_n_u_transition, (&(__pyx_v_self->transition.shape[0])), __pyx_v_self->k_states, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3187, __pyx_L1_error)
39447   __Pyx_GOTREF(__pyx_t_1);
39448   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39449   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39450 
39451   /* "statsmodels/tsa/statespace/_representation.pyx":3189
39452  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
39453  *                               self.k_states, self.k_states, self.nobs)
39454  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],             # <<<<<<<<<<<<<<
39455  *                               self.k_states, self.nobs)
39456  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
39457  */
39458   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3189, __pyx_L1_error)}
39459 
39460   /* "statsmodels/tsa/statespace/_representation.pyx":3190
39461  *                               self.k_states, self.k_states, self.nobs)
39462  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
39463  *                               self.k_states, self.nobs)             # <<<<<<<<<<<<<<
39464  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
39465  *                               self.k_posdef, self.k_posdef, self.nobs)
39466  */
39467   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3190, __pyx_L1_error)
39468   __Pyx_GOTREF(__pyx_t_1);
39469 
39470   /* "statsmodels/tsa/statespace/_representation.pyx":3189
39471  *         tools.validate_matrix_shape('transition', &self.transition.shape[0],
39472  *                               self.k_states, self.k_states, self.nobs)
39473  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],             # <<<<<<<<<<<<<<
39474  *                               self.k_states, self.nobs)
39475  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
39476  */
39477   __pyx_t_4.__pyx_n = 1;
39478   __pyx_t_4.nobs = __pyx_t_1;
39479   __pyx_t_2 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_state_intercept_2, (&(__pyx_v_self->state_intercept.shape[0])), __pyx_v_self->k_states, &__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3189, __pyx_L1_error)
39480   __Pyx_GOTREF(__pyx_t_2);
39481   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39482   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39483 
39484   /* "statsmodels/tsa/statespace/_representation.pyx":3191
39485  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
39486  *                               self.k_states, self.nobs)
39487  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],             # <<<<<<<<<<<<<<
39488  *                               self.k_posdef, self.k_posdef, self.nobs)
39489  *
39490  */
39491   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3191, __pyx_L1_error)}
39492 
39493   /* "statsmodels/tsa/statespace/_representation.pyx":3192
39494  *                               self.k_states, self.nobs)
39495  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],
39496  *                               self.k_posdef, self.k_posdef, self.nobs)             # <<<<<<<<<<<<<<
39497  *
39498  *         # Check for a time-invariant model
39499  */
39500   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3192, __pyx_L1_error)
39501   __Pyx_GOTREF(__pyx_t_2);
39502 
39503   /* "statsmodels/tsa/statespace/_representation.pyx":3191
39504  *         tools.validate_vector_shape('state intercept', &self.state_intercept.shape[0],
39505  *                               self.k_states, self.nobs)
39506  *         tools.validate_matrix_shape('state covariance matrix', &self.state_cov.shape[0],             # <<<<<<<<<<<<<<
39507  *                               self.k_posdef, self.k_posdef, self.nobs)
39508  *
39509  */
39510   __pyx_t_3.__pyx_n = 1;
39511   __pyx_t_3.nobs = __pyx_t_2;
39512   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_state_covariance_matrix, (&(__pyx_v_self->state_cov.shape[0])), __pyx_v_self->k_posdef, __pyx_v_self->k_posdef, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3191, __pyx_L1_error)
39513   __Pyx_GOTREF(__pyx_t_1);
39514   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39515   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39516 
39517   /* "statsmodels/tsa/statespace/_representation.pyx":3196
39518  *         # Check for a time-invariant model
39519  *         self.time_invariant = (
39520  *             self.design.shape[2] == 1           and             # <<<<<<<<<<<<<<
39521  *             self.obs_intercept.shape[1] == 1    and
39522  *             self.obs_cov.shape[2] == 1          and
39523  */
39524   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3196, __pyx_L1_error)}
39525   __pyx_t_6 = ((__pyx_v_self->design.shape[2]) == 1);
39526   if (__pyx_t_6) {
39527   } else {
39528     __pyx_t_5 = __pyx_t_6;
39529     goto __pyx_L3_bool_binop_done;
39530   }
39531 
39532   /* "statsmodels/tsa/statespace/_representation.pyx":3197
39533  *         self.time_invariant = (
39534  *             self.design.shape[2] == 1           and
39535  *             self.obs_intercept.shape[1] == 1    and             # <<<<<<<<<<<<<<
39536  *             self.obs_cov.shape[2] == 1          and
39537  *             self.transition.shape[2] == 1       and
39538  */
39539   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3197, __pyx_L1_error)}
39540   __pyx_t_6 = ((__pyx_v_self->obs_intercept.shape[1]) == 1);
39541   if (__pyx_t_6) {
39542   } else {
39543     __pyx_t_5 = __pyx_t_6;
39544     goto __pyx_L3_bool_binop_done;
39545   }
39546 
39547   /* "statsmodels/tsa/statespace/_representation.pyx":3198
39548  *             self.design.shape[2] == 1           and
39549  *             self.obs_intercept.shape[1] == 1    and
39550  *             self.obs_cov.shape[2] == 1          and             # <<<<<<<<<<<<<<
39551  *             self.transition.shape[2] == 1       and
39552  *             self.state_intercept.shape[1] == 1  and
39553  */
39554   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3198, __pyx_L1_error)}
39555   __pyx_t_6 = ((__pyx_v_self->obs_cov.shape[2]) == 1);
39556   if (__pyx_t_6) {
39557   } else {
39558     __pyx_t_5 = __pyx_t_6;
39559     goto __pyx_L3_bool_binop_done;
39560   }
39561 
39562   /* "statsmodels/tsa/statespace/_representation.pyx":3199
39563  *             self.obs_intercept.shape[1] == 1    and
39564  *             self.obs_cov.shape[2] == 1          and
39565  *             self.transition.shape[2] == 1       and             # <<<<<<<<<<<<<<
39566  *             self.state_intercept.shape[1] == 1  and
39567  *             self.selection.shape[2] == 1        and
39568  */
39569   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3199, __pyx_L1_error)}
39570   __pyx_t_6 = ((__pyx_v_self->transition.shape[2]) == 1);
39571   if (__pyx_t_6) {
39572   } else {
39573     __pyx_t_5 = __pyx_t_6;
39574     goto __pyx_L3_bool_binop_done;
39575   }
39576 
39577   /* "statsmodels/tsa/statespace/_representation.pyx":3200
39578  *             self.obs_cov.shape[2] == 1          and
39579  *             self.transition.shape[2] == 1       and
39580  *             self.state_intercept.shape[1] == 1  and             # <<<<<<<<<<<<<<
39581  *             self.selection.shape[2] == 1        and
39582  *             self.state_cov.shape[2] == 1
39583  */
39584   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3200, __pyx_L1_error)}
39585   __pyx_t_6 = ((__pyx_v_self->state_intercept.shape[1]) == 1);
39586   if (__pyx_t_6) {
39587   } else {
39588     __pyx_t_5 = __pyx_t_6;
39589     goto __pyx_L3_bool_binop_done;
39590   }
39591 
39592   /* "statsmodels/tsa/statespace/_representation.pyx":3201
39593  *             self.transition.shape[2] == 1       and
39594  *             self.state_intercept.shape[1] == 1  and
39595  *             self.selection.shape[2] == 1        and             # <<<<<<<<<<<<<<
39596  *             self.state_cov.shape[2] == 1
39597  *         )
39598  */
39599   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3201, __pyx_L1_error)}
39600   __pyx_t_6 = ((__pyx_v_self->selection.shape[2]) == 1);
39601   if (__pyx_t_6) {
39602   } else {
39603     __pyx_t_5 = __pyx_t_6;
39604     goto __pyx_L3_bool_binop_done;
39605   }
39606 
39607   /* "statsmodels/tsa/statespace/_representation.pyx":3202
39608  *             self.state_intercept.shape[1] == 1  and
39609  *             self.selection.shape[2] == 1        and
39610  *             self.state_cov.shape[2] == 1             # <<<<<<<<<<<<<<
39611  *         )
39612  *
39613  */
39614   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3202, __pyx_L1_error)}
39615   __pyx_t_6 = ((__pyx_v_self->state_cov.shape[2]) == 1);
39616   __pyx_t_5 = __pyx_t_6;
39617   __pyx_L3_bool_binop_done:;
39618 
39619   /* "statsmodels/tsa/statespace/_representation.pyx":3195
39620  *
39621  *         # Check for a time-invariant model
39622  *         self.time_invariant = (             # <<<<<<<<<<<<<<
39623  *             self.design.shape[2] == 1           and
39624  *             self.obs_intercept.shape[1] == 1    and
39625  */
39626   __pyx_v_self->time_invariant = __pyx_t_5;
39627 
39628   /* "statsmodels/tsa/statespace/_representation.pyx":3206
39629  *
39630  *         # Set the flags for initialization to be false
39631  *         self.initialized = False             # <<<<<<<<<<<<<<
39632  *         self.initialized_diffuse = False
39633  *         self.initialized_stationary = False
39634  */
39635   __pyx_v_self->initialized = 0;
39636 
39637   /* "statsmodels/tsa/statespace/_representation.pyx":3207
39638  *         # Set the flags for initialization to be false
39639  *         self.initialized = False
39640  *         self.initialized_diffuse = False             # <<<<<<<<<<<<<<
39641  *         self.initialized_stationary = False
39642  *
39643  */
39644   __pyx_v_self->initialized_diffuse = 0;
39645 
39646   /* "statsmodels/tsa/statespace/_representation.pyx":3208
39647  *         self.initialized = False
39648  *         self.initialized_diffuse = False
39649  *         self.initialized_stationary = False             # <<<<<<<<<<<<<<
39650  *
39651  *         self.diagonal_obs_cov = diagonal_obs_cov
39652  */
39653   __pyx_v_self->initialized_stationary = 0;
39654 
39655   /* "statsmodels/tsa/statespace/_representation.pyx":3210
39656  *         self.initialized_stationary = False
39657  *
39658  *         self.diagonal_obs_cov = diagonal_obs_cov             # <<<<<<<<<<<<<<
39659  *         self._diagonal_obs_cov = -1
39660  *
39661  */
39662   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_diagonal_obs_cov); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3210, __pyx_L1_error)
39663   __pyx_v_self->diagonal_obs_cov = __pyx_t_5;
39664 
39665   /* "statsmodels/tsa/statespace/_representation.pyx":3211
39666  *
39667  *         self.diagonal_obs_cov = diagonal_obs_cov
39668  *         self._diagonal_obs_cov = -1             # <<<<<<<<<<<<<<
39669  *
39670  *         # Allocate selected state covariance matrix
39671  */
39672   __pyx_v_self->_diagonal_obs_cov = -1;
39673 
39674   /* "statsmodels/tsa/statespace/_representation.pyx":3214
39675  *
39676  *         # Allocate selected state covariance matrix
39677  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;             # <<<<<<<<<<<<<<
39678  *         # (we only allocate memory for time-varying array if necessary)
39679  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
39680  */
39681   __pyx_t_5 = __pyx_v_self->k_states;
39682   (__pyx_v_dim3[0]) = __pyx_t_5;
39683   __pyx_t_5 = __pyx_v_self->k_states;
39684   (__pyx_v_dim3[1]) = __pyx_t_5;
39685   (__pyx_v_dim3[2]) = 1;
39686 
39687   /* "statsmodels/tsa/statespace/_representation.pyx":3216
39688  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;
39689  *         # (we only allocate memory for time-varying array if necessary)
39690  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:             # <<<<<<<<<<<<<<
39691  *             dim3[2] = self.nobs
39692  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_COMPLEX128, FORTRAN)
39693  */
39694   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3216, __pyx_L1_error)}
39695   __pyx_t_7 = (((__pyx_v_self->state_cov.shape[2]) > 1) != 0);
39696   if (!__pyx_t_7) {
39697   } else {
39698     __pyx_t_6 = __pyx_t_7;
39699     goto __pyx_L11_bool_binop_done;
39700   }
39701   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3216, __pyx_L1_error)}
39702   __pyx_t_7 = (((__pyx_v_self->selection.shape[2]) > 1) != 0);
39703   __pyx_t_6 = __pyx_t_7;
39704   __pyx_L11_bool_binop_done:;
39705   if (__pyx_t_6) {
39706 
39707     /* "statsmodels/tsa/statespace/_representation.pyx":3217
39708  *         # (we only allocate memory for time-varying array if necessary)
39709  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
39710  *             dim3[2] = self.nobs             # <<<<<<<<<<<<<<
39711  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_COMPLEX128, FORTRAN)
39712  *
39713  */
39714     __pyx_t_5 = __pyx_v_self->nobs;
39715     (__pyx_v_dim3[2]) = __pyx_t_5;
39716 
39717     /* "statsmodels/tsa/statespace/_representation.pyx":3216
39718  *         dim3[0] = self.k_states; dim3[1] = self.k_states; dim3[2] = 1;
39719  *         # (we only allocate memory for time-varying array if necessary)
39720  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:             # <<<<<<<<<<<<<<
39721  *             dim3[2] = self.nobs
39722  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_COMPLEX128, FORTRAN)
39723  */
39724   }
39725 
39726   /* "statsmodels/tsa/statespace/_representation.pyx":3218
39727  *         if self.state_cov.shape[2] > 1 or self.selection.shape[2] > 1:
39728  *             dim3[2] = self.nobs
39729  *         self.selected_state_cov = np.PyArray_ZEROS(3, dim3, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
39730  *
39731  *         # Handle missing data
39732  */
39733   __pyx_t_1 = PyArray_ZEROS(3, __pyx_v_dim3, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3218, __pyx_L1_error)
39734   __Pyx_GOTREF(__pyx_t_1);
39735   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 3218, __pyx_L1_error)
39736   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39737   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_state_cov, 0);
39738   __pyx_v_self->selected_state_cov = __pyx_t_8;
39739   __pyx_t_8.memview = NULL;
39740   __pyx_t_8.data = NULL;
39741 
39742   /* "statsmodels/tsa/statespace/_representation.pyx":3221
39743  *
39744  *         # Handle missing data
39745  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")             # <<<<<<<<<<<<<<
39746  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)
39747  *         self.has_missing = np.sum(self.nmissing) > 0
39748  */
39749   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3221, __pyx_L1_error)
39750   __Pyx_GOTREF(__pyx_t_1);
39751   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3221, __pyx_L1_error)
39752   __Pyx_GOTREF(__pyx_t_2);
39753   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39754   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3221, __pyx_L1_error)
39755   __Pyx_GOTREF(__pyx_t_9);
39756   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_isnan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3221, __pyx_L1_error)
39757   __Pyx_GOTREF(__pyx_t_10);
39758   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
39759   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_obs, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3221, __pyx_L1_error)
39760   __Pyx_GOTREF(__pyx_t_9);
39761   __pyx_t_11 = NULL;
39762   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
39763     __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
39764     if (likely(__pyx_t_11)) {
39765       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
39766       __Pyx_INCREF(__pyx_t_11);
39767       __Pyx_INCREF(function);
39768       __Pyx_DECREF_SET(__pyx_t_10, function);
39769     }
39770   }
39771   __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9);
39772   __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
39773   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
39774   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3221, __pyx_L1_error)
39775   __Pyx_GOTREF(__pyx_t_1);
39776   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
39777   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3221, __pyx_L1_error)
39778   __Pyx_GOTREF(__pyx_t_10);
39779   __Pyx_GIVEREF(__pyx_t_1);
39780   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
39781   __pyx_t_1 = 0;
39782   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3221, __pyx_L1_error)
39783   __Pyx_GOTREF(__pyx_t_1);
39784   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3221, __pyx_L1_error)
39785   __Pyx_GOTREF(__pyx_t_9);
39786   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_int32); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3221, __pyx_L1_error)
39787   __Pyx_GOTREF(__pyx_t_11);
39788   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
39789   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 3221, __pyx_L1_error)
39790   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39791   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3221, __pyx_L1_error)
39792   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3221, __pyx_L1_error)
39793   __Pyx_GOTREF(__pyx_t_11);
39794   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39795   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
39796   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39797   __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 3221, __pyx_L1_error)
39798   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39799   __PYX_XDEC_MEMVIEW(&__pyx_v_self->missing, 0);
39800   __pyx_v_self->missing = __pyx_t_12;
39801   __pyx_t_12.memview = NULL;
39802   __pyx_t_12.data = NULL;
39803 
39804   /* "statsmodels/tsa/statespace/_representation.pyx":3222
39805  *         # Handle missing data
39806  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")
39807  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)             # <<<<<<<<<<<<<<
39808  *         self.has_missing = np.sum(self.nmissing) > 0
39809  *
39810  */
39811   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3222, __pyx_L1_error)
39812   __Pyx_GOTREF(__pyx_t_11);
39813   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3222, __pyx_L1_error)
39814   __Pyx_GOTREF(__pyx_t_1);
39815   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39816   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3222, __pyx_L1_error)
39817   __Pyx_GOTREF(__pyx_t_11);
39818   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sum); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3222, __pyx_L1_error)
39819   __Pyx_GOTREF(__pyx_t_10);
39820   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39821   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3222, __pyx_L1_error)}
39822   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3222, __pyx_L1_error)
39823   __Pyx_GOTREF(__pyx_t_11);
39824   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3222, __pyx_L1_error)
39825   __Pyx_GOTREF(__pyx_t_2);
39826   __Pyx_GIVEREF(__pyx_t_11);
39827   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
39828   __pyx_t_11 = 0;
39829   __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3222, __pyx_L1_error)
39830   __Pyx_GOTREF(__pyx_t_11);
39831   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 3222, __pyx_L1_error)
39832   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3222, __pyx_L1_error)
39833   __Pyx_GOTREF(__pyx_t_9);
39834   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
39835   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39836   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39837   __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3222, __pyx_L1_error)
39838   __Pyx_GOTREF(__pyx_t_11);
39839   __Pyx_GIVEREF(__pyx_t_9);
39840   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
39841   __pyx_t_9 = 0;
39842   __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3222, __pyx_L1_error)
39843   __Pyx_GOTREF(__pyx_t_9);
39844   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3222, __pyx_L1_error)
39845   __Pyx_GOTREF(__pyx_t_2);
39846   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3222, __pyx_L1_error)
39847   __Pyx_GOTREF(__pyx_t_10);
39848   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39849   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 3222, __pyx_L1_error)
39850   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
39851   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3222, __pyx_L1_error)
39852   __Pyx_GOTREF(__pyx_t_10);
39853   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39854   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39855   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
39856   __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 3222, __pyx_L1_error)
39857   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
39858   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nmissing, 0);
39859   __pyx_v_self->nmissing = __pyx_t_13;
39860   __pyx_t_13.memview = NULL;
39861   __pyx_t_13.data = NULL;
39862 
39863   /* "statsmodels/tsa/statespace/_representation.pyx":3223
39864  *         self.missing = np.array(np.isnan(obs), dtype=np.int32, order="F")
39865  *         self.nmissing = np.array(np.sum(self.missing, axis=0), dtype=np.int32)
39866  *         self.has_missing = np.sum(self.nmissing) > 0             # <<<<<<<<<<<<<<
39867  *
39868  *         # Create the temporary array
39869  */
39870   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3223, __pyx_L1_error)
39871   __Pyx_GOTREF(__pyx_t_9);
39872   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3223, __pyx_L1_error)
39873   __Pyx_GOTREF(__pyx_t_11);
39874   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
39875   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3223, __pyx_L1_error)}
39876   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3223, __pyx_L1_error)
39877   __Pyx_GOTREF(__pyx_t_9);
39878   __pyx_t_1 = NULL;
39879   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
39880     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
39881     if (likely(__pyx_t_1)) {
39882       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
39883       __Pyx_INCREF(__pyx_t_1);
39884       __Pyx_INCREF(function);
39885       __Pyx_DECREF_SET(__pyx_t_11, function);
39886     }
39887   }
39888   __pyx_t_10 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_9);
39889   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
39890   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
39891   if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3223, __pyx_L1_error)
39892   __Pyx_GOTREF(__pyx_t_10);
39893   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39894   __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3223, __pyx_L1_error)
39895   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
39896   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3223, __pyx_L1_error)
39897   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39898   __pyx_v_self->has_missing = __pyx_t_5;
39899 
39900   /* "statsmodels/tsa/statespace/_representation.pyx":3227
39901  *         # Create the temporary array
39902  *         # Holds arrays of dimension $(m \times m)$
39903  *         dim2[0] = self.k_states; dim2[1] = max(self.k_states, self.k_posdef);             # <<<<<<<<<<<<<<
39904  *         self.tmp = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
39905  *
39906  */
39907   __pyx_t_5 = __pyx_v_self->k_states;
39908   (__pyx_v_dim2[0]) = __pyx_t_5;
39909   __pyx_t_5 = __pyx_v_self->k_posdef;
39910   __pyx_t_14 = __pyx_v_self->k_states;
39911   if (((__pyx_t_5 > __pyx_t_14) != 0)) {
39912     __pyx_t_15 = __pyx_t_5;
39913   } else {
39914     __pyx_t_15 = __pyx_t_14;
39915   }
39916   (__pyx_v_dim2[1]) = __pyx_t_15;
39917 
39918   /* "statsmodels/tsa/statespace/_representation.pyx":3228
39919  *         # Holds arrays of dimension $(m \times m)$
39920  *         dim2[0] = self.k_states; dim2[1] = max(self.k_states, self.k_posdef);
39921  *         self.tmp = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
39922  *
39923  *         # Arrays for initialization
39924  */
39925   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3228, __pyx_L1_error)
39926   __Pyx_GOTREF(__pyx_t_11);
39927   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3228, __pyx_L1_error)
39928   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39929   __PYX_XDEC_MEMVIEW(&__pyx_v_self->tmp, 0);
39930   __pyx_v_self->tmp = __pyx_t_16;
39931   __pyx_t_16.memview = NULL;
39932   __pyx_t_16.data = NULL;
39933 
39934   /* "statsmodels/tsa/statespace/_representation.pyx":3231
39935  *
39936  *         # Arrays for initialization
39937  *         dim1[0] = self.k_states;             # <<<<<<<<<<<<<<
39938  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
39939  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
39940  */
39941   __pyx_t_15 = __pyx_v_self->k_states;
39942   (__pyx_v_dim1[0]) = __pyx_t_15;
39943 
39944   /* "statsmodels/tsa/statespace/_representation.pyx":3232
39945  *         # Arrays for initialization
39946  *         dim1[0] = self.k_states;
39947  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
39948  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
39949  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
39950  */
39951   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3232, __pyx_L1_error)
39952   __Pyx_GOTREF(__pyx_t_11);
39953   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 3232, __pyx_L1_error)
39954   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39955   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
39956   __pyx_v_self->initial_state = __pyx_t_17;
39957   __pyx_t_17.memview = NULL;
39958   __pyx_t_17.data = NULL;
39959 
39960   /* "statsmodels/tsa/statespace/_representation.pyx":3233
39961  *         dim1[0] = self.k_states;
39962  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
39963  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
39964  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
39965  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
39966  */
39967   __pyx_t_15 = __pyx_v_self->k_states;
39968   (__pyx_v_dim2[0]) = __pyx_t_15;
39969   __pyx_t_15 = __pyx_v_self->k_states;
39970   (__pyx_v_dim2[1]) = __pyx_t_15;
39971 
39972   /* "statsmodels/tsa/statespace/_representation.pyx":3234
39973  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
39974  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
39975  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
39976  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
39977  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
39978  */
39979   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3234, __pyx_L1_error)
39980   __Pyx_GOTREF(__pyx_t_11);
39981   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3234, __pyx_L1_error)
39982   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
39983   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
39984   __pyx_v_self->initial_state_cov = __pyx_t_16;
39985   __pyx_t_16.memview = NULL;
39986   __pyx_t_16.data = NULL;
39987 
39988   /* "statsmodels/tsa/statespace/_representation.pyx":3235
39989  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
39990  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
39991  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
39992  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
39993  *
39994  */
39995   __pyx_t_15 = __pyx_v_self->k_states;
39996   (__pyx_v_dim2[0]) = __pyx_t_15;
39997   __pyx_t_15 = __pyx_v_self->k_states;
39998   (__pyx_v_dim2[1]) = __pyx_t_15;
39999 
40000   /* "statsmodels/tsa/statespace/_representation.pyx":3236
40001  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40002  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
40003  *         self.initial_diffuse_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40004  *
40005  *         # Arrays for missing data
40006  */
40007   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3236, __pyx_L1_error)
40008   __Pyx_GOTREF(__pyx_t_11);
40009   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3236, __pyx_L1_error)
40010   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40011   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_diffuse_state_cov, 0);
40012   __pyx_v_self->initial_diffuse_state_cov = __pyx_t_16;
40013   __pyx_t_16.memview = NULL;
40014   __pyx_t_16.data = NULL;
40015 
40016   /* "statsmodels/tsa/statespace/_representation.pyx":3239
40017  *
40018  *         # Arrays for missing data
40019  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
40020  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40021  *         dim1[0] = self.k_endog;
40022  */
40023   __pyx_t_15 = __pyx_v_self->k_endog;
40024   (__pyx_v_dim1[0]) = __pyx_t_15;
40025 
40026   /* "statsmodels/tsa/statespace/_representation.pyx":3240
40027  *         # Arrays for missing data
40028  *         dim1[0] = self.k_endog;
40029  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40030  *         dim1[0] = self.k_endog;
40031  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40032  */
40033   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3240, __pyx_L1_error)
40034   __Pyx_GOTREF(__pyx_t_11);
40035   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 3240, __pyx_L1_error)
40036   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40037   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs, 0);
40038   __pyx_v_self->selected_obs = __pyx_t_17;
40039   __pyx_t_17.memview = NULL;
40040   __pyx_t_17.data = NULL;
40041 
40042   /* "statsmodels/tsa/statespace/_representation.pyx":3241
40043  *         dim1[0] = self.k_endog;
40044  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40045  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
40046  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40047  *         dim1[0] = self.k_endog * self.k_states;
40048  */
40049   __pyx_t_15 = __pyx_v_self->k_endog;
40050   (__pyx_v_dim1[0]) = __pyx_t_15;
40051 
40052   /* "statsmodels/tsa/statespace/_representation.pyx":3242
40053  *         self.selected_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40054  *         dim1[0] = self.k_endog;
40055  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40056  *         dim1[0] = self.k_endog * self.k_states;
40057  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40058  */
40059   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3242, __pyx_L1_error)
40060   __Pyx_GOTREF(__pyx_t_11);
40061   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 3242, __pyx_L1_error)
40062   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40063   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_intercept, 0);
40064   __pyx_v_self->selected_obs_intercept = __pyx_t_17;
40065   __pyx_t_17.memview = NULL;
40066   __pyx_t_17.data = NULL;
40067 
40068   /* "statsmodels/tsa/statespace/_representation.pyx":3243
40069  *         dim1[0] = self.k_endog;
40070  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40071  *         dim1[0] = self.k_endog * self.k_states;             # <<<<<<<<<<<<<<
40072  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40073  *         dim1[0] = self.k_endog**2;
40074  */
40075   (__pyx_v_dim1[0]) = (__pyx_v_self->k_endog * __pyx_v_self->k_states);
40076 
40077   /* "statsmodels/tsa/statespace/_representation.pyx":3244
40078  *         self.selected_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40079  *         dim1[0] = self.k_endog * self.k_states;
40080  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40081  *         dim1[0] = self.k_endog**2;
40082  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40083  */
40084   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3244, __pyx_L1_error)
40085   __Pyx_GOTREF(__pyx_t_11);
40086   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 3244, __pyx_L1_error)
40087   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40088   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_design, 0);
40089   __pyx_v_self->selected_design = __pyx_t_17;
40090   __pyx_t_17.memview = NULL;
40091   __pyx_t_17.data = NULL;
40092 
40093   /* "statsmodels/tsa/statespace/_representation.pyx":3245
40094  *         dim1[0] = self.k_endog * self.k_states;
40095  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40096  *         dim1[0] = self.k_endog**2;             # <<<<<<<<<<<<<<
40097  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40098  *
40099  */
40100   (__pyx_v_dim1[0]) = __Pyx_pow_long(((long)__pyx_v_self->k_endog), 2);
40101 
40102   /* "statsmodels/tsa/statespace/_representation.pyx":3246
40103  *         self.selected_design = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40104  *         dim1[0] = self.k_endog**2;
40105  *         self.selected_obs_cov = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40106  *
40107  *         # Arrays for transformations
40108  */
40109   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3246, __pyx_L1_error)
40110   __Pyx_GOTREF(__pyx_t_11);
40111   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 3246, __pyx_L1_error)
40112   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40113   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_cov, 0);
40114   __pyx_v_self->selected_obs_cov = __pyx_t_17;
40115   __pyx_t_17.memview = NULL;
40116   __pyx_t_17.data = NULL;
40117 
40118   /* "statsmodels/tsa/statespace/_representation.pyx":3249
40119  *
40120  *         # Arrays for transformations
40121  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;             # <<<<<<<<<<<<<<
40122  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40123  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40124  */
40125   __pyx_t_15 = __pyx_v_self->k_endog;
40126   (__pyx_v_dim2[0]) = __pyx_t_15;
40127   __pyx_t_15 = __pyx_v_self->k_endog;
40128   (__pyx_v_dim2[1]) = __pyx_t_15;
40129 
40130   /* "statsmodels/tsa/statespace/_representation.pyx":3250
40131  *         # Arrays for transformations
40132  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;
40133  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40134  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40135  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
40136  */
40137   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3250, __pyx_L1_error)
40138   __Pyx_GOTREF(__pyx_t_11);
40139   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3250, __pyx_L1_error)
40140   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40141   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_cholesky, 0);
40142   __pyx_v_self->transform_cholesky = __pyx_t_16;
40143   __pyx_t_16.memview = NULL;
40144   __pyx_t_16.data = NULL;
40145 
40146   /* "statsmodels/tsa/statespace/_representation.pyx":3251
40147  *         dim2[0] = self.k_endog; dim2[1] = self.k_endog;
40148  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40149  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40150  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
40151  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40152  */
40153   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3251, __pyx_L1_error)
40154   __Pyx_GOTREF(__pyx_t_11);
40155   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3251, __pyx_L1_error)
40156   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40157   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_cov, 0);
40158   __pyx_v_self->transform_obs_cov = __pyx_t_16;
40159   __pyx_t_16.memview = NULL;
40160   __pyx_t_16.data = NULL;
40161 
40162   /* "statsmodels/tsa/statespace/_representation.pyx":3252
40163  *         self.transform_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40164  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40165  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
40166  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40167  *         dim1[0] = self.k_endog;
40168  */
40169   __pyx_t_15 = __pyx_v_self->k_endog;
40170   (__pyx_v_dim2[0]) = __pyx_t_15;
40171   __pyx_t_15 = __pyx_v_self->k_states;
40172   (__pyx_v_dim2[1]) = __pyx_t_15;
40173 
40174   /* "statsmodels/tsa/statespace/_representation.pyx":3253
40175  *         self.transform_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40176  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
40177  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40178  *         dim1[0] = self.k_endog;
40179  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40180  */
40181   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3253, __pyx_L1_error)
40182   __Pyx_GOTREF(__pyx_t_11);
40183   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3253, __pyx_L1_error)
40184   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40185   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_design, 0);
40186   __pyx_v_self->transform_design = __pyx_t_16;
40187   __pyx_t_16.memview = NULL;
40188   __pyx_t_16.data = NULL;
40189 
40190   /* "statsmodels/tsa/statespace/_representation.pyx":3254
40191  *         dim2[0] = self.k_endog; dim2[1] = self.k_states;
40192  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40193  *         dim1[0] = self.k_endog;             # <<<<<<<<<<<<<<
40194  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40195  *
40196  */
40197   __pyx_t_15 = __pyx_v_self->k_endog;
40198   (__pyx_v_dim1[0]) = __pyx_t_15;
40199 
40200   /* "statsmodels/tsa/statespace/_representation.pyx":3255
40201  *         self.transform_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40202  *         dim1[0] = self.k_endog;
40203  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40204  *
40205  *         dim1[0] = self.k_states;
40206  */
40207   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3255, __pyx_L1_error)
40208   __Pyx_GOTREF(__pyx_t_11);
40209   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 3255, __pyx_L1_error)
40210   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40211   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_intercept, 0);
40212   __pyx_v_self->transform_obs_intercept = __pyx_t_17;
40213   __pyx_t_17.memview = NULL;
40214   __pyx_t_17.data = NULL;
40215 
40216   /* "statsmodels/tsa/statespace/_representation.pyx":3257
40217  *         self.transform_obs_intercept = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40218  *
40219  *         dim1[0] = self.k_states;             # <<<<<<<<<<<<<<
40220  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40221  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40222  */
40223   __pyx_t_15 = __pyx_v_self->k_states;
40224   (__pyx_v_dim1[0]) = __pyx_t_15;
40225 
40226   /* "statsmodels/tsa/statespace/_representation.pyx":3258
40227  *
40228  *         dim1[0] = self.k_states;
40229  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40230  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40231  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
40232  */
40233   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3258, __pyx_L1_error)
40234   __Pyx_GOTREF(__pyx_t_11);
40235   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 3258, __pyx_L1_error)
40236   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40237   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs, 0);
40238   __pyx_v_self->collapse_obs = __pyx_t_17;
40239   __pyx_t_17.memview = NULL;
40240   __pyx_t_17.data = NULL;
40241 
40242   /* "statsmodels/tsa/statespace/_representation.pyx":3259
40243  *         dim1[0] = self.k_states;
40244  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40245  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40246  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
40247  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40248  */
40249   __pyx_t_11 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3259, __pyx_L1_error)
40250   __Pyx_GOTREF(__pyx_t_11);
40251   __pyx_t_17 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_17.memview)) __PYX_ERR(0, 3259, __pyx_L1_error)
40252   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40253   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_tmp, 0);
40254   __pyx_v_self->collapse_obs_tmp = __pyx_t_17;
40255   __pyx_t_17.memview = NULL;
40256   __pyx_t_17.data = NULL;
40257 
40258   /* "statsmodels/tsa/statespace/_representation.pyx":3260
40259  *         self.collapse_obs = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40260  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40261  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
40262  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40263  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40264  */
40265   __pyx_t_15 = __pyx_v_self->k_states;
40266   (__pyx_v_dim2[0]) = __pyx_t_15;
40267   __pyx_t_15 = __pyx_v_self->k_states;
40268   (__pyx_v_dim2[1]) = __pyx_t_15;
40269 
40270   /* "statsmodels/tsa/statespace/_representation.pyx":3261
40271  *         self.collapse_obs_tmp = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
40272  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
40273  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40274  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40275  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40276  */
40277   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3261, __pyx_L1_error)
40278   __Pyx_GOTREF(__pyx_t_11);
40279   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3261, __pyx_L1_error)
40280   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40281   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_design, 0);
40282   __pyx_v_self->collapse_design = __pyx_t_16;
40283   __pyx_t_16.memview = NULL;
40284   __pyx_t_16.data = NULL;
40285 
40286   /* "statsmodels/tsa/statespace/_representation.pyx":3262
40287  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
40288  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40289  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40290  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40291  *
40292  */
40293   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3262, __pyx_L1_error)
40294   __Pyx_GOTREF(__pyx_t_11);
40295   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3262, __pyx_L1_error)
40296   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40297   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_cov, 0);
40298   __pyx_v_self->collapse_obs_cov = __pyx_t_16;
40299   __pyx_t_16.memview = NULL;
40300   __pyx_t_16.data = NULL;
40301 
40302   /* "statsmodels/tsa/statespace/_representation.pyx":3263
40303  *         self.collapse_design = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40304  *         self.collapse_obs_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
40305  *         self.collapse_cholesky = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
40306  *
40307  *         # Initialize location
40308  */
40309   __pyx_t_11 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3263, __pyx_L1_error)
40310   __Pyx_GOTREF(__pyx_t_11);
40311   __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_11, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3263, __pyx_L1_error)
40312   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40313   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_cholesky, 0);
40314   __pyx_v_self->collapse_cholesky = __pyx_t_16;
40315   __pyx_t_16.memview = NULL;
40316   __pyx_t_16.data = NULL;
40317 
40318   /* "statsmodels/tsa/statespace/_representation.pyx":3266
40319  *
40320  *         # Initialize location
40321  *         self.t = 0             # <<<<<<<<<<<<<<
40322  *         self._previous_t = 0
40323  *
40324  */
40325   __pyx_v_self->t = 0;
40326 
40327   /* "statsmodels/tsa/statespace/_representation.pyx":3267
40328  *         # Initialize location
40329  *         self.t = 0
40330  *         self._previous_t = 0             # <<<<<<<<<<<<<<
40331  *
40332  *         # Initialize dimensions
40333  */
40334   __pyx_v_self->_previous_t = 0;
40335 
40336   /* "statsmodels/tsa/statespace/_representation.pyx":3270
40337  *
40338  *         # Initialize dimensions
40339  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)             # <<<<<<<<<<<<<<
40340  *
40341  *     def __reduce__(self):
40342  */
40343   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_self->k_endog, __pyx_v_self->k_states, __pyx_v_self->k_posdef);
40344 
40345   /* "statsmodels/tsa/statespace/_representation.pyx":3141
40346  *     # ### Initialize state space model
40347  *     # *Note*: The initial state and state covariance matrix must be provided.
40348  *     def __init__(self,             # <<<<<<<<<<<<<<
40349  *                  np.complex128_t [::1,:]   obs,
40350  *                  np.complex128_t [::1,:,:] design,
40351  */
40352 
40353   /* function exit code */
40354   __pyx_r = 0;
40355   goto __pyx_L0;
40356   __pyx_L1_error:;
40357   __Pyx_XDECREF(__pyx_t_1);
40358   __Pyx_XDECREF(__pyx_t_2);
40359   __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
40360   __Pyx_XDECREF(__pyx_t_9);
40361   __Pyx_XDECREF(__pyx_t_10);
40362   __Pyx_XDECREF(__pyx_t_11);
40363   __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
40364   __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
40365   __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
40366   __PYX_XDEC_MEMVIEW(&__pyx_t_17, 1);
40367   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
40368   __pyx_r = -1;
40369   __pyx_L0:;
40370   __PYX_XDEC_MEMVIEW(&__pyx_v_obs, 1);
40371   __PYX_XDEC_MEMVIEW(&__pyx_v_design, 1);
40372   __PYX_XDEC_MEMVIEW(&__pyx_v_obs_intercept, 1);
40373   __PYX_XDEC_MEMVIEW(&__pyx_v_obs_cov, 1);
40374   __PYX_XDEC_MEMVIEW(&__pyx_v_transition, 1);
40375   __PYX_XDEC_MEMVIEW(&__pyx_v_state_intercept, 1);
40376   __PYX_XDEC_MEMVIEW(&__pyx_v_selection, 1);
40377   __PYX_XDEC_MEMVIEW(&__pyx_v_state_cov, 1);
40378   __Pyx_RefNannyFinishContext();
40379   return __pyx_r;
40380 }
40381 
40382 /* "statsmodels/tsa/statespace/_representation.pyx":3272
40383  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)
40384  *
40385  *     def __reduce__(self):             # <<<<<<<<<<<<<<
40386  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
40387  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
40388  */
40389 
40390 /* Python wrapper */
40391 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3__reduce__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)40392 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
40393   PyObject *__pyx_r = 0;
40394   __Pyx_RefNannyDeclarations
40395   __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
40396   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_2__reduce__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
40397 
40398   /* function exit code */
40399   __Pyx_RefNannyFinishContext();
40400   return __pyx_r;
40401 }
40402 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)40403 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_2__reduce__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
40404   PyObject *__pyx_v_init = NULL;
40405   PyObject *__pyx_v_state = NULL;
40406   PyObject *__pyx_r = NULL;
40407   __Pyx_RefNannyDeclarations
40408   PyObject *__pyx_t_1 = NULL;
40409   PyObject *__pyx_t_2 = NULL;
40410   PyObject *__pyx_t_3 = NULL;
40411   PyObject *__pyx_t_4 = NULL;
40412   PyObject *__pyx_t_5 = NULL;
40413   PyObject *__pyx_t_6 = NULL;
40414   PyObject *__pyx_t_7 = NULL;
40415   PyObject *__pyx_t_8 = NULL;
40416   PyObject *__pyx_t_9 = NULL;
40417   PyObject *__pyx_t_10 = NULL;
40418   PyObject *__pyx_t_11 = NULL;
40419   int __pyx_t_12;
40420   int __pyx_lineno = 0;
40421   const char *__pyx_filename = NULL;
40422   int __pyx_clineno = 0;
40423   __Pyx_RefNannySetupContext("__reduce__", 0);
40424 
40425   /* "statsmodels/tsa/statespace/_representation.pyx":3273
40426  *
40427  *     def __reduce__(self):
40428  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),             # <<<<<<<<<<<<<<
40429  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
40430  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
40431  */
40432   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
40433   __Pyx_GOTREF(__pyx_t_1);
40434   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3273, __pyx_L1_error)
40435   __Pyx_GOTREF(__pyx_t_2);
40436   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40437   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3273, __pyx_L1_error)}
40438   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
40439   __Pyx_GOTREF(__pyx_t_1);
40440   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error)
40441   __Pyx_GOTREF(__pyx_t_3);
40442   __Pyx_GIVEREF(__pyx_t_1);
40443   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
40444   __pyx_t_1 = 0;
40445   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
40446   __Pyx_GOTREF(__pyx_t_1);
40447   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3273, __pyx_L1_error)
40448   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3273, __pyx_L1_error)
40449   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3273, __pyx_L1_error)
40450   __Pyx_GOTREF(__pyx_t_4);
40451   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40452   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40453   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40454   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
40455   __Pyx_GOTREF(__pyx_t_1);
40456   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error)
40457   __Pyx_GOTREF(__pyx_t_3);
40458   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40459   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3273, __pyx_L1_error)}
40460   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->design, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
40461   __Pyx_GOTREF(__pyx_t_1);
40462   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3273, __pyx_L1_error)
40463   __Pyx_GOTREF(__pyx_t_2);
40464   __Pyx_GIVEREF(__pyx_t_1);
40465   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
40466   __pyx_t_1 = 0;
40467   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
40468   __Pyx_GOTREF(__pyx_t_1);
40469   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3273, __pyx_L1_error)
40470   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3273, __pyx_L1_error)
40471   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3273, __pyx_L1_error)
40472   __Pyx_GOTREF(__pyx_t_5);
40473   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40474   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40475   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40476 
40477   /* "statsmodels/tsa/statespace/_representation.pyx":3274
40478  *     def __reduce__(self):
40479  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
40480  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
40481  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
40482  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
40483  */
40484   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
40485   __Pyx_GOTREF(__pyx_t_1);
40486   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3274, __pyx_L1_error)
40487   __Pyx_GOTREF(__pyx_t_2);
40488   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40489   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3274, __pyx_L1_error)}
40490   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
40491   __Pyx_GOTREF(__pyx_t_1);
40492   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3274, __pyx_L1_error)
40493   __Pyx_GOTREF(__pyx_t_3);
40494   __Pyx_GIVEREF(__pyx_t_1);
40495   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
40496   __pyx_t_1 = 0;
40497   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
40498   __Pyx_GOTREF(__pyx_t_1);
40499   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3274, __pyx_L1_error)
40500   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3274, __pyx_L1_error)
40501   __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3274, __pyx_L1_error)
40502   __Pyx_GOTREF(__pyx_t_6);
40503   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40504   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40505   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40506   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
40507   __Pyx_GOTREF(__pyx_t_1);
40508   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3274, __pyx_L1_error)
40509   __Pyx_GOTREF(__pyx_t_3);
40510   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40511   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3274, __pyx_L1_error)}
40512   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
40513   __Pyx_GOTREF(__pyx_t_1);
40514   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3274, __pyx_L1_error)
40515   __Pyx_GOTREF(__pyx_t_2);
40516   __Pyx_GIVEREF(__pyx_t_1);
40517   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
40518   __pyx_t_1 = 0;
40519   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
40520   __Pyx_GOTREF(__pyx_t_1);
40521   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3274, __pyx_L1_error)
40522   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3274, __pyx_L1_error)
40523   __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3274, __pyx_L1_error)
40524   __Pyx_GOTREF(__pyx_t_7);
40525   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40526   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40527   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40528 
40529   /* "statsmodels/tsa/statespace/_representation.pyx":3275
40530  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
40531  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
40532  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),             # <<<<<<<<<<<<<<
40533  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
40534  *                 self.diagonal_obs_cov)
40535  */
40536   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
40537   __Pyx_GOTREF(__pyx_t_1);
40538   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3275, __pyx_L1_error)
40539   __Pyx_GOTREF(__pyx_t_2);
40540   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40541   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3275, __pyx_L1_error)}
40542   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transition, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
40543   __Pyx_GOTREF(__pyx_t_1);
40544   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3275, __pyx_L1_error)
40545   __Pyx_GOTREF(__pyx_t_3);
40546   __Pyx_GIVEREF(__pyx_t_1);
40547   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
40548   __pyx_t_1 = 0;
40549   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
40550   __Pyx_GOTREF(__pyx_t_1);
40551   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3275, __pyx_L1_error)
40552   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3275, __pyx_L1_error)
40553   __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3275, __pyx_L1_error)
40554   __Pyx_GOTREF(__pyx_t_8);
40555   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40556   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40557   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40558   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
40559   __Pyx_GOTREF(__pyx_t_1);
40560   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3275, __pyx_L1_error)
40561   __Pyx_GOTREF(__pyx_t_3);
40562   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40563   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3275, __pyx_L1_error)}
40564   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
40565   __Pyx_GOTREF(__pyx_t_1);
40566   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3275, __pyx_L1_error)
40567   __Pyx_GOTREF(__pyx_t_2);
40568   __Pyx_GIVEREF(__pyx_t_1);
40569   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
40570   __pyx_t_1 = 0;
40571   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3275, __pyx_L1_error)
40572   __Pyx_GOTREF(__pyx_t_1);
40573   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3275, __pyx_L1_error)
40574   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3275, __pyx_L1_error)
40575   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3275, __pyx_L1_error)
40576   __Pyx_GOTREF(__pyx_t_9);
40577   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40578   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40579   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40580 
40581   /* "statsmodels/tsa/statespace/_representation.pyx":3276
40582  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
40583  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
40584  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
40585  *                 self.diagonal_obs_cov)
40586  *         state = {'initialized': self.initialized,
40587  */
40588   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
40589   __Pyx_GOTREF(__pyx_t_1);
40590   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3276, __pyx_L1_error)
40591   __Pyx_GOTREF(__pyx_t_2);
40592   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40593   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3276, __pyx_L1_error)}
40594   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selection, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
40595   __Pyx_GOTREF(__pyx_t_1);
40596   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3276, __pyx_L1_error)
40597   __Pyx_GOTREF(__pyx_t_3);
40598   __Pyx_GIVEREF(__pyx_t_1);
40599   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
40600   __pyx_t_1 = 0;
40601   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
40602   __Pyx_GOTREF(__pyx_t_1);
40603   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3276, __pyx_L1_error)
40604   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3276, __pyx_L1_error)
40605   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3276, __pyx_L1_error)
40606   __Pyx_GOTREF(__pyx_t_10);
40607   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40608   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40609   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40610   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
40611   __Pyx_GOTREF(__pyx_t_1);
40612   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3276, __pyx_L1_error)
40613   __Pyx_GOTREF(__pyx_t_3);
40614   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40615   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3276, __pyx_L1_error)}
40616   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
40617   __Pyx_GOTREF(__pyx_t_1);
40618   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3276, __pyx_L1_error)
40619   __Pyx_GOTREF(__pyx_t_2);
40620   __Pyx_GIVEREF(__pyx_t_1);
40621   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
40622   __pyx_t_1 = 0;
40623   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
40624   __Pyx_GOTREF(__pyx_t_1);
40625   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3276, __pyx_L1_error)
40626   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3276, __pyx_L1_error)
40627   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3276, __pyx_L1_error)
40628   __Pyx_GOTREF(__pyx_t_11);
40629   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
40630   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
40631   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40632 
40633   /* "statsmodels/tsa/statespace/_representation.pyx":3277
40634  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
40635  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
40636  *                 self.diagonal_obs_cov)             # <<<<<<<<<<<<<<
40637  *         state = {'initialized': self.initialized,
40638  *                  'initialized_diffuse': self.initialized_diffuse,
40639  */
40640   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3277, __pyx_L1_error)
40641   __Pyx_GOTREF(__pyx_t_1);
40642 
40643   /* "statsmodels/tsa/statespace/_representation.pyx":3273
40644  *
40645  *     def __reduce__(self):
40646  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),             # <<<<<<<<<<<<<<
40647  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
40648  *                 np.array(self.transition, copy=True, order='F'), np.array(self.state_intercept, copy=True, order='F'),
40649  */
40650   __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3273, __pyx_L1_error)
40651   __Pyx_GOTREF(__pyx_t_2);
40652   __Pyx_GIVEREF(__pyx_t_4);
40653   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
40654   __Pyx_GIVEREF(__pyx_t_5);
40655   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
40656   __Pyx_GIVEREF(__pyx_t_6);
40657   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
40658   __Pyx_GIVEREF(__pyx_t_7);
40659   PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_7);
40660   __Pyx_GIVEREF(__pyx_t_8);
40661   PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_8);
40662   __Pyx_GIVEREF(__pyx_t_9);
40663   PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_9);
40664   __Pyx_GIVEREF(__pyx_t_10);
40665   PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_10);
40666   __Pyx_GIVEREF(__pyx_t_11);
40667   PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_11);
40668   __Pyx_GIVEREF(__pyx_t_1);
40669   PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_t_1);
40670   __pyx_t_4 = 0;
40671   __pyx_t_5 = 0;
40672   __pyx_t_6 = 0;
40673   __pyx_t_7 = 0;
40674   __pyx_t_8 = 0;
40675   __pyx_t_9 = 0;
40676   __pyx_t_10 = 0;
40677   __pyx_t_11 = 0;
40678   __pyx_t_1 = 0;
40679   __pyx_v_init = ((PyObject*)__pyx_t_2);
40680   __pyx_t_2 = 0;
40681 
40682   /* "statsmodels/tsa/statespace/_representation.pyx":3278
40683  *                 np.array(self.selection, copy=True, order='F'), np.array(self.state_cov, copy=True, order='F'),
40684  *                 self.diagonal_obs_cov)
40685  *         state = {'initialized': self.initialized,             # <<<<<<<<<<<<<<
40686  *                  'initialized_diffuse': self.initialized_diffuse,
40687  *                  'initialized_stationary': self.initialized_stationary,
40688  */
40689   __pyx_t_2 = __Pyx_PyDict_NewPresized(27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3278, __pyx_L1_error)
40690   __Pyx_GOTREF(__pyx_t_2);
40691   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3278, __pyx_L1_error)
40692   __Pyx_GOTREF(__pyx_t_1);
40693   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized, __pyx_t_1) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40694   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40695 
40696   /* "statsmodels/tsa/statespace/_representation.pyx":3279
40697  *                 self.diagonal_obs_cov)
40698  *         state = {'initialized': self.initialized,
40699  *                  'initialized_diffuse': self.initialized_diffuse,             # <<<<<<<<<<<<<<
40700  *                  'initialized_stationary': self.initialized_stationary,
40701  *                  'initial_state': None,
40702  */
40703   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3279, __pyx_L1_error)
40704   __Pyx_GOTREF(__pyx_t_1);
40705   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized_diffuse, __pyx_t_1) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40706   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40707 
40708   /* "statsmodels/tsa/statespace/_representation.pyx":3280
40709  *         state = {'initialized': self.initialized,
40710  *                  'initialized_diffuse': self.initialized_diffuse,
40711  *                  'initialized_stationary': self.initialized_stationary,             # <<<<<<<<<<<<<<
40712  *                  'initial_state': None,
40713  *                  'initial_state_cov': None,
40714  */
40715   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3280, __pyx_L1_error)
40716   __Pyx_GOTREF(__pyx_t_1);
40717   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initialized_stationary, __pyx_t_1) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40718   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40719 
40720   /* "statsmodels/tsa/statespace/_representation.pyx":3281
40721  *                  'initialized_diffuse': self.initialized_diffuse,
40722  *                  'initialized_stationary': self.initialized_stationary,
40723  *                  'initial_state': None,             # <<<<<<<<<<<<<<
40724  *                  'initial_state_cov': None,
40725  *                  'initial_diffuse_state_cov': None,
40726  */
40727   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_state, Py_None) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40728 
40729   /* "statsmodels/tsa/statespace/_representation.pyx":3282
40730  *                  'initialized_stationary': self.initialized_stationary,
40731  *                  'initial_state': None,
40732  *                  'initial_state_cov': None,             # <<<<<<<<<<<<<<
40733  *                  'initial_diffuse_state_cov': None,
40734  *                  'missing': np.array(self.missing, copy=True, order='F'),
40735  */
40736   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_state_cov, Py_None) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40737 
40738   /* "statsmodels/tsa/statespace/_representation.pyx":3283
40739  *                  'initial_state': None,
40740  *                  'initial_state_cov': None,
40741  *                  'initial_diffuse_state_cov': None,             # <<<<<<<<<<<<<<
40742  *                  'missing': np.array(self.missing, copy=True, order='F'),
40743  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
40744  */
40745   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_initial_diffuse_state_cov, Py_None) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40746 
40747   /* "statsmodels/tsa/statespace/_representation.pyx":3284
40748  *                  'initial_state_cov': None,
40749  *                  'initial_diffuse_state_cov': None,
40750  *                  'missing': np.array(self.missing, copy=True, order='F'),             # <<<<<<<<<<<<<<
40751  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
40752  *                  'has_missing': self.has_missing,
40753  */
40754   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3284, __pyx_L1_error)
40755   __Pyx_GOTREF(__pyx_t_1);
40756   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3284, __pyx_L1_error)
40757   __Pyx_GOTREF(__pyx_t_11);
40758   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40759   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3284, __pyx_L1_error)}
40760   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3284, __pyx_L1_error)
40761   __Pyx_GOTREF(__pyx_t_1);
40762   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3284, __pyx_L1_error)
40763   __Pyx_GOTREF(__pyx_t_10);
40764   __Pyx_GIVEREF(__pyx_t_1);
40765   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
40766   __pyx_t_1 = 0;
40767   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3284, __pyx_L1_error)
40768   __Pyx_GOTREF(__pyx_t_1);
40769   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3284, __pyx_L1_error)
40770   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3284, __pyx_L1_error)
40771   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3284, __pyx_L1_error)
40772   __Pyx_GOTREF(__pyx_t_9);
40773   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40774   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40775   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40776   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_missing, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40777   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40778 
40779   /* "statsmodels/tsa/statespace/_representation.pyx":3285
40780  *                  'initial_diffuse_state_cov': None,
40781  *                  'missing': np.array(self.missing, copy=True, order='F'),
40782  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),             # <<<<<<<<<<<<<<
40783  *                  'has_missing': self.has_missing,
40784  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
40785  */
40786   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3285, __pyx_L1_error)
40787   __Pyx_GOTREF(__pyx_t_9);
40788   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3285, __pyx_L1_error)
40789   __Pyx_GOTREF(__pyx_t_1);
40790   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40791   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3285, __pyx_L1_error)}
40792   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3285, __pyx_L1_error)
40793   __Pyx_GOTREF(__pyx_t_9);
40794   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3285, __pyx_L1_error)
40795   __Pyx_GOTREF(__pyx_t_10);
40796   __Pyx_GIVEREF(__pyx_t_9);
40797   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
40798   __pyx_t_9 = 0;
40799   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3285, __pyx_L1_error)
40800   __Pyx_GOTREF(__pyx_t_9);
40801   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3285, __pyx_L1_error)
40802   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3285, __pyx_L1_error)
40803   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3285, __pyx_L1_error)
40804   __Pyx_GOTREF(__pyx_t_11);
40805   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40806   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40807   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40808   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nmissing, __pyx_t_11) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40809   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40810 
40811   /* "statsmodels/tsa/statespace/_representation.pyx":3286
40812  *                  'missing': np.array(self.missing, copy=True, order='F'),
40813  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
40814  *                  'has_missing': self.has_missing,             # <<<<<<<<<<<<<<
40815  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
40816  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
40817  */
40818   __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_self->has_missing); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3286, __pyx_L1_error)
40819   __Pyx_GOTREF(__pyx_t_11);
40820   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_has_missing, __pyx_t_11) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40821   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40822 
40823   /* "statsmodels/tsa/statespace/_representation.pyx":3287
40824  *                  'nmissing': np.array(self.nmissing, copy=True, order='F'),
40825  *                  'has_missing': self.has_missing,
40826  *                  'tmp': np.array(self.tmp, copy=True, order='F'),             # <<<<<<<<<<<<<<
40827  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
40828  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
40829  */
40830   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3287, __pyx_L1_error)
40831   __Pyx_GOTREF(__pyx_t_11);
40832   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3287, __pyx_L1_error)
40833   __Pyx_GOTREF(__pyx_t_9);
40834   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40835   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3287, __pyx_L1_error)}
40836   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->tmp, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3287, __pyx_L1_error)
40837   __Pyx_GOTREF(__pyx_t_11);
40838   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3287, __pyx_L1_error)
40839   __Pyx_GOTREF(__pyx_t_10);
40840   __Pyx_GIVEREF(__pyx_t_11);
40841   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
40842   __pyx_t_11 = 0;
40843   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3287, __pyx_L1_error)
40844   __Pyx_GOTREF(__pyx_t_11);
40845   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3287, __pyx_L1_error)
40846   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3287, __pyx_L1_error)
40847   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3287, __pyx_L1_error)
40848   __Pyx_GOTREF(__pyx_t_1);
40849   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40850   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40851   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40852   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_tmp, __pyx_t_1) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40853   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40854 
40855   /* "statsmodels/tsa/statespace/_representation.pyx":3288
40856  *                  'has_missing': self.has_missing,
40857  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
40858  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
40859  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
40860  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
40861  */
40862   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3288, __pyx_L1_error)
40863   __Pyx_GOTREF(__pyx_t_1);
40864   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3288, __pyx_L1_error)
40865   __Pyx_GOTREF(__pyx_t_11);
40866   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40867   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3288, __pyx_L1_error)}
40868   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3288, __pyx_L1_error)
40869   __Pyx_GOTREF(__pyx_t_1);
40870   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3288, __pyx_L1_error)
40871   __Pyx_GOTREF(__pyx_t_10);
40872   __Pyx_GIVEREF(__pyx_t_1);
40873   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
40874   __pyx_t_1 = 0;
40875   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3288, __pyx_L1_error)
40876   __Pyx_GOTREF(__pyx_t_1);
40877   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3288, __pyx_L1_error)
40878   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3288, __pyx_L1_error)
40879   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3288, __pyx_L1_error)
40880   __Pyx_GOTREF(__pyx_t_9);
40881   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40882   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40883   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40884   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_state_cov, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40885   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40886 
40887   /* "statsmodels/tsa/statespace/_representation.pyx":3289
40888  *                  'tmp': np.array(self.tmp, copy=True, order='F'),
40889  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
40890  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),             # <<<<<<<<<<<<<<
40891  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
40892  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
40893  */
40894   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3289, __pyx_L1_error)
40895   __Pyx_GOTREF(__pyx_t_9);
40896   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3289, __pyx_L1_error)
40897   __Pyx_GOTREF(__pyx_t_1);
40898   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40899   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3289, __pyx_L1_error)}
40900   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3289, __pyx_L1_error)
40901   __Pyx_GOTREF(__pyx_t_9);
40902   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3289, __pyx_L1_error)
40903   __Pyx_GOTREF(__pyx_t_10);
40904   __Pyx_GIVEREF(__pyx_t_9);
40905   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
40906   __pyx_t_9 = 0;
40907   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3289, __pyx_L1_error)
40908   __Pyx_GOTREF(__pyx_t_9);
40909   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3289, __pyx_L1_error)
40910   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3289, __pyx_L1_error)
40911   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3289, __pyx_L1_error)
40912   __Pyx_GOTREF(__pyx_t_11);
40913   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40914   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40915   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40916   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs, __pyx_t_11) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40917   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40918 
40919   /* "statsmodels/tsa/statespace/_representation.pyx":3290
40920  *                  'selected_state_cov': np.array(self.selected_state_cov, copy=True, order='F'),
40921  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
40922  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),             # <<<<<<<<<<<<<<
40923  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
40924  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
40925  */
40926   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3290, __pyx_L1_error)
40927   __Pyx_GOTREF(__pyx_t_11);
40928   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3290, __pyx_L1_error)
40929   __Pyx_GOTREF(__pyx_t_9);
40930   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40931   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3290, __pyx_L1_error)}
40932   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3290, __pyx_L1_error)
40933   __Pyx_GOTREF(__pyx_t_11);
40934   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3290, __pyx_L1_error)
40935   __Pyx_GOTREF(__pyx_t_10);
40936   __Pyx_GIVEREF(__pyx_t_11);
40937   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
40938   __pyx_t_11 = 0;
40939   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3290, __pyx_L1_error)
40940   __Pyx_GOTREF(__pyx_t_11);
40941   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3290, __pyx_L1_error)
40942   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3290, __pyx_L1_error)
40943   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3290, __pyx_L1_error)
40944   __Pyx_GOTREF(__pyx_t_1);
40945   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40946   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40947   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40948   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs_intercept, __pyx_t_1) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40949   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40950 
40951   /* "statsmodels/tsa/statespace/_representation.pyx":3291
40952  *                  'selected_obs': np.array(self.selected_obs, copy=True, order='F'),
40953  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
40954  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
40955  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
40956  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
40957  */
40958   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3291, __pyx_L1_error)
40959   __Pyx_GOTREF(__pyx_t_1);
40960   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3291, __pyx_L1_error)
40961   __Pyx_GOTREF(__pyx_t_11);
40962   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40963   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3291, __pyx_L1_error)}
40964   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_design, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3291, __pyx_L1_error)
40965   __Pyx_GOTREF(__pyx_t_1);
40966   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3291, __pyx_L1_error)
40967   __Pyx_GOTREF(__pyx_t_10);
40968   __Pyx_GIVEREF(__pyx_t_1);
40969   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
40970   __pyx_t_1 = 0;
40971   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3291, __pyx_L1_error)
40972   __Pyx_GOTREF(__pyx_t_1);
40973   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3291, __pyx_L1_error)
40974   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3291, __pyx_L1_error)
40975   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3291, __pyx_L1_error)
40976   __Pyx_GOTREF(__pyx_t_9);
40977   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
40978   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40979   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
40980   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_design, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
40981   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40982 
40983   /* "statsmodels/tsa/statespace/_representation.pyx":3292
40984  *                  'selected_obs_intercept': np.array(self.selected_obs_intercept, copy=True, order='F'),
40985  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
40986  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
40987  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
40988  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
40989  */
40990   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3292, __pyx_L1_error)
40991   __Pyx_GOTREF(__pyx_t_9);
40992   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3292, __pyx_L1_error)
40993   __Pyx_GOTREF(__pyx_t_1);
40994   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40995   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3292, __pyx_L1_error)}
40996   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_cov, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3292, __pyx_L1_error)
40997   __Pyx_GOTREF(__pyx_t_9);
40998   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3292, __pyx_L1_error)
40999   __Pyx_GOTREF(__pyx_t_10);
41000   __Pyx_GIVEREF(__pyx_t_9);
41001   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
41002   __pyx_t_9 = 0;
41003   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3292, __pyx_L1_error)
41004   __Pyx_GOTREF(__pyx_t_9);
41005   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3292, __pyx_L1_error)
41006   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3292, __pyx_L1_error)
41007   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3292, __pyx_L1_error)
41008   __Pyx_GOTREF(__pyx_t_11);
41009   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41010   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41011   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41012   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_selected_obs_cov, __pyx_t_11) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41013   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41014 
41015   /* "statsmodels/tsa/statespace/_representation.pyx":3293
41016  *                  'selected_design': np.array(self.selected_design, copy=True, order='F'),
41017  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
41018  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),             # <<<<<<<<<<<<<<
41019  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
41020  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
41021  */
41022   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3293, __pyx_L1_error)
41023   __Pyx_GOTREF(__pyx_t_11);
41024   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3293, __pyx_L1_error)
41025   __Pyx_GOTREF(__pyx_t_9);
41026   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41027   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3293, __pyx_L1_error)}
41028   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->transform_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3293, __pyx_L1_error)
41029   __Pyx_GOTREF(__pyx_t_11);
41030   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3293, __pyx_L1_error)
41031   __Pyx_GOTREF(__pyx_t_10);
41032   __Pyx_GIVEREF(__pyx_t_11);
41033   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
41034   __pyx_t_11 = 0;
41035   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3293, __pyx_L1_error)
41036   __Pyx_GOTREF(__pyx_t_11);
41037   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3293, __pyx_L1_error)
41038   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3293, __pyx_L1_error)
41039   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3293, __pyx_L1_error)
41040   __Pyx_GOTREF(__pyx_t_1);
41041   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41042   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41043   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41044   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_cholesky, __pyx_t_1) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41045   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41046 
41047   /* "statsmodels/tsa/statespace/_representation.pyx":3294
41048  *                  'selected_obs_cov': np.array(self.selected_obs_cov, copy=True, order='F'),
41049  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
41050  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
41051  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
41052  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
41053  */
41054   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3294, __pyx_L1_error)
41055   __Pyx_GOTREF(__pyx_t_1);
41056   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3294, __pyx_L1_error)
41057   __Pyx_GOTREF(__pyx_t_11);
41058   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41059   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3294, __pyx_L1_error)}
41060   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3294, __pyx_L1_error)
41061   __Pyx_GOTREF(__pyx_t_1);
41062   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3294, __pyx_L1_error)
41063   __Pyx_GOTREF(__pyx_t_10);
41064   __Pyx_GIVEREF(__pyx_t_1);
41065   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
41066   __pyx_t_1 = 0;
41067   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3294, __pyx_L1_error)
41068   __Pyx_GOTREF(__pyx_t_1);
41069   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3294, __pyx_L1_error)
41070   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3294, __pyx_L1_error)
41071   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3294, __pyx_L1_error)
41072   __Pyx_GOTREF(__pyx_t_9);
41073   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41074   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41075   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41076   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_obs_cov, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41077   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41078 
41079   /* "statsmodels/tsa/statespace/_representation.pyx":3295
41080  *                  'transform_cholesky': np.array(self.transform_cholesky, copy=True, order='F'),
41081  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
41082  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
41083  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
41084  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
41085  */
41086   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3295, __pyx_L1_error)
41087   __Pyx_GOTREF(__pyx_t_9);
41088   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3295, __pyx_L1_error)
41089   __Pyx_GOTREF(__pyx_t_1);
41090   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41091   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3295, __pyx_L1_error)}
41092   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->transform_design, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3295, __pyx_L1_error)
41093   __Pyx_GOTREF(__pyx_t_9);
41094   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3295, __pyx_L1_error)
41095   __Pyx_GOTREF(__pyx_t_10);
41096   __Pyx_GIVEREF(__pyx_t_9);
41097   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
41098   __pyx_t_9 = 0;
41099   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3295, __pyx_L1_error)
41100   __Pyx_GOTREF(__pyx_t_9);
41101   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3295, __pyx_L1_error)
41102   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3295, __pyx_L1_error)
41103   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3295, __pyx_L1_error)
41104   __Pyx_GOTREF(__pyx_t_11);
41105   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41106   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41107   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41108   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_design, __pyx_t_11) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41109   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41110 
41111   /* "statsmodels/tsa/statespace/_representation.pyx":3296
41112  *                  'transform_obs_cov': np.array(self.transform_obs_cov, copy=True, order='F'),
41113  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
41114  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),             # <<<<<<<<<<<<<<
41115  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
41116  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
41117  */
41118   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3296, __pyx_L1_error)
41119   __Pyx_GOTREF(__pyx_t_11);
41120   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3296, __pyx_L1_error)
41121   __Pyx_GOTREF(__pyx_t_9);
41122   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41123   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3296, __pyx_L1_error)}
41124   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3296, __pyx_L1_error)
41125   __Pyx_GOTREF(__pyx_t_11);
41126   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3296, __pyx_L1_error)
41127   __Pyx_GOTREF(__pyx_t_10);
41128   __Pyx_GIVEREF(__pyx_t_11);
41129   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
41130   __pyx_t_11 = 0;
41131   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3296, __pyx_L1_error)
41132   __Pyx_GOTREF(__pyx_t_11);
41133   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3296, __pyx_L1_error)
41134   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3296, __pyx_L1_error)
41135   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3296, __pyx_L1_error)
41136   __Pyx_GOTREF(__pyx_t_1);
41137   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41138   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41139   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41140   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs, __pyx_t_1) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41141   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41142 
41143   /* "statsmodels/tsa/statespace/_representation.pyx":3297
41144  *                  'transform_design': np.array(self.transform_design, copy=True, order='F'),
41145  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
41146  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),             # <<<<<<<<<<<<<<
41147  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
41148  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
41149  */
41150   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
41151   __Pyx_GOTREF(__pyx_t_1);
41152   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3297, __pyx_L1_error)
41153   __Pyx_GOTREF(__pyx_t_11);
41154   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41155   if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3297, __pyx_L1_error)}
41156   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_tmp, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
41157   __Pyx_GOTREF(__pyx_t_1);
41158   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3297, __pyx_L1_error)
41159   __Pyx_GOTREF(__pyx_t_10);
41160   __Pyx_GIVEREF(__pyx_t_1);
41161   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
41162   __pyx_t_1 = 0;
41163   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
41164   __Pyx_GOTREF(__pyx_t_1);
41165   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3297, __pyx_L1_error)
41166   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3297, __pyx_L1_error)
41167   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3297, __pyx_L1_error)
41168   __Pyx_GOTREF(__pyx_t_9);
41169   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41170   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41171   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41172   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs_tmp, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41173   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41174 
41175   /* "statsmodels/tsa/statespace/_representation.pyx":3298
41176  *                  'collapse_obs': np.array(self.collapse_obs, copy=True, order='F'),
41177  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
41178  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),             # <<<<<<<<<<<<<<
41179  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
41180  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
41181  */
41182   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3298, __pyx_L1_error)
41183   __Pyx_GOTREF(__pyx_t_9);
41184   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error)
41185   __Pyx_GOTREF(__pyx_t_1);
41186   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41187   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3298, __pyx_L1_error)}
41188   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_design, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3298, __pyx_L1_error)
41189   __Pyx_GOTREF(__pyx_t_9);
41190   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3298, __pyx_L1_error)
41191   __Pyx_GOTREF(__pyx_t_10);
41192   __Pyx_GIVEREF(__pyx_t_9);
41193   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
41194   __pyx_t_9 = 0;
41195   __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3298, __pyx_L1_error)
41196   __Pyx_GOTREF(__pyx_t_9);
41197   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3298, __pyx_L1_error)
41198   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3298, __pyx_L1_error)
41199   __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3298, __pyx_L1_error)
41200   __Pyx_GOTREF(__pyx_t_11);
41201   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41202   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41203   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41204   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_design, __pyx_t_11) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41205   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41206 
41207   /* "statsmodels/tsa/statespace/_representation.pyx":3299
41208  *                  'collapse_obs_tmp': np.array(self.collapse_obs_tmp, copy=True, order='F'),
41209  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
41210  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),             # <<<<<<<<<<<<<<
41211  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
41212  *                  't': self.t,
41213  */
41214   __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3299, __pyx_L1_error)
41215   __Pyx_GOTREF(__pyx_t_11);
41216   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3299, __pyx_L1_error)
41217   __Pyx_GOTREF(__pyx_t_9);
41218   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41219   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3299, __pyx_L1_error)}
41220   __pyx_t_11 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3299, __pyx_L1_error)
41221   __Pyx_GOTREF(__pyx_t_11);
41222   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3299, __pyx_L1_error)
41223   __Pyx_GOTREF(__pyx_t_10);
41224   __Pyx_GIVEREF(__pyx_t_11);
41225   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
41226   __pyx_t_11 = 0;
41227   __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3299, __pyx_L1_error)
41228   __Pyx_GOTREF(__pyx_t_11);
41229   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3299, __pyx_L1_error)
41230   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3299, __pyx_L1_error)
41231   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3299, __pyx_L1_error)
41232   __Pyx_GOTREF(__pyx_t_1);
41233   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41234   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41235   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41236   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_obs_cov, __pyx_t_1) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41237   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41238 
41239   /* "statsmodels/tsa/statespace/_representation.pyx":3300
41240  *                  'collapse_design': np.array(self.collapse_design, copy=True, order='F'),
41241  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
41242  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),             # <<<<<<<<<<<<<<
41243  *                  't': self.t,
41244  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
41245  */
41246   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3300, __pyx_L1_error)
41247   __Pyx_GOTREF(__pyx_t_1);
41248   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3300, __pyx_L1_error)
41249   __Pyx_GOTREF(__pyx_t_11);
41250   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41251   if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3300, __pyx_L1_error)}
41252   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3300, __pyx_L1_error)
41253   __Pyx_GOTREF(__pyx_t_1);
41254   __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3300, __pyx_L1_error)
41255   __Pyx_GOTREF(__pyx_t_10);
41256   __Pyx_GIVEREF(__pyx_t_1);
41257   PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
41258   __pyx_t_1 = 0;
41259   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3300, __pyx_L1_error)
41260   __Pyx_GOTREF(__pyx_t_1);
41261   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3300, __pyx_L1_error)
41262   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3300, __pyx_L1_error)
41263   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3300, __pyx_L1_error)
41264   __Pyx_GOTREF(__pyx_t_9);
41265   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
41266   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41267   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41268   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_cholesky, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41269   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41270 
41271   /* "statsmodels/tsa/statespace/_representation.pyx":3301
41272  *                  'collapse_obs_cov': np.array(self.collapse_obs_cov, copy=True, order='F'),
41273  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
41274  *                  't': self.t,             # <<<<<<<<<<<<<<
41275  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
41276  *                  'companion_transition': self.companion_transition,
41277  */
41278   __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->t); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3301, __pyx_L1_error)
41279   __Pyx_GOTREF(__pyx_t_9);
41280   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_t, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41281   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41282 
41283   /* "statsmodels/tsa/statespace/_representation.pyx":3302
41284  *                  'collapse_cholesky': np.array(self.collapse_cholesky, copy=True, order='F'),
41285  *                  't': self.t,
41286  *                  'collapse_loglikelihood': self.collapse_loglikelihood,             # <<<<<<<<<<<<<<
41287  *                  'companion_transition': self.companion_transition,
41288  *                  'transform_determinant': self.transform_determinant,
41289  */
41290   __pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_self->collapse_loglikelihood); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3302, __pyx_L1_error)
41291   __Pyx_GOTREF(__pyx_t_9);
41292   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_collapse_loglikelihood, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41293   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41294 
41295   /* "statsmodels/tsa/statespace/_representation.pyx":3303
41296  *                  't': self.t,
41297  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
41298  *                  'companion_transition': self.companion_transition,             # <<<<<<<<<<<<<<
41299  *                  'transform_determinant': self.transform_determinant,
41300  *                  }
41301  */
41302   __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->companion_transition); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3303, __pyx_L1_error)
41303   __Pyx_GOTREF(__pyx_t_9);
41304   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_companion_transition, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41305   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41306 
41307   /* "statsmodels/tsa/statespace/_representation.pyx":3304
41308  *                  'collapse_loglikelihood': self.collapse_loglikelihood,
41309  *                  'companion_transition': self.companion_transition,
41310  *                  'transform_determinant': self.transform_determinant,             # <<<<<<<<<<<<<<
41311  *                  }
41312  *         if self.initialized:
41313  */
41314   __pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_self->transform_determinant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3304, __pyx_L1_error)
41315   __Pyx_GOTREF(__pyx_t_9);
41316   if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_transform_determinant, __pyx_t_9) < 0) __PYX_ERR(0, 3278, __pyx_L1_error)
41317   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41318   __pyx_v_state = ((PyObject*)__pyx_t_2);
41319   __pyx_t_2 = 0;
41320 
41321   /* "statsmodels/tsa/statespace/_representation.pyx":3306
41322  *                  'transform_determinant': self.transform_determinant,
41323  *                  }
41324  *         if self.initialized:             # <<<<<<<<<<<<<<
41325  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
41326  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
41327  */
41328   __pyx_t_12 = (__pyx_v_self->initialized != 0);
41329   if (__pyx_t_12) {
41330 
41331     /* "statsmodels/tsa/statespace/_representation.pyx":3307
41332  *                  }
41333  *         if self.initialized:
41334  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')             # <<<<<<<<<<<<<<
41335  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
41336  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
41337  */
41338     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3307, __pyx_L1_error)
41339     __Pyx_GOTREF(__pyx_t_2);
41340     __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3307, __pyx_L1_error)
41341     __Pyx_GOTREF(__pyx_t_9);
41342     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
41343     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3307, __pyx_L1_error)}
41344     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3307, __pyx_L1_error)
41345     __Pyx_GOTREF(__pyx_t_2);
41346     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3307, __pyx_L1_error)
41347     __Pyx_GOTREF(__pyx_t_1);
41348     __Pyx_GIVEREF(__pyx_t_2);
41349     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
41350     __pyx_t_2 = 0;
41351     __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3307, __pyx_L1_error)
41352     __Pyx_GOTREF(__pyx_t_2);
41353     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3307, __pyx_L1_error)
41354     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3307, __pyx_L1_error)
41355     __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3307, __pyx_L1_error)
41356     __Pyx_GOTREF(__pyx_t_10);
41357     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41358     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41359     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
41360     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_state, __pyx_t_10) < 0)) __PYX_ERR(0, 3307, __pyx_L1_error)
41361     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41362 
41363     /* "statsmodels/tsa/statespace/_representation.pyx":3308
41364  *         if self.initialized:
41365  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
41366  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')             # <<<<<<<<<<<<<<
41367  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
41368  *         return (self.__class__, init, state)
41369  */
41370     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3308, __pyx_L1_error)
41371     __Pyx_GOTREF(__pyx_t_10);
41372     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3308, __pyx_L1_error)
41373     __Pyx_GOTREF(__pyx_t_2);
41374     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41375     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3308, __pyx_L1_error)}
41376     __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3308, __pyx_L1_error)
41377     __Pyx_GOTREF(__pyx_t_10);
41378     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3308, __pyx_L1_error)
41379     __Pyx_GOTREF(__pyx_t_1);
41380     __Pyx_GIVEREF(__pyx_t_10);
41381     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10);
41382     __pyx_t_10 = 0;
41383     __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3308, __pyx_L1_error)
41384     __Pyx_GOTREF(__pyx_t_10);
41385     if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3308, __pyx_L1_error)
41386     if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3308, __pyx_L1_error)
41387     __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3308, __pyx_L1_error)
41388     __Pyx_GOTREF(__pyx_t_9);
41389     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
41390     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41391     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41392     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_state_cov, __pyx_t_9) < 0)) __PYX_ERR(0, 3308, __pyx_L1_error)
41393     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41394 
41395     /* "statsmodels/tsa/statespace/_representation.pyx":3309
41396  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
41397  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
41398  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')             # <<<<<<<<<<<<<<
41399  *         return (self.__class__, init, state)
41400  *
41401  */
41402     __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3309, __pyx_L1_error)
41403     __Pyx_GOTREF(__pyx_t_9);
41404     __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3309, __pyx_L1_error)
41405     __Pyx_GOTREF(__pyx_t_10);
41406     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41407     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3309, __pyx_L1_error)}
41408     __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_self->initial_diffuse_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3309, __pyx_L1_error)
41409     __Pyx_GOTREF(__pyx_t_9);
41410     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3309, __pyx_L1_error)
41411     __Pyx_GOTREF(__pyx_t_1);
41412     __Pyx_GIVEREF(__pyx_t_9);
41413     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9);
41414     __pyx_t_9 = 0;
41415     __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3309, __pyx_L1_error)
41416     __Pyx_GOTREF(__pyx_t_9);
41417     if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_copy, Py_True) < 0) __PYX_ERR(0, 3309, __pyx_L1_error)
41418     if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_order, __pyx_n_u_F) < 0) __PYX_ERR(0, 3309, __pyx_L1_error)
41419     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3309, __pyx_L1_error)
41420     __Pyx_GOTREF(__pyx_t_2);
41421     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41422     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41423     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41424     if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_u_initial_diffuse_state_cov, __pyx_t_2) < 0)) __PYX_ERR(0, 3309, __pyx_L1_error)
41425     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
41426 
41427     /* "statsmodels/tsa/statespace/_representation.pyx":3306
41428  *                  'transform_determinant': self.transform_determinant,
41429  *                  }
41430  *         if self.initialized:             # <<<<<<<<<<<<<<
41431  *             state['initial_state'] = np.array(self.initial_state, copy=True, order='F')
41432  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
41433  */
41434   }
41435 
41436   /* "statsmodels/tsa/statespace/_representation.pyx":3310
41437  *             state['initial_state_cov'] = np.array(self.initial_state_cov, copy=True, order='F')
41438  *             state['initial_diffuse_state_cov'] = np.array(self.initial_diffuse_state_cov, copy=True, order='F')
41439  *         return (self.__class__, init, state)             # <<<<<<<<<<<<<<
41440  *
41441  *     def __setstate__(self, state):
41442  */
41443   __Pyx_XDECREF(__pyx_r);
41444   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3310, __pyx_L1_error)
41445   __Pyx_GOTREF(__pyx_t_2);
41446   __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3310, __pyx_L1_error)
41447   __Pyx_GOTREF(__pyx_t_9);
41448   __Pyx_GIVEREF(__pyx_t_2);
41449   PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
41450   __Pyx_INCREF(__pyx_v_init);
41451   __Pyx_GIVEREF(__pyx_v_init);
41452   PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_init);
41453   __Pyx_INCREF(__pyx_v_state);
41454   __Pyx_GIVEREF(__pyx_v_state);
41455   PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_state);
41456   __pyx_t_2 = 0;
41457   __pyx_r = __pyx_t_9;
41458   __pyx_t_9 = 0;
41459   goto __pyx_L0;
41460 
41461   /* "statsmodels/tsa/statespace/_representation.pyx":3272
41462  *         self.set_dimensions(self.k_endog, self.k_states, self.k_posdef)
41463  *
41464  *     def __reduce__(self):             # <<<<<<<<<<<<<<
41465  *         init = (np.array(self.obs, copy=True, order='F'), np.array(self.design, copy=True, order='F'),
41466  *                 np.array(self.obs_intercept, copy=True, order='F'), np.array(self.obs_cov, copy=True, order='F'),
41467  */
41468 
41469   /* function exit code */
41470   __pyx_L1_error:;
41471   __Pyx_XDECREF(__pyx_t_1);
41472   __Pyx_XDECREF(__pyx_t_2);
41473   __Pyx_XDECREF(__pyx_t_3);
41474   __Pyx_XDECREF(__pyx_t_4);
41475   __Pyx_XDECREF(__pyx_t_5);
41476   __Pyx_XDECREF(__pyx_t_6);
41477   __Pyx_XDECREF(__pyx_t_7);
41478   __Pyx_XDECREF(__pyx_t_8);
41479   __Pyx_XDECREF(__pyx_t_9);
41480   __Pyx_XDECREF(__pyx_t_10);
41481   __Pyx_XDECREF(__pyx_t_11);
41482   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41483   __pyx_r = NULL;
41484   __pyx_L0:;
41485   __Pyx_XDECREF(__pyx_v_init);
41486   __Pyx_XDECREF(__pyx_v_state);
41487   __Pyx_XGIVEREF(__pyx_r);
41488   __Pyx_RefNannyFinishContext();
41489   return __pyx_r;
41490 }
41491 
41492 /* "statsmodels/tsa/statespace/_representation.pyx":3312
41493  *         return (self.__class__, init, state)
41494  *
41495  *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
41496  *         self.initial_state = state['initial_state']
41497  *         self.initial_state_cov = state['initial_state_cov']
41498  */
41499 
41500 /* Python wrapper */
41501 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_5__setstate__(PyObject * __pyx_v_self,PyObject * __pyx_v_state)41502 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_5__setstate__(PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
41503   PyObject *__pyx_r = 0;
41504   __Pyx_RefNannyDeclarations
41505   __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
41506   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4__setstate__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_state));
41507 
41508   /* function exit code */
41509   __Pyx_RefNannyFinishContext();
41510   return __pyx_r;
41511 }
41512 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,PyObject * __pyx_v_state)41513 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4__setstate__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_state) {
41514   PyObject *__pyx_r = NULL;
41515   __Pyx_RefNannyDeclarations
41516   PyObject *__pyx_t_1 = NULL;
41517   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
41518   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
41519   int __pyx_t_4;
41520   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
41521   __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
41522   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
41523   __pyx_t_double_complex __pyx_t_8;
41524   int __pyx_lineno = 0;
41525   const char *__pyx_filename = NULL;
41526   int __pyx_clineno = 0;
41527   __Pyx_RefNannySetupContext("__setstate__", 0);
41528 
41529   /* "statsmodels/tsa/statespace/_representation.pyx":3313
41530  *
41531  *     def __setstate__(self, state):
41532  *         self.initial_state = state['initial_state']             # <<<<<<<<<<<<<<
41533  *         self.initial_state_cov = state['initial_state_cov']
41534  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
41535  */
41536   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3313, __pyx_L1_error)
41537   __Pyx_GOTREF(__pyx_t_1);
41538   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 3313, __pyx_L1_error)
41539   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41540   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
41541   __pyx_v_self->initial_state = __pyx_t_2;
41542   __pyx_t_2.memview = NULL;
41543   __pyx_t_2.data = NULL;
41544 
41545   /* "statsmodels/tsa/statespace/_representation.pyx":3314
41546  *     def __setstate__(self, state):
41547  *         self.initial_state = state['initial_state']
41548  *         self.initial_state_cov = state['initial_state_cov']             # <<<<<<<<<<<<<<
41549  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
41550  *         self.initialized = state['initialized']
41551  */
41552   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3314, __pyx_L1_error)
41553   __Pyx_GOTREF(__pyx_t_1);
41554   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3314, __pyx_L1_error)
41555   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41556   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
41557   __pyx_v_self->initial_state_cov = __pyx_t_3;
41558   __pyx_t_3.memview = NULL;
41559   __pyx_t_3.data = NULL;
41560 
41561   /* "statsmodels/tsa/statespace/_representation.pyx":3315
41562  *         self.initial_state = state['initial_state']
41563  *         self.initial_state_cov = state['initial_state_cov']
41564  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']             # <<<<<<<<<<<<<<
41565  *         self.initialized = state['initialized']
41566  *         self.initialized_diffuse = state['initialized_diffuse']
41567  */
41568   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initial_diffuse_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3315, __pyx_L1_error)
41569   __Pyx_GOTREF(__pyx_t_1);
41570   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3315, __pyx_L1_error)
41571   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41572   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_diffuse_state_cov, 0);
41573   __pyx_v_self->initial_diffuse_state_cov = __pyx_t_3;
41574   __pyx_t_3.memview = NULL;
41575   __pyx_t_3.data = NULL;
41576 
41577   /* "statsmodels/tsa/statespace/_representation.pyx":3316
41578  *         self.initial_state_cov = state['initial_state_cov']
41579  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
41580  *         self.initialized = state['initialized']             # <<<<<<<<<<<<<<
41581  *         self.initialized_diffuse = state['initialized_diffuse']
41582  *         self.initialized_stationary = state['initialized_stationary']
41583  */
41584   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3316, __pyx_L1_error)
41585   __Pyx_GOTREF(__pyx_t_1);
41586   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3316, __pyx_L1_error)
41587   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41588   __pyx_v_self->initialized = __pyx_t_4;
41589 
41590   /* "statsmodels/tsa/statespace/_representation.pyx":3317
41591  *         self.initial_diffuse_state_cov = state['initial_diffuse_state_cov']
41592  *         self.initialized = state['initialized']
41593  *         self.initialized_diffuse = state['initialized_diffuse']             # <<<<<<<<<<<<<<
41594  *         self.initialized_stationary = state['initialized_stationary']
41595  *         self.selected_state_cov = state['selected_state_cov']
41596  */
41597   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3317, __pyx_L1_error)
41598   __Pyx_GOTREF(__pyx_t_1);
41599   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3317, __pyx_L1_error)
41600   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41601   __pyx_v_self->initialized_diffuse = __pyx_t_4;
41602 
41603   /* "statsmodels/tsa/statespace/_representation.pyx":3318
41604  *         self.initialized = state['initialized']
41605  *         self.initialized_diffuse = state['initialized_diffuse']
41606  *         self.initialized_stationary = state['initialized_stationary']             # <<<<<<<<<<<<<<
41607  *         self.selected_state_cov = state['selected_state_cov']
41608  *         self.missing = state['missing']
41609  */
41610   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3318, __pyx_L1_error)
41611   __Pyx_GOTREF(__pyx_t_1);
41612   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3318, __pyx_L1_error)
41613   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41614   __pyx_v_self->initialized_stationary = __pyx_t_4;
41615 
41616   /* "statsmodels/tsa/statespace/_representation.pyx":3319
41617  *         self.initialized_diffuse = state['initialized_diffuse']
41618  *         self.initialized_stationary = state['initialized_stationary']
41619  *         self.selected_state_cov = state['selected_state_cov']             # <<<<<<<<<<<<<<
41620  *         self.missing = state['missing']
41621  *         self.nmissing =state['nmissing']
41622  */
41623   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_state_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3319, __pyx_L1_error)
41624   __Pyx_GOTREF(__pyx_t_1);
41625   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 3319, __pyx_L1_error)
41626   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41627   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_state_cov, 0);
41628   __pyx_v_self->selected_state_cov = __pyx_t_5;
41629   __pyx_t_5.memview = NULL;
41630   __pyx_t_5.data = NULL;
41631 
41632   /* "statsmodels/tsa/statespace/_representation.pyx":3320
41633  *         self.initialized_stationary = state['initialized_stationary']
41634  *         self.selected_state_cov = state['selected_state_cov']
41635  *         self.missing = state['missing']             # <<<<<<<<<<<<<<
41636  *         self.nmissing =state['nmissing']
41637  *         self.has_missing = state['has_missing']
41638  */
41639   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error)
41640   __Pyx_GOTREF(__pyx_t_1);
41641   __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 3320, __pyx_L1_error)
41642   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41643   __PYX_XDEC_MEMVIEW(&__pyx_v_self->missing, 0);
41644   __pyx_v_self->missing = __pyx_t_6;
41645   __pyx_t_6.memview = NULL;
41646   __pyx_t_6.data = NULL;
41647 
41648   /* "statsmodels/tsa/statespace/_representation.pyx":3321
41649  *         self.selected_state_cov = state['selected_state_cov']
41650  *         self.missing = state['missing']
41651  *         self.nmissing =state['nmissing']             # <<<<<<<<<<<<<<
41652  *         self.has_missing = state['has_missing']
41653  *         self.tmp = state['tmp']
41654  */
41655   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_nmissing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error)
41656   __Pyx_GOTREF(__pyx_t_1);
41657   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 3321, __pyx_L1_error)
41658   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41659   __PYX_XDEC_MEMVIEW(&__pyx_v_self->nmissing, 0);
41660   __pyx_v_self->nmissing = __pyx_t_7;
41661   __pyx_t_7.memview = NULL;
41662   __pyx_t_7.data = NULL;
41663 
41664   /* "statsmodels/tsa/statespace/_representation.pyx":3322
41665  *         self.missing = state['missing']
41666  *         self.nmissing =state['nmissing']
41667  *         self.has_missing = state['has_missing']             # <<<<<<<<<<<<<<
41668  *         self.tmp = state['tmp']
41669  *         self.selected_obs  = state['selected_obs']
41670  */
41671   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_has_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3322, __pyx_L1_error)
41672   __Pyx_GOTREF(__pyx_t_1);
41673   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3322, __pyx_L1_error)
41674   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41675   __pyx_v_self->has_missing = __pyx_t_4;
41676 
41677   /* "statsmodels/tsa/statespace/_representation.pyx":3323
41678  *         self.nmissing =state['nmissing']
41679  *         self.has_missing = state['has_missing']
41680  *         self.tmp = state['tmp']             # <<<<<<<<<<<<<<
41681  *         self.selected_obs  = state['selected_obs']
41682  *         self.selected_obs_intercept  = state['selected_obs_intercept']
41683  */
41684   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3323, __pyx_L1_error)
41685   __Pyx_GOTREF(__pyx_t_1);
41686   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3323, __pyx_L1_error)
41687   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41688   __PYX_XDEC_MEMVIEW(&__pyx_v_self->tmp, 0);
41689   __pyx_v_self->tmp = __pyx_t_3;
41690   __pyx_t_3.memview = NULL;
41691   __pyx_t_3.data = NULL;
41692 
41693   /* "statsmodels/tsa/statespace/_representation.pyx":3324
41694  *         self.has_missing = state['has_missing']
41695  *         self.tmp = state['tmp']
41696  *         self.selected_obs  = state['selected_obs']             # <<<<<<<<<<<<<<
41697  *         self.selected_obs_intercept  = state['selected_obs_intercept']
41698  *         self.selected_design  = state['selected_design']
41699  */
41700   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3324, __pyx_L1_error)
41701   __Pyx_GOTREF(__pyx_t_1);
41702   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 3324, __pyx_L1_error)
41703   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41704   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs, 0);
41705   __pyx_v_self->selected_obs = __pyx_t_2;
41706   __pyx_t_2.memview = NULL;
41707   __pyx_t_2.data = NULL;
41708 
41709   /* "statsmodels/tsa/statespace/_representation.pyx":3325
41710  *         self.tmp = state['tmp']
41711  *         self.selected_obs  = state['selected_obs']
41712  *         self.selected_obs_intercept  = state['selected_obs_intercept']             # <<<<<<<<<<<<<<
41713  *         self.selected_design  = state['selected_design']
41714  *         self.selected_obs_cov  =state['selected_obs_cov']
41715  */
41716   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs_intercept); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3325, __pyx_L1_error)
41717   __Pyx_GOTREF(__pyx_t_1);
41718   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 3325, __pyx_L1_error)
41719   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41720   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_intercept, 0);
41721   __pyx_v_self->selected_obs_intercept = __pyx_t_2;
41722   __pyx_t_2.memview = NULL;
41723   __pyx_t_2.data = NULL;
41724 
41725   /* "statsmodels/tsa/statespace/_representation.pyx":3326
41726  *         self.selected_obs  = state['selected_obs']
41727  *         self.selected_obs_intercept  = state['selected_obs_intercept']
41728  *         self.selected_design  = state['selected_design']             # <<<<<<<<<<<<<<
41729  *         self.selected_obs_cov  =state['selected_obs_cov']
41730  *         self.transform_cholesky  = state['transform_cholesky']
41731  */
41732   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3326, __pyx_L1_error)
41733   __Pyx_GOTREF(__pyx_t_1);
41734   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 3326, __pyx_L1_error)
41735   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41736   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_design, 0);
41737   __pyx_v_self->selected_design = __pyx_t_2;
41738   __pyx_t_2.memview = NULL;
41739   __pyx_t_2.data = NULL;
41740 
41741   /* "statsmodels/tsa/statespace/_representation.pyx":3327
41742  *         self.selected_obs_intercept  = state['selected_obs_intercept']
41743  *         self.selected_design  = state['selected_design']
41744  *         self.selected_obs_cov  =state['selected_obs_cov']             # <<<<<<<<<<<<<<
41745  *         self.transform_cholesky  = state['transform_cholesky']
41746  *         self.transform_obs_cov  = state['transform_obs_cov']
41747  */
41748   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_selected_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3327, __pyx_L1_error)
41749   __Pyx_GOTREF(__pyx_t_1);
41750   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 3327, __pyx_L1_error)
41751   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41752   __PYX_XDEC_MEMVIEW(&__pyx_v_self->selected_obs_cov, 0);
41753   __pyx_v_self->selected_obs_cov = __pyx_t_2;
41754   __pyx_t_2.memview = NULL;
41755   __pyx_t_2.data = NULL;
41756 
41757   /* "statsmodels/tsa/statespace/_representation.pyx":3328
41758  *         self.selected_design  = state['selected_design']
41759  *         self.selected_obs_cov  =state['selected_obs_cov']
41760  *         self.transform_cholesky  = state['transform_cholesky']             # <<<<<<<<<<<<<<
41761  *         self.transform_obs_cov  = state['transform_obs_cov']
41762  *         self.transform_design = state['transform_design']
41763  */
41764   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_cholesky); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3328, __pyx_L1_error)
41765   __Pyx_GOTREF(__pyx_t_1);
41766   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3328, __pyx_L1_error)
41767   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41768   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_cholesky, 0);
41769   __pyx_v_self->transform_cholesky = __pyx_t_3;
41770   __pyx_t_3.memview = NULL;
41771   __pyx_t_3.data = NULL;
41772 
41773   /* "statsmodels/tsa/statespace/_representation.pyx":3329
41774  *         self.selected_obs_cov  =state['selected_obs_cov']
41775  *         self.transform_cholesky  = state['transform_cholesky']
41776  *         self.transform_obs_cov  = state['transform_obs_cov']             # <<<<<<<<<<<<<<
41777  *         self.transform_design = state['transform_design']
41778  *         self.collapse_obs = state['collapse_obs']
41779  */
41780   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3329, __pyx_L1_error)
41781   __Pyx_GOTREF(__pyx_t_1);
41782   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3329, __pyx_L1_error)
41783   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41784   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_obs_cov, 0);
41785   __pyx_v_self->transform_obs_cov = __pyx_t_3;
41786   __pyx_t_3.memview = NULL;
41787   __pyx_t_3.data = NULL;
41788 
41789   /* "statsmodels/tsa/statespace/_representation.pyx":3330
41790  *         self.transform_cholesky  = state['transform_cholesky']
41791  *         self.transform_obs_cov  = state['transform_obs_cov']
41792  *         self.transform_design = state['transform_design']             # <<<<<<<<<<<<<<
41793  *         self.collapse_obs = state['collapse_obs']
41794  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
41795  */
41796   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3330, __pyx_L1_error)
41797   __Pyx_GOTREF(__pyx_t_1);
41798   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3330, __pyx_L1_error)
41799   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41800   __PYX_XDEC_MEMVIEW(&__pyx_v_self->transform_design, 0);
41801   __pyx_v_self->transform_design = __pyx_t_3;
41802   __pyx_t_3.memview = NULL;
41803   __pyx_t_3.data = NULL;
41804 
41805   /* "statsmodels/tsa/statespace/_representation.pyx":3331
41806  *         self.transform_obs_cov  = state['transform_obs_cov']
41807  *         self.transform_design = state['transform_design']
41808  *         self.collapse_obs = state['collapse_obs']             # <<<<<<<<<<<<<<
41809  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
41810  *         self.collapse_design = state['collapse_design']
41811  */
41812   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3331, __pyx_L1_error)
41813   __Pyx_GOTREF(__pyx_t_1);
41814   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 3331, __pyx_L1_error)
41815   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41816   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs, 0);
41817   __pyx_v_self->collapse_obs = __pyx_t_2;
41818   __pyx_t_2.memview = NULL;
41819   __pyx_t_2.data = NULL;
41820 
41821   /* "statsmodels/tsa/statespace/_representation.pyx":3332
41822  *         self.transform_design = state['transform_design']
41823  *         self.collapse_obs = state['collapse_obs']
41824  *         self.collapse_obs_tmp = state['collapse_obs_tmp']             # <<<<<<<<<<<<<<
41825  *         self.collapse_design = state['collapse_design']
41826  *         self.collapse_obs_cov = state['collapse_obs_cov']
41827  */
41828   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3332, __pyx_L1_error)
41829   __Pyx_GOTREF(__pyx_t_1);
41830   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 3332, __pyx_L1_error)
41831   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41832   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_tmp, 0);
41833   __pyx_v_self->collapse_obs_tmp = __pyx_t_2;
41834   __pyx_t_2.memview = NULL;
41835   __pyx_t_2.data = NULL;
41836 
41837   /* "statsmodels/tsa/statespace/_representation.pyx":3333
41838  *         self.collapse_obs = state['collapse_obs']
41839  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
41840  *         self.collapse_design = state['collapse_design']             # <<<<<<<<<<<<<<
41841  *         self.collapse_obs_cov = state['collapse_obs_cov']
41842  *         self.collapse_cholesky = state['collapse_cholesky']
41843  */
41844   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __pyx_L1_error)
41845   __Pyx_GOTREF(__pyx_t_1);
41846   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3333, __pyx_L1_error)
41847   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41848   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_design, 0);
41849   __pyx_v_self->collapse_design = __pyx_t_3;
41850   __pyx_t_3.memview = NULL;
41851   __pyx_t_3.data = NULL;
41852 
41853   /* "statsmodels/tsa/statespace/_representation.pyx":3334
41854  *         self.collapse_obs_tmp = state['collapse_obs_tmp']
41855  *         self.collapse_design = state['collapse_design']
41856  *         self.collapse_obs_cov = state['collapse_obs_cov']             # <<<<<<<<<<<<<<
41857  *         self.collapse_cholesky = state['collapse_cholesky']
41858  *         self.t = state['t']
41859  */
41860   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3334, __pyx_L1_error)
41861   __Pyx_GOTREF(__pyx_t_1);
41862   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3334, __pyx_L1_error)
41863   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41864   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_obs_cov, 0);
41865   __pyx_v_self->collapse_obs_cov = __pyx_t_3;
41866   __pyx_t_3.memview = NULL;
41867   __pyx_t_3.data = NULL;
41868 
41869   /* "statsmodels/tsa/statespace/_representation.pyx":3335
41870  *         self.collapse_design = state['collapse_design']
41871  *         self.collapse_obs_cov = state['collapse_obs_cov']
41872  *         self.collapse_cholesky = state['collapse_cholesky']             # <<<<<<<<<<<<<<
41873  *         self.t = state['t']
41874  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
41875  */
41876   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_cholesky); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3335, __pyx_L1_error)
41877   __Pyx_GOTREF(__pyx_t_1);
41878   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3335, __pyx_L1_error)
41879   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41880   __PYX_XDEC_MEMVIEW(&__pyx_v_self->collapse_cholesky, 0);
41881   __pyx_v_self->collapse_cholesky = __pyx_t_3;
41882   __pyx_t_3.memview = NULL;
41883   __pyx_t_3.data = NULL;
41884 
41885   /* "statsmodels/tsa/statespace/_representation.pyx":3336
41886  *         self.collapse_obs_cov = state['collapse_obs_cov']
41887  *         self.collapse_cholesky = state['collapse_cholesky']
41888  *         self.t = state['t']             # <<<<<<<<<<<<<<
41889  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
41890  *         self.companion_transition = state['companion_transition']
41891  */
41892   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3336, __pyx_L1_error)
41893   __Pyx_GOTREF(__pyx_t_1);
41894   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3336, __pyx_L1_error)
41895   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41896   __pyx_v_self->t = __pyx_t_4;
41897 
41898   /* "statsmodels/tsa/statespace/_representation.pyx":3337
41899  *         self.collapse_cholesky = state['collapse_cholesky']
41900  *         self.t = state['t']
41901  *         self.collapse_loglikelihood = state['collapse_loglikelihood']             # <<<<<<<<<<<<<<
41902  *         self.companion_transition = state['companion_transition']
41903  *         self.transform_determinant = state['transform_determinant']
41904  */
41905   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_collapse_loglikelihood); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3337, __pyx_L1_error)
41906   __Pyx_GOTREF(__pyx_t_1);
41907   __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3337, __pyx_L1_error)
41908   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41909   __pyx_v_self->collapse_loglikelihood = __pyx_t_8;
41910 
41911   /* "statsmodels/tsa/statespace/_representation.pyx":3338
41912  *         self.t = state['t']
41913  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
41914  *         self.companion_transition = state['companion_transition']             # <<<<<<<<<<<<<<
41915  *         self.transform_determinant = state['transform_determinant']
41916  *
41917  */
41918   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_companion_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3338, __pyx_L1_error)
41919   __Pyx_GOTREF(__pyx_t_1);
41920   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3338, __pyx_L1_error)
41921   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41922   __pyx_v_self->companion_transition = __pyx_t_4;
41923 
41924   /* "statsmodels/tsa/statespace/_representation.pyx":3339
41925  *         self.collapse_loglikelihood = state['collapse_loglikelihood']
41926  *         self.companion_transition = state['companion_transition']
41927  *         self.transform_determinant = state['transform_determinant']             # <<<<<<<<<<<<<<
41928  *
41929  *     def initialize(self, init, offset=0, complex_step=False, clear=True):
41930  */
41931   __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_transform_determinant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3339, __pyx_L1_error)
41932   __Pyx_GOTREF(__pyx_t_1);
41933   __pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3339, __pyx_L1_error)
41934   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
41935   __pyx_v_self->transform_determinant = __pyx_t_8;
41936 
41937   /* "statsmodels/tsa/statespace/_representation.pyx":3312
41938  *         return (self.__class__, init, state)
41939  *
41940  *     def __setstate__(self, state):             # <<<<<<<<<<<<<<
41941  *         self.initial_state = state['initial_state']
41942  *         self.initial_state_cov = state['initial_state_cov']
41943  */
41944 
41945   /* function exit code */
41946   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
41947   goto __pyx_L0;
41948   __pyx_L1_error:;
41949   __Pyx_XDECREF(__pyx_t_1);
41950   __PYX_XDEC_MEMVIEW(&__pyx_t_2, 1);
41951   __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
41952   __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
41953   __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
41954   __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
41955   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
41956   __pyx_r = NULL;
41957   __pyx_L0:;
41958   __Pyx_XGIVEREF(__pyx_r);
41959   __Pyx_RefNannyFinishContext();
41960   return __pyx_r;
41961 }
41962 
41963 /* "statsmodels/tsa/statespace/_representation.pyx":3341
41964  *         self.transform_determinant = state['transform_determinant']
41965  *
41966  *     def initialize(self, init, offset=0, complex_step=False, clear=True):             # <<<<<<<<<<<<<<
41967  *         cdef zInitialization _init
41968  *         # Clear initial arrays
41969  */
41970 
41971 /* Python wrapper */
41972 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7initialize(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)41973 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7initialize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
41974   PyObject *__pyx_v_init = 0;
41975   PyObject *__pyx_v_offset = 0;
41976   PyObject *__pyx_v_complex_step = 0;
41977   PyObject *__pyx_v_clear = 0;
41978   int __pyx_lineno = 0;
41979   const char *__pyx_filename = NULL;
41980   int __pyx_clineno = 0;
41981   PyObject *__pyx_r = 0;
41982   __Pyx_RefNannyDeclarations
41983   __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
41984   {
41985     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init,&__pyx_n_s_offset,&__pyx_n_s_complex_step,&__pyx_n_s_clear,0};
41986     PyObject* values[4] = {0,0,0,0};
41987     values[1] = ((PyObject *)__pyx_int_0);
41988     values[2] = ((PyObject *)Py_False);
41989     values[3] = ((PyObject *)Py_True);
41990     if (unlikely(__pyx_kwds)) {
41991       Py_ssize_t kw_args;
41992       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
41993       switch (pos_args) {
41994         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
41995         CYTHON_FALLTHROUGH;
41996         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
41997         CYTHON_FALLTHROUGH;
41998         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
41999         CYTHON_FALLTHROUGH;
42000         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42001         CYTHON_FALLTHROUGH;
42002         case  0: break;
42003         default: goto __pyx_L5_argtuple_error;
42004       }
42005       kw_args = PyDict_Size(__pyx_kwds);
42006       switch (pos_args) {
42007         case  0:
42008         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_init)) != 0)) kw_args--;
42009         else goto __pyx_L5_argtuple_error;
42010         CYTHON_FALLTHROUGH;
42011         case  1:
42012         if (kw_args > 0) {
42013           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset);
42014           if (value) { values[1] = value; kw_args--; }
42015         }
42016         CYTHON_FALLTHROUGH;
42017         case  2:
42018         if (kw_args > 0) {
42019           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complex_step);
42020           if (value) { values[2] = value; kw_args--; }
42021         }
42022         CYTHON_FALLTHROUGH;
42023         case  3:
42024         if (kw_args > 0) {
42025           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_clear);
42026           if (value) { values[3] = value; kw_args--; }
42027         }
42028       }
42029       if (unlikely(kw_args > 0)) {
42030         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize") < 0)) __PYX_ERR(0, 3341, __pyx_L3_error)
42031       }
42032     } else {
42033       switch (PyTuple_GET_SIZE(__pyx_args)) {
42034         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
42035         CYTHON_FALLTHROUGH;
42036         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
42037         CYTHON_FALLTHROUGH;
42038         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42039         CYTHON_FALLTHROUGH;
42040         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42041         break;
42042         default: goto __pyx_L5_argtuple_error;
42043       }
42044     }
42045     __pyx_v_init = values[0];
42046     __pyx_v_offset = values[1];
42047     __pyx_v_complex_step = values[2];
42048     __pyx_v_clear = values[3];
42049   }
42050   goto __pyx_L4_argument_unpacking_done;
42051   __pyx_L5_argtuple_error:;
42052   __Pyx_RaiseArgtupleInvalid("initialize", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3341, __pyx_L3_error)
42053   __pyx_L3_error:;
42054   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
42055   __Pyx_RefNannyFinishContext();
42056   return NULL;
42057   __pyx_L4_argument_unpacking_done:;
42058   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6initialize(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), __pyx_v_init, __pyx_v_offset, __pyx_v_complex_step, __pyx_v_clear);
42059 
42060   /* function exit code */
42061   __Pyx_RefNannyFinishContext();
42062   return __pyx_r;
42063 }
42064 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,PyObject * __pyx_v_init,PyObject * __pyx_v_offset,PyObject * __pyx_v_complex_step,PyObject * __pyx_v_clear)42065 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6initialize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_init, PyObject *__pyx_v_offset, PyObject *__pyx_v_complex_step, PyObject *__pyx_v_clear) {
42066   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *__pyx_v__init = 0;
42067   PyObject *__pyx_v_block_index = NULL;
42068   PyObject *__pyx_v_block_init = NULL;
42069   PyObject *__pyx_r = NULL;
42070   __Pyx_RefNannyDeclarations
42071   int __pyx_t_1;
42072   PyObject *__pyx_t_2 = NULL;
42073   int __pyx_t_3;
42074   PyObject *__pyx_t_4 = NULL;
42075   PyObject *__pyx_t_5 = NULL;
42076   int __pyx_t_6;
42077   int __pyx_t_7;
42078   int __pyx_t_8;
42079   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_initialization_15zInitialization_initialize __pyx_t_9;
42080   Py_ssize_t __pyx_t_10;
42081   Py_ssize_t __pyx_t_11;
42082   PyObject *__pyx_t_12 = NULL;
42083   PyObject *__pyx_t_13 = NULL;
42084   PyObject *__pyx_t_14 = NULL;
42085   int __pyx_lineno = 0;
42086   const char *__pyx_filename = NULL;
42087   int __pyx_clineno = 0;
42088   __Pyx_RefNannySetupContext("initialize", 0);
42089 
42090   /* "statsmodels/tsa/statespace/_representation.pyx":3344
42091  *         cdef zInitialization _init
42092  *         # Clear initial arrays
42093  *         if clear:             # <<<<<<<<<<<<<<
42094  *             self.initial_state[:] = 0
42095  *             self.initial_diffuse_state_cov[:] = 0
42096  */
42097   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_clear); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3344, __pyx_L1_error)
42098   if (__pyx_t_1) {
42099 
42100     /* "statsmodels/tsa/statespace/_representation.pyx":3345
42101  *         # Clear initial arrays
42102  *         if clear:
42103  *             self.initial_state[:] = 0             # <<<<<<<<<<<<<<
42104  *             self.initial_diffuse_state_cov[:] = 0
42105  *             self.initial_state_cov[:] = 0
42106  */
42107     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3345, __pyx_L1_error)}
42108     {
42109         __pyx_t_double_complex __pyx_temp_scalar = __pyx_t_double_complex_from_parts(0, 0);
42110         {
42111             Py_ssize_t __pyx_temp_extent_0 = __pyx_v_self->initial_state.shape[0];
42112             Py_ssize_t __pyx_temp_stride_0 = __pyx_v_self->initial_state.strides[0];
42113             char *__pyx_temp_pointer_0;
42114             Py_ssize_t __pyx_temp_idx_0;
42115             __pyx_temp_pointer_0 = __pyx_v_self->initial_state.data;
42116             for (__pyx_temp_idx_0 = 0; __pyx_temp_idx_0 < __pyx_temp_extent_0; __pyx_temp_idx_0++) {
42117               *((__pyx_t_double_complex *) __pyx_temp_pointer_0) = __pyx_temp_scalar;
42118               __pyx_temp_pointer_0 += __pyx_temp_stride_0;
42119             }
42120         }
42121     }
42122 
42123     /* "statsmodels/tsa/statespace/_representation.pyx":3346
42124  *         if clear:
42125  *             self.initial_state[:] = 0
42126  *             self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
42127  *             self.initial_state_cov[:] = 0
42128  *
42129  */
42130     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3346, __pyx_L1_error)}
42131     {
42132         __pyx_t_double_complex __pyx_temp_scalar = __pyx_t_double_complex_from_parts(0, 0);
42133         {
42134             Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
42135             Py_ssize_t __pyx_temp_idx;
42136             __pyx_t_double_complex *__pyx_temp_pointer = (__pyx_t_double_complex *) __pyx_v_self->initial_diffuse_state_cov.data;
42137             for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
42138               *((__pyx_t_double_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
42139               __pyx_temp_pointer += 1;
42140             }
42141         }
42142     }
42143 
42144     /* "statsmodels/tsa/statespace/_representation.pyx":3347
42145  *             self.initial_state[:] = 0
42146  *             self.initial_diffuse_state_cov[:] = 0
42147  *             self.initial_state_cov[:] = 0             # <<<<<<<<<<<<<<
42148  *
42149  *         # If using global initialization, compute the actual elements and
42150  */
42151     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3347, __pyx_L1_error)}
42152     {
42153         __pyx_t_double_complex __pyx_temp_scalar = __pyx_t_double_complex_from_parts(0, 0);
42154         {
42155             Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_state_cov.shape[0] * __pyx_v_self->initial_state_cov.shape[1];
42156             Py_ssize_t __pyx_temp_idx;
42157             __pyx_t_double_complex *__pyx_temp_pointer = (__pyx_t_double_complex *) __pyx_v_self->initial_state_cov.data;
42158             for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
42159               *((__pyx_t_double_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
42160               __pyx_temp_pointer += 1;
42161             }
42162         }
42163     }
42164 
42165     /* "statsmodels/tsa/statespace/_representation.pyx":3344
42166  *         cdef zInitialization _init
42167  *         # Clear initial arrays
42168  *         if clear:             # <<<<<<<<<<<<<<
42169  *             self.initial_state[:] = 0
42170  *             self.initial_diffuse_state_cov[:] = 0
42171  */
42172   }
42173 
42174   /* "statsmodels/tsa/statespace/_representation.pyx":3351
42175  *         # If using global initialization, compute the actual elements and
42176  *         # return them
42177  *         self.initialized_diffuse = False             # <<<<<<<<<<<<<<
42178  *         self.initialized_stationary = False
42179  *         if init.initialization_type is not None:
42180  */
42181   __pyx_v_self->initialized_diffuse = 0;
42182 
42183   /* "statsmodels/tsa/statespace/_representation.pyx":3352
42184  *         # return them
42185  *         self.initialized_diffuse = False
42186  *         self.initialized_stationary = False             # <<<<<<<<<<<<<<
42187  *         if init.initialization_type is not None:
42188  *             init._initialize_initialization(prefix='z')
42189  */
42190   __pyx_v_self->initialized_stationary = 0;
42191 
42192   /* "statsmodels/tsa/statespace/_representation.pyx":3353
42193  *         self.initialized_diffuse = False
42194  *         self.initialized_stationary = False
42195  *         if init.initialization_type is not None:             # <<<<<<<<<<<<<<
42196  *             init._initialize_initialization(prefix='z')
42197  *             _init = init._initializations['z']
42198  */
42199   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3353, __pyx_L1_error)
42200   __Pyx_GOTREF(__pyx_t_2);
42201   __pyx_t_1 = (__pyx_t_2 != Py_None);
42202   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42203   __pyx_t_3 = (__pyx_t_1 != 0);
42204   if (__pyx_t_3) {
42205 
42206     /* "statsmodels/tsa/statespace/_representation.pyx":3354
42207  *         self.initialized_stationary = False
42208  *         if init.initialization_type is not None:
42209  *             init._initialize_initialization(prefix='z')             # <<<<<<<<<<<<<<
42210  *             _init = init._initializations['z']
42211  *             _init.initialize(init.initialization_type, offset, self,
42212  */
42213     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialize_initialization); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3354, __pyx_L1_error)
42214     __Pyx_GOTREF(__pyx_t_2);
42215     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3354, __pyx_L1_error)
42216     __Pyx_GOTREF(__pyx_t_4);
42217     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_prefix, __pyx_n_u_z) < 0) __PYX_ERR(0, 3354, __pyx_L1_error)
42218     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3354, __pyx_L1_error)
42219     __Pyx_GOTREF(__pyx_t_5);
42220     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42221     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42222     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42223 
42224     /* "statsmodels/tsa/statespace/_representation.pyx":3355
42225  *         if init.initialization_type is not None:
42226  *             init._initialize_initialization(prefix='z')
42227  *             _init = init._initializations['z']             # <<<<<<<<<<<<<<
42228  *             _init.initialize(init.initialization_type, offset, self,
42229  *                              self.initial_state,
42230  */
42231     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initializations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3355, __pyx_L1_error)
42232     __Pyx_GOTREF(__pyx_t_5);
42233     __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_u_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3355, __pyx_L1_error)
42234     __Pyx_GOTREF(__pyx_t_4);
42235     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42236     if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_zInitialization))))) __PYX_ERR(0, 3355, __pyx_L1_error)
42237     __pyx_v__init = ((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *)__pyx_t_4);
42238     __pyx_t_4 = 0;
42239 
42240     /* "statsmodels/tsa/statespace/_representation.pyx":3356
42241  *             init._initialize_initialization(prefix='z')
42242  *             _init = init._initializations['z']
42243  *             _init.initialize(init.initialization_type, offset, self,             # <<<<<<<<<<<<<<
42244  *                              self.initial_state,
42245  *                              self.initial_diffuse_state_cov,
42246  */
42247     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3356, __pyx_L1_error)
42248     __Pyx_GOTREF(__pyx_t_4);
42249     __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_offset); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3356, __pyx_L1_error)
42250 
42251     /* "statsmodels/tsa/statespace/_representation.pyx":3357
42252  *             _init = init._initializations['z']
42253  *             _init.initialize(init.initialization_type, offset, self,
42254  *                              self.initial_state,             # <<<<<<<<<<<<<<
42255  *                              self.initial_diffuse_state_cov,
42256  *                              self.initial_state_cov, complex_step)
42257  */
42258     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3357, __pyx_L1_error)}
42259 
42260     /* "statsmodels/tsa/statespace/_representation.pyx":3358
42261  *             _init.initialize(init.initialization_type, offset, self,
42262  *                              self.initial_state,
42263  *                              self.initial_diffuse_state_cov,             # <<<<<<<<<<<<<<
42264  *                              self.initial_state_cov, complex_step)
42265  *             if init.initialization_type == 'diffuse':
42266  */
42267     if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3358, __pyx_L1_error)}
42268 
42269     /* "statsmodels/tsa/statespace/_representation.pyx":3359
42270  *                              self.initial_state,
42271  *                              self.initial_diffuse_state_cov,
42272  *                              self.initial_state_cov, complex_step)             # <<<<<<<<<<<<<<
42273  *             if init.initialization_type == 'diffuse':
42274  *                 self.initialized_diffuse = True
42275  */
42276     if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3359, __pyx_L1_error)}
42277     __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_complex_step); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3359, __pyx_L1_error)
42278 
42279     /* "statsmodels/tsa/statespace/_representation.pyx":3356
42280  *             init._initialize_initialization(prefix='z')
42281  *             _init = init._initializations['z']
42282  *             _init.initialize(init.initialization_type, offset, self,             # <<<<<<<<<<<<<<
42283  *                              self.initial_state,
42284  *                              self.initial_diffuse_state_cov,
42285  */
42286     __pyx_t_9.__pyx_n = 1;
42287     __pyx_t_9.complex_step = __pyx_t_7;
42288     __pyx_t_8 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_zInitialization *)__pyx_v__init->__pyx_vtab)->initialize(__pyx_v__init, __pyx_t_4, __pyx_t_6, __pyx_v_self, __pyx_v_self->initial_state, __pyx_v_self->initial_diffuse_state_cov, __pyx_v_self->initial_state_cov, 0, &__pyx_t_9); if (unlikely(__pyx_t_8 == ((int)1))) __PYX_ERR(0, 3356, __pyx_L1_error)
42289     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42290 
42291     /* "statsmodels/tsa/statespace/_representation.pyx":3360
42292  *                              self.initial_diffuse_state_cov,
42293  *                              self.initial_state_cov, complex_step)
42294  *             if init.initialization_type == 'diffuse':             # <<<<<<<<<<<<<<
42295  *                 self.initialized_diffuse = True
42296  *             if init.initialization_type == 'stationary':
42297  */
42298     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3360, __pyx_L1_error)
42299     __Pyx_GOTREF(__pyx_t_4);
42300     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_diffuse, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3360, __pyx_L1_error)
42301     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42302     if (__pyx_t_3) {
42303 
42304       /* "statsmodels/tsa/statespace/_representation.pyx":3361
42305  *                              self.initial_state_cov, complex_step)
42306  *             if init.initialization_type == 'diffuse':
42307  *                 self.initialized_diffuse = True             # <<<<<<<<<<<<<<
42308  *             if init.initialization_type == 'stationary':
42309  *                 self.initialized_stationary = True
42310  */
42311       __pyx_v_self->initialized_diffuse = 1;
42312 
42313       /* "statsmodels/tsa/statespace/_representation.pyx":3360
42314  *                              self.initial_diffuse_state_cov,
42315  *                              self.initial_state_cov, complex_step)
42316  *             if init.initialization_type == 'diffuse':             # <<<<<<<<<<<<<<
42317  *                 self.initialized_diffuse = True
42318  *             if init.initialization_type == 'stationary':
42319  */
42320     }
42321 
42322     /* "statsmodels/tsa/statespace/_representation.pyx":3362
42323  *             if init.initialization_type == 'diffuse':
42324  *                 self.initialized_diffuse = True
42325  *             if init.initialization_type == 'stationary':             # <<<<<<<<<<<<<<
42326  *                 self.initialized_stationary = True
42327  *         # Otherwise, if using blocks, initialize each of the blocks
42328  */
42329     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_initialization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3362, __pyx_L1_error)
42330     __Pyx_GOTREF(__pyx_t_4);
42331     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_n_u_stationary, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3362, __pyx_L1_error)
42332     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42333     if (__pyx_t_3) {
42334 
42335       /* "statsmodels/tsa/statespace/_representation.pyx":3363
42336  *                 self.initialized_diffuse = True
42337  *             if init.initialization_type == 'stationary':
42338  *                 self.initialized_stationary = True             # <<<<<<<<<<<<<<
42339  *         # Otherwise, if using blocks, initialize each of the blocks
42340  *         else:
42341  */
42342       __pyx_v_self->initialized_stationary = 1;
42343 
42344       /* "statsmodels/tsa/statespace/_representation.pyx":3362
42345  *             if init.initialization_type == 'diffuse':
42346  *                 self.initialized_diffuse = True
42347  *             if init.initialization_type == 'stationary':             # <<<<<<<<<<<<<<
42348  *                 self.initialized_stationary = True
42349  *         # Otherwise, if using blocks, initialize each of the blocks
42350  */
42351     }
42352 
42353     /* "statsmodels/tsa/statespace/_representation.pyx":3353
42354  *         self.initialized_diffuse = False
42355  *         self.initialized_stationary = False
42356  *         if init.initialization_type is not None:             # <<<<<<<<<<<<<<
42357  *             init._initialize_initialization(prefix='z')
42358  *             _init = init._initializations['z']
42359  */
42360     goto __pyx_L4;
42361   }
42362 
42363   /* "statsmodels/tsa/statespace/_representation.pyx":3366
42364  *         # Otherwise, if using blocks, initialize each of the blocks
42365  *         else:
42366  *             for block_index, block_init in init.blocks.items():             # <<<<<<<<<<<<<<
42367  *                 self.initialize(block_init, offset=offset + block_index[0],
42368  *                                 complex_step=complex_step, clear=False)
42369  */
42370   /*else*/ {
42371     __pyx_t_10 = 0;
42372     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_init, __pyx_n_s_blocks); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3366, __pyx_L1_error)
42373     __Pyx_GOTREF(__pyx_t_5);
42374     if (unlikely(__pyx_t_5 == Py_None)) {
42375       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
42376       __PYX_ERR(0, 3366, __pyx_L1_error)
42377     }
42378     __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_items, (&__pyx_t_11), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3366, __pyx_L1_error)
42379     __Pyx_GOTREF(__pyx_t_2);
42380     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42381     __Pyx_XDECREF(__pyx_t_4);
42382     __pyx_t_4 = __pyx_t_2;
42383     __pyx_t_2 = 0;
42384     while (1) {
42385       __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_11, &__pyx_t_10, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_8);
42386       if (unlikely(__pyx_t_7 == 0)) break;
42387       if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3366, __pyx_L1_error)
42388       __Pyx_GOTREF(__pyx_t_2);
42389       __Pyx_GOTREF(__pyx_t_5);
42390       __Pyx_XDECREF_SET(__pyx_v_block_index, __pyx_t_2);
42391       __pyx_t_2 = 0;
42392       __Pyx_XDECREF_SET(__pyx_v_block_init, __pyx_t_5);
42393       __pyx_t_5 = 0;
42394 
42395       /* "statsmodels/tsa/statespace/_representation.pyx":3367
42396  *         else:
42397  *             for block_index, block_init in init.blocks.items():
42398  *                 self.initialize(block_init, offset=offset + block_index[0],             # <<<<<<<<<<<<<<
42399  *                                 complex_step=complex_step, clear=False)
42400  *
42401  */
42402       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_initialize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3367, __pyx_L1_error)
42403       __Pyx_GOTREF(__pyx_t_5);
42404       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3367, __pyx_L1_error)
42405       __Pyx_GOTREF(__pyx_t_2);
42406       __Pyx_INCREF(__pyx_v_block_init);
42407       __Pyx_GIVEREF(__pyx_v_block_init);
42408       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_block_init);
42409       __pyx_t_12 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3367, __pyx_L1_error)
42410       __Pyx_GOTREF(__pyx_t_12);
42411       __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_block_index, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3367, __pyx_L1_error)
42412       __Pyx_GOTREF(__pyx_t_13);
42413       __pyx_t_14 = PyNumber_Add(__pyx_v_offset, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3367, __pyx_L1_error)
42414       __Pyx_GOTREF(__pyx_t_14);
42415       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
42416       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_offset, __pyx_t_14) < 0) __PYX_ERR(0, 3367, __pyx_L1_error)
42417       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
42418 
42419       /* "statsmodels/tsa/statespace/_representation.pyx":3368
42420  *             for block_index, block_init in init.blocks.items():
42421  *                 self.initialize(block_init, offset=offset + block_index[0],
42422  *                                 complex_step=complex_step, clear=False)             # <<<<<<<<<<<<<<
42423  *
42424  *         if not self.initialized:
42425  */
42426       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_complex_step, __pyx_v_complex_step) < 0) __PYX_ERR(0, 3367, __pyx_L1_error)
42427       if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_clear, Py_False) < 0) __PYX_ERR(0, 3367, __pyx_L1_error)
42428 
42429       /* "statsmodels/tsa/statespace/_representation.pyx":3367
42430  *         else:
42431  *             for block_index, block_init in init.blocks.items():
42432  *                 self.initialize(block_init, offset=offset + block_index[0],             # <<<<<<<<<<<<<<
42433  *                                 complex_step=complex_step, clear=False)
42434  *
42435  */
42436       __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3367, __pyx_L1_error)
42437       __Pyx_GOTREF(__pyx_t_14);
42438       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42439       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42440       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
42441       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
42442     }
42443     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42444   }
42445   __pyx_L4:;
42446 
42447   /* "statsmodels/tsa/statespace/_representation.pyx":3370
42448  *                                 complex_step=complex_step, clear=False)
42449  *
42450  *         if not self.initialized:             # <<<<<<<<<<<<<<
42451  *             self.initialized = True
42452  *
42453  */
42454   __pyx_t_3 = ((!(__pyx_v_self->initialized != 0)) != 0);
42455   if (__pyx_t_3) {
42456 
42457     /* "statsmodels/tsa/statespace/_representation.pyx":3371
42458  *
42459  *         if not self.initialized:
42460  *             self.initialized = True             # <<<<<<<<<<<<<<
42461  *
42462  *     # ## Initialize: known values
42463  */
42464     __pyx_v_self->initialized = 1;
42465 
42466     /* "statsmodels/tsa/statespace/_representation.pyx":3370
42467  *                                 complex_step=complex_step, clear=False)
42468  *
42469  *         if not self.initialized:             # <<<<<<<<<<<<<<
42470  *             self.initialized = True
42471  *
42472  */
42473   }
42474 
42475   /* "statsmodels/tsa/statespace/_representation.pyx":3341
42476  *         self.transform_determinant = state['transform_determinant']
42477  *
42478  *     def initialize(self, init, offset=0, complex_step=False, clear=True):             # <<<<<<<<<<<<<<
42479  *         cdef zInitialization _init
42480  *         # Clear initial arrays
42481  */
42482 
42483   /* function exit code */
42484   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42485   goto __pyx_L0;
42486   __pyx_L1_error:;
42487   __Pyx_XDECREF(__pyx_t_2);
42488   __Pyx_XDECREF(__pyx_t_4);
42489   __Pyx_XDECREF(__pyx_t_5);
42490   __Pyx_XDECREF(__pyx_t_12);
42491   __Pyx_XDECREF(__pyx_t_13);
42492   __Pyx_XDECREF(__pyx_t_14);
42493   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
42494   __pyx_r = NULL;
42495   __pyx_L0:;
42496   __Pyx_XDECREF((PyObject *)__pyx_v__init);
42497   __Pyx_XDECREF(__pyx_v_block_index);
42498   __Pyx_XDECREF(__pyx_v_block_init);
42499   __Pyx_XGIVEREF(__pyx_r);
42500   __Pyx_RefNannyFinishContext();
42501   return __pyx_r;
42502 }
42503 
42504 /* "statsmodels/tsa/statespace/_representation.pyx":3378
42505  *     # certainty or else as filled with parameters from a maximum likelihood
42506  *     # estimation run.
42507  *     def initialize_known(self, np.complex128_t [:] initial_state, np.complex128_t [::1,:] initial_state_cov):             # <<<<<<<<<<<<<<
42508  *         """
42509  *         initialize_known(initial_state, initial_state_cov)
42510  */
42511 
42512 /* Python wrapper */
42513 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9initialize_known(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
42514 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8initialize_known[] = "\n        initialize_known(initial_state, initial_state_cov)\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9initialize_known(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)42515 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9initialize_known(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
42516   __Pyx_memviewslice __pyx_v_initial_state = { 0, 0, { 0 }, { 0 }, { 0 } };
42517   __Pyx_memviewslice __pyx_v_initial_state_cov = { 0, 0, { 0 }, { 0 }, { 0 } };
42518   int __pyx_lineno = 0;
42519   const char *__pyx_filename = NULL;
42520   int __pyx_clineno = 0;
42521   PyObject *__pyx_r = 0;
42522   __Pyx_RefNannyDeclarations
42523   __Pyx_RefNannySetupContext("initialize_known (wrapper)", 0);
42524   {
42525     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_initial_state,&__pyx_n_s_initial_state_cov,0};
42526     PyObject* values[2] = {0,0};
42527     if (unlikely(__pyx_kwds)) {
42528       Py_ssize_t kw_args;
42529       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
42530       switch (pos_args) {
42531         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42532         CYTHON_FALLTHROUGH;
42533         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42534         CYTHON_FALLTHROUGH;
42535         case  0: break;
42536         default: goto __pyx_L5_argtuple_error;
42537       }
42538       kw_args = PyDict_Size(__pyx_kwds);
42539       switch (pos_args) {
42540         case  0:
42541         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial_state)) != 0)) kw_args--;
42542         else goto __pyx_L5_argtuple_error;
42543         CYTHON_FALLTHROUGH;
42544         case  1:
42545         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_initial_state_cov)) != 0)) kw_args--;
42546         else {
42547           __Pyx_RaiseArgtupleInvalid("initialize_known", 1, 2, 2, 1); __PYX_ERR(0, 3378, __pyx_L3_error)
42548         }
42549       }
42550       if (unlikely(kw_args > 0)) {
42551         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_known") < 0)) __PYX_ERR(0, 3378, __pyx_L3_error)
42552       }
42553     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
42554       goto __pyx_L5_argtuple_error;
42555     } else {
42556       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42557       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42558     }
42559     __pyx_v_initial_state = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_initial_state.memview)) __PYX_ERR(0, 3378, __pyx_L3_error)
42560     __pyx_v_initial_state_cov = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_initial_state_cov.memview)) __PYX_ERR(0, 3378, __pyx_L3_error)
42561   }
42562   goto __pyx_L4_argument_unpacking_done;
42563   __pyx_L5_argtuple_error:;
42564   __Pyx_RaiseArgtupleInvalid("initialize_known", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3378, __pyx_L3_error)
42565   __pyx_L3_error:;
42566   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialize_known", __pyx_clineno, __pyx_lineno, __pyx_filename);
42567   __Pyx_RefNannyFinishContext();
42568   return NULL;
42569   __pyx_L4_argument_unpacking_done:;
42570   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8initialize_known(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), __pyx_v_initial_state, __pyx_v_initial_state_cov);
42571 
42572   /* function exit code */
42573   __Pyx_RefNannyFinishContext();
42574   return __pyx_r;
42575 }
42576 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,__Pyx_memviewslice __pyx_v_initial_state,__Pyx_memviewslice __pyx_v_initial_state_cov)42577 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8initialize_known(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, __Pyx_memviewslice __pyx_v_initial_state, __Pyx_memviewslice __pyx_v_initial_state_cov) {
42578   PyObject *__pyx_r = NULL;
42579   __Pyx_RefNannyDeclarations
42580   PyObject *__pyx_t_1 = NULL;
42581   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape __pyx_t_2;
42582   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape __pyx_t_3;
42583   int __pyx_lineno = 0;
42584   const char *__pyx_filename = NULL;
42585   int __pyx_clineno = 0;
42586   __Pyx_RefNannySetupContext("initialize_known", 0);
42587 
42588   /* "statsmodels/tsa/statespace/_representation.pyx":3382
42589  *         initialize_known(initial_state, initial_state_cov)
42590  *         """
42591  *         tools.validate_vector_shape('initial state', &initial_state.shape[0], self.k_states, None)             # <<<<<<<<<<<<<<
42592  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)
42593  *
42594  */
42595   __pyx_t_2.__pyx_n = 1;
42596   __pyx_t_2.nobs = Py_None;
42597   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape(__pyx_kp_u_initial_state_2, (&(__pyx_v_initial_state.shape[0])), __pyx_v_self->k_states, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3382, __pyx_L1_error)
42598   __Pyx_GOTREF(__pyx_t_1);
42599   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42600 
42601   /* "statsmodels/tsa/statespace/_representation.pyx":3383
42602  *         """
42603  *         tools.validate_vector_shape('initial state', &initial_state.shape[0], self.k_states, None)
42604  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)             # <<<<<<<<<<<<<<
42605  *
42606  *         self.initial_state = initial_state
42607  */
42608   __pyx_t_3.__pyx_n = 1;
42609   __pyx_t_3.nobs = Py_None;
42610   __pyx_t_1 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape(__pyx_kp_u_initial_state_covariance, (&(__pyx_v_initial_state_cov.shape[0])), __pyx_v_self->k_states, __pyx_v_self->k_states, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3383, __pyx_L1_error)
42611   __Pyx_GOTREF(__pyx_t_1);
42612   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42613 
42614   /* "statsmodels/tsa/statespace/_representation.pyx":3385
42615  *         tools.validate_matrix_shape('initial state covariance', &initial_state_cov.shape[0], self.k_states, self.k_states, None)
42616  *
42617  *         self.initial_state = initial_state             # <<<<<<<<<<<<<<
42618  *         self.initial_state_cov = initial_state_cov
42619  *         self.initial_diffuse_state_cov[:] = 0
42620  */
42621   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
42622   __PYX_INC_MEMVIEW(&__pyx_v_initial_state, 0);
42623   __pyx_v_self->initial_state = __pyx_v_initial_state;
42624 
42625   /* "statsmodels/tsa/statespace/_representation.pyx":3386
42626  *
42627  *         self.initial_state = initial_state
42628  *         self.initial_state_cov = initial_state_cov             # <<<<<<<<<<<<<<
42629  *         self.initial_diffuse_state_cov[:] = 0
42630  *
42631  */
42632   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
42633   __PYX_INC_MEMVIEW(&__pyx_v_initial_state_cov, 0);
42634   __pyx_v_self->initial_state_cov = __pyx_v_initial_state_cov;
42635 
42636   /* "statsmodels/tsa/statespace/_representation.pyx":3387
42637  *         self.initial_state = initial_state
42638  *         self.initial_state_cov = initial_state_cov
42639  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
42640  *
42641  *         self.initialized = True
42642  */
42643   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3387, __pyx_L1_error)}
42644   {
42645       __pyx_t_double_complex __pyx_temp_scalar = __pyx_t_double_complex_from_parts(0, 0);
42646       {
42647           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
42648           Py_ssize_t __pyx_temp_idx;
42649           __pyx_t_double_complex *__pyx_temp_pointer = (__pyx_t_double_complex *) __pyx_v_self->initial_diffuse_state_cov.data;
42650           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
42651             *((__pyx_t_double_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
42652             __pyx_temp_pointer += 1;
42653           }
42654       }
42655   }
42656 
42657   /* "statsmodels/tsa/statespace/_representation.pyx":3389
42658  *         self.initial_diffuse_state_cov[:] = 0
42659  *
42660  *         self.initialized = True             # <<<<<<<<<<<<<<
42661  *
42662  *     # ## Initialize: approximate diffuse priors
42663  */
42664   __pyx_v_self->initialized = 1;
42665 
42666   /* "statsmodels/tsa/statespace/_representation.pyx":3378
42667  *     # certainty or else as filled with parameters from a maximum likelihood
42668  *     # estimation run.
42669  *     def initialize_known(self, np.complex128_t [:] initial_state, np.complex128_t [::1,:] initial_state_cov):             # <<<<<<<<<<<<<<
42670  *         """
42671  *         initialize_known(initial_state, initial_state_cov)
42672  */
42673 
42674   /* function exit code */
42675   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42676   goto __pyx_L0;
42677   __pyx_L1_error:;
42678   __Pyx_XDECREF(__pyx_t_1);
42679   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialize_known", __pyx_clineno, __pyx_lineno, __pyx_filename);
42680   __pyx_r = NULL;
42681   __pyx_L0:;
42682   __PYX_XDEC_MEMVIEW(&__pyx_v_initial_state, 1);
42683   __PYX_XDEC_MEMVIEW(&__pyx_v_initial_state_cov, 1);
42684   __Pyx_XGIVEREF(__pyx_r);
42685   __Pyx_RefNannyFinishContext();
42686   return __pyx_r;
42687 }
42688 
42689 /* "statsmodels/tsa/statespace/_representation.pyx":3398
42690  *     #
42691  *     # *Note:* see Durbin and Koopman section 5.6.1
42692  *     def initialize_approximate_diffuse(self, np.complex128_t variance=1e2):             # <<<<<<<<<<<<<<
42693  *         """
42694  *         initialize_approximate_diffuse(variance=1e2)
42695  */
42696 
42697 /* Python wrapper */
42698 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialize_approximate_diffuse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
42699 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10initialize_approximate_diffuse[] = "\n        initialize_approximate_diffuse(variance=1e2)\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialize_approximate_diffuse(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)42700 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialize_approximate_diffuse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
42701   __pyx_t_double_complex __pyx_v_variance;
42702   int __pyx_lineno = 0;
42703   const char *__pyx_filename = NULL;
42704   int __pyx_clineno = 0;
42705   PyObject *__pyx_r = 0;
42706   __Pyx_RefNannyDeclarations
42707   __Pyx_RefNannySetupContext("initialize_approximate_diffuse (wrapper)", 0);
42708   {
42709     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_variance,0};
42710     PyObject* values[1] = {0};
42711     if (unlikely(__pyx_kwds)) {
42712       Py_ssize_t kw_args;
42713       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
42714       switch (pos_args) {
42715         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42716         CYTHON_FALLTHROUGH;
42717         case  0: break;
42718         default: goto __pyx_L5_argtuple_error;
42719       }
42720       kw_args = PyDict_Size(__pyx_kwds);
42721       switch (pos_args) {
42722         case  0:
42723         if (kw_args > 0) {
42724           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_variance);
42725           if (value) { values[0] = value; kw_args--; }
42726         }
42727       }
42728       if (unlikely(kw_args > 0)) {
42729         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_approximate_diffuse") < 0)) __PYX_ERR(0, 3398, __pyx_L3_error)
42730       }
42731     } else {
42732       switch (PyTuple_GET_SIZE(__pyx_args)) {
42733         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42734         CYTHON_FALLTHROUGH;
42735         case  0: break;
42736         default: goto __pyx_L5_argtuple_error;
42737       }
42738     }
42739     if (values[0]) {
42740       __pyx_v_variance = __Pyx_PyComplex_As___pyx_t_double_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3398, __pyx_L3_error)
42741     } else {
42742       __pyx_v_variance = __pyx_k__6;
42743     }
42744   }
42745   goto __pyx_L4_argument_unpacking_done;
42746   __pyx_L5_argtuple_error:;
42747   __Pyx_RaiseArgtupleInvalid("initialize_approximate_diffuse", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3398, __pyx_L3_error)
42748   __pyx_L3_error:;
42749   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialize_approximate_diffuse", __pyx_clineno, __pyx_lineno, __pyx_filename);
42750   __Pyx_RefNannyFinishContext();
42751   return NULL;
42752   __pyx_L4_argument_unpacking_done:;
42753   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10initialize_approximate_diffuse(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), __pyx_v_variance);
42754 
42755   /* function exit code */
42756   __Pyx_RefNannyFinishContext();
42757   return __pyx_r;
42758 }
42759 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,__pyx_t_double_complex __pyx_v_variance)42760 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10initialize_approximate_diffuse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, __pyx_t_double_complex __pyx_v_variance) {
42761   npy_intp __pyx_v_dim[1];
42762   PyObject *__pyx_r = NULL;
42763   __Pyx_RefNannyDeclarations
42764   int __pyx_t_1;
42765   PyObject *__pyx_t_2 = NULL;
42766   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
42767   PyObject *__pyx_t_4 = NULL;
42768   PyObject *__pyx_t_5 = NULL;
42769   PyObject *__pyx_t_6 = NULL;
42770   __Pyx_memviewslice __pyx_t_7 = { 0, 0, { 0 }, { 0 }, { 0 } };
42771   int __pyx_lineno = 0;
42772   const char *__pyx_filename = NULL;
42773   int __pyx_clineno = 0;
42774   __Pyx_RefNannySetupContext("initialize_approximate_diffuse", 0);
42775 
42776   /* "statsmodels/tsa/statespace/_representation.pyx":3403
42777  *         """
42778  *         cdef np.npy_intp dim[1]
42779  *         dim[0] = self.k_states             # <<<<<<<<<<<<<<
42780  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_COMPLEX128, FORTRAN)
42781  *         self.initial_state_cov = np.eye(self.k_states, dtype=complex).T * variance
42782  */
42783   __pyx_t_1 = __pyx_v_self->k_states;
42784   (__pyx_v_dim[0]) = __pyx_t_1;
42785 
42786   /* "statsmodels/tsa/statespace/_representation.pyx":3404
42787  *         cdef np.npy_intp dim[1]
42788  *         dim[0] = self.k_states
42789  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
42790  *         self.initial_state_cov = np.eye(self.k_states, dtype=complex).T * variance
42791  *         self.initial_diffuse_state_cov[:] = 0
42792  */
42793   __pyx_t_2 = PyArray_ZEROS(1, __pyx_v_dim, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3404, __pyx_L1_error)
42794   __Pyx_GOTREF(__pyx_t_2);
42795   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 3404, __pyx_L1_error)
42796   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42797   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
42798   __pyx_v_self->initial_state = __pyx_t_3;
42799   __pyx_t_3.memview = NULL;
42800   __pyx_t_3.data = NULL;
42801 
42802   /* "statsmodels/tsa/statespace/_representation.pyx":3405
42803  *         dim[0] = self.k_states
42804  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_COMPLEX128, FORTRAN)
42805  *         self.initial_state_cov = np.eye(self.k_states, dtype=complex).T * variance             # <<<<<<<<<<<<<<
42806  *         self.initial_diffuse_state_cov[:] = 0
42807  *
42808  */
42809   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3405, __pyx_L1_error)
42810   __Pyx_GOTREF(__pyx_t_2);
42811   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_eye); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3405, __pyx_L1_error)
42812   __Pyx_GOTREF(__pyx_t_4);
42813   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42814   __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->k_states); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3405, __pyx_L1_error)
42815   __Pyx_GOTREF(__pyx_t_2);
42816   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3405, __pyx_L1_error)
42817   __Pyx_GOTREF(__pyx_t_5);
42818   __Pyx_GIVEREF(__pyx_t_2);
42819   PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
42820   __pyx_t_2 = 0;
42821   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3405, __pyx_L1_error)
42822   __Pyx_GOTREF(__pyx_t_2);
42823   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyComplex_Type))) < 0) __PYX_ERR(0, 3405, __pyx_L1_error)
42824   __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3405, __pyx_L1_error)
42825   __Pyx_GOTREF(__pyx_t_6);
42826   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42827   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42828   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42829   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3405, __pyx_L1_error)
42830   __Pyx_GOTREF(__pyx_t_2);
42831   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42832   __pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_v_variance); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3405, __pyx_L1_error)
42833   __Pyx_GOTREF(__pyx_t_6);
42834   __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3405, __pyx_L1_error)
42835   __Pyx_GOTREF(__pyx_t_5);
42836   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42837   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42838   __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 3405, __pyx_L1_error)
42839   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42840   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
42841   __pyx_v_self->initial_state_cov = __pyx_t_7;
42842   __pyx_t_7.memview = NULL;
42843   __pyx_t_7.data = NULL;
42844 
42845   /* "statsmodels/tsa/statespace/_representation.pyx":3406
42846  *         self.initial_state = np.PyArray_ZEROS(1, dim, np.NPY_COMPLEX128, FORTRAN)
42847  *         self.initial_state_cov = np.eye(self.k_states, dtype=complex).T * variance
42848  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
42849  *
42850  *         self.initialized = True
42851  */
42852   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3406, __pyx_L1_error)}
42853   {
42854       __pyx_t_double_complex __pyx_temp_scalar = __pyx_t_double_complex_from_parts(0, 0);
42855       {
42856           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
42857           Py_ssize_t __pyx_temp_idx;
42858           __pyx_t_double_complex *__pyx_temp_pointer = (__pyx_t_double_complex *) __pyx_v_self->initial_diffuse_state_cov.data;
42859           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
42860             *((__pyx_t_double_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
42861             __pyx_temp_pointer += 1;
42862           }
42863       }
42864   }
42865 
42866   /* "statsmodels/tsa/statespace/_representation.pyx":3408
42867  *         self.initial_diffuse_state_cov[:] = 0
42868  *
42869  *         self.initialized = True             # <<<<<<<<<<<<<<
42870  *
42871  *     # ## Initialize: stationary process
42872  */
42873   __pyx_v_self->initialized = 1;
42874 
42875   /* "statsmodels/tsa/statespace/_representation.pyx":3398
42876  *     #
42877  *     # *Note:* see Durbin and Koopman section 5.6.1
42878  *     def initialize_approximate_diffuse(self, np.complex128_t variance=1e2):             # <<<<<<<<<<<<<<
42879  *         """
42880  *         initialize_approximate_diffuse(variance=1e2)
42881  */
42882 
42883   /* function exit code */
42884   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42885   goto __pyx_L0;
42886   __pyx_L1_error:;
42887   __Pyx_XDECREF(__pyx_t_2);
42888   __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
42889   __Pyx_XDECREF(__pyx_t_4);
42890   __Pyx_XDECREF(__pyx_t_5);
42891   __Pyx_XDECREF(__pyx_t_6);
42892   __PYX_XDEC_MEMVIEW(&__pyx_t_7, 1);
42893   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialize_approximate_diffuse", __pyx_clineno, __pyx_lineno, __pyx_filename);
42894   __pyx_r = NULL;
42895   __pyx_L0:;
42896   __Pyx_XGIVEREF(__pyx_r);
42897   __Pyx_RefNannyFinishContext();
42898   return __pyx_r;
42899 }
42900 
42901 /* "statsmodels/tsa/statespace/_representation.pyx":3412
42902  *     # ## Initialize: stationary process
42903  *     # *Note:* see Durbin and Koopman section 5.6.2
42904  *     def initialize_stationary(self, complex_step=False):             # <<<<<<<<<<<<<<
42905  *         """
42906  *         initialize_stationary()
42907  */
42908 
42909 /* Python wrapper */
42910 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initialize_stationary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
42911 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12initialize_stationary[] = "\n        initialize_stationary()\n        ";
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initialize_stationary(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)42912 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initialize_stationary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
42913   PyObject *__pyx_v_complex_step = 0;
42914   int __pyx_lineno = 0;
42915   const char *__pyx_filename = NULL;
42916   int __pyx_clineno = 0;
42917   PyObject *__pyx_r = 0;
42918   __Pyx_RefNannyDeclarations
42919   __Pyx_RefNannySetupContext("initialize_stationary (wrapper)", 0);
42920   {
42921     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_complex_step,0};
42922     PyObject* values[1] = {0};
42923     values[0] = ((PyObject *)Py_False);
42924     if (unlikely(__pyx_kwds)) {
42925       Py_ssize_t kw_args;
42926       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
42927       switch (pos_args) {
42928         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42929         CYTHON_FALLTHROUGH;
42930         case  0: break;
42931         default: goto __pyx_L5_argtuple_error;
42932       }
42933       kw_args = PyDict_Size(__pyx_kwds);
42934       switch (pos_args) {
42935         case  0:
42936         if (kw_args > 0) {
42937           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complex_step);
42938           if (value) { values[0] = value; kw_args--; }
42939         }
42940       }
42941       if (unlikely(kw_args > 0)) {
42942         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "initialize_stationary") < 0)) __PYX_ERR(0, 3412, __pyx_L3_error)
42943       }
42944     } else {
42945       switch (PyTuple_GET_SIZE(__pyx_args)) {
42946         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42947         CYTHON_FALLTHROUGH;
42948         case  0: break;
42949         default: goto __pyx_L5_argtuple_error;
42950       }
42951     }
42952     __pyx_v_complex_step = values[0];
42953   }
42954   goto __pyx_L4_argument_unpacking_done;
42955   __pyx_L5_argtuple_error:;
42956   __Pyx_RaiseArgtupleInvalid("initialize_stationary", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3412, __pyx_L3_error)
42957   __pyx_L3_error:;
42958   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialize_stationary", __pyx_clineno, __pyx_lineno, __pyx_filename);
42959   __Pyx_RefNannyFinishContext();
42960   return NULL;
42961   __pyx_L4_argument_unpacking_done:;
42962   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12initialize_stationary(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), __pyx_v_complex_step);
42963 
42964   /* function exit code */
42965   __Pyx_RefNannyFinishContext();
42966   return __pyx_r;
42967 }
42968 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,PyObject * __pyx_v_complex_step)42969 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12initialize_stationary(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_complex_step) {
42970   npy_intp __pyx_v_dim1[1];
42971   npy_intp __pyx_v_dim2[2];
42972   int __pyx_v_i;
42973   int __pyx_v_info;
42974   int __pyx_v_inc;
42975   int __pyx_v_k_states2;
42976   __pyx_t_5numpy_float64_t __pyx_v_asum;
42977   __pyx_t_5numpy_float64_t __pyx_v_tol;
42978   __pyx_t_double_complex __pyx_v_scalar;
42979   __Pyx_memviewslice __pyx_v_ipiv = { 0, 0, { 0 }, { 0 }, { 0 } };
42980   PyObject *__pyx_r = NULL;
42981   __Pyx_RefNannyDeclarations
42982   Py_ssize_t __pyx_t_1;
42983   Py_ssize_t __pyx_t_2;
42984   Py_ssize_t __pyx_t_3;
42985   Py_ssize_t __pyx_t_4;
42986   Py_ssize_t __pyx_t_5;
42987   Py_ssize_t __pyx_t_6;
42988   Py_ssize_t __pyx_t_7;
42989   Py_ssize_t __pyx_t_8;
42990   Py_ssize_t __pyx_t_9;
42991   Py_ssize_t __pyx_t_10;
42992   Py_ssize_t __pyx_t_11;
42993   int __pyx_t_12;
42994   PyObject *__pyx_t_13 = NULL;
42995   __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } };
42996   int __pyx_t_15;
42997   __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
42998   int __pyx_t_17;
42999   int __pyx_t_18;
43000   __Pyx_memviewslice __pyx_t_19 = { 0, 0, { 0 }, { 0 }, { 0 } };
43001   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__zsolve_discrete_lyapunov __pyx_t_20;
43002   int __pyx_lineno = 0;
43003   const char *__pyx_filename = NULL;
43004   int __pyx_clineno = 0;
43005   __Pyx_RefNannySetupContext("initialize_stationary", 0);
43006 
43007   /* "statsmodels/tsa/statespace/_representation.pyx":3418
43008  *         cdef np.npy_intp dim1[1]
43009  *         cdef np.npy_intp dim2[2]
43010  *         cdef int i, info, inc = 1             # <<<<<<<<<<<<<<
43011  *         cdef int k_states2 = self.k_states**2
43012  *         cdef np.float64_t asum, tol = 1e-9
43013  */
43014   __pyx_v_inc = 1;
43015 
43016   /* "statsmodels/tsa/statespace/_representation.pyx":3419
43017  *         cdef np.npy_intp dim2[2]
43018  *         cdef int i, info, inc = 1
43019  *         cdef int k_states2 = self.k_states**2             # <<<<<<<<<<<<<<
43020  *         cdef np.float64_t asum, tol = 1e-9
43021  *         cdef np.complex128_t scalar
43022  */
43023   __pyx_v_k_states2 = __Pyx_pow_long(((long)__pyx_v_self->k_states), 2);
43024 
43025   /* "statsmodels/tsa/statespace/_representation.pyx":3420
43026  *         cdef int i, info, inc = 1
43027  *         cdef int k_states2 = self.k_states**2
43028  *         cdef np.float64_t asum, tol = 1e-9             # <<<<<<<<<<<<<<
43029  *         cdef np.complex128_t scalar
43030  *         cdef int [::1,:] ipiv
43031  */
43032   __pyx_v_tol = 1e-9;
43033 
43034   /* "statsmodels/tsa/statespace/_representation.pyx":3426
43035  *         # Create selected state covariance matrix
43036  *         zselect_cov(self.k_states, self.k_posdef,
43037  *                                    &self.tmp[0,0],             # <<<<<<<<<<<<<<
43038  *                                    &self.selection[0,0,0],
43039  *                                    &self.state_cov[0,0,0],
43040  */
43041   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3426, __pyx_L1_error)}
43042   __pyx_t_1 = 0;
43043   __pyx_t_2 = 0;
43044 
43045   /* "statsmodels/tsa/statespace/_representation.pyx":3427
43046  *         zselect_cov(self.k_states, self.k_posdef,
43047  *                                    &self.tmp[0,0],
43048  *                                    &self.selection[0,0,0],             # <<<<<<<<<<<<<<
43049  *                                    &self.state_cov[0,0,0],
43050  *                                    &self.selected_state_cov[0,0,0])
43051  */
43052   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3427, __pyx_L1_error)}
43053   __pyx_t_3 = 0;
43054   __pyx_t_4 = 0;
43055   __pyx_t_5 = 0;
43056 
43057   /* "statsmodels/tsa/statespace/_representation.pyx":3428
43058  *                                    &self.tmp[0,0],
43059  *                                    &self.selection[0,0,0],
43060  *                                    &self.state_cov[0,0,0],             # <<<<<<<<<<<<<<
43061  *                                    &self.selected_state_cov[0,0,0])
43062  *
43063  */
43064   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3428, __pyx_L1_error)}
43065   __pyx_t_6 = 0;
43066   __pyx_t_7 = 0;
43067   __pyx_t_8 = 0;
43068 
43069   /* "statsmodels/tsa/statespace/_representation.pyx":3429
43070  *                                    &self.selection[0,0,0],
43071  *                                    &self.state_cov[0,0,0],
43072  *                                    &self.selected_state_cov[0,0,0])             # <<<<<<<<<<<<<<
43073  *
43074  *         # Initial state mean
43075  */
43076   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3429, __pyx_L1_error)}
43077   __pyx_t_9 = 0;
43078   __pyx_t_10 = 0;
43079   __pyx_t_11 = 0;
43080 
43081   /* "statsmodels/tsa/statespace/_representation.pyx":3425
43082  *
43083  *         # Create selected state covariance matrix
43084  *         zselect_cov(self.k_states, self.k_posdef,             # <<<<<<<<<<<<<<
43085  *                                    &self.tmp[0,0],
43086  *                                    &self.selection[0,0,0],
43087  */
43088   (void)(__pyx_f_11statsmodels_3tsa_10statespace_15_representation_zselect_cov(__pyx_v_self->k_states, __pyx_v_self->k_posdef, (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_1)) ) + __pyx_t_2 * __pyx_v_self->tmp.strides[1]) )))), (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->selection.data) + __pyx_t_3)) ) + __pyx_t_4 * __pyx_v_self->selection.strides[1]) ) + __pyx_t_5 * __pyx_v_self->selection.strides[2]) )))), (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->state_cov.data) + __pyx_t_6)) ) + __pyx_t_7 * __pyx_v_self->state_cov.strides[1]) ) + __pyx_t_8 * __pyx_v_self->state_cov.strides[2]) )))), (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->selected_state_cov.data) + __pyx_t_9)) ) + __pyx_t_10 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_11 * __pyx_v_self->selected_state_cov.strides[2]) ))))));
43089 
43090   /* "statsmodels/tsa/statespace/_representation.pyx":3432
43091  *
43092  *         # Initial state mean
43093  *         asum = blas.dzasum(&self.k_states, &self.state_intercept[0, 0], &inc)             # <<<<<<<<<<<<<<
43094  *
43095  *         dim1[0] = self.k_states
43096  */
43097   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3432, __pyx_L1_error)}
43098   __pyx_t_11 = 0;
43099   __pyx_t_10 = 0;
43100   __pyx_v_asum = __pyx_f_5scipy_6linalg_11cython_blas_dzasum((&__pyx_v_self->k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->state_intercept.data) + __pyx_t_11)) ) + __pyx_t_10 * __pyx_v_self->state_intercept.strides[1]) )))), (&__pyx_v_inc));
43101 
43102   /* "statsmodels/tsa/statespace/_representation.pyx":3434
43103  *         asum = blas.dzasum(&self.k_states, &self.state_intercept[0, 0], &inc)
43104  *
43105  *         dim1[0] = self.k_states             # <<<<<<<<<<<<<<
43106  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
43107  *         if asum > tol:
43108  */
43109   __pyx_t_12 = __pyx_v_self->k_states;
43110   (__pyx_v_dim1[0]) = __pyx_t_12;
43111 
43112   /* "statsmodels/tsa/statespace/_representation.pyx":3435
43113  *
43114  *         dim1[0] = self.k_states
43115  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
43116  *         if asum > tol:
43117  *             dim2[0] = self.k_states
43118  */
43119   __pyx_t_13 = PyArray_ZEROS(1, __pyx_v_dim1, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3435, __pyx_L1_error)
43120   __Pyx_GOTREF(__pyx_t_13);
43121   __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 3435, __pyx_L1_error)
43122   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
43123   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state, 0);
43124   __pyx_v_self->initial_state = __pyx_t_14;
43125   __pyx_t_14.memview = NULL;
43126   __pyx_t_14.data = NULL;
43127 
43128   /* "statsmodels/tsa/statespace/_representation.pyx":3436
43129  *         dim1[0] = self.k_states
43130  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
43131  *         if asum > tol:             # <<<<<<<<<<<<<<
43132  *             dim2[0] = self.k_states
43133  *             dim2[1] = self.k_states
43134  */
43135   __pyx_t_15 = ((__pyx_v_asum > __pyx_v_tol) != 0);
43136   if (__pyx_t_15) {
43137 
43138     /* "statsmodels/tsa/statespace/_representation.pyx":3437
43139  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
43140  *         if asum > tol:
43141  *             dim2[0] = self.k_states             # <<<<<<<<<<<<<<
43142  *             dim2[1] = self.k_states
43143  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)
43144  */
43145     __pyx_t_12 = __pyx_v_self->k_states;
43146     (__pyx_v_dim2[0]) = __pyx_t_12;
43147 
43148     /* "statsmodels/tsa/statespace/_representation.pyx":3438
43149  *         if asum > tol:
43150  *             dim2[0] = self.k_states
43151  *             dim2[1] = self.k_states             # <<<<<<<<<<<<<<
43152  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)
43153  *
43154  */
43155     __pyx_t_12 = __pyx_v_self->k_states;
43156     (__pyx_v_dim2[1]) = __pyx_t_12;
43157 
43158     /* "statsmodels/tsa/statespace/_representation.pyx":3439
43159  *             dim2[0] = self.k_states
43160  *             dim2[1] = self.k_states
43161  *             ipiv = np.PyArray_ZEROS(2, dim2, np.NPY_INT32, FORTRAN)             # <<<<<<<<<<<<<<
43162  *
43163  *             # I - T
43164  */
43165     __pyx_t_13 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_INT32, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3439, __pyx_L1_error)
43166     __Pyx_GOTREF(__pyx_t_13);
43167     __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dcd__int(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 3439, __pyx_L1_error)
43168     __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
43169     __pyx_v_ipiv = __pyx_t_16;
43170     __pyx_t_16.memview = NULL;
43171     __pyx_t_16.data = NULL;
43172 
43173     /* "statsmodels/tsa/statespace/_representation.pyx":3442
43174  *
43175  *             # I - T
43176  *             blas.zcopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
43177  *                                             &self.tmp[0,0], &inc)
43178  *             scalar = -1.0
43179  */
43180     if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3442, __pyx_L1_error)}
43181     __pyx_t_10 = 0;
43182     __pyx_t_11 = 0;
43183     __pyx_t_9 = 0;
43184 
43185     /* "statsmodels/tsa/statespace/_representation.pyx":3443
43186  *             # I - T
43187  *             blas.zcopy(&k_states2, &self.transition[0,0,0], &inc,
43188  *                                             &self.tmp[0,0], &inc)             # <<<<<<<<<<<<<<
43189  *             scalar = -1.0
43190  *             blas.zscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
43191  */
43192     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3443, __pyx_L1_error)}
43193     __pyx_t_8 = 0;
43194     __pyx_t_7 = 0;
43195 
43196     /* "statsmodels/tsa/statespace/_representation.pyx":3442
43197  *
43198  *             # I - T
43199  *             blas.zcopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
43200  *                                             &self.tmp[0,0], &inc)
43201  *             scalar = -1.0
43202  */
43203     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_k_states2), (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transition.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_9 * __pyx_v_self->transition.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
43204 
43205     /* "statsmodels/tsa/statespace/_representation.pyx":3444
43206  *             blas.zcopy(&k_states2, &self.transition[0,0,0], &inc,
43207  *                                             &self.tmp[0,0], &inc)
43208  *             scalar = -1.0             # <<<<<<<<<<<<<<
43209  *             blas.zscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
43210  *             for i in range(self.k_states):
43211  */
43212     __pyx_v_scalar = __pyx_t_double_complex_from_parts(-1.0, 0);
43213 
43214     /* "statsmodels/tsa/statespace/_representation.pyx":3445
43215  *                                             &self.tmp[0,0], &inc)
43216  *             scalar = -1.0
43217  *             blas.zscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)             # <<<<<<<<<<<<<<
43218  *             for i in range(self.k_states):
43219  *                 self.tmp[i, i] = self.tmp[i, i] + 1
43220  */
43221     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3445, __pyx_L1_error)}
43222     __pyx_t_7 = 0;
43223     __pyx_t_8 = 0;
43224     __pyx_f_5scipy_6linalg_11cython_blas_zscal((&__pyx_v_k_states2), (&__pyx_v_scalar), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
43225 
43226     /* "statsmodels/tsa/statespace/_representation.pyx":3446
43227  *             scalar = -1.0
43228  *             blas.zscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
43229  *             for i in range(self.k_states):             # <<<<<<<<<<<<<<
43230  *                 self.tmp[i, i] = self.tmp[i, i] + 1
43231  *
43232  */
43233     __pyx_t_12 = __pyx_v_self->k_states;
43234     __pyx_t_17 = __pyx_t_12;
43235     for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
43236       __pyx_v_i = __pyx_t_18;
43237 
43238       /* "statsmodels/tsa/statespace/_representation.pyx":3447
43239  *             blas.zscal(&k_states2, &scalar, &self.tmp[0, 0], &inc)
43240  *             for i in range(self.k_states):
43241  *                 self.tmp[i, i] = self.tmp[i, i] + 1             # <<<<<<<<<<<<<<
43242  *
43243  *             # c
43244  */
43245       if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3447, __pyx_L1_error)}
43246       __pyx_t_8 = __pyx_v_i;
43247       __pyx_t_7 = __pyx_v_i;
43248       if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3447, __pyx_L1_error)}
43249       __pyx_t_9 = __pyx_v_i;
43250       __pyx_t_11 = __pyx_v_i;
43251       *((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_9)) ) + __pyx_t_11 * __pyx_v_self->tmp.strides[1]) )) = __Pyx_c_sum_double((*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) ))), __pyx_t_double_complex_from_parts(1, 0));
43252     }
43253 
43254     /* "statsmodels/tsa/statespace/_representation.pyx":3450
43255  *
43256  *             # c
43257  *             blas.zcopy(&self.k_states, &self.state_intercept[0,0], &inc,             # <<<<<<<<<<<<<<
43258  *                                                 &self.initial_state[0], &inc)
43259  *
43260  */
43261     if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3450, __pyx_L1_error)}
43262     __pyx_t_7 = 0;
43263     __pyx_t_8 = 0;
43264 
43265     /* "statsmodels/tsa/statespace/_representation.pyx":3451
43266  *             # c
43267  *             blas.zcopy(&self.k_states, &self.state_intercept[0,0], &inc,
43268  *                                                 &self.initial_state[0], &inc)             # <<<<<<<<<<<<<<
43269  *
43270  *             # Solve (I - T) x = c
43271  */
43272     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3451, __pyx_L1_error)}
43273     __pyx_t_11 = 0;
43274 
43275     /* "statsmodels/tsa/statespace/_representation.pyx":3450
43276  *
43277  *             # c
43278  *             blas.zcopy(&self.k_states, &self.state_intercept[0,0], &inc,             # <<<<<<<<<<<<<<
43279  *                                                 &self.initial_state[0], &inc)
43280  *
43281  */
43282     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->state_intercept.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->state_intercept.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_11 * __pyx_v_self->initial_state.strides[0]) )))), (&__pyx_v_inc));
43283 
43284     /* "statsmodels/tsa/statespace/_representation.pyx":3454
43285  *
43286  *             # Solve (I - T) x = c
43287  *             lapack.zgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
43288  *                                    &ipiv[0, 0], &info)
43289  *             lapack.zgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
43290  */
43291     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3454, __pyx_L1_error)}
43292     __pyx_t_11 = 0;
43293     __pyx_t_8 = 0;
43294 
43295     /* "statsmodels/tsa/statespace/_representation.pyx":3455
43296  *             # Solve (I - T) x = c
43297  *             lapack.zgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
43298  *                                    &ipiv[0, 0], &info)             # <<<<<<<<<<<<<<
43299  *             lapack.zgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
43300  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
43301  */
43302     __pyx_t_7 = 0;
43303     __pyx_t_9 = 0;
43304 
43305     /* "statsmodels/tsa/statespace/_representation.pyx":3454
43306  *
43307  *             # Solve (I - T) x = c
43308  *             lapack.zgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
43309  *                                    &ipiv[0, 0], &info)
43310  *             lapack.zgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
43311  */
43312     __pyx_f_5scipy_6linalg_13cython_lapack_zgetrf((&__pyx_v_self->k_states), (&__pyx_v_self->k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_11)) ) + __pyx_t_8 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_self->k_states), (&(*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_ipiv.data) + __pyx_t_7)) ) + __pyx_t_9 * __pyx_v_ipiv.strides[1]) )))), (&__pyx_v_info));
43313 
43314     /* "statsmodels/tsa/statespace/_representation.pyx":3456
43315  *             lapack.zgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
43316  *                                    &ipiv[0, 0], &info)
43317  *             lapack.zgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
43318  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
43319  *
43320  */
43321     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3456, __pyx_L1_error)}
43322     __pyx_t_9 = 0;
43323     __pyx_t_7 = 0;
43324 
43325     /* "statsmodels/tsa/statespace/_representation.pyx":3457
43326  *                                    &ipiv[0, 0], &info)
43327  *             lapack.zgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,
43328  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)             # <<<<<<<<<<<<<<
43329  *
43330  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
43331  */
43332     __pyx_t_8 = 0;
43333     __pyx_t_11 = 0;
43334     if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3457, __pyx_L1_error)}
43335     __pyx_t_10 = 0;
43336 
43337     /* "statsmodels/tsa/statespace/_representation.pyx":3456
43338  *             lapack.zgetrf(&self.k_states, &self.k_states, &self.tmp[0, 0], &self.k_states,
43339  *                                    &ipiv[0, 0], &info)
43340  *             lapack.zgetrs('N', &self.k_states, &inc, &self.tmp[0, 0], &self.k_states,             # <<<<<<<<<<<<<<
43341  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
43342  *
43343  */
43344     __pyx_f_5scipy_6linalg_13cython_lapack_zgetrs(((char *)"N"), (&__pyx_v_self->k_states), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_9)) ) + __pyx_t_7 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_self->k_states), (&(*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_ipiv.data) + __pyx_t_8)) ) + __pyx_t_11 * __pyx_v_ipiv.strides[1]) )))), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_10 * __pyx_v_self->initial_state.strides[0]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
43345 
43346     /* "statsmodels/tsa/statespace/_representation.pyx":3436
43347  *         dim1[0] = self.k_states
43348  *         self.initial_state = np.PyArray_ZEROS(1, dim1, np.NPY_COMPLEX128, FORTRAN)
43349  *         if asum > tol:             # <<<<<<<<<<<<<<
43350  *             dim2[0] = self.k_states
43351  *             dim2[1] = self.k_states
43352  */
43353   }
43354 
43355   /* "statsmodels/tsa/statespace/_representation.pyx":3459
43356  *                                    &ipiv[0, 0], &self.initial_state[0], &self.k_states, &info)
43357  *
43358  *         dim2[0] = self.k_states; dim2[1] = self.k_states;             # <<<<<<<<<<<<<<
43359  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)
43360  *
43361  */
43362   __pyx_t_12 = __pyx_v_self->k_states;
43363   (__pyx_v_dim2[0]) = __pyx_t_12;
43364   __pyx_t_12 = __pyx_v_self->k_states;
43365   (__pyx_v_dim2[1]) = __pyx_t_12;
43366 
43367   /* "statsmodels/tsa/statespace/_representation.pyx":3460
43368  *
43369  *         dim2[0] = self.k_states; dim2[1] = self.k_states;
43370  *         self.initial_state_cov = np.PyArray_ZEROS(2, dim2, np.NPY_COMPLEX128, FORTRAN)             # <<<<<<<<<<<<<<
43371  *
43372  *         # Create a copy of the transition matrix (to avoid overwriting it)
43373  */
43374   __pyx_t_13 = PyArray_ZEROS(2, __pyx_v_dim2, NPY_COMPLEX128, __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3460, __pyx_L1_error)
43375   __Pyx_GOTREF(__pyx_t_13);
43376   __pyx_t_19 = __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(__pyx_t_13, PyBUF_WRITABLE); if (unlikely(!__pyx_t_19.memview)) __PYX_ERR(0, 3460, __pyx_L1_error)
43377   __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
43378   __PYX_XDEC_MEMVIEW(&__pyx_v_self->initial_state_cov, 0);
43379   __pyx_v_self->initial_state_cov = __pyx_t_19;
43380   __pyx_t_19.memview = NULL;
43381   __pyx_t_19.data = NULL;
43382 
43383   /* "statsmodels/tsa/statespace/_representation.pyx":3463
43384  *
43385  *         # Create a copy of the transition matrix (to avoid overwriting it)
43386  *         blas.zcopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
43387  *                                    &self.tmp[0,0], &inc)
43388  *
43389  */
43390   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3463, __pyx_L1_error)}
43391   __pyx_t_10 = 0;
43392   __pyx_t_11 = 0;
43393   __pyx_t_8 = 0;
43394 
43395   /* "statsmodels/tsa/statespace/_representation.pyx":3464
43396  *         # Create a copy of the transition matrix (to avoid overwriting it)
43397  *         blas.zcopy(&k_states2, &self.transition[0,0,0], &inc,
43398  *                                    &self.tmp[0,0], &inc)             # <<<<<<<<<<<<<<
43399  *
43400  *         # Copy the selected state covariance to the initial state covariance
43401  */
43402   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3464, __pyx_L1_error)}
43403   __pyx_t_7 = 0;
43404   __pyx_t_9 = 0;
43405 
43406   /* "statsmodels/tsa/statespace/_representation.pyx":3463
43407  *
43408  *         # Create a copy of the transition matrix (to avoid overwriting it)
43409  *         blas.zcopy(&k_states2, &self.transition[0,0,0], &inc,             # <<<<<<<<<<<<<<
43410  *                                    &self.tmp[0,0], &inc)
43411  *
43412  */
43413   __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_k_states2), (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transition.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_8 * __pyx_v_self->transition.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_7)) ) + __pyx_t_9 * __pyx_v_self->tmp.strides[1]) )))), (&__pyx_v_inc));
43414 
43415   /* "statsmodels/tsa/statespace/_representation.pyx":3468
43416  *         # Copy the selected state covariance to the initial state covariance
43417  *         # (it will be overwritten with the appropriate matrix)
43418  *         blas.zcopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,             # <<<<<<<<<<<<<<
43419  *                                    &self.initial_state_cov[0,0], &inc)
43420  *
43421  */
43422   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3468, __pyx_L1_error)}
43423   __pyx_t_9 = 0;
43424   __pyx_t_7 = 0;
43425   __pyx_t_8 = 0;
43426 
43427   /* "statsmodels/tsa/statespace/_representation.pyx":3469
43428  *         # (it will be overwritten with the appropriate matrix)
43429  *         blas.zcopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,
43430  *                                    &self.initial_state_cov[0,0], &inc)             # <<<<<<<<<<<<<<
43431  *
43432  *         # Solve the discrete Lyapunov equation to the get initial state
43433  */
43434   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3469, __pyx_L1_error)}
43435   __pyx_t_11 = 0;
43436   __pyx_t_10 = 0;
43437 
43438   /* "statsmodels/tsa/statespace/_representation.pyx":3468
43439  *         # Copy the selected state covariance to the initial state covariance
43440  *         # (it will be overwritten with the appropriate matrix)
43441  *         blas.zcopy(&k_states2, &self.selected_state_cov[0,0,0], &inc,             # <<<<<<<<<<<<<<
43442  *                                    &self.initial_state_cov[0,0], &inc)
43443  *
43444  */
43445   __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_k_states2), (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->selected_state_cov.data) + __pyx_t_9)) ) + __pyx_t_7 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_8 * __pyx_v_self->selected_state_cov.strides[2]) )))), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->initial_state_cov.data) + __pyx_t_11)) ) + __pyx_t_10 * __pyx_v_self->initial_state_cov.strides[1]) )))), (&__pyx_v_inc));
43446 
43447   /* "statsmodels/tsa/statespace/_representation.pyx":3473
43448  *         # Solve the discrete Lyapunov equation to the get initial state
43449  *         # covariance matrix
43450  *         tools._zsolve_discrete_lyapunov(&self.tmp[0,0], &self.initial_state_cov[0,0], self.k_states, complex_step)             # <<<<<<<<<<<<<<
43451  *
43452  *         self.initial_diffuse_state_cov[:] = 0
43453  */
43454   if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3473, __pyx_L1_error)}
43455   __pyx_t_10 = 0;
43456   __pyx_t_11 = 0;
43457   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3473, __pyx_L1_error)}
43458   __pyx_t_8 = 0;
43459   __pyx_t_7 = 0;
43460   __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_complex_step); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3473, __pyx_L1_error)
43461   __pyx_t_20.__pyx_n = 1;
43462   __pyx_t_20.complex_step = __pyx_t_12;
43463   __pyx_f_11statsmodels_3tsa_10statespace_6_tools__zsolve_discrete_lyapunov((&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_10)) ) + __pyx_t_11 * __pyx_v_self->tmp.strides[1]) )))), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->initial_state_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->initial_state_cov.strides[1]) )))), __pyx_v_self->k_states, &__pyx_t_20); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3473, __pyx_L1_error)
43464 
43465   /* "statsmodels/tsa/statespace/_representation.pyx":3475
43466  *         tools._zsolve_discrete_lyapunov(&self.tmp[0,0], &self.initial_state_cov[0,0], self.k_states, complex_step)
43467  *
43468  *         self.initial_diffuse_state_cov[:] = 0             # <<<<<<<<<<<<<<
43469  *
43470  *         self.initialized = True
43471  */
43472   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3475, __pyx_L1_error)}
43473   {
43474       __pyx_t_double_complex __pyx_temp_scalar = __pyx_t_double_complex_from_parts(0, 0);
43475       {
43476           Py_ssize_t __pyx_temp_extent = __pyx_v_self->initial_diffuse_state_cov.shape[0] * __pyx_v_self->initial_diffuse_state_cov.shape[1];
43477           Py_ssize_t __pyx_temp_idx;
43478           __pyx_t_double_complex *__pyx_temp_pointer = (__pyx_t_double_complex *) __pyx_v_self->initial_diffuse_state_cov.data;
43479           for (__pyx_temp_idx = 0; __pyx_temp_idx < __pyx_temp_extent; __pyx_temp_idx++) {
43480             *((__pyx_t_double_complex *) __pyx_temp_pointer) = __pyx_temp_scalar;
43481             __pyx_temp_pointer += 1;
43482           }
43483       }
43484   }
43485 
43486   /* "statsmodels/tsa/statespace/_representation.pyx":3477
43487  *         self.initial_diffuse_state_cov[:] = 0
43488  *
43489  *         self.initialized = True             # <<<<<<<<<<<<<<
43490  *
43491  *     def __iter__(self):
43492  */
43493   __pyx_v_self->initialized = 1;
43494 
43495   /* "statsmodels/tsa/statespace/_representation.pyx":3412
43496  *     # ## Initialize: stationary process
43497  *     # *Note:* see Durbin and Koopman section 5.6.2
43498  *     def initialize_stationary(self, complex_step=False):             # <<<<<<<<<<<<<<
43499  *         """
43500  *         initialize_stationary()
43501  */
43502 
43503   /* function exit code */
43504   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43505   goto __pyx_L0;
43506   __pyx_L1_error:;
43507   __Pyx_XDECREF(__pyx_t_13);
43508   __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
43509   __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
43510   __PYX_XDEC_MEMVIEW(&__pyx_t_19, 1);
43511   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialize_stationary", __pyx_clineno, __pyx_lineno, __pyx_filename);
43512   __pyx_r = NULL;
43513   __pyx_L0:;
43514   __PYX_XDEC_MEMVIEW(&__pyx_v_ipiv, 1);
43515   __Pyx_XGIVEREF(__pyx_r);
43516   __Pyx_RefNannyFinishContext();
43517   return __pyx_r;
43518 }
43519 
43520 /* "statsmodels/tsa/statespace/_representation.pyx":3479
43521  *         self.initialized = True
43522  *
43523  *     def __iter__(self):             # <<<<<<<<<<<<<<
43524  *         return self
43525  *
43526  */
43527 
43528 /* Python wrapper */
43529 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15__iter__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15__iter__(PyObject * __pyx_v_self)43530 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15__iter__(PyObject *__pyx_v_self) {
43531   PyObject *__pyx_r = 0;
43532   __Pyx_RefNannyDeclarations
43533   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
43534   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14__iter__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
43535 
43536   /* function exit code */
43537   __Pyx_RefNannyFinishContext();
43538   return __pyx_r;
43539 }
43540 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)43541 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14__iter__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
43542   PyObject *__pyx_r = NULL;
43543   __Pyx_RefNannyDeclarations
43544   __Pyx_RefNannySetupContext("__iter__", 0);
43545 
43546   /* "statsmodels/tsa/statespace/_representation.pyx":3480
43547  *
43548  *     def __iter__(self):
43549  *         return self             # <<<<<<<<<<<<<<
43550  *
43551  *     def __next__(self):
43552  */
43553   __Pyx_XDECREF(__pyx_r);
43554   __Pyx_INCREF(((PyObject *)__pyx_v_self));
43555   __pyx_r = ((PyObject *)__pyx_v_self);
43556   goto __pyx_L0;
43557 
43558   /* "statsmodels/tsa/statespace/_representation.pyx":3479
43559  *         self.initialized = True
43560  *
43561  *     def __iter__(self):             # <<<<<<<<<<<<<<
43562  *         return self
43563  *
43564  */
43565 
43566   /* function exit code */
43567   __pyx_L0:;
43568   __Pyx_XGIVEREF(__pyx_r);
43569   __Pyx_RefNannyFinishContext();
43570   return __pyx_r;
43571 }
43572 
43573 /* "statsmodels/tsa/statespace/_representation.pyx":3482
43574  *         return self
43575  *
43576  *     def __next__(self):             # <<<<<<<<<<<<<<
43577  *         """
43578  *         Advance to the next location
43579  */
43580 
43581 /* Python wrapper */
43582 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17__next__(PyObject *__pyx_v_self); /*proto*/
43583 static char __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__[] = "\n        Advance to the next location\n        ";
43584 #if CYTHON_COMPILING_IN_CPYTHON
43585 struct wrapperbase __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__;
43586 #endif
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17__next__(PyObject * __pyx_v_self)43587 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17__next__(PyObject *__pyx_v_self) {
43588   PyObject *__pyx_r = 0;
43589   __Pyx_RefNannyDeclarations
43590   __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
43591   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
43592 
43593   /* function exit code */
43594   __Pyx_RefNannyFinishContext();
43595   return __pyx_r;
43596 }
43597 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)43598 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
43599   PyObject *__pyx_r = NULL;
43600   __Pyx_RefNannyDeclarations
43601   int __pyx_t_1;
43602   PyObject *__pyx_t_2 = NULL;
43603   int __pyx_lineno = 0;
43604   const char *__pyx_filename = NULL;
43605   int __pyx_clineno = 0;
43606   __Pyx_RefNannySetupContext("__next__", 0);
43607 
43608   /* "statsmodels/tsa/statespace/_representation.pyx":3486
43609  *         Advance to the next location
43610  *         """
43611  *         if self.t >= self.nobs:             # <<<<<<<<<<<<<<
43612  *             raise StopIteration
43613  *         else:
43614  */
43615   __pyx_t_1 = ((__pyx_v_self->t >= __pyx_v_self->nobs) != 0);
43616   if (unlikely(__pyx_t_1)) {
43617 
43618     /* "statsmodels/tsa/statespace/_representation.pyx":3487
43619  *         """
43620  *         if self.t >= self.nobs:
43621  *             raise StopIteration             # <<<<<<<<<<<<<<
43622  *         else:
43623  *             self.seek(self.t+1, 0, 0)
43624  */
43625     __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
43626     __PYX_ERR(0, 3487, __pyx_L1_error)
43627 
43628     /* "statsmodels/tsa/statespace/_representation.pyx":3486
43629  *         Advance to the next location
43630  *         """
43631  *         if self.t >= self.nobs:             # <<<<<<<<<<<<<<
43632  *             raise StopIteration
43633  *         else:
43634  */
43635   }
43636 
43637   /* "statsmodels/tsa/statespace/_representation.pyx":3489
43638  *             raise StopIteration
43639  *         else:
43640  *             self.seek(self.t+1, 0, 0)             # <<<<<<<<<<<<<<
43641  *
43642  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):
43643  */
43644   /*else*/ {
43645     __pyx_t_2 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->seek(__pyx_v_self, (__pyx_v_self->t + 1), 0, 0, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3489, __pyx_L1_error)
43646     __Pyx_GOTREF(__pyx_t_2);
43647     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43648   }
43649 
43650   /* "statsmodels/tsa/statespace/_representation.pyx":3482
43651  *         return self
43652  *
43653  *     def __next__(self):             # <<<<<<<<<<<<<<
43654  *         """
43655  *         Advance to the next location
43656  */
43657 
43658   /* function exit code */
43659   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
43660   goto __pyx_L0;
43661   __pyx_L1_error:;
43662   __Pyx_XDECREF(__pyx_t_2);
43663   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
43664   __pyx_r = NULL;
43665   __pyx_L0:;
43666   __Pyx_XGIVEREF(__pyx_r);
43667   __Pyx_RefNannyFinishContext();
43668   return __pyx_r;
43669 }
43670 
43671 /* "statsmodels/tsa/statespace/_representation.pyx":3491
43672  *             self.seek(self.t+1, 0, 0)
43673  *
43674  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):             # <<<<<<<<<<<<<<
43675  *         self._previous_t = self.t
43676  *
43677  */
43678 
43679 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,int __pyx_skip_dispatch,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek * __pyx_optional_args)43680 static PyObject *__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek *__pyx_optional_args) {
43681   unsigned int __pyx_v_reset = ((unsigned int)0);
43682   int __pyx_v_k_endog;
43683   int __pyx_v_design_t;
43684   int __pyx_v_obs_intercept_t;
43685   int __pyx_v_obs_cov_t;
43686   int __pyx_v_transition_t;
43687   int __pyx_v_state_intercept_t;
43688   int __pyx_v_selection_t;
43689   int __pyx_v_state_cov_t;
43690   PyObject *__pyx_r = NULL;
43691   __Pyx_RefNannyDeclarations
43692   PyObject *__pyx_t_1 = NULL;
43693   PyObject *__pyx_t_2 = NULL;
43694   PyObject *__pyx_t_3 = NULL;
43695   PyObject *__pyx_t_4 = NULL;
43696   PyObject *__pyx_t_5 = NULL;
43697   PyObject *__pyx_t_6 = NULL;
43698   PyObject *__pyx_t_7 = NULL;
43699   PyObject *__pyx_t_8 = NULL;
43700   int __pyx_t_9;
43701   PyObject *__pyx_t_10 = NULL;
43702   int __pyx_t_11;
43703   Py_ssize_t __pyx_t_12;
43704   size_t __pyx_t_13;
43705   Py_ssize_t __pyx_t_14;
43706   Py_ssize_t __pyx_t_15;
43707   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform __pyx_t_16;
43708   int __pyx_lineno = 0;
43709   const char *__pyx_filename = NULL;
43710   int __pyx_clineno = 0;
43711   __Pyx_RefNannySetupContext("seek", 0);
43712   if (__pyx_optional_args) {
43713     if (__pyx_optional_args->__pyx_n > 0) {
43714       __pyx_v_reset = __pyx_optional_args->reset;
43715     }
43716   }
43717   /* Check if called by wrapper */
43718   if (unlikely(__pyx_skip_dispatch)) ;
43719   /* Check if overridden in Python */
43720   else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
43721     #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
43722     static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
43723     if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
43724       PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
43725       #endif
43726       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3491, __pyx_L1_error)
43727       __Pyx_GOTREF(__pyx_t_1);
43728       if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19seek)) {
43729         __Pyx_XDECREF(__pyx_r);
43730         __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3491, __pyx_L1_error)
43731         __Pyx_GOTREF(__pyx_t_3);
43732         __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_transform_diagonalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3491, __pyx_L1_error)
43733         __Pyx_GOTREF(__pyx_t_4);
43734         __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_transform_generalized_collapse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3491, __pyx_L1_error)
43735         __Pyx_GOTREF(__pyx_t_5);
43736         __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_reset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3491, __pyx_L1_error)
43737         __Pyx_GOTREF(__pyx_t_6);
43738         __Pyx_INCREF(__pyx_t_1);
43739         __pyx_t_7 = __pyx_t_1; __pyx_t_8 = NULL;
43740         __pyx_t_9 = 0;
43741         if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
43742           __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
43743           if (likely(__pyx_t_8)) {
43744             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
43745             __Pyx_INCREF(__pyx_t_8);
43746             __Pyx_INCREF(function);
43747             __Pyx_DECREF_SET(__pyx_t_7, function);
43748             __pyx_t_9 = 1;
43749           }
43750         }
43751         #if CYTHON_FAST_PYCALL
43752         if (PyFunction_Check(__pyx_t_7)) {
43753           PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
43754           __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3491, __pyx_L1_error)
43755           __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43756           __Pyx_GOTREF(__pyx_t_2);
43757           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43758           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43759           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
43760           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43761         } else
43762         #endif
43763         #if CYTHON_FAST_PYCCALL
43764         if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
43765           PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
43766           __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3491, __pyx_L1_error)
43767           __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43768           __Pyx_GOTREF(__pyx_t_2);
43769           __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43770           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43771           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
43772           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
43773         } else
43774         #endif
43775         {
43776           __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3491, __pyx_L1_error)
43777           __Pyx_GOTREF(__pyx_t_10);
43778           if (__pyx_t_8) {
43779             __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
43780           }
43781           __Pyx_GIVEREF(__pyx_t_3);
43782           PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
43783           __Pyx_GIVEREF(__pyx_t_4);
43784           PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
43785           __Pyx_GIVEREF(__pyx_t_5);
43786           PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
43787           __Pyx_GIVEREF(__pyx_t_6);
43788           PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
43789           __pyx_t_3 = 0;
43790           __pyx_t_4 = 0;
43791           __pyx_t_5 = 0;
43792           __pyx_t_6 = 0;
43793           __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3491, __pyx_L1_error)
43794           __Pyx_GOTREF(__pyx_t_2);
43795           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
43796         }
43797         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
43798         __pyx_r = __pyx_t_2;
43799         __pyx_t_2 = 0;
43800         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43801         goto __pyx_L0;
43802       }
43803       #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
43804       __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
43805       __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
43806       if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
43807         __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
43808       }
43809       #endif
43810       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43811       #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
43812     }
43813     #endif
43814   }
43815 
43816   /* "statsmodels/tsa/statespace/_representation.pyx":3492
43817  *
43818  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):
43819  *         self._previous_t = self.t             # <<<<<<<<<<<<<<
43820  *
43821  *         # Set the global time indicator, if valid
43822  */
43823   __pyx_t_9 = __pyx_v_self->t;
43824   __pyx_v_self->_previous_t = __pyx_t_9;
43825 
43826   /* "statsmodels/tsa/statespace/_representation.pyx":3495
43827  *
43828  *         # Set the global time indicator, if valid
43829  *         if t >= self.nobs:             # <<<<<<<<<<<<<<
43830  *             raise IndexError("Observation index out of range")
43831  *         self.t = t
43832  */
43833   __pyx_t_11 = ((__pyx_v_t >= __pyx_v_self->nobs) != 0);
43834   if (unlikely(__pyx_t_11)) {
43835 
43836     /* "statsmodels/tsa/statespace/_representation.pyx":3496
43837  *         # Set the global time indicator, if valid
43838  *         if t >= self.nobs:
43839  *             raise IndexError("Observation index out of range")             # <<<<<<<<<<<<<<
43840  *         self.t = t
43841  *
43842  */
43843     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3496, __pyx_L1_error)
43844     __Pyx_GOTREF(__pyx_t_1);
43845     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
43846     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43847     __PYX_ERR(0, 3496, __pyx_L1_error)
43848 
43849     /* "statsmodels/tsa/statespace/_representation.pyx":3495
43850  *
43851  *         # Set the global time indicator, if valid
43852  *         if t >= self.nobs:             # <<<<<<<<<<<<<<
43853  *             raise IndexError("Observation index out of range")
43854  *         self.t = t
43855  */
43856   }
43857 
43858   /* "statsmodels/tsa/statespace/_representation.pyx":3497
43859  *         if t >= self.nobs:
43860  *             raise IndexError("Observation index out of range")
43861  *         self.t = t             # <<<<<<<<<<<<<<
43862  *
43863  *         # Indices for possibly time-varying arrays
43864  */
43865   __pyx_v_self->t = __pyx_v_t;
43866 
43867   /* "statsmodels/tsa/statespace/_representation.pyx":3502
43868  *         cdef:
43869  *             int k_endog
43870  *             int design_t = 0             # <<<<<<<<<<<<<<
43871  *             int obs_intercept_t = 0
43872  *             int obs_cov_t = 0
43873  */
43874   __pyx_v_design_t = 0;
43875 
43876   /* "statsmodels/tsa/statespace/_representation.pyx":3503
43877  *             int k_endog
43878  *             int design_t = 0
43879  *             int obs_intercept_t = 0             # <<<<<<<<<<<<<<
43880  *             int obs_cov_t = 0
43881  *             int transition_t = 0
43882  */
43883   __pyx_v_obs_intercept_t = 0;
43884 
43885   /* "statsmodels/tsa/statespace/_representation.pyx":3504
43886  *             int design_t = 0
43887  *             int obs_intercept_t = 0
43888  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
43889  *             int transition_t = 0
43890  *             int state_intercept_t = 0
43891  */
43892   __pyx_v_obs_cov_t = 0;
43893 
43894   /* "statsmodels/tsa/statespace/_representation.pyx":3505
43895  *             int obs_intercept_t = 0
43896  *             int obs_cov_t = 0
43897  *             int transition_t = 0             # <<<<<<<<<<<<<<
43898  *             int state_intercept_t = 0
43899  *             int selection_t = 0
43900  */
43901   __pyx_v_transition_t = 0;
43902 
43903   /* "statsmodels/tsa/statespace/_representation.pyx":3506
43904  *             int obs_cov_t = 0
43905  *             int transition_t = 0
43906  *             int state_intercept_t = 0             # <<<<<<<<<<<<<<
43907  *             int selection_t = 0
43908  *             int state_cov_t = 0
43909  */
43910   __pyx_v_state_intercept_t = 0;
43911 
43912   /* "statsmodels/tsa/statespace/_representation.pyx":3507
43913  *             int transition_t = 0
43914  *             int state_intercept_t = 0
43915  *             int selection_t = 0             # <<<<<<<<<<<<<<
43916  *             int state_cov_t = 0
43917  *
43918  */
43919   __pyx_v_selection_t = 0;
43920 
43921   /* "statsmodels/tsa/statespace/_representation.pyx":3508
43922  *             int state_intercept_t = 0
43923  *             int selection_t = 0
43924  *             int state_cov_t = 0             # <<<<<<<<<<<<<<
43925  *
43926  *         # Get indices for possibly time-varying arrays
43927  */
43928   __pyx_v_state_cov_t = 0;
43929 
43930   /* "statsmodels/tsa/statespace/_representation.pyx":3511
43931  *
43932  *         # Get indices for possibly time-varying arrays
43933  *         if not self.time_invariant:             # <<<<<<<<<<<<<<
43934  *             if self.design.shape[2] > 1:             design_t = t
43935  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
43936  */
43937   __pyx_t_11 = ((!(__pyx_v_self->time_invariant != 0)) != 0);
43938   if (__pyx_t_11) {
43939 
43940     /* "statsmodels/tsa/statespace/_representation.pyx":3512
43941  *         # Get indices for possibly time-varying arrays
43942  *         if not self.time_invariant:
43943  *             if self.design.shape[2] > 1:             design_t = t             # <<<<<<<<<<<<<<
43944  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
43945  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
43946  */
43947     if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3512, __pyx_L1_error)}
43948     __pyx_t_11 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
43949     if (__pyx_t_11) {
43950       __pyx_v_design_t = __pyx_v_t;
43951     }
43952 
43953     /* "statsmodels/tsa/statespace/_representation.pyx":3513
43954  *         if not self.time_invariant:
43955  *             if self.design.shape[2] > 1:             design_t = t
43956  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t             # <<<<<<<<<<<<<<
43957  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
43958  *             if self.transition.shape[2] > 1:         transition_t = t
43959  */
43960     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3513, __pyx_L1_error)}
43961     __pyx_t_11 = (((__pyx_v_self->obs_intercept.shape[1]) > 1) != 0);
43962     if (__pyx_t_11) {
43963       __pyx_v_obs_intercept_t = __pyx_v_t;
43964     }
43965 
43966     /* "statsmodels/tsa/statespace/_representation.pyx":3514
43967  *             if self.design.shape[2] > 1:             design_t = t
43968  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
43969  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t             # <<<<<<<<<<<<<<
43970  *             if self.transition.shape[2] > 1:         transition_t = t
43971  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
43972  */
43973     if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3514, __pyx_L1_error)}
43974     __pyx_t_11 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
43975     if (__pyx_t_11) {
43976       __pyx_v_obs_cov_t = __pyx_v_t;
43977     }
43978 
43979     /* "statsmodels/tsa/statespace/_representation.pyx":3515
43980  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
43981  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
43982  *             if self.transition.shape[2] > 1:         transition_t = t             # <<<<<<<<<<<<<<
43983  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
43984  *             if self.selection.shape[2] > 1:          selection_t = t
43985  */
43986     if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3515, __pyx_L1_error)}
43987     __pyx_t_11 = (((__pyx_v_self->transition.shape[2]) > 1) != 0);
43988     if (__pyx_t_11) {
43989       __pyx_v_transition_t = __pyx_v_t;
43990     }
43991 
43992     /* "statsmodels/tsa/statespace/_representation.pyx":3516
43993  *             if self.obs_cov.shape[2] > 1:            obs_cov_t = t
43994  *             if self.transition.shape[2] > 1:         transition_t = t
43995  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t             # <<<<<<<<<<<<<<
43996  *             if self.selection.shape[2] > 1:          selection_t = t
43997  *             if self.state_cov.shape[2] > 1:          state_cov_t = t
43998  */
43999     if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3516, __pyx_L1_error)}
44000     __pyx_t_11 = (((__pyx_v_self->state_intercept.shape[1]) > 1) != 0);
44001     if (__pyx_t_11) {
44002       __pyx_v_state_intercept_t = __pyx_v_t;
44003     }
44004 
44005     /* "statsmodels/tsa/statespace/_representation.pyx":3517
44006  *             if self.transition.shape[2] > 1:         transition_t = t
44007  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
44008  *             if self.selection.shape[2] > 1:          selection_t = t             # <<<<<<<<<<<<<<
44009  *             if self.state_cov.shape[2] > 1:          state_cov_t = t
44010  *
44011  */
44012     if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3517, __pyx_L1_error)}
44013     __pyx_t_11 = (((__pyx_v_self->selection.shape[2]) > 1) != 0);
44014     if (__pyx_t_11) {
44015       __pyx_v_selection_t = __pyx_v_t;
44016     }
44017 
44018     /* "statsmodels/tsa/statespace/_representation.pyx":3518
44019  *             if self.state_intercept.shape[1] > 1:    state_intercept_t = t
44020  *             if self.selection.shape[2] > 1:          selection_t = t
44021  *             if self.state_cov.shape[2] > 1:          state_cov_t = t             # <<<<<<<<<<<<<<
44022  *
44023  *         # Initialize object-level pointers to statespace arrays
44024  */
44025     if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3518, __pyx_L1_error)}
44026     __pyx_t_11 = (((__pyx_v_self->state_cov.shape[2]) > 1) != 0);
44027     if (__pyx_t_11) {
44028       __pyx_v_state_cov_t = __pyx_v_t;
44029     }
44030 
44031     /* "statsmodels/tsa/statespace/_representation.pyx":3511
44032  *
44033  *         # Get indices for possibly time-varying arrays
44034  *         if not self.time_invariant:             # <<<<<<<<<<<<<<
44035  *             if self.design.shape[2] > 1:             design_t = t
44036  *             if self.obs_intercept.shape[1] > 1:      obs_intercept_t = t
44037  */
44038   }
44039 
44040   /* "statsmodels/tsa/statespace/_representation.pyx":3521
44041  *
44042  *         # Initialize object-level pointers to statespace arrays
44043  *         self._obs = &self.obs[0, t]             # <<<<<<<<<<<<<<
44044  *         self._design = &self.design[0, 0, design_t]
44045  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
44046  */
44047   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3521, __pyx_L1_error)}
44048   __pyx_t_12 = 0;
44049   __pyx_t_13 = __pyx_v_t;
44050   __pyx_v_self->_obs = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->obs.data) + __pyx_t_12)) ) + __pyx_t_13 * __pyx_v_self->obs.strides[1]) ))));
44051 
44052   /* "statsmodels/tsa/statespace/_representation.pyx":3522
44053  *         # Initialize object-level pointers to statespace arrays
44054  *         self._obs = &self.obs[0, t]
44055  *         self._design = &self.design[0, 0, design_t]             # <<<<<<<<<<<<<<
44056  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
44057  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
44058  */
44059   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3522, __pyx_L1_error)}
44060   __pyx_t_12 = 0;
44061   __pyx_t_14 = 0;
44062   __pyx_t_15 = __pyx_v_design_t;
44063   __pyx_v_self->_design = (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->design.data) + __pyx_t_12)) ) + __pyx_t_14 * __pyx_v_self->design.strides[1]) ) + __pyx_t_15 * __pyx_v_self->design.strides[2]) ))));
44064 
44065   /* "statsmodels/tsa/statespace/_representation.pyx":3523
44066  *         self._obs = &self.obs[0, t]
44067  *         self._design = &self.design[0, 0, design_t]
44068  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]             # <<<<<<<<<<<<<<
44069  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
44070  *         self._transition = &self.transition[0, 0, transition_t]
44071  */
44072   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3523, __pyx_L1_error)}
44073   __pyx_t_15 = 0;
44074   __pyx_t_14 = __pyx_v_obs_intercept_t;
44075   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->obs_intercept.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->obs_intercept.strides[1]) ))));
44076 
44077   /* "statsmodels/tsa/statespace/_representation.pyx":3524
44078  *         self._design = &self.design[0, 0, design_t]
44079  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
44080  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]             # <<<<<<<<<<<<<<
44081  *         self._transition = &self.transition[0, 0, transition_t]
44082  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
44083  */
44084   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3524, __pyx_L1_error)}
44085   __pyx_t_14 = 0;
44086   __pyx_t_15 = 0;
44087   __pyx_t_12 = __pyx_v_obs_cov_t;
44088   __pyx_v_self->_obs_cov = (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->obs_cov.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->obs_cov.strides[1]) ) + __pyx_t_12 * __pyx_v_self->obs_cov.strides[2]) ))));
44089 
44090   /* "statsmodels/tsa/statespace/_representation.pyx":3525
44091  *         self._obs_intercept = &self.obs_intercept[0, obs_intercept_t]
44092  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
44093  *         self._transition = &self.transition[0, 0, transition_t]             # <<<<<<<<<<<<<<
44094  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
44095  *         self._selection = &self.selection[0, 0, selection_t]
44096  */
44097   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3525, __pyx_L1_error)}
44098   __pyx_t_12 = 0;
44099   __pyx_t_15 = 0;
44100   __pyx_t_14 = __pyx_v_transition_t;
44101   __pyx_v_self->_transition = (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transition.data) + __pyx_t_12)) ) + __pyx_t_15 * __pyx_v_self->transition.strides[1]) ) + __pyx_t_14 * __pyx_v_self->transition.strides[2]) ))));
44102 
44103   /* "statsmodels/tsa/statespace/_representation.pyx":3526
44104  *         self._obs_cov = &self.obs_cov[0, 0, obs_cov_t]
44105  *         self._transition = &self.transition[0, 0, transition_t]
44106  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]             # <<<<<<<<<<<<<<
44107  *         self._selection = &self.selection[0, 0, selection_t]
44108  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]
44109  */
44110   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3526, __pyx_L1_error)}
44111   __pyx_t_14 = 0;
44112   __pyx_t_15 = __pyx_v_state_intercept_t;
44113   __pyx_v_self->_state_intercept = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->state_intercept.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->state_intercept.strides[1]) ))));
44114 
44115   /* "statsmodels/tsa/statespace/_representation.pyx":3527
44116  *         self._transition = &self.transition[0, 0, transition_t]
44117  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
44118  *         self._selection = &self.selection[0, 0, selection_t]             # <<<<<<<<<<<<<<
44119  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]
44120  *
44121  */
44122   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3527, __pyx_L1_error)}
44123   __pyx_t_15 = 0;
44124   __pyx_t_14 = 0;
44125   __pyx_t_12 = __pyx_v_selection_t;
44126   __pyx_v_self->_selection = (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->selection.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->selection.strides[1]) ) + __pyx_t_12 * __pyx_v_self->selection.strides[2]) ))));
44127 
44128   /* "statsmodels/tsa/statespace/_representation.pyx":3528
44129  *         self._state_intercept = &self.state_intercept[0, state_intercept_t]
44130  *         self._selection = &self.selection[0, 0, selection_t]
44131  *         self._state_cov = &self.state_cov[0, 0, state_cov_t]             # <<<<<<<<<<<<<<
44132  *
44133  *         # Initialize object-level pointers to initialization
44134  */
44135   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3528, __pyx_L1_error)}
44136   __pyx_t_12 = 0;
44137   __pyx_t_14 = 0;
44138   __pyx_t_15 = __pyx_v_state_cov_t;
44139   __pyx_v_self->_state_cov = (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->state_cov.data) + __pyx_t_12)) ) + __pyx_t_14 * __pyx_v_self->state_cov.strides[1]) ) + __pyx_t_15 * __pyx_v_self->state_cov.strides[2]) ))));
44140 
44141   /* "statsmodels/tsa/statespace/_representation.pyx":3531
44142  *
44143  *         # Initialize object-level pointers to initialization
44144  *         if not self.initialized:             # <<<<<<<<<<<<<<
44145  *             raise RuntimeError("Statespace model not initialized.")
44146  *         self._initial_state = &self.initial_state[0]
44147  */
44148   __pyx_t_11 = ((!(__pyx_v_self->initialized != 0)) != 0);
44149   if (unlikely(__pyx_t_11)) {
44150 
44151     /* "statsmodels/tsa/statespace/_representation.pyx":3532
44152  *         # Initialize object-level pointers to initialization
44153  *         if not self.initialized:
44154  *             raise RuntimeError("Statespace model not initialized.")             # <<<<<<<<<<<<<<
44155  *         self._initial_state = &self.initial_state[0]
44156  *         self._initial_state_cov = &self.initial_state_cov[0,0]
44157  */
44158     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3532, __pyx_L1_error)
44159     __Pyx_GOTREF(__pyx_t_1);
44160     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
44161     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44162     __PYX_ERR(0, 3532, __pyx_L1_error)
44163 
44164     /* "statsmodels/tsa/statespace/_representation.pyx":3531
44165  *
44166  *         # Initialize object-level pointers to initialization
44167  *         if not self.initialized:             # <<<<<<<<<<<<<<
44168  *             raise RuntimeError("Statespace model not initialized.")
44169  *         self._initial_state = &self.initial_state[0]
44170  */
44171   }
44172 
44173   /* "statsmodels/tsa/statespace/_representation.pyx":3533
44174  *         if not self.initialized:
44175  *             raise RuntimeError("Statespace model not initialized.")
44176  *         self._initial_state = &self.initial_state[0]             # <<<<<<<<<<<<<<
44177  *         self._initial_state_cov = &self.initial_state_cov[0,0]
44178  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]
44179  */
44180   if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3533, __pyx_L1_error)}
44181   __pyx_t_15 = 0;
44182   __pyx_v_self->_initial_state = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->initial_state.data + __pyx_t_15 * __pyx_v_self->initial_state.strides[0]) ))));
44183 
44184   /* "statsmodels/tsa/statespace/_representation.pyx":3534
44185  *             raise RuntimeError("Statespace model not initialized.")
44186  *         self._initial_state = &self.initial_state[0]
44187  *         self._initial_state_cov = &self.initial_state_cov[0,0]             # <<<<<<<<<<<<<<
44188  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]
44189  *
44190  */
44191   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3534, __pyx_L1_error)}
44192   __pyx_t_15 = 0;
44193   __pyx_t_14 = 0;
44194   __pyx_v_self->_initial_state_cov = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->initial_state_cov.data) + __pyx_t_15)) ) + __pyx_t_14 * __pyx_v_self->initial_state_cov.strides[1]) ))));
44195 
44196   /* "statsmodels/tsa/statespace/_representation.pyx":3535
44197  *         self._initial_state = &self.initial_state[0]
44198  *         self._initial_state_cov = &self.initial_state_cov[0,0]
44199  *         self._initial_diffuse_state_cov = &self.initial_diffuse_state_cov[0,0]             # <<<<<<<<<<<<<<
44200  *
44201  *         # Create the selected state covariance matrix
44202  */
44203   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3535, __pyx_L1_error)}
44204   __pyx_t_14 = 0;
44205   __pyx_t_15 = 0;
44206   __pyx_v_self->_initial_diffuse_state_cov = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->initial_diffuse_state_cov.data) + __pyx_t_14)) ) + __pyx_t_15 * __pyx_v_self->initial_diffuse_state_cov.strides[1]) ))));
44207 
44208   /* "statsmodels/tsa/statespace/_representation.pyx":3538
44209  *
44210  *         # Create the selected state covariance matrix
44211  *         self.select_state_cov(t)             # <<<<<<<<<<<<<<
44212  *
44213  *         # Handle missing data
44214  */
44215   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->select_state_cov(__pyx_v_self, __pyx_v_t);
44216 
44217   /* "statsmodels/tsa/statespace/_representation.pyx":3542
44218  *         # Handle missing data
44219  *         # Note: this modifies object pointers and _* dimensions
44220  *         k_endog = self.select_missing(t)             # <<<<<<<<<<<<<<
44221  *
44222  *         # Set dimensions
44223  */
44224   __pyx_v_k_endog = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->select_missing(__pyx_v_self, __pyx_v_t);
44225 
44226   /* "statsmodels/tsa/statespace/_representation.pyx":3545
44227  *
44228  *         # Set dimensions
44229  *         self.set_dimensions(k_endog, self.k_states, self.k_posdef)             # <<<<<<<<<<<<<<
44230  *
44231  *         # Handle transformations
44232  */
44233   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_k_endog, __pyx_v_self->k_states, __pyx_v_self->k_posdef);
44234 
44235   /* "statsmodels/tsa/statespace/_representation.pyx":3548
44236  *
44237  *         # Handle transformations
44238  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)             # <<<<<<<<<<<<<<
44239  *
44240  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
44241  */
44242   __pyx_t_16.__pyx_n = 1;
44243   __pyx_t_16.reset = __pyx_v_reset;
44244   ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->transform(__pyx_v_self, __pyx_v_t, __pyx_v_self->_previous_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, &__pyx_t_16); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3548, __pyx_L1_error)
44245 
44246   /* "statsmodels/tsa/statespace/_representation.pyx":3491
44247  *             self.seek(self.t+1, 0, 0)
44248  *
44249  *     cpdef seek(self, unsigned int t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False):             # <<<<<<<<<<<<<<
44250  *         self._previous_t = self.t
44251  *
44252  */
44253 
44254   /* function exit code */
44255   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
44256   goto __pyx_L0;
44257   __pyx_L1_error:;
44258   __Pyx_XDECREF(__pyx_t_1);
44259   __Pyx_XDECREF(__pyx_t_2);
44260   __Pyx_XDECREF(__pyx_t_3);
44261   __Pyx_XDECREF(__pyx_t_4);
44262   __Pyx_XDECREF(__pyx_t_5);
44263   __Pyx_XDECREF(__pyx_t_6);
44264   __Pyx_XDECREF(__pyx_t_7);
44265   __Pyx_XDECREF(__pyx_t_8);
44266   __Pyx_XDECREF(__pyx_t_10);
44267   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
44268   __pyx_r = 0;
44269   __pyx_L0:;
44270   __Pyx_XGIVEREF(__pyx_r);
44271   __Pyx_RefNannyFinishContext();
44272   return __pyx_r;
44273 }
44274 
44275 /* Python wrapper */
44276 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19seek(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)44277 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
44278   unsigned int __pyx_v_t;
44279   unsigned int __pyx_v_transform_diagonalize;
44280   unsigned int __pyx_v_transform_generalized_collapse;
44281   unsigned int __pyx_v_reset;
44282   int __pyx_lineno = 0;
44283   const char *__pyx_filename = NULL;
44284   int __pyx_clineno = 0;
44285   PyObject *__pyx_r = 0;
44286   __Pyx_RefNannyDeclarations
44287   __Pyx_RefNannySetupContext("seek (wrapper)", 0);
44288   {
44289     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_transform_diagonalize,&__pyx_n_s_transform_generalized_collapse,&__pyx_n_s_reset,0};
44290     PyObject* values[4] = {0,0,0,0};
44291     if (unlikely(__pyx_kwds)) {
44292       Py_ssize_t kw_args;
44293       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
44294       switch (pos_args) {
44295         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44296         CYTHON_FALLTHROUGH;
44297         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44298         CYTHON_FALLTHROUGH;
44299         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44300         CYTHON_FALLTHROUGH;
44301         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44302         CYTHON_FALLTHROUGH;
44303         case  0: break;
44304         default: goto __pyx_L5_argtuple_error;
44305       }
44306       kw_args = PyDict_Size(__pyx_kwds);
44307       switch (pos_args) {
44308         case  0:
44309         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
44310         else goto __pyx_L5_argtuple_error;
44311         CYTHON_FALLTHROUGH;
44312         case  1:
44313         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_diagonalize)) != 0)) kw_args--;
44314         else {
44315           __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, 1); __PYX_ERR(0, 3491, __pyx_L3_error)
44316         }
44317         CYTHON_FALLTHROUGH;
44318         case  2:
44319         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_transform_generalized_collapse)) != 0)) kw_args--;
44320         else {
44321           __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, 2); __PYX_ERR(0, 3491, __pyx_L3_error)
44322         }
44323         CYTHON_FALLTHROUGH;
44324         case  3:
44325         if (kw_args > 0) {
44326           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reset);
44327           if (value) { values[3] = value; kw_args--; }
44328         }
44329       }
44330       if (unlikely(kw_args > 0)) {
44331         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "seek") < 0)) __PYX_ERR(0, 3491, __pyx_L3_error)
44332       }
44333     } else {
44334       switch (PyTuple_GET_SIZE(__pyx_args)) {
44335         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44336         CYTHON_FALLTHROUGH;
44337         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44338         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44339         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44340         break;
44341         default: goto __pyx_L5_argtuple_error;
44342       }
44343     }
44344     __pyx_v_t = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_t == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3491, __pyx_L3_error)
44345     __pyx_v_transform_diagonalize = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_transform_diagonalize == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3491, __pyx_L3_error)
44346     __pyx_v_transform_generalized_collapse = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_transform_generalized_collapse == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3491, __pyx_L3_error)
44347     if (values[3]) {
44348       __pyx_v_reset = __Pyx_PyInt_As_unsigned_int(values[3]); if (unlikely((__pyx_v_reset == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3491, __pyx_L3_error)
44349     } else {
44350       __pyx_v_reset = ((unsigned int)0);
44351     }
44352   }
44353   goto __pyx_L4_argument_unpacking_done;
44354   __pyx_L5_argtuple_error:;
44355   __Pyx_RaiseArgtupleInvalid("seek", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3491, __pyx_L3_error)
44356   __pyx_L3_error:;
44357   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
44358   __Pyx_RefNannyFinishContext();
44359   return NULL;
44360   __pyx_L4_argument_unpacking_done:;
44361   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18seek(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), __pyx_v_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, __pyx_v_reset);
44362 
44363   /* function exit code */
44364   __Pyx_RefNannyFinishContext();
44365   return __pyx_r;
44366 }
44367 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,unsigned int __pyx_v_reset)44368 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18seek(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, unsigned int __pyx_v_reset) {
44369   PyObject *__pyx_r = NULL;
44370   __Pyx_RefNannyDeclarations
44371   PyObject *__pyx_t_1 = NULL;
44372   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek __pyx_t_2;
44373   int __pyx_lineno = 0;
44374   const char *__pyx_filename = NULL;
44375   int __pyx_clineno = 0;
44376   __Pyx_RefNannySetupContext("seek", 0);
44377   __Pyx_XDECREF(__pyx_r);
44378   __pyx_t_2.__pyx_n = 1;
44379   __pyx_t_2.reset = __pyx_v_reset;
44380   __pyx_t_1 = __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_zStatespace->seek(__pyx_v_self, __pyx_v_t, __pyx_v_transform_diagonalize, __pyx_v_transform_generalized_collapse, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3491, __pyx_L1_error)
44381   __Pyx_GOTREF(__pyx_t_1);
44382   __pyx_r = __pyx_t_1;
44383   __pyx_t_1 = 0;
44384   goto __pyx_L0;
44385 
44386   /* function exit code */
44387   __pyx_L1_error:;
44388   __Pyx_XDECREF(__pyx_t_1);
44389   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
44390   __pyx_r = NULL;
44391   __pyx_L0:;
44392   __Pyx_XGIVEREF(__pyx_r);
44393   __Pyx_RefNannyFinishContext();
44394   return __pyx_r;
44395 }
44396 
44397 /* "statsmodels/tsa/statespace/_representation.pyx":3550
44398  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)
44399  *
44400  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):             # <<<<<<<<<<<<<<
44401  *         self._k_endog = k_endog
44402  *         self._k_states = k_states
44403  */
44404 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_k_endog,unsigned int __pyx_v_k_states,unsigned int __pyx_v_k_posdef)44405 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_set_dimensions(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_k_endog, unsigned int __pyx_v_k_states, unsigned int __pyx_v_k_posdef) {
44406   __Pyx_RefNannyDeclarations
44407   __Pyx_RefNannySetupContext("set_dimensions", 0);
44408 
44409   /* "statsmodels/tsa/statespace/_representation.pyx":3551
44410  *
44411  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
44412  *         self._k_endog = k_endog             # <<<<<<<<<<<<<<
44413  *         self._k_states = k_states
44414  *         self._k_posdef = k_posdef
44415  */
44416   __pyx_v_self->_k_endog = __pyx_v_k_endog;
44417 
44418   /* "statsmodels/tsa/statespace/_representation.pyx":3552
44419  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):
44420  *         self._k_endog = k_endog
44421  *         self._k_states = k_states             # <<<<<<<<<<<<<<
44422  *         self._k_posdef = k_posdef
44423  *         self._k_endog2 = k_endog**2
44424  */
44425   __pyx_v_self->_k_states = __pyx_v_k_states;
44426 
44427   /* "statsmodels/tsa/statespace/_representation.pyx":3553
44428  *         self._k_endog = k_endog
44429  *         self._k_states = k_states
44430  *         self._k_posdef = k_posdef             # <<<<<<<<<<<<<<
44431  *         self._k_endog2 = k_endog**2
44432  *         self._k_states2 = k_states**2
44433  */
44434   __pyx_v_self->_k_posdef = __pyx_v_k_posdef;
44435 
44436   /* "statsmodels/tsa/statespace/_representation.pyx":3554
44437  *         self._k_states = k_states
44438  *         self._k_posdef = k_posdef
44439  *         self._k_endog2 = k_endog**2             # <<<<<<<<<<<<<<
44440  *         self._k_states2 = k_states**2
44441  *         self._k_posdef2 = k_posdef**2
44442  */
44443   __pyx_v_self->_k_endog2 = __Pyx_pow_long(((long)__pyx_v_k_endog), 2);
44444 
44445   /* "statsmodels/tsa/statespace/_representation.pyx":3555
44446  *         self._k_posdef = k_posdef
44447  *         self._k_endog2 = k_endog**2
44448  *         self._k_states2 = k_states**2             # <<<<<<<<<<<<<<
44449  *         self._k_posdef2 = k_posdef**2
44450  *         self._k_endogstates = k_endog * k_states
44451  */
44452   __pyx_v_self->_k_states2 = __Pyx_pow_long(((long)__pyx_v_k_states), 2);
44453 
44454   /* "statsmodels/tsa/statespace/_representation.pyx":3556
44455  *         self._k_endog2 = k_endog**2
44456  *         self._k_states2 = k_states**2
44457  *         self._k_posdef2 = k_posdef**2             # <<<<<<<<<<<<<<
44458  *         self._k_endogstates = k_endog * k_states
44459  *         self._k_statesposdef = k_states * k_posdef
44460  */
44461   __pyx_v_self->_k_posdef2 = __Pyx_pow_long(((long)__pyx_v_k_posdef), 2);
44462 
44463   /* "statsmodels/tsa/statespace/_representation.pyx":3557
44464  *         self._k_states2 = k_states**2
44465  *         self._k_posdef2 = k_posdef**2
44466  *         self._k_endogstates = k_endog * k_states             # <<<<<<<<<<<<<<
44467  *         self._k_statesposdef = k_states * k_posdef
44468  *
44469  */
44470   __pyx_v_self->_k_endogstates = (__pyx_v_k_endog * __pyx_v_k_states);
44471 
44472   /* "statsmodels/tsa/statespace/_representation.pyx":3558
44473  *         self._k_posdef2 = k_posdef**2
44474  *         self._k_endogstates = k_endog * k_states
44475  *         self._k_statesposdef = k_states * k_posdef             # <<<<<<<<<<<<<<
44476  *
44477  *     cdef void select_state_cov(self, unsigned int t):
44478  */
44479   __pyx_v_self->_k_statesposdef = (__pyx_v_k_states * __pyx_v_k_posdef);
44480 
44481   /* "statsmodels/tsa/statespace/_representation.pyx":3550
44482  *         self.transform(t, self._previous_t, transform_diagonalize, transform_generalized_collapse, reset)
44483  *
44484  *     cdef void set_dimensions(self, unsigned int k_endog, unsigned int k_states, unsigned int k_posdef):             # <<<<<<<<<<<<<<
44485  *         self._k_endog = k_endog
44486  *         self._k_states = k_states
44487  */
44488 
44489   /* function exit code */
44490   __Pyx_RefNannyFinishContext();
44491 }
44492 
44493 /* "statsmodels/tsa/statespace/_representation.pyx":3560
44494  *         self._k_statesposdef = k_states * k_posdef
44495  *
44496  *     cdef void select_state_cov(self, unsigned int t):             # <<<<<<<<<<<<<<
44497  *         cdef int selected_state_cov_t = 0
44498  *
44499  */
44500 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_t)44501 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_select_state_cov(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
44502   int __pyx_v_selected_state_cov_t;
44503   __Pyx_RefNannyDeclarations
44504   int __pyx_t_1;
44505   int __pyx_t_2;
44506   Py_ssize_t __pyx_t_3;
44507   Py_ssize_t __pyx_t_4;
44508   Py_ssize_t __pyx_t_5;
44509   int __pyx_lineno = 0;
44510   const char *__pyx_filename = NULL;
44511   int __pyx_clineno = 0;
44512   __Pyx_RefNannySetupContext("select_state_cov", 0);
44513 
44514   /* "statsmodels/tsa/statespace/_representation.pyx":3561
44515  *
44516  *     cdef void select_state_cov(self, unsigned int t):
44517  *         cdef int selected_state_cov_t = 0             # <<<<<<<<<<<<<<
44518  *
44519  *         # ### Get selected state covariance matrix
44520  */
44521   __pyx_v_selected_state_cov_t = 0;
44522 
44523   /* "statsmodels/tsa/statespace/_representation.pyx":3564
44524  *
44525  *         # ### Get selected state covariance matrix
44526  *         if t == 0 or self.selected_state_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
44527  *             selected_state_cov_t = t
44528  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
44529  */
44530   __pyx_t_2 = ((__pyx_v_t == 0) != 0);
44531   if (!__pyx_t_2) {
44532   } else {
44533     __pyx_t_1 = __pyx_t_2;
44534     goto __pyx_L4_bool_binop_done;
44535   }
44536   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3564, __pyx_L1_error)}
44537   __pyx_t_2 = (((__pyx_v_self->selected_state_cov.shape[2]) > 1) != 0);
44538   __pyx_t_1 = __pyx_t_2;
44539   __pyx_L4_bool_binop_done:;
44540   if (__pyx_t_1) {
44541 
44542     /* "statsmodels/tsa/statespace/_representation.pyx":3565
44543  *         # ### Get selected state covariance matrix
44544  *         if t == 0 or self.selected_state_cov.shape[2] > 1:
44545  *             selected_state_cov_t = t             # <<<<<<<<<<<<<<
44546  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
44547  *
44548  */
44549     __pyx_v_selected_state_cov_t = __pyx_v_t;
44550 
44551     /* "statsmodels/tsa/statespace/_representation.pyx":3566
44552  *         if t == 0 or self.selected_state_cov.shape[2] > 1:
44553  *             selected_state_cov_t = t
44554  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]             # <<<<<<<<<<<<<<
44555  *
44556  *             zselect_cov(self.k_states, self.k_posdef,
44557  */
44558     if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3566, __pyx_L1_error)}
44559     __pyx_t_3 = 0;
44560     __pyx_t_4 = 0;
44561     __pyx_t_5 = __pyx_v_selected_state_cov_t;
44562     __pyx_v_self->_selected_state_cov = (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->selected_state_cov.data) + __pyx_t_3)) ) + __pyx_t_4 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_5 * __pyx_v_self->selected_state_cov.strides[2]) ))));
44563 
44564     /* "statsmodels/tsa/statespace/_representation.pyx":3569
44565  *
44566  *             zselect_cov(self.k_states, self.k_posdef,
44567  *                                        &self.tmp[0,0],             # <<<<<<<<<<<<<<
44568  *                                        self._selection,
44569  *                                        self._state_cov,
44570  */
44571     if (unlikely(!__pyx_v_self->tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3569, __pyx_L1_error)}
44572     __pyx_t_5 = 0;
44573     __pyx_t_4 = 0;
44574 
44575     /* "statsmodels/tsa/statespace/_representation.pyx":3568
44576  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
44577  *
44578  *             zselect_cov(self.k_states, self.k_posdef,             # <<<<<<<<<<<<<<
44579  *                                        &self.tmp[0,0],
44580  *                                        self._selection,
44581  */
44582     (void)(__pyx_f_11statsmodels_3tsa_10statespace_15_representation_zselect_cov(__pyx_v_self->k_states, __pyx_v_self->k_posdef, (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->tmp.data) + __pyx_t_5)) ) + __pyx_t_4 * __pyx_v_self->tmp.strides[1]) )))), __pyx_v_self->_selection, __pyx_v_self->_state_cov, __pyx_v_self->_selected_state_cov));
44583 
44584     /* "statsmodels/tsa/statespace/_representation.pyx":3564
44585  *
44586  *         # ### Get selected state covariance matrix
44587  *         if t == 0 or self.selected_state_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
44588  *             selected_state_cov_t = t
44589  *             self._selected_state_cov = &self.selected_state_cov[0, 0, selected_state_cov_t]
44590  */
44591     goto __pyx_L3;
44592   }
44593 
44594   /* "statsmodels/tsa/statespace/_representation.pyx":3574
44595  *                                        self._selected_state_cov)
44596  *         else:
44597  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]             # <<<<<<<<<<<<<<
44598  *
44599  *     cdef int select_missing(self, unsigned int t):
44600  */
44601   /*else*/ {
44602     if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3574, __pyx_L1_error)}
44603     __pyx_t_4 = 0;
44604     __pyx_t_5 = 0;
44605     __pyx_t_3 = 0;
44606     __pyx_v_self->_selected_state_cov = (&(*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->selected_state_cov.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->selected_state_cov.strides[1]) ) + __pyx_t_3 * __pyx_v_self->selected_state_cov.strides[2]) ))));
44607   }
44608   __pyx_L3:;
44609 
44610   /* "statsmodels/tsa/statespace/_representation.pyx":3560
44611  *         self._k_statesposdef = k_states * k_posdef
44612  *
44613  *     cdef void select_state_cov(self, unsigned int t):             # <<<<<<<<<<<<<<
44614  *         cdef int selected_state_cov_t = 0
44615  *
44616  */
44617 
44618   /* function exit code */
44619   goto __pyx_L0;
44620   __pyx_L1_error:;
44621   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.zStatespace.select_state_cov", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
44622   __pyx_L0:;
44623   __Pyx_RefNannyFinishContext();
44624 }
44625 
44626 /* "statsmodels/tsa/statespace/_representation.pyx":3576
44627  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]
44628  *
44629  *     cdef int select_missing(self, unsigned int t):             # <<<<<<<<<<<<<<
44630  *         # Note: this assumes that object pointers are already initialized
44631  *         # Note: this assumes that transform_... will be done *later*
44632  */
44633 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_t)44634 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_select_missing(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
44635   int __pyx_v_k_endog;
44636   int __pyx_r;
44637   __Pyx_RefNannyDeclarations
44638   int __pyx_t_1;
44639   size_t __pyx_t_2;
44640   int __pyx_t_3;
44641   int __pyx_lineno = 0;
44642   const char *__pyx_filename = NULL;
44643   int __pyx_clineno = 0;
44644   __Pyx_RefNannySetupContext("select_missing", 0);
44645 
44646   /* "statsmodels/tsa/statespace/_representation.pyx":3579
44647  *         # Note: this assumes that object pointers are already initialized
44648  *         # Note: this assumes that transform_... will be done *later*
44649  *         cdef int k_endog = self.k_endog             # <<<<<<<<<<<<<<
44650  *
44651  *         # Set the current iteration nmissing
44652  */
44653   __pyx_t_1 = __pyx_v_self->k_endog;
44654   __pyx_v_k_endog = __pyx_t_1;
44655 
44656   /* "statsmodels/tsa/statespace/_representation.pyx":3582
44657  *
44658  *         # Set the current iteration nmissing
44659  *         self._nmissing = self.nmissing[t]             # <<<<<<<<<<<<<<
44660  *
44661  *         # ### Perform missing selections
44662  */
44663   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3582, __pyx_L1_error)}
44664   __pyx_t_2 = __pyx_v_t;
44665   __pyx_v_self->_nmissing = (*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_2 * __pyx_v_self->nmissing.strides[0]) )));
44666 
44667   /* "statsmodels/tsa/statespace/_representation.pyx":3599
44668  *         # forecasting), we actually set do not change the dimension, but we set
44669  *         # the design matrix to the zeros array.
44670  *         if self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
44671  *             self._select_missing_entire_obs(t)
44672  *         elif self._nmissing > 0:
44673  */
44674   __pyx_t_3 = ((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0);
44675   if (__pyx_t_3) {
44676 
44677     /* "statsmodels/tsa/statespace/_representation.pyx":3600
44678  *         # the design matrix to the zeros array.
44679  *         if self._nmissing == self.k_endog:
44680  *             self._select_missing_entire_obs(t)             # <<<<<<<<<<<<<<
44681  *         elif self._nmissing > 0:
44682  *             self._select_missing_partial_obs(t)
44683  */
44684     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->_select_missing_entire_obs(__pyx_v_self, __pyx_v_t);
44685 
44686     /* "statsmodels/tsa/statespace/_representation.pyx":3599
44687  *         # forecasting), we actually set do not change the dimension, but we set
44688  *         # the design matrix to the zeros array.
44689  *         if self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
44690  *             self._select_missing_entire_obs(t)
44691  *         elif self._nmissing > 0:
44692  */
44693     goto __pyx_L3;
44694   }
44695 
44696   /* "statsmodels/tsa/statespace/_representation.pyx":3601
44697  *         if self._nmissing == self.k_endog:
44698  *             self._select_missing_entire_obs(t)
44699  *         elif self._nmissing > 0:             # <<<<<<<<<<<<<<
44700  *             self._select_missing_partial_obs(t)
44701  *             k_endog = self.k_endog - self._nmissing
44702  */
44703   __pyx_t_3 = ((__pyx_v_self->_nmissing > 0) != 0);
44704   if (__pyx_t_3) {
44705 
44706     /* "statsmodels/tsa/statespace/_representation.pyx":3602
44707  *             self._select_missing_entire_obs(t)
44708  *         elif self._nmissing > 0:
44709  *             self._select_missing_partial_obs(t)             # <<<<<<<<<<<<<<
44710  *             k_endog = self.k_endog - self._nmissing
44711  *
44712  */
44713     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->_select_missing_partial_obs(__pyx_v_self, __pyx_v_t);
44714 
44715     /* "statsmodels/tsa/statespace/_representation.pyx":3603
44716  *         elif self._nmissing > 0:
44717  *             self._select_missing_partial_obs(t)
44718  *             k_endog = self.k_endog - self._nmissing             # <<<<<<<<<<<<<<
44719  *
44720  *         # Return the number of non-missing endogenous variables
44721  */
44722     __pyx_v_k_endog = (__pyx_v_self->k_endog - __pyx_v_self->_nmissing);
44723 
44724     /* "statsmodels/tsa/statespace/_representation.pyx":3601
44725  *         if self._nmissing == self.k_endog:
44726  *             self._select_missing_entire_obs(t)
44727  *         elif self._nmissing > 0:             # <<<<<<<<<<<<<<
44728  *             self._select_missing_partial_obs(t)
44729  *             k_endog = self.k_endog - self._nmissing
44730  */
44731   }
44732   __pyx_L3:;
44733 
44734   /* "statsmodels/tsa/statespace/_representation.pyx":3606
44735  *
44736  *         # Return the number of non-missing endogenous variables
44737  *         return k_endog             # <<<<<<<<<<<<<<
44738  *
44739  *     cdef void _select_missing_entire_obs(self, unsigned int t):
44740  */
44741   __pyx_r = __pyx_v_k_endog;
44742   goto __pyx_L0;
44743 
44744   /* "statsmodels/tsa/statespace/_representation.pyx":3576
44745  *             self._selected_state_cov = &self.selected_state_cov[0, 0, 0]
44746  *
44747  *     cdef int select_missing(self, unsigned int t):             # <<<<<<<<<<<<<<
44748  *         # Note: this assumes that object pointers are already initialized
44749  *         # Note: this assumes that transform_... will be done *later*
44750  */
44751 
44752   /* function exit code */
44753   __pyx_L1_error:;
44754   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.zStatespace.select_missing", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
44755   __pyx_r = 0;
44756   __pyx_L0:;
44757   __Pyx_RefNannyFinishContext();
44758   return __pyx_r;
44759 }
44760 
44761 /* "statsmodels/tsa/statespace/_representation.pyx":3608
44762  *         return k_endog
44763  *
44764  *     cdef void _select_missing_entire_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
44765  *         cdef:
44766  *             int i, j
44767  */
44768 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,CYTHON_UNUSED unsigned int __pyx_v_t)44769 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__select_missing_entire_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, CYTHON_UNUSED unsigned int __pyx_v_t) {
44770   int __pyx_v_i;
44771   int __pyx_v_j;
44772   __Pyx_RefNannyDeclarations
44773   int __pyx_t_1;
44774   int __pyx_t_2;
44775   int __pyx_t_3;
44776   int __pyx_t_4;
44777   int __pyx_t_5;
44778   int __pyx_t_6;
44779   Py_ssize_t __pyx_t_7;
44780   int __pyx_lineno = 0;
44781   const char *__pyx_filename = NULL;
44782   int __pyx_clineno = 0;
44783   __Pyx_RefNannySetupContext("_select_missing_entire_obs", 0);
44784 
44785   /* "statsmodels/tsa/statespace/_representation.pyx":3613
44786  *
44787  *         # Design matrix is set to zeros
44788  *         for i in range(self.k_states):             # <<<<<<<<<<<<<<
44789  *             for j in range(self.k_endog):
44790  *                 self.selected_design[j + i*self.k_endog] = 0.0
44791  */
44792   __pyx_t_1 = __pyx_v_self->k_states;
44793   __pyx_t_2 = __pyx_t_1;
44794   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
44795     __pyx_v_i = __pyx_t_3;
44796 
44797     /* "statsmodels/tsa/statespace/_representation.pyx":3614
44798  *         # Design matrix is set to zeros
44799  *         for i in range(self.k_states):
44800  *             for j in range(self.k_endog):             # <<<<<<<<<<<<<<
44801  *                 self.selected_design[j + i*self.k_endog] = 0.0
44802  *         self._design = &self.selected_design[0]
44803  */
44804     __pyx_t_4 = __pyx_v_self->k_endog;
44805     __pyx_t_5 = __pyx_t_4;
44806     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
44807       __pyx_v_j = __pyx_t_6;
44808 
44809       /* "statsmodels/tsa/statespace/_representation.pyx":3615
44810  *         for i in range(self.k_states):
44811  *             for j in range(self.k_endog):
44812  *                 self.selected_design[j + i*self.k_endog] = 0.0             # <<<<<<<<<<<<<<
44813  *         self._design = &self.selected_design[0]
44814  *
44815  */
44816       if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3615, __pyx_L1_error)}
44817       __pyx_t_7 = (__pyx_v_j + (__pyx_v_i * __pyx_v_self->k_endog));
44818       *((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_7 * __pyx_v_self->selected_design.strides[0]) )) = __pyx_t_double_complex_from_parts(0.0, 0);
44819     }
44820   }
44821 
44822   /* "statsmodels/tsa/statespace/_representation.pyx":3616
44823  *             for j in range(self.k_endog):
44824  *                 self.selected_design[j + i*self.k_endog] = 0.0
44825  *         self._design = &self.selected_design[0]             # <<<<<<<<<<<<<<
44826  *
44827  *     cdef void _select_missing_partial_obs(self, unsigned int t):
44828  */
44829   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3616, __pyx_L1_error)}
44830   __pyx_t_7 = 0;
44831   __pyx_v_self->_design = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_7 * __pyx_v_self->selected_design.strides[0]) ))));
44832 
44833   /* "statsmodels/tsa/statespace/_representation.pyx":3608
44834  *         return k_endog
44835  *
44836  *     cdef void _select_missing_entire_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
44837  *         cdef:
44838  *             int i, j
44839  */
44840 
44841   /* function exit code */
44842   goto __pyx_L0;
44843   __pyx_L1_error:;
44844   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.zStatespace._select_missing_entire_obs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
44845   __pyx_L0:;
44846   __Pyx_RefNannyFinishContext();
44847 }
44848 
44849 /* "statsmodels/tsa/statespace/_representation.pyx":3618
44850  *         self._design = &self.selected_design[0]
44851  *
44852  *     cdef void _select_missing_partial_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
44853  *         cdef:
44854  *             int i, j, k, l
44855  */
44856 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_t)44857 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__select_missing_partial_obs(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t) {
44858   int __pyx_v_i;
44859   int __pyx_v_j;
44860   int __pyx_v_k;
44861   int __pyx_v_l;
44862   CYTHON_UNUSED int __pyx_v_inc;
44863   CYTHON_UNUSED int __pyx_v_design_t;
44864   CYTHON_UNUSED int __pyx_v_obs_cov_t;
44865   int __pyx_v_k_endog;
44866   __Pyx_RefNannyDeclarations
44867   int __pyx_t_1;
44868   int __pyx_t_2;
44869   int __pyx_t_3;
44870   Py_ssize_t __pyx_t_4;
44871   size_t __pyx_t_5;
44872   int __pyx_t_6;
44873   int __pyx_t_7;
44874   int __pyx_t_8;
44875   int __pyx_t_9;
44876   int __pyx_lineno = 0;
44877   const char *__pyx_filename = NULL;
44878   int __pyx_clineno = 0;
44879   __Pyx_RefNannySetupContext("_select_missing_partial_obs", 0);
44880 
44881   /* "statsmodels/tsa/statespace/_representation.pyx":3621
44882  *         cdef:
44883  *             int i, j, k, l
44884  *             int inc = 1             # <<<<<<<<<<<<<<
44885  *             int design_t = 0
44886  *             int obs_cov_t = 0
44887  */
44888   __pyx_v_inc = 1;
44889 
44890   /* "statsmodels/tsa/statespace/_representation.pyx":3622
44891  *             int i, j, k, l
44892  *             int inc = 1
44893  *             int design_t = 0             # <<<<<<<<<<<<<<
44894  *             int obs_cov_t = 0
44895  *             int k_endog = self.k_endog - self._nmissing
44896  */
44897   __pyx_v_design_t = 0;
44898 
44899   /* "statsmodels/tsa/statespace/_representation.pyx":3623
44900  *             int inc = 1
44901  *             int design_t = 0
44902  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
44903  *             int k_endog = self.k_endog - self._nmissing
44904  *
44905  */
44906   __pyx_v_obs_cov_t = 0;
44907 
44908   /* "statsmodels/tsa/statespace/_representation.pyx":3624
44909  *             int design_t = 0
44910  *             int obs_cov_t = 0
44911  *             int k_endog = self.k_endog - self._nmissing             # <<<<<<<<<<<<<<
44912  *
44913  *         k = 0
44914  */
44915   __pyx_v_k_endog = (__pyx_v_self->k_endog - __pyx_v_self->_nmissing);
44916 
44917   /* "statsmodels/tsa/statespace/_representation.pyx":3626
44918  *             int k_endog = self.k_endog - self._nmissing
44919  *
44920  *         k = 0             # <<<<<<<<<<<<<<
44921  *         for i in range(self.k_endog):
44922  *             if not self.missing[i, t]:
44923  */
44924   __pyx_v_k = 0;
44925 
44926   /* "statsmodels/tsa/statespace/_representation.pyx":3627
44927  *
44928  *         k = 0
44929  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
44930  *             if not self.missing[i, t]:
44931  *
44932  */
44933   __pyx_t_1 = __pyx_v_self->k_endog;
44934   __pyx_t_2 = __pyx_t_1;
44935   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
44936     __pyx_v_i = __pyx_t_3;
44937 
44938     /* "statsmodels/tsa/statespace/_representation.pyx":3628
44939  *         k = 0
44940  *         for i in range(self.k_endog):
44941  *             if not self.missing[i, t]:             # <<<<<<<<<<<<<<
44942  *
44943  *                 self.selected_obs[k] = self._obs[i]
44944  */
44945     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3628, __pyx_L1_error)}
44946     __pyx_t_4 = __pyx_v_i;
44947     __pyx_t_5 = __pyx_v_t;
44948     __pyx_t_6 = ((!((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->missing.strides[1]) ))) != 0)) != 0);
44949     if (__pyx_t_6) {
44950 
44951       /* "statsmodels/tsa/statespace/_representation.pyx":3630
44952  *             if not self.missing[i, t]:
44953  *
44954  *                 self.selected_obs[k] = self._obs[i]             # <<<<<<<<<<<<<<
44955  *                 self.selected_obs_intercept[k] = self._obs_intercept[i]
44956  *
44957  */
44958       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3630, __pyx_L1_error)}
44959       __pyx_t_4 = __pyx_v_k;
44960       *((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_4 * __pyx_v_self->selected_obs.strides[0]) )) = (__pyx_v_self->_obs[__pyx_v_i]);
44961 
44962       /* "statsmodels/tsa/statespace/_representation.pyx":3631
44963  *
44964  *                 self.selected_obs[k] = self._obs[i]
44965  *                 self.selected_obs_intercept[k] = self._obs_intercept[i]             # <<<<<<<<<<<<<<
44966  *
44967  *                 # i is rows, k is rows
44968  */
44969       if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3631, __pyx_L1_error)}
44970       __pyx_t_4 = __pyx_v_k;
44971       *((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs_intercept.data + __pyx_t_4 * __pyx_v_self->selected_obs_intercept.strides[0]) )) = (__pyx_v_self->_obs_intercept[__pyx_v_i]);
44972 
44973       /* "statsmodels/tsa/statespace/_representation.pyx":3636
44974  *                 blas.zcopy(&self.k_states,
44975  *                       &self._design[i], &self.k_endog,
44976  *                       &self.selected_design[k], &k_endog)             # <<<<<<<<<<<<<<
44977  *
44978  *                 # i, k is columns, j, l is rows
44979  */
44980       if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3636, __pyx_L1_error)}
44981       __pyx_t_4 = __pyx_v_k;
44982 
44983       /* "statsmodels/tsa/statespace/_representation.pyx":3634
44984  *
44985  *                 # i is rows, k is rows
44986  *                 blas.zcopy(&self.k_states,             # <<<<<<<<<<<<<<
44987  *                       &self._design[i], &self.k_endog,
44988  *                       &self.selected_design[k], &k_endog)
44989  */
44990       __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->k_states), (&(__pyx_v_self->_design[__pyx_v_i])), (&__pyx_v_self->k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_4 * __pyx_v_self->selected_design.strides[0]) )))), (&__pyx_v_k_endog));
44991 
44992       /* "statsmodels/tsa/statespace/_representation.pyx":3639
44993  *
44994  *                 # i, k is columns, j, l is rows
44995  *                 l = 0             # <<<<<<<<<<<<<<
44996  *                 for j in range(self.k_endog):
44997  *                     if not self.missing[j, t]:
44998  */
44999       __pyx_v_l = 0;
45000 
45001       /* "statsmodels/tsa/statespace/_representation.pyx":3640
45002  *                 # i, k is columns, j, l is rows
45003  *                 l = 0
45004  *                 for j in range(self.k_endog):             # <<<<<<<<<<<<<<
45005  *                     if not self.missing[j, t]:
45006  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
45007  */
45008       __pyx_t_7 = __pyx_v_self->k_endog;
45009       __pyx_t_8 = __pyx_t_7;
45010       for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
45011         __pyx_v_j = __pyx_t_9;
45012 
45013         /* "statsmodels/tsa/statespace/_representation.pyx":3641
45014  *                 l = 0
45015  *                 for j in range(self.k_endog):
45016  *                     if not self.missing[j, t]:             # <<<<<<<<<<<<<<
45017  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
45018  *                         l += 1
45019  */
45020         if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3641, __pyx_L1_error)}
45021         __pyx_t_4 = __pyx_v_j;
45022         __pyx_t_5 = __pyx_v_t;
45023         __pyx_t_6 = ((!((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_4)) ) + __pyx_t_5 * __pyx_v_self->missing.strides[1]) ))) != 0)) != 0);
45024         if (__pyx_t_6) {
45025 
45026           /* "statsmodels/tsa/statespace/_representation.pyx":3642
45027  *                 for j in range(self.k_endog):
45028  *                     if not self.missing[j, t]:
45029  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]             # <<<<<<<<<<<<<<
45030  *                         l += 1
45031  *                 k += 1
45032  */
45033           if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3642, __pyx_L1_error)}
45034           __pyx_t_4 = (__pyx_v_l + (__pyx_v_k * __pyx_v_k_endog));
45035           *((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs_cov.data + __pyx_t_4 * __pyx_v_self->selected_obs_cov.strides[0]) )) = (__pyx_v_self->_obs_cov[(__pyx_v_j + (__pyx_v_i * __pyx_v_self->k_endog))]);
45036 
45037           /* "statsmodels/tsa/statespace/_representation.pyx":3643
45038  *                     if not self.missing[j, t]:
45039  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
45040  *                         l += 1             # <<<<<<<<<<<<<<
45041  *                 k += 1
45042  *         self._obs = &self.selected_obs[0]
45043  */
45044           __pyx_v_l = (__pyx_v_l + 1);
45045 
45046           /* "statsmodels/tsa/statespace/_representation.pyx":3641
45047  *                 l = 0
45048  *                 for j in range(self.k_endog):
45049  *                     if not self.missing[j, t]:             # <<<<<<<<<<<<<<
45050  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
45051  *                         l += 1
45052  */
45053         }
45054       }
45055 
45056       /* "statsmodels/tsa/statespace/_representation.pyx":3644
45057  *                         self.selected_obs_cov[l + k*k_endog] = self._obs_cov[j + i*self.k_endog]
45058  *                         l += 1
45059  *                 k += 1             # <<<<<<<<<<<<<<
45060  *         self._obs = &self.selected_obs[0]
45061  *         self._obs_intercept = &self.selected_obs_intercept[0]
45062  */
45063       __pyx_v_k = (__pyx_v_k + 1);
45064 
45065       /* "statsmodels/tsa/statespace/_representation.pyx":3628
45066  *         k = 0
45067  *         for i in range(self.k_endog):
45068  *             if not self.missing[i, t]:             # <<<<<<<<<<<<<<
45069  *
45070  *                 self.selected_obs[k] = self._obs[i]
45071  */
45072     }
45073   }
45074 
45075   /* "statsmodels/tsa/statespace/_representation.pyx":3645
45076  *                         l += 1
45077  *                 k += 1
45078  *         self._obs = &self.selected_obs[0]             # <<<<<<<<<<<<<<
45079  *         self._obs_intercept = &self.selected_obs_intercept[0]
45080  *         self._design = &self.selected_design[0]
45081  */
45082   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3645, __pyx_L1_error)}
45083   __pyx_t_4 = 0;
45084   __pyx_v_self->_obs = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_4 * __pyx_v_self->selected_obs.strides[0]) ))));
45085 
45086   /* "statsmodels/tsa/statespace/_representation.pyx":3646
45087  *                 k += 1
45088  *         self._obs = &self.selected_obs[0]
45089  *         self._obs_intercept = &self.selected_obs_intercept[0]             # <<<<<<<<<<<<<<
45090  *         self._design = &self.selected_design[0]
45091  *         self._obs_cov = &self.selected_obs_cov[0]
45092  */
45093   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3646, __pyx_L1_error)}
45094   __pyx_t_4 = 0;
45095   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs_intercept.data + __pyx_t_4 * __pyx_v_self->selected_obs_intercept.strides[0]) ))));
45096 
45097   /* "statsmodels/tsa/statespace/_representation.pyx":3647
45098  *         self._obs = &self.selected_obs[0]
45099  *         self._obs_intercept = &self.selected_obs_intercept[0]
45100  *         self._design = &self.selected_design[0]             # <<<<<<<<<<<<<<
45101  *         self._obs_cov = &self.selected_obs_cov[0]
45102  *
45103  */
45104   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3647, __pyx_L1_error)}
45105   __pyx_t_4 = 0;
45106   __pyx_v_self->_design = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_design.data + __pyx_t_4 * __pyx_v_self->selected_design.strides[0]) ))));
45107 
45108   /* "statsmodels/tsa/statespace/_representation.pyx":3648
45109  *         self._obs_intercept = &self.selected_obs_intercept[0]
45110  *         self._design = &self.selected_design[0]
45111  *         self._obs_cov = &self.selected_obs_cov[0]             # <<<<<<<<<<<<<<
45112  *
45113  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:
45114  */
45115   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3648, __pyx_L1_error)}
45116   __pyx_t_4 = 0;
45117   __pyx_v_self->_obs_cov = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs_cov.data + __pyx_t_4 * __pyx_v_self->selected_obs_cov.strides[0]) ))));
45118 
45119   /* "statsmodels/tsa/statespace/_representation.pyx":3618
45120  *         self._design = &self.selected_design[0]
45121  *
45122  *     cdef void _select_missing_partial_obs(self, unsigned int t):             # <<<<<<<<<<<<<<
45123  *         cdef:
45124  *             int i, j, k, l
45125  */
45126 
45127   /* function exit code */
45128   goto __pyx_L0;
45129   __pyx_L1_error:;
45130   __Pyx_WriteUnraisable("statsmodels.tsa.statespace._representation.zStatespace._select_missing_partial_obs", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
45131   __pyx_L0:;
45132   __Pyx_RefNannyFinishContext();
45133 }
45134 
45135 /* "statsmodels/tsa/statespace/_representation.pyx":3650
45136  *         self._obs_cov = &self.selected_obs_cov[0]
45137  *
45138  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
45139  *         # Reset the collapsed loglikelihood
45140  *         self.collapse_loglikelihood = 0
45141  */
45142 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,unsigned int __pyx_v_transform_diagonalize,unsigned int __pyx_v_transform_generalized_collapse,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform * __pyx_optional_args)45143 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, unsigned int __pyx_v_transform_diagonalize, unsigned int __pyx_v_transform_generalized_collapse, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform *__pyx_optional_args) {
45144   unsigned int __pyx_v_reset = ((unsigned int)0);
45145   int __pyx_v_k_endog;
45146   __Pyx_RefNannyDeclarations
45147   int __pyx_t_1;
45148   int __pyx_t_2;
45149   int __pyx_t_3;
45150   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse __pyx_t_4;
45151   struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize __pyx_t_5;
45152   int __pyx_lineno = 0;
45153   const char *__pyx_filename = NULL;
45154   int __pyx_clineno = 0;
45155   __Pyx_RefNannySetupContext("transform", 0);
45156   if (__pyx_optional_args) {
45157     if (__pyx_optional_args->__pyx_n > 0) {
45158       __pyx_v_reset = __pyx_optional_args->reset;
45159     }
45160   }
45161 
45162   /* "statsmodels/tsa/statespace/_representation.pyx":3652
45163  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:
45164  *         # Reset the collapsed loglikelihood
45165  *         self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
45166  *
45167  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:
45168  */
45169   __pyx_v_self->collapse_loglikelihood = __pyx_t_double_complex_from_parts(0, 0);
45170 
45171   /* "statsmodels/tsa/statespace/_representation.pyx":3654
45172  *         self.collapse_loglikelihood = 0
45173  *
45174  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:             # <<<<<<<<<<<<<<
45175  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
45176  *             # Reset dimensions
45177  */
45178   __pyx_t_2 = (__pyx_v_transform_generalized_collapse != 0);
45179   if (__pyx_t_2) {
45180   } else {
45181     __pyx_t_1 = __pyx_t_2;
45182     goto __pyx_L4_bool_binop_done;
45183   }
45184   __pyx_t_2 = ((!((__pyx_v_self->_k_endog <= __pyx_v_self->_k_states) != 0)) != 0);
45185   __pyx_t_1 = __pyx_t_2;
45186   __pyx_L4_bool_binop_done:;
45187   if (__pyx_t_1) {
45188 
45189     /* "statsmodels/tsa/statespace/_representation.pyx":3655
45190  *
45191  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:
45192  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)             # <<<<<<<<<<<<<<
45193  *             # Reset dimensions
45194  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
45195  */
45196     __pyx_t_4.__pyx_n = 1;
45197     __pyx_t_4.reset = __pyx_v_reset;
45198     __pyx_t_3 = ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->transform_generalized_collapse(__pyx_v_self, __pyx_v_t, __pyx_v_previous_t, &__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3655, __pyx_L1_error)
45199     __pyx_v_k_endog = __pyx_t_3;
45200 
45201     /* "statsmodels/tsa/statespace/_representation.pyx":3657
45202  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
45203  *             # Reset dimensions
45204  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)             # <<<<<<<<<<<<<<
45205  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):
45206  *             self.transform_diagonalize(t, previous_t, reset)
45207  */
45208     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->set_dimensions(__pyx_v_self, __pyx_v_k_endog, __pyx_v_self->_k_states, __pyx_v_self->_k_posdef);
45209 
45210     /* "statsmodels/tsa/statespace/_representation.pyx":3654
45211  *         self.collapse_loglikelihood = 0
45212  *
45213  *         if transform_generalized_collapse and not self._k_endog <= self._k_states:             # <<<<<<<<<<<<<<
45214  *             k_endog = self.transform_generalized_collapse(t, previous_t, reset)
45215  *             # Reset dimensions
45216  */
45217     goto __pyx_L3;
45218   }
45219 
45220   /* "statsmodels/tsa/statespace/_representation.pyx":3658
45221  *             # Reset dimensions
45222  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
45223  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):             # <<<<<<<<<<<<<<
45224  *             self.transform_diagonalize(t, previous_t, reset)
45225  *
45226  */
45227   __pyx_t_2 = (__pyx_v_transform_diagonalize != 0);
45228   if (__pyx_t_2) {
45229   } else {
45230     __pyx_t_1 = __pyx_t_2;
45231     goto __pyx_L6_bool_binop_done;
45232   }
45233   __pyx_t_2 = ((!((__pyx_v_self->diagonal_obs_cov == 1) != 0)) != 0);
45234   __pyx_t_1 = __pyx_t_2;
45235   __pyx_L6_bool_binop_done:;
45236   if (__pyx_t_1) {
45237 
45238     /* "statsmodels/tsa/statespace/_representation.pyx":3659
45239  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
45240  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):
45241  *             self.transform_diagonalize(t, previous_t, reset)             # <<<<<<<<<<<<<<
45242  *
45243  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:
45244  */
45245     __pyx_t_5.__pyx_n = 1;
45246     __pyx_t_5.reset = __pyx_v_reset;
45247     ((struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self->__pyx_vtab)->transform_diagonalize(__pyx_v_self, __pyx_v_t, __pyx_v_previous_t, &__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3659, __pyx_L1_error)
45248 
45249     /* "statsmodels/tsa/statespace/_representation.pyx":3658
45250  *             # Reset dimensions
45251  *             self.set_dimensions(k_endog, self._k_states, self._k_posdef)
45252  *         elif transform_diagonalize and not (self.diagonal_obs_cov == 1):             # <<<<<<<<<<<<<<
45253  *             self.transform_diagonalize(t, previous_t, reset)
45254  *
45255  */
45256   }
45257   __pyx_L3:;
45258 
45259   /* "statsmodels/tsa/statespace/_representation.pyx":3650
45260  *         self._obs_cov = &self.selected_obs_cov[0]
45261  *
45262  *     cdef void transform(self, unsigned int t, unsigned int previous_t, unsigned int transform_diagonalize, unsigned int transform_generalized_collapse, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
45263  *         # Reset the collapsed loglikelihood
45264  *         self.collapse_loglikelihood = 0
45265  */
45266 
45267   /* function exit code */
45268   goto __pyx_L0;
45269   __pyx_L1_error:;
45270   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transform", __pyx_clineno, __pyx_lineno, __pyx_filename);
45271   __pyx_L0:;
45272   __Pyx_RefNannyFinishContext();
45273 }
45274 
45275 /* "statsmodels/tsa/statespace/_representation.pyx":3661
45276  *             self.transform_diagonalize(t, previous_t, reset)
45277  *
45278  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
45279  *         # Note: this assumes that initialize_object_pointers has *already* been done
45280  *         # Note: this assumes that select_missing has *already* been done
45281  */
45282 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize * __pyx_optional_args)45283 static void __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize *__pyx_optional_args) {
45284   unsigned int __pyx_v_reset = ((unsigned int)0);
45285   int __pyx_v_i;
45286   int __pyx_v_j;
45287   int __pyx_v_inc;
45288   int __pyx_v_obs_cov_t;
45289   int __pyx_v_info;
45290   int __pyx_v_reset_missing;
45291   int __pyx_v_diagonal_obs_cov;
45292   __pyx_t_double_complex *__pyx_v__transform_obs_cov;
45293   __pyx_t_double_complex *__pyx_v__transform_cholesky;
45294   __Pyx_RefNannyDeclarations
45295   Py_ssize_t __pyx_t_1;
45296   Py_ssize_t __pyx_t_2;
45297   int __pyx_t_3;
45298   size_t __pyx_t_4;
45299   int __pyx_t_5;
45300   int __pyx_t_6;
45301   int __pyx_t_7;
45302   size_t __pyx_t_8;
45303   int __pyx_t_9;
45304   int __pyx_t_10;
45305   int __pyx_t_11;
45306   int __pyx_t_12;
45307   Py_ssize_t __pyx_t_13;
45308   PyObject *__pyx_t_14 = NULL;
45309   PyObject *__pyx_t_15 = NULL;
45310   PyObject *__pyx_t_16 = NULL;
45311   PyObject *__pyx_t_17 = NULL;
45312   int __pyx_lineno = 0;
45313   const char *__pyx_filename = NULL;
45314   int __pyx_clineno = 0;
45315   __Pyx_RefNannySetupContext("transform_diagonalize", 0);
45316   if (__pyx_optional_args) {
45317     if (__pyx_optional_args->__pyx_n > 0) {
45318       __pyx_v_reset = __pyx_optional_args->reset;
45319     }
45320   }
45321 
45322   /* "statsmodels/tsa/statespace/_representation.pyx":3667
45323  *         # TODO need to also transform observation intercept
45324  *         cdef:
45325  *             int i, j, inc=1             # <<<<<<<<<<<<<<
45326  *             int obs_cov_t = 0
45327  *             int info
45328  */
45329   __pyx_v_inc = 1;
45330 
45331   /* "statsmodels/tsa/statespace/_representation.pyx":3668
45332  *         cdef:
45333  *             int i, j, inc=1
45334  *             int obs_cov_t = 0             # <<<<<<<<<<<<<<
45335  *             int info
45336  *             int reset_missing
45337  */
45338   __pyx_v_obs_cov_t = 0;
45339 
45340   /* "statsmodels/tsa/statespace/_representation.pyx":3672
45341  *             int reset_missing
45342  *             int diagonal_obs_cov
45343  *             np.complex128_t * _transform_obs_cov = &self.transform_obs_cov[0, 0]             # <<<<<<<<<<<<<<
45344  *             np.complex128_t * _transform_cholesky = &self.transform_cholesky[0, 0]
45345  *
45346  */
45347   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3672, __pyx_L1_error)}
45348   __pyx_t_1 = 0;
45349   __pyx_t_2 = 0;
45350   __pyx_v__transform_obs_cov = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_obs_cov.data) + __pyx_t_1)) ) + __pyx_t_2 * __pyx_v_self->transform_obs_cov.strides[1]) ))));
45351 
45352   /* "statsmodels/tsa/statespace/_representation.pyx":3673
45353  *             int diagonal_obs_cov
45354  *             np.complex128_t * _transform_obs_cov = &self.transform_obs_cov[0, 0]
45355  *             np.complex128_t * _transform_cholesky = &self.transform_cholesky[0, 0]             # <<<<<<<<<<<<<<
45356  *
45357  *         if self.obs_cov.shape[2] > 1:
45358  */
45359   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3673, __pyx_L1_error)}
45360   __pyx_t_2 = 0;
45361   __pyx_t_1 = 0;
45362   __pyx_v__transform_cholesky = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_2)) ) + __pyx_t_1 * __pyx_v_self->transform_cholesky.strides[1]) ))));
45363 
45364   /* "statsmodels/tsa/statespace/_representation.pyx":3675
45365  *             np.complex128_t * _transform_cholesky = &self.transform_cholesky[0, 0]
45366  *
45367  *         if self.obs_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
45368  *             obs_cov_t = t
45369  *
45370  */
45371   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3675, __pyx_L1_error)}
45372   __pyx_t_3 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
45373   if (__pyx_t_3) {
45374 
45375     /* "statsmodels/tsa/statespace/_representation.pyx":3676
45376  *
45377  *         if self.obs_cov.shape[2] > 1:
45378  *             obs_cov_t = t             # <<<<<<<<<<<<<<
45379  *
45380  *         # Handle missing data
45381  */
45382     __pyx_v_obs_cov_t = __pyx_v_t;
45383 
45384     /* "statsmodels/tsa/statespace/_representation.pyx":3675
45385  *             np.complex128_t * _transform_cholesky = &self.transform_cholesky[0, 0]
45386  *
45387  *         if self.obs_cov.shape[2] > 1:             # <<<<<<<<<<<<<<
45388  *             obs_cov_t = t
45389  *
45390  */
45391   }
45392 
45393   /* "statsmodels/tsa/statespace/_representation.pyx":3679
45394  *
45395  *         # Handle missing data
45396  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
45397  *             return
45398  *         reset_missing = 0
45399  */
45400   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3679, __pyx_L1_error)}
45401   __pyx_t_4 = __pyx_v_t;
45402   __pyx_t_3 = (((*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_4 * __pyx_v_self->nmissing.strides[0]) ))) == __pyx_v_self->k_endog) != 0);
45403   if (__pyx_t_3) {
45404 
45405     /* "statsmodels/tsa/statespace/_representation.pyx":3680
45406  *         # Handle missing data
45407  *         if self.nmissing[t] == self.k_endog:
45408  *             return             # <<<<<<<<<<<<<<
45409  *         reset_missing = 0
45410  *         for i in range(self.k_endog):
45411  */
45412     goto __pyx_L0;
45413 
45414     /* "statsmodels/tsa/statespace/_representation.pyx":3679
45415  *
45416  *         # Handle missing data
45417  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
45418  *             return
45419  *         reset_missing = 0
45420  */
45421   }
45422 
45423   /* "statsmodels/tsa/statespace/_representation.pyx":3681
45424  *         if self.nmissing[t] == self.k_endog:
45425  *             return
45426  *         reset_missing = 0             # <<<<<<<<<<<<<<
45427  *         for i in range(self.k_endog):
45428  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
45429  */
45430   __pyx_v_reset_missing = 0;
45431 
45432   /* "statsmodels/tsa/statespace/_representation.pyx":3682
45433  *             return
45434  *         reset_missing = 0
45435  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
45436  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
45437  *
45438  */
45439   __pyx_t_5 = __pyx_v_self->k_endog;
45440   __pyx_t_6 = __pyx_t_5;
45441   for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
45442     __pyx_v_i = __pyx_t_7;
45443 
45444     /* "statsmodels/tsa/statespace/_representation.pyx":3683
45445  *         reset_missing = 0
45446  *         for i in range(self.k_endog):
45447  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])             # <<<<<<<<<<<<<<
45448  *
45449  *         # If the flag for a diagonal covariancem matrix is not set globally in
45450  */
45451     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3683, __pyx_L1_error)}
45452     __pyx_t_1 = __pyx_v_i;
45453     __pyx_t_4 = __pyx_v_t;
45454     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3683, __pyx_L1_error)}
45455     __pyx_t_2 = __pyx_v_i;
45456     __pyx_t_8 = __pyx_v_previous_t;
45457     __pyx_v_reset_missing = (__pyx_v_reset_missing + (!(((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_1)) ) + __pyx_t_4 * __pyx_v_self->missing.strides[1]) ))) == (*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_2)) ) + __pyx_t_8 * __pyx_v_self->missing.strides[1]) )))) != 0)));
45458   }
45459 
45460   /* "statsmodels/tsa/statespace/_representation.pyx":3687
45461  *         # If the flag for a diagonal covariancem matrix is not set globally in
45462  *         # the model one way or the other, then we need to check
45463  *         diagonal_obs_cov = self.diagonal_obs_cov             # <<<<<<<<<<<<<<
45464  *         if diagonal_obs_cov == -1:
45465  *             # We don't need to check for a diagonal covariance matrix each t,
45466  */
45467   __pyx_t_5 = __pyx_v_self->diagonal_obs_cov;
45468   __pyx_v_diagonal_obs_cov = __pyx_t_5;
45469 
45470   /* "statsmodels/tsa/statespace/_representation.pyx":3688
45471  *         # the model one way or the other, then we need to check
45472  *         diagonal_obs_cov = self.diagonal_obs_cov
45473  *         if diagonal_obs_cov == -1:             # <<<<<<<<<<<<<<
45474  *             # We don't need to check for a diagonal covariance matrix each t,
45475  *             # except in the following cases:
45476  */
45477   __pyx_t_3 = ((__pyx_v_diagonal_obs_cov == -1L) != 0);
45478   if (__pyx_t_3) {
45479 
45480     /* "statsmodels/tsa/statespace/_representation.pyx":3691
45481  *             # We don't need to check for a diagonal covariance matrix each t,
45482  *             # except in the following cases:
45483  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
45484  *                 diagonal_obs_cov = 1
45485  *                 for i in range(self.k_endog):
45486  */
45487     __pyx_t_9 = ((__pyx_v_self->_diagonal_obs_cov == -1L) != 0);
45488     if (!__pyx_t_9) {
45489     } else {
45490       __pyx_t_3 = __pyx_t_9;
45491       goto __pyx_L9_bool_binop_done;
45492     }
45493     __pyx_t_9 = ((__pyx_v_t == 0) != 0);
45494     if (!__pyx_t_9) {
45495     } else {
45496       __pyx_t_3 = __pyx_t_9;
45497       goto __pyx_L9_bool_binop_done;
45498     }
45499     if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3691, __pyx_L1_error)}
45500     __pyx_t_9 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
45501     if (!__pyx_t_9) {
45502     } else {
45503       __pyx_t_3 = __pyx_t_9;
45504       goto __pyx_L9_bool_binop_done;
45505     }
45506     __pyx_t_9 = (__pyx_v_reset_missing != 0);
45507     if (!__pyx_t_9) {
45508     } else {
45509       __pyx_t_3 = __pyx_t_9;
45510       goto __pyx_L9_bool_binop_done;
45511     }
45512     __pyx_t_9 = (__pyx_v_reset != 0);
45513     __pyx_t_3 = __pyx_t_9;
45514     __pyx_L9_bool_binop_done:;
45515     if (__pyx_t_3) {
45516 
45517       /* "statsmodels/tsa/statespace/_representation.pyx":3692
45518  *             # except in the following cases:
45519  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
45520  *                 diagonal_obs_cov = 1             # <<<<<<<<<<<<<<
45521  *                 for i in range(self.k_endog):
45522  *                     for j in range(self.k_endog):
45523  */
45524       __pyx_v_diagonal_obs_cov = 1;
45525 
45526       /* "statsmodels/tsa/statespace/_representation.pyx":3693
45527  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
45528  *                 diagonal_obs_cov = 1
45529  *                 for i in range(self.k_endog):             # <<<<<<<<<<<<<<
45530  *                     for j in range(self.k_endog):
45531  *                         if i == j:
45532  */
45533       __pyx_t_5 = __pyx_v_self->k_endog;
45534       __pyx_t_6 = __pyx_t_5;
45535       for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
45536         __pyx_v_i = __pyx_t_7;
45537 
45538         /* "statsmodels/tsa/statespace/_representation.pyx":3694
45539  *                 diagonal_obs_cov = 1
45540  *                 for i in range(self.k_endog):
45541  *                     for j in range(self.k_endog):             # <<<<<<<<<<<<<<
45542  *                         if i == j:
45543  *                             continue
45544  */
45545         __pyx_t_10 = __pyx_v_self->k_endog;
45546         __pyx_t_11 = __pyx_t_10;
45547         for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
45548           __pyx_v_j = __pyx_t_12;
45549 
45550           /* "statsmodels/tsa/statespace/_representation.pyx":3695
45551  *                 for i in range(self.k_endog):
45552  *                     for j in range(self.k_endog):
45553  *                         if i == j:             # <<<<<<<<<<<<<<
45554  *                             continue
45555  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
45556  */
45557           __pyx_t_3 = ((__pyx_v_i == __pyx_v_j) != 0);
45558           if (__pyx_t_3) {
45559 
45560             /* "statsmodels/tsa/statespace/_representation.pyx":3696
45561  *                     for j in range(self.k_endog):
45562  *                         if i == j:
45563  *                             continue             # <<<<<<<<<<<<<<
45564  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
45565  *                             diagonal_obs_cov = 0
45566  */
45567             goto __pyx_L16_continue;
45568 
45569             /* "statsmodels/tsa/statespace/_representation.pyx":3695
45570  *                 for i in range(self.k_endog):
45571  *                     for j in range(self.k_endog):
45572  *                         if i == j:             # <<<<<<<<<<<<<<
45573  *                             continue
45574  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
45575  */
45576           }
45577 
45578           /* "statsmodels/tsa/statespace/_representation.pyx":3697
45579  *                         if i == j:
45580  *                             continue
45581  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):             # <<<<<<<<<<<<<<
45582  *                             diagonal_obs_cov = 0
45583  *                             break
45584  */
45585           if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3697, __pyx_L1_error)}
45586           __pyx_t_2 = __pyx_v_i;
45587           __pyx_t_1 = __pyx_v_j;
45588           __pyx_t_13 = __pyx_v_obs_cov_t;
45589           __pyx_t_3 = ((!((__pyx_f_11statsmodels_3src_4math_zabs((*((__pyx_t_double_complex *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->obs_cov.data) + __pyx_t_2)) ) + __pyx_t_1 * __pyx_v_self->obs_cov.strides[1]) ) + __pyx_t_13 * __pyx_v_self->obs_cov.strides[2]) )))) < 1e-9) != 0)) != 0);
45590           if (__pyx_t_3) {
45591 
45592             /* "statsmodels/tsa/statespace/_representation.pyx":3698
45593  *                             continue
45594  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
45595  *                             diagonal_obs_cov = 0             # <<<<<<<<<<<<<<
45596  *                             break
45597  *             # Otherwise, we use whatever value was produced last period
45598  */
45599             __pyx_v_diagonal_obs_cov = 0;
45600 
45601             /* "statsmodels/tsa/statespace/_representation.pyx":3699
45602  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):
45603  *                             diagonal_obs_cov = 0
45604  *                             break             # <<<<<<<<<<<<<<
45605  *             # Otherwise, we use whatever value was produced last period
45606  *             else:
45607  */
45608             goto __pyx_L17_break;
45609 
45610             /* "statsmodels/tsa/statespace/_representation.pyx":3697
45611  *                         if i == j:
45612  *                             continue
45613  *                         if not (zabs(self.obs_cov[i, j, obs_cov_t]) < 1e-9):             # <<<<<<<<<<<<<<
45614  *                             diagonal_obs_cov = 0
45615  *                             break
45616  */
45617           }
45618           __pyx_L16_continue:;
45619         }
45620         __pyx_L17_break:;
45621       }
45622 
45623       /* "statsmodels/tsa/statespace/_representation.pyx":3691
45624  *             # We don't need to check for a diagonal covariance matrix each t,
45625  *             # except in the following cases:
45626  *             if self._diagonal_obs_cov == -1 or t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
45627  *                 diagonal_obs_cov = 1
45628  *                 for i in range(self.k_endog):
45629  */
45630       goto __pyx_L8;
45631     }
45632 
45633     /* "statsmodels/tsa/statespace/_representation.pyx":3702
45634  *             # Otherwise, we use whatever value was produced last period
45635  *             else:
45636  *                 diagonal_obs_cov = self._diagonal_obs_cov             # <<<<<<<<<<<<<<
45637  *         self._diagonal_obs_cov = diagonal_obs_cov
45638  *         if diagonal_obs_cov == 1:
45639  */
45640     /*else*/ {
45641       __pyx_t_5 = __pyx_v_self->_diagonal_obs_cov;
45642       __pyx_v_diagonal_obs_cov = __pyx_t_5;
45643     }
45644     __pyx_L8:;
45645 
45646     /* "statsmodels/tsa/statespace/_representation.pyx":3688
45647  *         # the model one way or the other, then we need to check
45648  *         diagonal_obs_cov = self.diagonal_obs_cov
45649  *         if diagonal_obs_cov == -1:             # <<<<<<<<<<<<<<
45650  *             # We don't need to check for a diagonal covariance matrix each t,
45651  *             # except in the following cases:
45652  */
45653   }
45654 
45655   /* "statsmodels/tsa/statespace/_representation.pyx":3703
45656  *             else:
45657  *                 diagonal_obs_cov = self._diagonal_obs_cov
45658  *         self._diagonal_obs_cov = diagonal_obs_cov             # <<<<<<<<<<<<<<
45659  *         if diagonal_obs_cov == 1:
45660  *             return
45661  */
45662   __pyx_v_self->_diagonal_obs_cov = __pyx_v_diagonal_obs_cov;
45663 
45664   /* "statsmodels/tsa/statespace/_representation.pyx":3704
45665  *                 diagonal_obs_cov = self._diagonal_obs_cov
45666  *         self._diagonal_obs_cov = diagonal_obs_cov
45667  *         if diagonal_obs_cov == 1:             # <<<<<<<<<<<<<<
45668  *             return
45669  *
45670  */
45671   __pyx_t_3 = ((__pyx_v_diagonal_obs_cov == 1) != 0);
45672   if (__pyx_t_3) {
45673 
45674     /* "statsmodels/tsa/statespace/_representation.pyx":3705
45675  *         self._diagonal_obs_cov = diagonal_obs_cov
45676  *         if diagonal_obs_cov == 1:
45677  *             return             # <<<<<<<<<<<<<<
45678  *
45679  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
45680  */
45681     goto __pyx_L0;
45682 
45683     /* "statsmodels/tsa/statespace/_representation.pyx":3704
45684  *                 diagonal_obs_cov = self._diagonal_obs_cov
45685  *         self._diagonal_obs_cov = diagonal_obs_cov
45686  *         if diagonal_obs_cov == 1:             # <<<<<<<<<<<<<<
45687  *             return
45688  *
45689  */
45690   }
45691 
45692   /* "statsmodels/tsa/statespace/_representation.pyx":3709
45693  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
45694  *         # decomposition of *self._obs_cov
45695  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
45696  *             # LDL decomposition
45697  *             blas.zcopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
45698  */
45699   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
45700   if (!__pyx_t_9) {
45701   } else {
45702     __pyx_t_3 = __pyx_t_9;
45703     goto __pyx_L22_bool_binop_done;
45704   }
45705   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3709, __pyx_L1_error)}
45706   __pyx_t_9 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
45707   if (!__pyx_t_9) {
45708   } else {
45709     __pyx_t_3 = __pyx_t_9;
45710     goto __pyx_L22_bool_binop_done;
45711   }
45712   __pyx_t_9 = (__pyx_v_reset_missing != 0);
45713   if (!__pyx_t_9) {
45714   } else {
45715     __pyx_t_3 = __pyx_t_9;
45716     goto __pyx_L22_bool_binop_done;
45717   }
45718   __pyx_t_9 = (__pyx_v_reset != 0);
45719   __pyx_t_3 = __pyx_t_9;
45720   __pyx_L22_bool_binop_done:;
45721   if (__pyx_t_3) {
45722 
45723     /* "statsmodels/tsa/statespace/_representation.pyx":3711
45724  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
45725  *             # LDL decomposition
45726  *             blas.zcopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)             # <<<<<<<<<<<<<<
45727  *             info = tools._zldl(_transform_cholesky, self._k_endog)
45728  *
45729  */
45730     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->_k_endog2), __pyx_v_self->_obs_cov, (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_inc));
45731 
45732     /* "statsmodels/tsa/statespace/_representation.pyx":3712
45733  *             # LDL decomposition
45734  *             blas.zcopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
45735  *             info = tools._zldl(_transform_cholesky, self._k_endog)             # <<<<<<<<<<<<<<
45736  *
45737  *             # Check for errors
45738  */
45739     __pyx_t_5 = __pyx_f_11statsmodels_3tsa_10statespace_6_tools__zldl(__pyx_v__transform_cholesky, __pyx_v_self->_k_endog); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3712, __pyx_L1_error)
45740     __pyx_v_info = __pyx_t_5;
45741 
45742     /* "statsmodels/tsa/statespace/_representation.pyx":3715
45743  *
45744  *             # Check for errors
45745  *             if info > 0:             # <<<<<<<<<<<<<<
45746  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
45747  *             elif info < 0:
45748  */
45749     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
45750     if (__pyx_t_3) {
45751 
45752       /* "statsmodels/tsa/statespace/_representation.pyx":3716
45753  *             # Check for errors
45754  *             if info > 0:
45755  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)             # <<<<<<<<<<<<<<
45756  *             elif info < 0:
45757  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
45758  */
45759       __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_warnings); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3716, __pyx_L1_error)
45760       __Pyx_GOTREF(__pyx_t_15);
45761       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_warn); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3716, __pyx_L1_error)
45762       __Pyx_GOTREF(__pyx_t_16);
45763       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45764       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3716, __pyx_L1_error)
45765       __Pyx_GOTREF(__pyx_t_15);
45766       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Positive_semi_definite_observati, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3716, __pyx_L1_error)
45767       __Pyx_GOTREF(__pyx_t_17);
45768       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45769       __pyx_t_15 = NULL;
45770       if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
45771         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
45772         if (likely(__pyx_t_15)) {
45773           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
45774           __Pyx_INCREF(__pyx_t_15);
45775           __Pyx_INCREF(function);
45776           __Pyx_DECREF_SET(__pyx_t_16, function);
45777         }
45778       }
45779       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
45780       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
45781       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
45782       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3716, __pyx_L1_error)
45783       __Pyx_GOTREF(__pyx_t_14);
45784       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
45785       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
45786 
45787       /* "statsmodels/tsa/statespace/_representation.pyx":3715
45788  *
45789  *             # Check for errors
45790  *             if info > 0:             # <<<<<<<<<<<<<<
45791  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
45792  *             elif info < 0:
45793  */
45794       goto __pyx_L26;
45795     }
45796 
45797     /* "statsmodels/tsa/statespace/_representation.pyx":3717
45798  *             if info > 0:
45799  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
45800  *             elif info < 0:             # <<<<<<<<<<<<<<
45801  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
45802  *
45803  */
45804     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
45805     if (unlikely(__pyx_t_3)) {
45806 
45807       /* "statsmodels/tsa/statespace/_representation.pyx":3718
45808  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
45809  *             elif info < 0:
45810  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
45811  *
45812  *             # Currently both L and D are stored in transform_cholesky
45813  */
45814       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3718, __pyx_L1_error)
45815       __Pyx_GOTREF(__pyx_t_16);
45816       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3718, __pyx_L1_error)
45817       __Pyx_GOTREF(__pyx_t_17);
45818       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
45819       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3718, __pyx_L1_error)
45820       __Pyx_GOTREF(__pyx_t_16);
45821       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
45822       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3718, __pyx_L1_error)
45823       __Pyx_GOTREF(__pyx_t_17);
45824       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_LDL_factorizati, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3718, __pyx_L1_error)
45825       __Pyx_GOTREF(__pyx_t_15);
45826       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
45827       __pyx_t_17 = NULL;
45828       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
45829         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
45830         if (likely(__pyx_t_17)) {
45831           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
45832           __Pyx_INCREF(__pyx_t_17);
45833           __Pyx_INCREF(function);
45834           __Pyx_DECREF_SET(__pyx_t_16, function);
45835         }
45836       }
45837       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
45838       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
45839       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45840       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3718, __pyx_L1_error)
45841       __Pyx_GOTREF(__pyx_t_14);
45842       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
45843       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
45844       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
45845       __PYX_ERR(0, 3718, __pyx_L1_error)
45846 
45847       /* "statsmodels/tsa/statespace/_representation.pyx":3717
45848  *             if info > 0:
45849  *                 warnings.warn("Positive semi-definite observation covariance matrix encountered at period %d" % t)
45850  *             elif info < 0:             # <<<<<<<<<<<<<<
45851  *                 raise np.linalg.LinAlgError('Invalid value in LDL factorization of observation covariance matrix encountered at period %d' % t)
45852  *
45853  */
45854     }
45855     __pyx_L26:;
45856 
45857     /* "statsmodels/tsa/statespace/_representation.pyx":3721
45858  *
45859  *             # Currently both L and D are stored in transform_cholesky
45860  *             for i in range(self._k_endog): # i is rows             # <<<<<<<<<<<<<<
45861  *                 for j in range(self._k_endog): # j is columns
45862  *                     # Diagonal elements come from the diagonal
45863  */
45864     __pyx_t_5 = __pyx_v_self->_k_endog;
45865     __pyx_t_6 = __pyx_t_5;
45866     for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
45867       __pyx_v_i = __pyx_t_7;
45868 
45869       /* "statsmodels/tsa/statespace/_representation.pyx":3722
45870  *             # Currently both L and D are stored in transform_cholesky
45871  *             for i in range(self._k_endog): # i is rows
45872  *                 for j in range(self._k_endog): # j is columns             # <<<<<<<<<<<<<<
45873  *                     # Diagonal elements come from the diagonal
45874  *                     if i == j:
45875  */
45876       __pyx_t_10 = __pyx_v_self->_k_endog;
45877       __pyx_t_11 = __pyx_t_10;
45878       for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
45879         __pyx_v_j = __pyx_t_12;
45880 
45881         /* "statsmodels/tsa/statespace/_representation.pyx":3724
45882  *                 for j in range(self._k_endog): # j is columns
45883  *                     # Diagonal elements come from the diagonal
45884  *                     if i == j:             # <<<<<<<<<<<<<<
45885  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]
45886  *                     # Other elements are zero
45887  */
45888         __pyx_t_3 = ((__pyx_v_i == __pyx_v_j) != 0);
45889         if (__pyx_t_3) {
45890 
45891           /* "statsmodels/tsa/statespace/_representation.pyx":3725
45892  *                     # Diagonal elements come from the diagonal
45893  *                     if i == j:
45894  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]             # <<<<<<<<<<<<<<
45895  *                     # Other elements are zero
45896  *                     else:
45897  */
45898           (__pyx_v__transform_obs_cov[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]) = (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]);
45899 
45900           /* "statsmodels/tsa/statespace/_representation.pyx":3724
45901  *                 for j in range(self._k_endog): # j is columns
45902  *                     # Diagonal elements come from the diagonal
45903  *                     if i == j:             # <<<<<<<<<<<<<<
45904  *                         _transform_obs_cov[i + i * self._k_endog] = _transform_cholesky[i + i * self._k_endog]
45905  *                     # Other elements are zero
45906  */
45907           goto __pyx_L31;
45908         }
45909 
45910         /* "statsmodels/tsa/statespace/_representation.pyx":3728
45911  *                     # Other elements are zero
45912  *                     else:
45913  *                         _transform_obs_cov[i + j * self._k_endog] = 0             # <<<<<<<<<<<<<<
45914  *
45915  *                     # Zero out the upper triangle of the cholesky
45916  */
45917         /*else*/ {
45918           (__pyx_v__transform_obs_cov[(__pyx_v_i + (__pyx_v_j * __pyx_v_self->_k_endog))]) = __pyx_t_double_complex_from_parts(0, 0);
45919         }
45920         __pyx_L31:;
45921 
45922         /* "statsmodels/tsa/statespace/_representation.pyx":3731
45923  *
45924  *                     # Zero out the upper triangle of the cholesky
45925  *                     if j > i:             # <<<<<<<<<<<<<<
45926  *                         _transform_cholesky[i + j * self._k_endog] = 0
45927  *
45928  */
45929         __pyx_t_3 = ((__pyx_v_j > __pyx_v_i) != 0);
45930         if (__pyx_t_3) {
45931 
45932           /* "statsmodels/tsa/statespace/_representation.pyx":3732
45933  *                     # Zero out the upper triangle of the cholesky
45934  *                     if j > i:
45935  *                         _transform_cholesky[i + j * self._k_endog] = 0             # <<<<<<<<<<<<<<
45936  *
45937  *                 # Convert from L to C simply by setting the diagonal elements to ones
45938  */
45939           (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_j * __pyx_v_self->_k_endog))]) = __pyx_t_double_complex_from_parts(0, 0);
45940 
45941           /* "statsmodels/tsa/statespace/_representation.pyx":3731
45942  *
45943  *                     # Zero out the upper triangle of the cholesky
45944  *                     if j > i:             # <<<<<<<<<<<<<<
45945  *                         _transform_cholesky[i + j * self._k_endog] = 0
45946  *
45947  */
45948         }
45949       }
45950 
45951       /* "statsmodels/tsa/statespace/_representation.pyx":3735
45952  *
45953  *                 # Convert from L to C simply by setting the diagonal elements to ones
45954  *                 _transform_cholesky[i + i * self._k_endog] = 1             # <<<<<<<<<<<<<<
45955  *
45956  *         # Solve for y_t^*
45957  */
45958       (__pyx_v__transform_cholesky[(__pyx_v_i + (__pyx_v_i * __pyx_v_self->_k_endog))]) = __pyx_t_double_complex_from_parts(1, 0);
45959     }
45960 
45961     /* "statsmodels/tsa/statespace/_representation.pyx":3709
45962  *         # If we have a non-diagonal obs cov, we need to compute the cholesky
45963  *         # decomposition of *self._obs_cov
45964  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
45965  *             # LDL decomposition
45966  *             blas.zcopy(&self._k_endog2, self._obs_cov, &inc, _transform_cholesky, &inc)
45967  */
45968   }
45969 
45970   /* "statsmodels/tsa/statespace/_representation.pyx":3740
45971  *         # (unless this is a completely missing observation)
45972  *         # TODO: note that this can cause problems if this function is run twice
45973  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
45974  *             # If we have some missing elements, selected_obs is already populated
45975  *             if self._nmissing == 0:
45976  */
45977   __pyx_t_3 = ((!((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0)) != 0);
45978   if (__pyx_t_3) {
45979 
45980     /* "statsmodels/tsa/statespace/_representation.pyx":3742
45981  *         if not self._nmissing == self.k_endog:
45982  *             # If we have some missing elements, selected_obs is already populated
45983  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
45984  *                 blas.zcopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
45985  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,
45986  */
45987     __pyx_t_3 = ((__pyx_v_self->_nmissing == 0) != 0);
45988     if (__pyx_t_3) {
45989 
45990       /* "statsmodels/tsa/statespace/_representation.pyx":3743
45991  *             # If we have some missing elements, selected_obs is already populated
45992  *             if self._nmissing == 0:
45993  *                 blas.zcopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
45994  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,
45995  *                         _transform_cholesky, &self.k_endog,
45996  */
45997       if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3743, __pyx_L1_error)}
45998       __pyx_t_13 = 0;
45999       __pyx_t_8 = __pyx_v_t;
46000       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3743, __pyx_L1_error)}
46001       __pyx_t_1 = 0;
46002       __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->_k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->obs.data) + __pyx_t_13)) ) + __pyx_t_8 * __pyx_v_self->obs.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
46003 
46004       /* "statsmodels/tsa/statespace/_representation.pyx":3742
46005  *         if not self._nmissing == self.k_endog:
46006  *             # If we have some missing elements, selected_obs is already populated
46007  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
46008  *                 blas.zcopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
46009  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,
46010  */
46011     }
46012 
46013     /* "statsmodels/tsa/statespace/_representation.pyx":3746
46014  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,
46015  *                         _transform_cholesky, &self.k_endog,
46016  *                         &self.selected_obs[0], &self._k_endog, &info)             # <<<<<<<<<<<<<<
46017  *
46018  *             # Check for errors
46019  */
46020     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3746, __pyx_L1_error)}
46021     __pyx_t_1 = 0;
46022 
46023     /* "statsmodels/tsa/statespace/_representation.pyx":3744
46024  *             if self._nmissing == 0:
46025  *                 blas.zcopy(&self._k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
46026  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
46027  *                         _transform_cholesky, &self.k_endog,
46028  *                         &self.selected_obs[0], &self._k_endog, &info)
46029  */
46030     __pyx_f_5scipy_6linalg_13cython_lapack_ztrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
46031 
46032     /* "statsmodels/tsa/statespace/_representation.pyx":3749
46033  *
46034  *             # Check for errors
46035  *             if info > 0:             # <<<<<<<<<<<<<<
46036  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46037  *             elif info < 0:
46038  */
46039     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
46040     if (unlikely(__pyx_t_3)) {
46041 
46042       /* "statsmodels/tsa/statespace/_representation.pyx":3750
46043  *             # Check for errors
46044  *             if info > 0:
46045  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
46046  *             elif info < 0:
46047  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
46048  */
46049       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3750, __pyx_L1_error)
46050       __Pyx_GOTREF(__pyx_t_16);
46051       __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3750, __pyx_L1_error)
46052       __Pyx_GOTREF(__pyx_t_15);
46053       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
46054       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3750, __pyx_L1_error)
46055       __Pyx_GOTREF(__pyx_t_16);
46056       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
46057       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3750, __pyx_L1_error)
46058       __Pyx_GOTREF(__pyx_t_15);
46059       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Singular_factorization_of_observ, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3750, __pyx_L1_error)
46060       __Pyx_GOTREF(__pyx_t_17);
46061       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
46062       __pyx_t_15 = NULL;
46063       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
46064         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
46065         if (likely(__pyx_t_15)) {
46066           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
46067           __Pyx_INCREF(__pyx_t_15);
46068           __Pyx_INCREF(function);
46069           __Pyx_DECREF_SET(__pyx_t_16, function);
46070         }
46071       }
46072       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
46073       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
46074       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
46075       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3750, __pyx_L1_error)
46076       __Pyx_GOTREF(__pyx_t_14);
46077       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
46078       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
46079       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
46080       __PYX_ERR(0, 3750, __pyx_L1_error)
46081 
46082       /* "statsmodels/tsa/statespace/_representation.pyx":3749
46083  *
46084  *             # Check for errors
46085  *             if info > 0:             # <<<<<<<<<<<<<<
46086  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46087  *             elif info < 0:
46088  */
46089     }
46090 
46091     /* "statsmodels/tsa/statespace/_representation.pyx":3751
46092  *             if info > 0:
46093  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46094  *             elif info < 0:             # <<<<<<<<<<<<<<
46095  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
46096  *
46097  */
46098     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
46099     if (unlikely(__pyx_t_3)) {
46100 
46101       /* "statsmodels/tsa/statespace/_representation.pyx":3752
46102  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46103  *             elif info < 0:
46104  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
46105  *
46106  *             # Setup the pointer
46107  */
46108       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3752, __pyx_L1_error)
46109       __Pyx_GOTREF(__pyx_t_16);
46110       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3752, __pyx_L1_error)
46111       __Pyx_GOTREF(__pyx_t_17);
46112       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
46113       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3752, __pyx_L1_error)
46114       __Pyx_GOTREF(__pyx_t_16);
46115       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
46116       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3752, __pyx_L1_error)
46117       __Pyx_GOTREF(__pyx_t_17);
46118       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3752, __pyx_L1_error)
46119       __Pyx_GOTREF(__pyx_t_15);
46120       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
46121       __pyx_t_17 = NULL;
46122       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
46123         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
46124         if (likely(__pyx_t_17)) {
46125           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
46126           __Pyx_INCREF(__pyx_t_17);
46127           __Pyx_INCREF(function);
46128           __Pyx_DECREF_SET(__pyx_t_16, function);
46129         }
46130       }
46131       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
46132       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
46133       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
46134       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3752, __pyx_L1_error)
46135       __Pyx_GOTREF(__pyx_t_14);
46136       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
46137       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
46138       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
46139       __PYX_ERR(0, 3752, __pyx_L1_error)
46140 
46141       /* "statsmodels/tsa/statespace/_representation.pyx":3751
46142  *             if info > 0:
46143  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46144  *             elif info < 0:             # <<<<<<<<<<<<<<
46145  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
46146  *
46147  */
46148     }
46149 
46150     /* "statsmodels/tsa/statespace/_representation.pyx":3755
46151  *
46152  *             # Setup the pointer
46153  *             self._obs = &self.selected_obs[0]             # <<<<<<<<<<<<<<
46154  *
46155  *         # Solve for d_t^*, if necessary
46156  */
46157     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3755, __pyx_L1_error)}
46158     __pyx_t_1 = 0;
46159     __pyx_v_self->_obs = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_1 * __pyx_v_self->selected_obs.strides[0]) ))));
46160 
46161     /* "statsmodels/tsa/statespace/_representation.pyx":3740
46162  *         # (unless this is a completely missing observation)
46163  *         # TODO: note that this can cause problems if this function is run twice
46164  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
46165  *             # If we have some missing elements, selected_obs is already populated
46166  *             if self._nmissing == 0:
46167  */
46168   }
46169 
46170   /* "statsmodels/tsa/statespace/_representation.pyx":3758
46171  *
46172  *         # Solve for d_t^*, if necessary
46173  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
46174  *             blas.zcopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
46175  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,
46176  */
46177   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
46178   if (!__pyx_t_9) {
46179   } else {
46180     __pyx_t_3 = __pyx_t_9;
46181     goto __pyx_L37_bool_binop_done;
46182   }
46183   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3758, __pyx_L1_error)}
46184   __pyx_t_9 = (((__pyx_v_self->obs_intercept.shape[1]) > 1) != 0);
46185   if (!__pyx_t_9) {
46186   } else {
46187     __pyx_t_3 = __pyx_t_9;
46188     goto __pyx_L37_bool_binop_done;
46189   }
46190   __pyx_t_9 = (__pyx_v_reset_missing != 0);
46191   if (!__pyx_t_9) {
46192   } else {
46193     __pyx_t_3 = __pyx_t_9;
46194     goto __pyx_L37_bool_binop_done;
46195   }
46196   __pyx_t_9 = (__pyx_v_reset != 0);
46197   __pyx_t_3 = __pyx_t_9;
46198   __pyx_L37_bool_binop_done:;
46199   if (__pyx_t_3) {
46200 
46201     /* "statsmodels/tsa/statespace/_representation.pyx":3759
46202  *         # Solve for d_t^*, if necessary
46203  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:
46204  *             blas.zcopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)             # <<<<<<<<<<<<<<
46205  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,
46206  *                         _transform_cholesky, &self.k_endog,
46207  */
46208     if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3759, __pyx_L1_error)}
46209     __pyx_t_1 = 0;
46210     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->_k_endog), __pyx_v_self->_obs_intercept, (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) )))), (&__pyx_v_inc));
46211 
46212     /* "statsmodels/tsa/statespace/_representation.pyx":3762
46213  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,
46214  *                         _transform_cholesky, &self.k_endog,
46215  *                         &self.transform_obs_intercept[0], &self._k_endog,             # <<<<<<<<<<<<<<
46216  *                         &info)
46217  *
46218  */
46219     if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3762, __pyx_L1_error)}
46220     __pyx_t_1 = 0;
46221 
46222     /* "statsmodels/tsa/statespace/_representation.pyx":3760
46223  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:
46224  *             blas.zcopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
46225  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
46226  *                         _transform_cholesky, &self.k_endog,
46227  *                         &self.transform_obs_intercept[0], &self._k_endog,
46228  */
46229     __pyx_f_5scipy_6linalg_13cython_lapack_ztrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
46230 
46231     /* "statsmodels/tsa/statespace/_representation.pyx":3758
46232  *
46233  *         # Solve for d_t^*, if necessary
46234  *         if t == 0 or self.obs_intercept.shape[1] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
46235  *             blas.zcopy(&self._k_endog, self._obs_intercept, &inc, &self.transform_obs_intercept[0], &inc)
46236  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &inc,
46237  */
46238   }
46239 
46240   /* "statsmodels/tsa/statespace/_representation.pyx":3766
46241  *
46242  *         # Solve for Z_t^*, if necessary
46243  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
46244  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
46245  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &self._k_states,
46246  */
46247   __pyx_t_9 = ((__pyx_v_t == 0) != 0);
46248   if (!__pyx_t_9) {
46249   } else {
46250     __pyx_t_3 = __pyx_t_9;
46251     goto __pyx_L42_bool_binop_done;
46252   }
46253   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3766, __pyx_L1_error)}
46254   __pyx_t_9 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
46255   if (!__pyx_t_9) {
46256   } else {
46257     __pyx_t_3 = __pyx_t_9;
46258     goto __pyx_L42_bool_binop_done;
46259   }
46260   __pyx_t_9 = (__pyx_v_reset_missing != 0);
46261   if (!__pyx_t_9) {
46262   } else {
46263     __pyx_t_3 = __pyx_t_9;
46264     goto __pyx_L42_bool_binop_done;
46265   }
46266   __pyx_t_9 = (__pyx_v_reset != 0);
46267   __pyx_t_3 = __pyx_t_9;
46268   __pyx_L42_bool_binop_done:;
46269   if (__pyx_t_3) {
46270 
46271     /* "statsmodels/tsa/statespace/_representation.pyx":3767
46272  *         # Solve for Z_t^*, if necessary
46273  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:
46274  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)             # <<<<<<<<<<<<<<
46275  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &self._k_states,
46276  *                         _transform_cholesky, &self.k_endog,
46277  */
46278     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3767, __pyx_L1_error)}
46279     __pyx_t_1 = 0;
46280     __pyx_t_13 = 0;
46281     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->_k_endogstates), __pyx_v_self->_design, (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_design.data) + __pyx_t_1)) ) + __pyx_t_13 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_inc));
46282 
46283     /* "statsmodels/tsa/statespace/_representation.pyx":3770
46284  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &self._k_states,
46285  *                         _transform_cholesky, &self.k_endog,
46286  *                         &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
46287  *                         &info)
46288  *
46289  */
46290     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3770, __pyx_L1_error)}
46291     __pyx_t_13 = 0;
46292     __pyx_t_1 = 0;
46293 
46294     /* "statsmodels/tsa/statespace/_representation.pyx":3768
46295  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:
46296  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
46297  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &self._k_states,             # <<<<<<<<<<<<<<
46298  *                         _transform_cholesky, &self.k_endog,
46299  *                         &self.transform_design[0,0], &self._k_endog,
46300  */
46301     __pyx_f_5scipy_6linalg_13cython_lapack_ztrtrs(((char *)"L"), ((char *)"N"), ((char *)"U"), (&__pyx_v_self->_k_endog), (&__pyx_v_self->_k_states), __pyx_v__transform_cholesky, (&__pyx_v_self->k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_design.data) + __pyx_t_13)) ) + __pyx_t_1 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
46302 
46303     /* "statsmodels/tsa/statespace/_representation.pyx":3774
46304  *
46305  *             # Check for errors
46306  *             if info > 0:             # <<<<<<<<<<<<<<
46307  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46308  *             elif info < 0:
46309  */
46310     __pyx_t_3 = ((__pyx_v_info > 0) != 0);
46311     if (unlikely(__pyx_t_3)) {
46312 
46313       /* "statsmodels/tsa/statespace/_representation.pyx":3775
46314  *             # Check for errors
46315  *             if info > 0:
46316  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
46317  *             elif info < 0:
46318  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
46319  */
46320       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3775, __pyx_L1_error)
46321       __Pyx_GOTREF(__pyx_t_16);
46322       __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3775, __pyx_L1_error)
46323       __Pyx_GOTREF(__pyx_t_15);
46324       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
46325       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3775, __pyx_L1_error)
46326       __Pyx_GOTREF(__pyx_t_16);
46327       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
46328       __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3775, __pyx_L1_error)
46329       __Pyx_GOTREF(__pyx_t_15);
46330       __pyx_t_17 = PyUnicode_Format(__pyx_kp_u_Singular_factorization_of_observ, __pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3775, __pyx_L1_error)
46331       __Pyx_GOTREF(__pyx_t_17);
46332       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
46333       __pyx_t_15 = NULL;
46334       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
46335         __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
46336         if (likely(__pyx_t_15)) {
46337           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
46338           __Pyx_INCREF(__pyx_t_15);
46339           __Pyx_INCREF(function);
46340           __Pyx_DECREF_SET(__pyx_t_16, function);
46341         }
46342       }
46343       __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_15, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_17);
46344       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
46345       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
46346       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3775, __pyx_L1_error)
46347       __Pyx_GOTREF(__pyx_t_14);
46348       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
46349       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
46350       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
46351       __PYX_ERR(0, 3775, __pyx_L1_error)
46352 
46353       /* "statsmodels/tsa/statespace/_representation.pyx":3774
46354  *
46355  *             # Check for errors
46356  *             if info > 0:             # <<<<<<<<<<<<<<
46357  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46358  *             elif info < 0:
46359  */
46360     }
46361 
46362     /* "statsmodels/tsa/statespace/_representation.pyx":3776
46363  *             if info > 0:
46364  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46365  *             elif info < 0:             # <<<<<<<<<<<<<<
46366  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
46367  *
46368  */
46369     __pyx_t_3 = ((__pyx_v_info < 0) != 0);
46370     if (unlikely(__pyx_t_3)) {
46371 
46372       /* "statsmodels/tsa/statespace/_representation.pyx":3777
46373  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46374  *             elif info < 0:
46375  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
46376  *
46377  *         # Setup final pointers
46378  */
46379       __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3777, __pyx_L1_error)
46380       __Pyx_GOTREF(__pyx_t_16);
46381       __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_linalg); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3777, __pyx_L1_error)
46382       __Pyx_GOTREF(__pyx_t_17);
46383       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
46384       __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3777, __pyx_L1_error)
46385       __Pyx_GOTREF(__pyx_t_16);
46386       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
46387       __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3777, __pyx_L1_error)
46388       __Pyx_GOTREF(__pyx_t_17);
46389       __pyx_t_15 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3777, __pyx_L1_error)
46390       __Pyx_GOTREF(__pyx_t_15);
46391       __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
46392       __pyx_t_17 = NULL;
46393       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
46394         __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
46395         if (likely(__pyx_t_17)) {
46396           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
46397           __Pyx_INCREF(__pyx_t_17);
46398           __Pyx_INCREF(function);
46399           __Pyx_DECREF_SET(__pyx_t_16, function);
46400         }
46401       }
46402       __pyx_t_14 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_17, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15);
46403       __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
46404       __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
46405       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3777, __pyx_L1_error)
46406       __Pyx_GOTREF(__pyx_t_14);
46407       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
46408       __Pyx_Raise(__pyx_t_14, 0, 0, 0);
46409       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
46410       __PYX_ERR(0, 3777, __pyx_L1_error)
46411 
46412       /* "statsmodels/tsa/statespace/_representation.pyx":3776
46413  *             if info > 0:
46414  *                 raise np.linalg.LinAlgError('Singular factorization of observation covariance matrix encountered at period %d' % t)
46415  *             elif info < 0:             # <<<<<<<<<<<<<<
46416  *                 raise np.linalg.LinAlgError('Invalid value in factorization of observation covariance matrix encountered at period %d' % t)
46417  *
46418  */
46419     }
46420 
46421     /* "statsmodels/tsa/statespace/_representation.pyx":3766
46422  *
46423  *         # Solve for Z_t^*, if necessary
46424  *         if t == 0 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
46425  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
46426  *             lapack.ztrtrs("L", "N", "U", &self._k_endog, &self._k_states,
46427  */
46428   }
46429 
46430   /* "statsmodels/tsa/statespace/_representation.pyx":3780
46431  *
46432  *         # Setup final pointers
46433  *         self._design = &self.transform_design[0,0]             # <<<<<<<<<<<<<<
46434  *         self._obs_cov = &self.transform_obs_cov[0,0]
46435  *         self._obs_intercept = &self.transform_obs_intercept[0]
46436  */
46437   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3780, __pyx_L1_error)}
46438   __pyx_t_1 = 0;
46439   __pyx_t_13 = 0;
46440   __pyx_v_self->_design = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_design.data) + __pyx_t_1)) ) + __pyx_t_13 * __pyx_v_self->transform_design.strides[1]) ))));
46441 
46442   /* "statsmodels/tsa/statespace/_representation.pyx":3781
46443  *         # Setup final pointers
46444  *         self._design = &self.transform_design[0,0]
46445  *         self._obs_cov = &self.transform_obs_cov[0,0]             # <<<<<<<<<<<<<<
46446  *         self._obs_intercept = &self.transform_obs_intercept[0]
46447  *
46448  */
46449   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3781, __pyx_L1_error)}
46450   __pyx_t_13 = 0;
46451   __pyx_t_1 = 0;
46452   __pyx_v_self->_obs_cov = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_obs_cov.data) + __pyx_t_13)) ) + __pyx_t_1 * __pyx_v_self->transform_obs_cov.strides[1]) ))));
46453 
46454   /* "statsmodels/tsa/statespace/_representation.pyx":3782
46455  *         self._design = &self.transform_design[0,0]
46456  *         self._obs_cov = &self.transform_obs_cov[0,0]
46457  *         self._obs_intercept = &self.transform_obs_intercept[0]             # <<<<<<<<<<<<<<
46458  *
46459  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:
46460  */
46461   if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3782, __pyx_L1_error)}
46462   __pyx_t_1 = 0;
46463   __pyx_v_self->_obs_intercept = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->transform_obs_intercept.data + __pyx_t_1 * __pyx_v_self->transform_obs_intercept.strides[0]) ))));
46464 
46465   /* "statsmodels/tsa/statespace/_representation.pyx":3661
46466  *             self.transform_diagonalize(t, previous_t, reset)
46467  *
46468  *     cdef void transform_diagonalize(self, unsigned int t, unsigned int previous_t, unsigned int reset=False) except *:             # <<<<<<<<<<<<<<
46469  *         # Note: this assumes that initialize_object_pointers has *already* been done
46470  *         # Note: this assumes that select_missing has *already* been done
46471  */
46472 
46473   /* function exit code */
46474   goto __pyx_L0;
46475   __pyx_L1_error:;
46476   __Pyx_XDECREF(__pyx_t_14);
46477   __Pyx_XDECREF(__pyx_t_15);
46478   __Pyx_XDECREF(__pyx_t_16);
46479   __Pyx_XDECREF(__pyx_t_17);
46480   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transform_diagonalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
46481   __pyx_L0:;
46482   __Pyx_RefNannyFinishContext();
46483 }
46484 
46485 /* "statsmodels/tsa/statespace/_representation.pyx":3784
46486  *         self._obs_intercept = &self.transform_obs_intercept[0]
46487  *
46488  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:             # <<<<<<<<<<<<<<
46489  *         # Note: this assumes that initialize_object_pointers has *already* been done
46490  *         # Note: this assumes that select_missing has *already* been done
46491  */
46492 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,unsigned int __pyx_v_t,unsigned int __pyx_v_previous_t,struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse * __pyx_optional_args)46493 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, unsigned int __pyx_v_t, unsigned int __pyx_v_previous_t, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse *__pyx_optional_args) {
46494   unsigned int __pyx_v_reset = ((unsigned int)1);
46495   int __pyx_v_i;
46496   int __pyx_v_j;
46497   int __pyx_v_k;
46498   int __pyx_v_l;
46499   int __pyx_v_inc;
46500   int __pyx_v_info;
46501   int __pyx_v_reset_missing;
46502   __pyx_t_double_complex __pyx_v_alpha;
46503   __pyx_t_double_complex __pyx_v_beta;
46504   __pyx_t_double_complex __pyx_v_gamma;
46505   int __pyx_v_k_states;
46506   CYTHON_UNUSED int __pyx_v_k_states2;
46507   CYTHON_UNUSED int __pyx_v_k_endogstates;
46508   int __pyx_r;
46509   __Pyx_RefNannyDeclarations
46510   int __pyx_t_1;
46511   int __pyx_t_2;
46512   PyObject *__pyx_t_3 = NULL;
46513   size_t __pyx_t_4;
46514   int __pyx_t_5;
46515   int __pyx_t_6;
46516   Py_ssize_t __pyx_t_7;
46517   Py_ssize_t __pyx_t_8;
46518   size_t __pyx_t_9;
46519   PyObject *__pyx_t_10 = NULL;
46520   PyObject *__pyx_t_11 = NULL;
46521   PyObject *__pyx_t_12 = NULL;
46522   int __pyx_t_13;
46523   int __pyx_t_14;
46524   Py_ssize_t __pyx_t_15;
46525   Py_ssize_t __pyx_t_16;
46526   int __pyx_lineno = 0;
46527   const char *__pyx_filename = NULL;
46528   int __pyx_clineno = 0;
46529   __Pyx_RefNannySetupContext("transform_generalized_collapse", 0);
46530   if (__pyx_optional_args) {
46531     if (__pyx_optional_args->__pyx_n > 0) {
46532       __pyx_v_reset = __pyx_optional_args->reset;
46533     }
46534   }
46535 
46536   /* "statsmodels/tsa/statespace/_representation.pyx":3789
46537  *         # TODO need unit tests, especially for the missing case
46538  *         cdef:
46539  *             int i, j, k, l, inc=1             # <<<<<<<<<<<<<<
46540  *             int obs_cov_t, design_t
46541  *             int info
46542  */
46543   __pyx_v_inc = 1;
46544 
46545   /* "statsmodels/tsa/statespace/_representation.pyx":3793
46546  *             int info
46547  *             int reset_missing
46548  *             np.complex128_t alpha = 1.0             # <<<<<<<<<<<<<<
46549  *             np.complex128_t beta = 0.0
46550  *             np.complex128_t gamma = -1.0
46551  */
46552   __pyx_v_alpha = __pyx_t_double_complex_from_parts(1.0, 0);
46553 
46554   /* "statsmodels/tsa/statespace/_representation.pyx":3794
46555  *             int reset_missing
46556  *             np.complex128_t alpha = 1.0
46557  *             np.complex128_t beta = 0.0             # <<<<<<<<<<<<<<
46558  *             np.complex128_t gamma = -1.0
46559  *             int k_states = self._k_states
46560  */
46561   __pyx_v_beta = __pyx_t_double_complex_from_parts(0.0, 0);
46562 
46563   /* "statsmodels/tsa/statespace/_representation.pyx":3795
46564  *             np.complex128_t alpha = 1.0
46565  *             np.complex128_t beta = 0.0
46566  *             np.complex128_t gamma = -1.0             # <<<<<<<<<<<<<<
46567  *             int k_states = self._k_states
46568  *             int k_states2 = self._k_states2
46569  */
46570   __pyx_v_gamma = __pyx_t_double_complex_from_parts(-1.0, 0);
46571 
46572   /* "statsmodels/tsa/statespace/_representation.pyx":3796
46573  *             np.complex128_t beta = 0.0
46574  *             np.complex128_t gamma = -1.0
46575  *             int k_states = self._k_states             # <<<<<<<<<<<<<<
46576  *             int k_states2 = self._k_states2
46577  *             int k_endogstates = self._k_endogstates
46578  */
46579   __pyx_t_1 = __pyx_v_self->_k_states;
46580   __pyx_v_k_states = __pyx_t_1;
46581 
46582   /* "statsmodels/tsa/statespace/_representation.pyx":3797
46583  *             np.complex128_t gamma = -1.0
46584  *             int k_states = self._k_states
46585  *             int k_states2 = self._k_states2             # <<<<<<<<<<<<<<
46586  *             int k_endogstates = self._k_endogstates
46587  *
46588  */
46589   __pyx_t_1 = __pyx_v_self->_k_states2;
46590   __pyx_v_k_states2 = __pyx_t_1;
46591 
46592   /* "statsmodels/tsa/statespace/_representation.pyx":3798
46593  *             int k_states = self._k_states
46594  *             int k_states2 = self._k_states2
46595  *             int k_endogstates = self._k_endogstates             # <<<<<<<<<<<<<<
46596  *
46597  *         # $y_t^* = \bar A^* y_t = C_t Z_t' H_t^{-1} y_t$
46598  */
46599   __pyx_t_1 = __pyx_v_self->_k_endogstates;
46600   __pyx_v_k_endogstates = __pyx_t_1;
46601 
46602   /* "statsmodels/tsa/statespace/_representation.pyx":3805
46603  *
46604  *         # Make sure we have enough observations to perform collapse
46605  *         if self.k_endog < self.k_states:             # <<<<<<<<<<<<<<
46606  *             raise RuntimeError('Cannot collapse observation vector it the'
46607  *                                ' state dimension is larger than the dimension'
46608  */
46609   __pyx_t_2 = ((__pyx_v_self->k_endog < __pyx_v_self->k_states) != 0);
46610   if (unlikely(__pyx_t_2)) {
46611 
46612     /* "statsmodels/tsa/statespace/_representation.pyx":3806
46613  *         # Make sure we have enough observations to perform collapse
46614  *         if self.k_endog < self.k_states:
46615  *             raise RuntimeError('Cannot collapse observation vector it the'             # <<<<<<<<<<<<<<
46616  *                                ' state dimension is larger than the dimension'
46617  *                                ' of the observation vector.')
46618  */
46619     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3806, __pyx_L1_error)
46620     __Pyx_GOTREF(__pyx_t_3);
46621     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
46622     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46623     __PYX_ERR(0, 3806, __pyx_L1_error)
46624 
46625     /* "statsmodels/tsa/statespace/_representation.pyx":3805
46626  *
46627  *         # Make sure we have enough observations to perform collapse
46628  *         if self.k_endog < self.k_states:             # <<<<<<<<<<<<<<
46629  *             raise RuntimeError('Cannot collapse observation vector it the'
46630  *                                ' state dimension is larger than the dimension'
46631  */
46632   }
46633 
46634   /* "statsmodels/tsa/statespace/_representation.pyx":3812
46635  *         # Adjust for a VAR transition (i.e. design = [#, 0], where the zeros
46636  *         # correspond to all states except the first k_posdef states)
46637  *         if self.subset_design:             # <<<<<<<<<<<<<<
46638  *             k_states = self._k_posdef
46639  *             k_states2 = self._k_posdef2
46640  */
46641   __pyx_t_2 = (__pyx_v_self->subset_design != 0);
46642   if (__pyx_t_2) {
46643 
46644     /* "statsmodels/tsa/statespace/_representation.pyx":3813
46645  *         # correspond to all states except the first k_posdef states)
46646  *         if self.subset_design:
46647  *             k_states = self._k_posdef             # <<<<<<<<<<<<<<
46648  *             k_states2 = self._k_posdef2
46649  *             k_endogstates = self._k_endog * self._k_posdef
46650  */
46651     __pyx_t_1 = __pyx_v_self->_k_posdef;
46652     __pyx_v_k_states = __pyx_t_1;
46653 
46654     /* "statsmodels/tsa/statespace/_representation.pyx":3814
46655  *         if self.subset_design:
46656  *             k_states = self._k_posdef
46657  *             k_states2 = self._k_posdef2             # <<<<<<<<<<<<<<
46658  *             k_endogstates = self._k_endog * self._k_posdef
46659  *
46660  */
46661     __pyx_t_1 = __pyx_v_self->_k_posdef2;
46662     __pyx_v_k_states2 = __pyx_t_1;
46663 
46664     /* "statsmodels/tsa/statespace/_representation.pyx":3815
46665  *             k_states = self._k_posdef
46666  *             k_states2 = self._k_posdef2
46667  *             k_endogstates = self._k_endog * self._k_posdef             # <<<<<<<<<<<<<<
46668  *
46669  *         # Handle missing data
46670  */
46671     __pyx_v_k_endogstates = (__pyx_v_self->_k_endog * __pyx_v_self->_k_posdef);
46672 
46673     /* "statsmodels/tsa/statespace/_representation.pyx":3812
46674  *         # Adjust for a VAR transition (i.e. design = [#, 0], where the zeros
46675  *         # correspond to all states except the first k_posdef states)
46676  *         if self.subset_design:             # <<<<<<<<<<<<<<
46677  *             k_states = self._k_posdef
46678  *             k_states2 = self._k_posdef2
46679  */
46680   }
46681 
46682   /* "statsmodels/tsa/statespace/_representation.pyx":3818
46683  *
46684  *         # Handle missing data
46685  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
46686  *             return self.k_states
46687  *         reset_missing = 0
46688  */
46689   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3818, __pyx_L1_error)}
46690   __pyx_t_4 = __pyx_v_t;
46691   __pyx_t_2 = (((*((int *) ( /* dim=0 */ (__pyx_v_self->nmissing.data + __pyx_t_4 * __pyx_v_self->nmissing.strides[0]) ))) == __pyx_v_self->k_endog) != 0);
46692   if (__pyx_t_2) {
46693 
46694     /* "statsmodels/tsa/statespace/_representation.pyx":3819
46695  *         # Handle missing data
46696  *         if self.nmissing[t] == self.k_endog:
46697  *             return self.k_states             # <<<<<<<<<<<<<<
46698  *         reset_missing = 0
46699  *         for i in range(self.k_endog):
46700  */
46701     __pyx_r = __pyx_v_self->k_states;
46702     goto __pyx_L0;
46703 
46704     /* "statsmodels/tsa/statespace/_representation.pyx":3818
46705  *
46706  *         # Handle missing data
46707  *         if self.nmissing[t] == self.k_endog:             # <<<<<<<<<<<<<<
46708  *             return self.k_states
46709  *         reset_missing = 0
46710  */
46711   }
46712 
46713   /* "statsmodels/tsa/statespace/_representation.pyx":3820
46714  *         if self.nmissing[t] == self.k_endog:
46715  *             return self.k_states
46716  *         reset_missing = 0             # <<<<<<<<<<<<<<
46717  *         for i in range(self.k_endog):
46718  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
46719  */
46720   __pyx_v_reset_missing = 0;
46721 
46722   /* "statsmodels/tsa/statespace/_representation.pyx":3821
46723  *             return self.k_states
46724  *         reset_missing = 0
46725  *         for i in range(self.k_endog):             # <<<<<<<<<<<<<<
46726  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])
46727  *
46728  */
46729   __pyx_t_1 = __pyx_v_self->k_endog;
46730   __pyx_t_5 = __pyx_t_1;
46731   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
46732     __pyx_v_i = __pyx_t_6;
46733 
46734     /* "statsmodels/tsa/statespace/_representation.pyx":3822
46735  *         reset_missing = 0
46736  *         for i in range(self.k_endog):
46737  *             reset_missing = reset_missing + (not self.missing[i,t] == self.missing[i,previous_t])             # <<<<<<<<<<<<<<
46738  *
46739  *         # Initialize the transformation
46740  */
46741     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3822, __pyx_L1_error)}
46742     __pyx_t_7 = __pyx_v_i;
46743     __pyx_t_4 = __pyx_v_t;
46744     if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3822, __pyx_L1_error)}
46745     __pyx_t_8 = __pyx_v_i;
46746     __pyx_t_9 = __pyx_v_previous_t;
46747     __pyx_v_reset_missing = (__pyx_v_reset_missing + (!(((*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_7)) ) + __pyx_t_4 * __pyx_v_self->missing.strides[1]) ))) == (*((int *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((int *) __pyx_v_self->missing.data) + __pyx_t_8)) ) + __pyx_t_9 * __pyx_v_self->missing.strides[1]) )))) != 0)));
46748   }
46749 
46750   /* "statsmodels/tsa/statespace/_representation.pyx":3825
46751  *
46752  *         # Initialize the transformation
46753  *         if self.collapse_obs_cov[0,0] == 0:             # <<<<<<<<<<<<<<
46754  *             # Set H_t^* to identity
46755  *             for i in range(k_states):
46756  */
46757   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3825, __pyx_L1_error)}
46758   __pyx_t_8 = 0;
46759   __pyx_t_7 = 0;
46760   __pyx_t_2 = ((__Pyx_c_eq_double((*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_obs_cov.strides[1]) ))), __pyx_t_double_complex_from_parts(0, 0))) != 0);
46761   if (__pyx_t_2) {
46762 
46763     /* "statsmodels/tsa/statespace/_representation.pyx":3827
46764  *         if self.collapse_obs_cov[0,0] == 0:
46765  *             # Set H_t^* to identity
46766  *             for i in range(k_states):             # <<<<<<<<<<<<<<
46767  *                 self.collapse_obs_cov[i,i] = 1
46768  *
46769  */
46770     __pyx_t_1 = __pyx_v_k_states;
46771     __pyx_t_5 = __pyx_t_1;
46772     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
46773       __pyx_v_i = __pyx_t_6;
46774 
46775       /* "statsmodels/tsa/statespace/_representation.pyx":3828
46776  *             # Set H_t^* to identity
46777  *             for i in range(k_states):
46778  *                 self.collapse_obs_cov[i,i] = 1             # <<<<<<<<<<<<<<
46779  *
46780  *             # Make sure we do not have an observation intercept
46781  */
46782       if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3828, __pyx_L1_error)}
46783       __pyx_t_7 = __pyx_v_i;
46784       __pyx_t_8 = __pyx_v_i;
46785       *((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_obs_cov.strides[1]) )) = __pyx_t_double_complex_from_parts(1, 0);
46786     }
46787 
46788     /* "statsmodels/tsa/statespace/_representation.pyx":3831
46789  *
46790  *             # Make sure we do not have an observation intercept
46791  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:             # <<<<<<<<<<<<<<
46792  *                 raise RuntimeError('The observation collapse transformation'
46793  *                                    ' does not currently support an observation'
46794  */
46795     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3831, __pyx_L1_error)
46796     __Pyx_GOTREF(__pyx_t_10);
46797     __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3831, __pyx_L1_error)
46798     __Pyx_GOTREF(__pyx_t_11);
46799     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
46800     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3831, __pyx_L1_error)}
46801     __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3831, __pyx_L1_error)
46802     __Pyx_GOTREF(__pyx_t_10);
46803     __pyx_t_12 = NULL;
46804     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
46805       __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
46806       if (likely(__pyx_t_12)) {
46807         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
46808         __Pyx_INCREF(__pyx_t_12);
46809         __Pyx_INCREF(function);
46810         __Pyx_DECREF_SET(__pyx_t_11, function);
46811       }
46812     }
46813     __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10);
46814     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
46815     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
46816     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3831, __pyx_L1_error)
46817     __Pyx_GOTREF(__pyx_t_3);
46818     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
46819     __pyx_t_11 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3831, __pyx_L1_error)
46820     __Pyx_GOTREF(__pyx_t_11);
46821     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46822     __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 3831, __pyx_L1_error)
46823     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
46824     __pyx_t_14 = ((!__pyx_t_13) != 0);
46825     if (!__pyx_t_14) {
46826     } else {
46827       __pyx_t_2 = __pyx_t_14;
46828       goto __pyx_L12_bool_binop_done;
46829     }
46830     if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3831, __pyx_L1_error)}
46831     __pyx_t_14 = (((__pyx_v_self->obs_intercept.shape[2]) > 1) != 0);
46832     __pyx_t_2 = __pyx_t_14;
46833     __pyx_L12_bool_binop_done:;
46834     if (unlikely(__pyx_t_2)) {
46835 
46836       /* "statsmodels/tsa/statespace/_representation.pyx":3832
46837  *             # Make sure we do not have an observation intercept
46838  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:
46839  *                 raise RuntimeError('The observation collapse transformation'             # <<<<<<<<<<<<<<
46840  *                                    ' does not currently support an observation'
46841  *                                    ' intercept.')
46842  */
46843       __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3832, __pyx_L1_error)
46844       __Pyx_GOTREF(__pyx_t_11);
46845       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
46846       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
46847       __PYX_ERR(0, 3832, __pyx_L1_error)
46848 
46849       /* "statsmodels/tsa/statespace/_representation.pyx":3831
46850  *
46851  *             # Make sure we do not have an observation intercept
46852  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:             # <<<<<<<<<<<<<<
46853  *                 raise RuntimeError('The observation collapse transformation'
46854  *                                    ' does not currently support an observation'
46855  */
46856     }
46857 
46858     /* "statsmodels/tsa/statespace/_representation.pyx":3825
46859  *
46860  *         # Initialize the transformation
46861  *         if self.collapse_obs_cov[0,0] == 0:             # <<<<<<<<<<<<<<
46862  *             # Set H_t^* to identity
46863  *             for i in range(k_states):
46864  */
46865   }
46866 
46867   /* "statsmodels/tsa/statespace/_representation.pyx":3837
46868  *
46869  *         # Perform the Cholesky decomposition of H_t, if necessary
46870  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
46871  *             # Cholesky decomposition: $H = L L'$
46872  *             blas.zcopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
46873  */
46874   __pyx_t_14 = ((__pyx_v_t == 0) != 0);
46875   if (!__pyx_t_14) {
46876   } else {
46877     __pyx_t_2 = __pyx_t_14;
46878     goto __pyx_L15_bool_binop_done;
46879   }
46880   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3837, __pyx_L1_error)}
46881   __pyx_t_14 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
46882   if (!__pyx_t_14) {
46883   } else {
46884     __pyx_t_2 = __pyx_t_14;
46885     goto __pyx_L15_bool_binop_done;
46886   }
46887   __pyx_t_14 = (__pyx_v_reset_missing != 0);
46888   if (!__pyx_t_14) {
46889   } else {
46890     __pyx_t_2 = __pyx_t_14;
46891     goto __pyx_L15_bool_binop_done;
46892   }
46893   __pyx_t_14 = (__pyx_v_reset != 0);
46894   __pyx_t_2 = __pyx_t_14;
46895   __pyx_L15_bool_binop_done:;
46896   if (__pyx_t_2) {
46897 
46898     /* "statsmodels/tsa/statespace/_representation.pyx":3839
46899  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:
46900  *             # Cholesky decomposition: $H = L L'$
46901  *             blas.zcopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)             # <<<<<<<<<<<<<<
46902  *             lapack.zpotrf("L", &self._k_endog, &self.transform_cholesky[0,0], &self._k_endog, &info)
46903  *
46904  */
46905     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3839, __pyx_L1_error)}
46906     __pyx_t_8 = 0;
46907     __pyx_t_7 = 0;
46908     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->_k_endog2), __pyx_v_self->_obs_cov, (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_inc));
46909 
46910     /* "statsmodels/tsa/statespace/_representation.pyx":3840
46911  *             # Cholesky decomposition: $H = L L'$
46912  *             blas.zcopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
46913  *             lapack.zpotrf("L", &self._k_endog, &self.transform_cholesky[0,0], &self._k_endog, &info)             # <<<<<<<<<<<<<<
46914  *
46915  *             # Check for errors
46916  */
46917     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3840, __pyx_L1_error)}
46918     __pyx_t_7 = 0;
46919     __pyx_t_8 = 0;
46920     __pyx_f_5scipy_6linalg_13cython_lapack_zpotrf(((char *)"L"), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
46921 
46922     /* "statsmodels/tsa/statespace/_representation.pyx":3843
46923  *
46924  *             # Check for errors
46925  *             if info > 0:             # <<<<<<<<<<<<<<
46926  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
46927  *             elif info < 0:
46928  */
46929     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
46930     if (unlikely(__pyx_t_2)) {
46931 
46932       /* "statsmodels/tsa/statespace/_representation.pyx":3844
46933  *             # Check for errors
46934  *             if info > 0:
46935  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
46936  *             elif info < 0:
46937  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
46938  */
46939       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3844, __pyx_L1_error)
46940       __Pyx_GOTREF(__pyx_t_3);
46941       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3844, __pyx_L1_error)
46942       __Pyx_GOTREF(__pyx_t_10);
46943       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46944       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3844, __pyx_L1_error)
46945       __Pyx_GOTREF(__pyx_t_3);
46946       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
46947       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3844, __pyx_L1_error)
46948       __Pyx_GOTREF(__pyx_t_10);
46949       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_observatio, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3844, __pyx_L1_error)
46950       __Pyx_GOTREF(__pyx_t_12);
46951       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
46952       __pyx_t_10 = NULL;
46953       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
46954         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
46955         if (likely(__pyx_t_10)) {
46956           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
46957           __Pyx_INCREF(__pyx_t_10);
46958           __Pyx_INCREF(function);
46959           __Pyx_DECREF_SET(__pyx_t_3, function);
46960         }
46961       }
46962       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
46963       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
46964       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
46965       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3844, __pyx_L1_error)
46966       __Pyx_GOTREF(__pyx_t_11);
46967       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46968       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
46969       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
46970       __PYX_ERR(0, 3844, __pyx_L1_error)
46971 
46972       /* "statsmodels/tsa/statespace/_representation.pyx":3843
46973  *
46974  *             # Check for errors
46975  *             if info > 0:             # <<<<<<<<<<<<<<
46976  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
46977  *             elif info < 0:
46978  */
46979     }
46980 
46981     /* "statsmodels/tsa/statespace/_representation.pyx":3845
46982  *             if info > 0:
46983  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
46984  *             elif info < 0:             # <<<<<<<<<<<<<<
46985  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
46986  *
46987  */
46988     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
46989     if (unlikely(__pyx_t_2)) {
46990 
46991       /* "statsmodels/tsa/statespace/_representation.pyx":3846
46992  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
46993  *             elif info < 0:
46994  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
46995  *
46996  *             # Calculate the determinant (just the squared product of the
46997  */
46998       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3846, __pyx_L1_error)
46999       __Pyx_GOTREF(__pyx_t_3);
47000       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3846, __pyx_L1_error)
47001       __Pyx_GOTREF(__pyx_t_12);
47002       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47003       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3846, __pyx_L1_error)
47004       __Pyx_GOTREF(__pyx_t_3);
47005       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47006       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3846, __pyx_L1_error)
47007       __Pyx_GOTREF(__pyx_t_12);
47008       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_observation_cov, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3846, __pyx_L1_error)
47009       __Pyx_GOTREF(__pyx_t_10);
47010       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47011       __pyx_t_12 = NULL;
47012       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
47013         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
47014         if (likely(__pyx_t_12)) {
47015           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
47016           __Pyx_INCREF(__pyx_t_12);
47017           __Pyx_INCREF(function);
47018           __Pyx_DECREF_SET(__pyx_t_3, function);
47019         }
47020       }
47021       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
47022       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
47023       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47024       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3846, __pyx_L1_error)
47025       __Pyx_GOTREF(__pyx_t_11);
47026       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47027       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
47028       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
47029       __PYX_ERR(0, 3846, __pyx_L1_error)
47030 
47031       /* "statsmodels/tsa/statespace/_representation.pyx":3845
47032  *             if info > 0:
47033  *                 raise np.linalg.LinAlgError('Non-positive-definite observation covariance matrix encountered at period %d' % t)
47034  *             elif info < 0:             # <<<<<<<<<<<<<<
47035  *                 raise np.linalg.LinAlgError('Invalid value in observation covariance matrix encountered at period %d' % t)
47036  *
47037  */
47038     }
47039 
47040     /* "statsmodels/tsa/statespace/_representation.pyx":3850
47041  *             # Calculate the determinant (just the squared product of the
47042  *             # diagonals, in the Cholesky decomposition case)
47043  *             self.transform_determinant = 0.             # <<<<<<<<<<<<<<
47044  *             for i in range(self._k_endog):
47045  *                 j = i * (self._k_endog + 1)
47046  */
47047     __pyx_v_self->transform_determinant = __pyx_t_double_complex_from_parts(0., 0);
47048 
47049     /* "statsmodels/tsa/statespace/_representation.pyx":3851
47050  *             # diagonals, in the Cholesky decomposition case)
47051  *             self.transform_determinant = 0.
47052  *             for i in range(self._k_endog):             # <<<<<<<<<<<<<<
47053  *                 j = i * (self._k_endog + 1)
47054  *                 k = j % self.k_endog
47055  */
47056     __pyx_t_1 = __pyx_v_self->_k_endog;
47057     __pyx_t_5 = __pyx_t_1;
47058     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
47059       __pyx_v_i = __pyx_t_6;
47060 
47061       /* "statsmodels/tsa/statespace/_representation.pyx":3852
47062  *             self.transform_determinant = 0.
47063  *             for i in range(self._k_endog):
47064  *                 j = i * (self._k_endog + 1)             # <<<<<<<<<<<<<<
47065  *                 k = j % self.k_endog
47066  *                 l = j // self.k_endog
47067  */
47068       __pyx_v_j = (__pyx_v_i * (__pyx_v_self->_k_endog + 1));
47069 
47070       /* "statsmodels/tsa/statespace/_representation.pyx":3853
47071  *             for i in range(self._k_endog):
47072  *                 j = i * (self._k_endog + 1)
47073  *                 k = j % self.k_endog             # <<<<<<<<<<<<<<
47074  *                 l = j // self.k_endog
47075  *                 if not self.transform_cholesky[k, l] == 0:
47076  */
47077       if (unlikely(__pyx_v_self->k_endog == 0)) {
47078         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
47079         __PYX_ERR(0, 3853, __pyx_L1_error)
47080       }
47081       __pyx_v_k = __Pyx_mod_int(__pyx_v_j, __pyx_v_self->k_endog);
47082 
47083       /* "statsmodels/tsa/statespace/_representation.pyx":3854
47084  *                 j = i * (self._k_endog + 1)
47085  *                 k = j % self.k_endog
47086  *                 l = j // self.k_endog             # <<<<<<<<<<<<<<
47087  *                 if not self.transform_cholesky[k, l] == 0:
47088  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])
47089  */
47090       if (unlikely(__pyx_v_self->k_endog == 0)) {
47091         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
47092         __PYX_ERR(0, 3854, __pyx_L1_error)
47093       }
47094       else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_self->k_endog == (int)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_j))) {
47095         PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
47096         __PYX_ERR(0, 3854, __pyx_L1_error)
47097       }
47098       __pyx_v_l = __Pyx_div_int(__pyx_v_j, __pyx_v_self->k_endog);
47099 
47100       /* "statsmodels/tsa/statespace/_representation.pyx":3855
47101  *                 k = j % self.k_endog
47102  *                 l = j // self.k_endog
47103  *                 if not self.transform_cholesky[k, l] == 0:             # <<<<<<<<<<<<<<
47104  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])
47105  *             self.transform_determinant = 2 * self.transform_determinant
47106  */
47107       if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3855, __pyx_L1_error)}
47108       __pyx_t_8 = __pyx_v_k;
47109       __pyx_t_7 = __pyx_v_l;
47110       __pyx_t_2 = ((!((__Pyx_c_eq_double((*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_cholesky.strides[1]) ))), __pyx_t_double_complex_from_parts(0, 0))) != 0)) != 0);
47111       if (__pyx_t_2) {
47112 
47113         /* "statsmodels/tsa/statespace/_representation.pyx":3856
47114  *                 l = j // self.k_endog
47115  *                 if not self.transform_cholesky[k, l] == 0:
47116  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])             # <<<<<<<<<<<<<<
47117  *             self.transform_determinant = 2 * self.transform_determinant
47118  *
47119  */
47120         if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3856, __pyx_L1_error)}
47121         __pyx_t_7 = __pyx_v_k;
47122         __pyx_t_8 = __pyx_v_l;
47123         __pyx_v_self->transform_determinant = __Pyx_c_sum_double(__pyx_v_self->transform_determinant, __pyx_f_11statsmodels_3src_4math_zlog((*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))));
47124 
47125         /* "statsmodels/tsa/statespace/_representation.pyx":3855
47126  *                 k = j % self.k_endog
47127  *                 l = j // self.k_endog
47128  *                 if not self.transform_cholesky[k, l] == 0:             # <<<<<<<<<<<<<<
47129  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])
47130  *             self.transform_determinant = 2 * self.transform_determinant
47131  */
47132       }
47133     }
47134 
47135     /* "statsmodels/tsa/statespace/_representation.pyx":3857
47136  *                 if not self.transform_cholesky[k, l] == 0:
47137  *                     self.transform_determinant = self.transform_determinant + zlog(self.transform_cholesky[k, l])
47138  *             self.transform_determinant = 2 * self.transform_determinant             # <<<<<<<<<<<<<<
47139  *
47140  *         # Get $Z_t \equiv C^{-1}$, if necessary
47141  */
47142     __pyx_v_self->transform_determinant = __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_v_self->transform_determinant);
47143 
47144     /* "statsmodels/tsa/statespace/_representation.pyx":3837
47145  *
47146  *         # Perform the Cholesky decomposition of H_t, if necessary
47147  *         if t == 0 or self.obs_cov.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
47148  *             # Cholesky decomposition: $H = L L'$
47149  *             blas.zcopy(&self._k_endog2, self._obs_cov, &inc, &self.transform_cholesky[0,0], &inc)
47150  */
47151   }
47152 
47153   /* "statsmodels/tsa/statespace/_representation.pyx":3860
47154  *
47155  *         # Get $Z_t \equiv C^{-1}$, if necessary
47156  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
47157  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
47158  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
47159  */
47160   __pyx_t_14 = ((__pyx_v_t == 0) != 0);
47161   if (!__pyx_t_14) {
47162   } else {
47163     __pyx_t_2 = __pyx_t_14;
47164     goto __pyx_L24_bool_binop_done;
47165   }
47166   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3860, __pyx_L1_error)}
47167   __pyx_t_14 = (((__pyx_v_self->obs_cov.shape[2]) > 1) != 0);
47168   if (!__pyx_t_14) {
47169   } else {
47170     __pyx_t_2 = __pyx_t_14;
47171     goto __pyx_L24_bool_binop_done;
47172   }
47173   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3860, __pyx_L1_error)}
47174   __pyx_t_14 = (((__pyx_v_self->design.shape[2]) > 1) != 0);
47175   if (!__pyx_t_14) {
47176   } else {
47177     __pyx_t_2 = __pyx_t_14;
47178     goto __pyx_L24_bool_binop_done;
47179   }
47180   __pyx_t_14 = (__pyx_v_reset_missing != 0);
47181   if (!__pyx_t_14) {
47182   } else {
47183     __pyx_t_2 = __pyx_t_14;
47184     goto __pyx_L24_bool_binop_done;
47185   }
47186   __pyx_t_14 = (__pyx_v_reset != 0);
47187   __pyx_t_2 = __pyx_t_14;
47188   __pyx_L24_bool_binop_done:;
47189   if (__pyx_t_2) {
47190 
47191     /* "statsmodels/tsa/statespace/_representation.pyx":3862
47192  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:
47193  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
47194  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)             # <<<<<<<<<<<<<<
47195  *             lapack.zpotrs("L", &self._k_endog, &k_states,
47196  *                             &self.transform_cholesky[0,0], &self._k_endog,
47197  */
47198     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3862, __pyx_L1_error)}
47199     __pyx_t_8 = 0;
47200     __pyx_t_7 = 0;
47201     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->_k_endogstates), __pyx_v_self->_design, (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_design.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_inc));
47202 
47203     /* "statsmodels/tsa/statespace/_representation.pyx":3864
47204  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
47205  *             lapack.zpotrs("L", &self._k_endog, &k_states,
47206  *                             &self.transform_cholesky[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
47207  *                             &self.transform_design[0,0], &self._k_endog,
47208  *                             &info)
47209  */
47210     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3864, __pyx_L1_error)}
47211     __pyx_t_7 = 0;
47212     __pyx_t_8 = 0;
47213 
47214     /* "statsmodels/tsa/statespace/_representation.pyx":3865
47215  *             lapack.zpotrs("L", &self._k_endog, &k_states,
47216  *                             &self.transform_cholesky[0,0], &self._k_endog,
47217  *                             &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
47218  *                             &info)
47219  *
47220  */
47221     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3865, __pyx_L1_error)}
47222     __pyx_t_15 = 0;
47223     __pyx_t_16 = 0;
47224 
47225     /* "statsmodels/tsa/statespace/_representation.pyx":3863
47226  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
47227  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
47228  *             lapack.zpotrs("L", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
47229  *                             &self.transform_cholesky[0,0], &self._k_endog,
47230  *                             &self.transform_design[0,0], &self._k_endog,
47231  */
47232     __pyx_f_5scipy_6linalg_13cython_lapack_zpotrs(((char *)"L"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
47233 
47234     /* "statsmodels/tsa/statespace/_representation.pyx":3869
47235  *
47236  *             # Check for errors
47237  *             if not info == 0:             # <<<<<<<<<<<<<<
47238  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)
47239  *
47240  */
47241     __pyx_t_2 = ((!((__pyx_v_info == 0) != 0)) != 0);
47242     if (unlikely(__pyx_t_2)) {
47243 
47244       /* "statsmodels/tsa/statespace/_representation.pyx":3870
47245  *             # Check for errors
47246  *             if not info == 0:
47247  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
47248  *
47249  *             # Calculate $(H_t^{-1} Z_t)' Z_t$
47250  */
47251       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3870, __pyx_L1_error)
47252       __Pyx_GOTREF(__pyx_t_3);
47253       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3870, __pyx_L1_error)
47254       __Pyx_GOTREF(__pyx_t_10);
47255       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47256       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3870, __pyx_L1_error)
47257       __Pyx_GOTREF(__pyx_t_3);
47258       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47259       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3870, __pyx_L1_error)
47260       __Pyx_GOTREF(__pyx_t_10);
47261       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_calculation_of, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3870, __pyx_L1_error)
47262       __Pyx_GOTREF(__pyx_t_12);
47263       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47264       __pyx_t_10 = NULL;
47265       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
47266         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
47267         if (likely(__pyx_t_10)) {
47268           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
47269           __Pyx_INCREF(__pyx_t_10);
47270           __Pyx_INCREF(function);
47271           __Pyx_DECREF_SET(__pyx_t_3, function);
47272         }
47273       }
47274       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
47275       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
47276       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47277       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3870, __pyx_L1_error)
47278       __Pyx_GOTREF(__pyx_t_11);
47279       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47280       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
47281       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
47282       __PYX_ERR(0, 3870, __pyx_L1_error)
47283 
47284       /* "statsmodels/tsa/statespace/_representation.pyx":3869
47285  *
47286  *             # Check for errors
47287  *             if not info == 0:             # <<<<<<<<<<<<<<
47288  *                 raise np.linalg.LinAlgError('Invalid value in calculation of H_t^{-1}Z matrix encountered at period %d' % t)
47289  *
47290  */
47291     }
47292 
47293     /* "statsmodels/tsa/statespace/_representation.pyx":3876
47294  *             blas.zgemm("T", "N", &k_states, &k_states, &self._k_endog,
47295  *                    &alpha, self._design, &self._k_endog,
47296  *                            &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
47297  *                    &beta, &self.collapse_cholesky[0,0], &self._k_states)
47298  *
47299  */
47300     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3876, __pyx_L1_error)}
47301     __pyx_t_16 = 0;
47302     __pyx_t_15 = 0;
47303 
47304     /* "statsmodels/tsa/statespace/_representation.pyx":3877
47305  *                    &alpha, self._design, &self._k_endog,
47306  *                            &self.transform_design[0,0], &self._k_endog,
47307  *                    &beta, &self.collapse_cholesky[0,0], &self._k_states)             # <<<<<<<<<<<<<<
47308  *
47309  *             # Calculate $(Z_t' H_t^{-1} Z_t)^{-1}$ via Cholesky inversion
47310  */
47311     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3877, __pyx_L1_error)}
47312     __pyx_t_8 = 0;
47313     __pyx_t_7 = 0;
47314 
47315     /* "statsmodels/tsa/statespace/_representation.pyx":3874
47316  *             # Calculate $(H_t^{-1} Z_t)' Z_t$
47317  *             # $(m \times m) = (m \times p) (p \times p) (p \times m)$
47318  *             blas.zgemm("T", "N", &k_states, &k_states, &self._k_endog,             # <<<<<<<<<<<<<<
47319  *                    &alpha, self._design, &self._k_endog,
47320  *                            &self.transform_design[0,0], &self._k_endog,
47321  */
47322     __pyx_f_5scipy_6linalg_11cython_blas_zgemm(((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&__pyx_v_k_states), (&__pyx_v_self->_k_endog), (&__pyx_v_alpha), __pyx_v_self->_design, (&__pyx_v_self->_k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_design.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_beta), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states));
47323 
47324     /* "statsmodels/tsa/statespace/_representation.pyx":3880
47325  *
47326  *             # Calculate $(Z_t' H_t^{-1} Z_t)^{-1}$ via Cholesky inversion
47327  *             lapack.zpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
47328  *             # Check for errors
47329  *             if info > 0:
47330  */
47331     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3880, __pyx_L1_error)}
47332     __pyx_t_7 = 0;
47333     __pyx_t_8 = 0;
47334     __pyx_f_5scipy_6linalg_13cython_lapack_zpotrf(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
47335 
47336     /* "statsmodels/tsa/statespace/_representation.pyx":3882
47337  *             lapack.zpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
47338  *             # Check for errors
47339  *             if info > 0:             # <<<<<<<<<<<<<<
47340  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
47341  *             elif info < 0:
47342  */
47343     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
47344     if (unlikely(__pyx_t_2)) {
47345 
47346       /* "statsmodels/tsa/statespace/_representation.pyx":3883
47347  *             # Check for errors
47348  *             if info > 0:
47349  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
47350  *             elif info < 0:
47351  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
47352  */
47353       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3883, __pyx_L1_error)
47354       __Pyx_GOTREF(__pyx_t_3);
47355       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3883, __pyx_L1_error)
47356       __Pyx_GOTREF(__pyx_t_12);
47357       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47358       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3883, __pyx_L1_error)
47359       __Pyx_GOTREF(__pyx_t_3);
47360       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47361       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3883, __pyx_L1_error)
47362       __Pyx_GOTREF(__pyx_t_12);
47363       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_ZHZ_matrix, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3883, __pyx_L1_error)
47364       __Pyx_GOTREF(__pyx_t_10);
47365       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47366       __pyx_t_12 = NULL;
47367       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
47368         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
47369         if (likely(__pyx_t_12)) {
47370           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
47371           __Pyx_INCREF(__pyx_t_12);
47372           __Pyx_INCREF(function);
47373           __Pyx_DECREF_SET(__pyx_t_3, function);
47374         }
47375       }
47376       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
47377       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
47378       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47379       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3883, __pyx_L1_error)
47380       __Pyx_GOTREF(__pyx_t_11);
47381       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47382       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
47383       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
47384       __PYX_ERR(0, 3883, __pyx_L1_error)
47385 
47386       /* "statsmodels/tsa/statespace/_representation.pyx":3882
47387  *             lapack.zpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
47388  *             # Check for errors
47389  *             if info > 0:             # <<<<<<<<<<<<<<
47390  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
47391  *             elif info < 0:
47392  */
47393     }
47394 
47395     /* "statsmodels/tsa/statespace/_representation.pyx":3884
47396  *             if info > 0:
47397  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
47398  *             elif info < 0:             # <<<<<<<<<<<<<<
47399  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
47400  *             lapack.zpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
47401  */
47402     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
47403     if (unlikely(__pyx_t_2)) {
47404 
47405       /* "statsmodels/tsa/statespace/_representation.pyx":3885
47406  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
47407  *             elif info < 0:
47408  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
47409  *             lapack.zpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
47410  *
47411  */
47412       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3885, __pyx_L1_error)
47413       __Pyx_GOTREF(__pyx_t_3);
47414       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3885, __pyx_L1_error)
47415       __Pyx_GOTREF(__pyx_t_10);
47416       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47417       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3885, __pyx_L1_error)
47418       __Pyx_GOTREF(__pyx_t_3);
47419       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47420       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3885, __pyx_L1_error)
47421       __Pyx_GOTREF(__pyx_t_10);
47422       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_ZHZ_matrix_enco, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3885, __pyx_L1_error)
47423       __Pyx_GOTREF(__pyx_t_12);
47424       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47425       __pyx_t_10 = NULL;
47426       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
47427         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
47428         if (likely(__pyx_t_10)) {
47429           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
47430           __Pyx_INCREF(__pyx_t_10);
47431           __Pyx_INCREF(function);
47432           __Pyx_DECREF_SET(__pyx_t_3, function);
47433         }
47434       }
47435       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
47436       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
47437       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47438       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3885, __pyx_L1_error)
47439       __Pyx_GOTREF(__pyx_t_11);
47440       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47441       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
47442       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
47443       __PYX_ERR(0, 3885, __pyx_L1_error)
47444 
47445       /* "statsmodels/tsa/statespace/_representation.pyx":3884
47446  *             if info > 0:
47447  *                 raise np.linalg.LinAlgError('Non-positive-definite ZHZ matrix encountered at period %d' % t)
47448  *             elif info < 0:             # <<<<<<<<<<<<<<
47449  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
47450  *             lapack.zpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)
47451  */
47452     }
47453 
47454     /* "statsmodels/tsa/statespace/_representation.pyx":3886
47455  *             elif info < 0:
47456  *                 raise np.linalg.LinAlgError('Invalid value in ZHZ matrix encountered at period %d' % t)
47457  *             lapack.zpotri("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
47458  *
47459  *             # Calculate $C_t$ (the upper triangular cholesky decomposition of $(Z_t' H_t^{-1} Z_t)^{-1}$)
47460  */
47461     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3886, __pyx_L1_error)}
47462     __pyx_t_8 = 0;
47463     __pyx_t_7 = 0;
47464     __pyx_f_5scipy_6linalg_13cython_lapack_zpotri(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
47465 
47466     /* "statsmodels/tsa/statespace/_representation.pyx":3889
47467  *
47468  *             # Calculate $C_t$ (the upper triangular cholesky decomposition of $(Z_t' H_t^{-1} Z_t)^{-1}$)
47469  *             lapack.zpotrf("U", &k_states, &self.collapse_cholesky[0,0], &self.k_states, &info)             # <<<<<<<<<<<<<<
47470  *
47471  *             # Check for errors
47472  */
47473     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3889, __pyx_L1_error)}
47474     __pyx_t_7 = 0;
47475     __pyx_t_8 = 0;
47476     __pyx_f_5scipy_6linalg_13cython_lapack_zpotrf(((char *)"U"), (&__pyx_v_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->k_states), (&__pyx_v_info));
47477 
47478     /* "statsmodels/tsa/statespace/_representation.pyx":3892
47479  *
47480  *             # Check for errors
47481  *             if info > 0:             # <<<<<<<<<<<<<<
47482  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
47483  *             elif info < 0:
47484  */
47485     __pyx_t_2 = ((__pyx_v_info > 0) != 0);
47486     if (unlikely(__pyx_t_2)) {
47487 
47488       /* "statsmodels/tsa/statespace/_representation.pyx":3893
47489  *             # Check for errors
47490  *             if info > 0:
47491  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
47492  *             elif info < 0:
47493  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
47494  */
47495       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3893, __pyx_L1_error)
47496       __Pyx_GOTREF(__pyx_t_3);
47497       __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3893, __pyx_L1_error)
47498       __Pyx_GOTREF(__pyx_t_12);
47499       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47500       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3893, __pyx_L1_error)
47501       __Pyx_GOTREF(__pyx_t_3);
47502       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47503       __pyx_t_12 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3893, __pyx_L1_error)
47504       __Pyx_GOTREF(__pyx_t_12);
47505       __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Non_positive_definite_C_matrix_e, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3893, __pyx_L1_error)
47506       __Pyx_GOTREF(__pyx_t_10);
47507       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47508       __pyx_t_12 = NULL;
47509       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
47510         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
47511         if (likely(__pyx_t_12)) {
47512           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
47513           __Pyx_INCREF(__pyx_t_12);
47514           __Pyx_INCREF(function);
47515           __Pyx_DECREF_SET(__pyx_t_3, function);
47516         }
47517       }
47518       __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_12, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10);
47519       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
47520       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47521       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3893, __pyx_L1_error)
47522       __Pyx_GOTREF(__pyx_t_11);
47523       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47524       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
47525       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
47526       __PYX_ERR(0, 3893, __pyx_L1_error)
47527 
47528       /* "statsmodels/tsa/statespace/_representation.pyx":3892
47529  *
47530  *             # Check for errors
47531  *             if info > 0:             # <<<<<<<<<<<<<<
47532  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
47533  *             elif info < 0:
47534  */
47535     }
47536 
47537     /* "statsmodels/tsa/statespace/_representation.pyx":3894
47538  *             if info > 0:
47539  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
47540  *             elif info < 0:             # <<<<<<<<<<<<<<
47541  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
47542  *
47543  */
47544     __pyx_t_2 = ((__pyx_v_info < 0) != 0);
47545     if (unlikely(__pyx_t_2)) {
47546 
47547       /* "statsmodels/tsa/statespace/_representation.pyx":3895
47548  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
47549  *             elif info < 0:
47550  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)             # <<<<<<<<<<<<<<
47551  *
47552  *             # Calculate $C_t'^{-1} \equiv Z_t$
47553  */
47554       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3895, __pyx_L1_error)
47555       __Pyx_GOTREF(__pyx_t_3);
47556       __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linalg); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3895, __pyx_L1_error)
47557       __Pyx_GOTREF(__pyx_t_10);
47558       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47559       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_LinAlgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3895, __pyx_L1_error)
47560       __Pyx_GOTREF(__pyx_t_3);
47561       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47562       __pyx_t_10 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3895, __pyx_L1_error)
47563       __Pyx_GOTREF(__pyx_t_10);
47564       __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Invalid_value_in_C_matrix_encoun, __pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3895, __pyx_L1_error)
47565       __Pyx_GOTREF(__pyx_t_12);
47566       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
47567       __pyx_t_10 = NULL;
47568       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
47569         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
47570         if (likely(__pyx_t_10)) {
47571           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
47572           __Pyx_INCREF(__pyx_t_10);
47573           __Pyx_INCREF(function);
47574           __Pyx_DECREF_SET(__pyx_t_3, function);
47575         }
47576       }
47577       __pyx_t_11 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_10, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_12);
47578       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
47579       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
47580       if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3895, __pyx_L1_error)
47581       __Pyx_GOTREF(__pyx_t_11);
47582       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
47583       __Pyx_Raise(__pyx_t_11, 0, 0, 0);
47584       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
47585       __PYX_ERR(0, 3895, __pyx_L1_error)
47586 
47587       /* "statsmodels/tsa/statespace/_representation.pyx":3894
47588  *             if info > 0:
47589  *                 raise np.linalg.LinAlgError('Non-positive-definite C matrix encountered at period %d' % t)
47590  *             elif info < 0:             # <<<<<<<<<<<<<<
47591  *                 raise np.linalg.LinAlgError('Invalid value in C matrix encountered at period %d' % t)
47592  *
47593  */
47594     }
47595 
47596     /* "statsmodels/tsa/statespace/_representation.pyx":3900
47597  *             # Do so by solving the system: $C_t' x = I$
47598  *             # (Recall that collapse_obs_cov is an identity matrix)
47599  *             blas.zcopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)             # <<<<<<<<<<<<<<
47600  *             lapack.ztrtrs("U", "T", "N", &k_states, &k_states,
47601  *                         &self.collapse_cholesky[0,0], &self._k_states,
47602  */
47603     if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3900, __pyx_L1_error)}
47604     __pyx_t_8 = 0;
47605     __pyx_t_7 = 0;
47606     if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3900, __pyx_L1_error)}
47607     __pyx_t_15 = 0;
47608     __pyx_t_16 = 0;
47609     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->_k_states2), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_8)) ) + __pyx_t_7 * __pyx_v_self->collapse_obs_cov.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->collapse_design.strides[1]) )))), (&__pyx_v_inc));
47610 
47611     /* "statsmodels/tsa/statespace/_representation.pyx":3902
47612  *             blas.zcopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)
47613  *             lapack.ztrtrs("U", "T", "N", &k_states, &k_states,
47614  *                         &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
47615  *                         &self.collapse_design[0,0], &self._k_states,
47616  *                         &info)
47617  */
47618     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3902, __pyx_L1_error)}
47619     __pyx_t_16 = 0;
47620     __pyx_t_15 = 0;
47621 
47622     /* "statsmodels/tsa/statespace/_representation.pyx":3903
47623  *             lapack.ztrtrs("U", "T", "N", &k_states, &k_states,
47624  *                         &self.collapse_cholesky[0,0], &self._k_states,
47625  *                         &self.collapse_design[0,0], &self._k_states,             # <<<<<<<<<<<<<<
47626  *                         &info)
47627  *
47628  */
47629     if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3903, __pyx_L1_error)}
47630     __pyx_t_7 = 0;
47631     __pyx_t_8 = 0;
47632 
47633     /* "statsmodels/tsa/statespace/_representation.pyx":3901
47634  *             # (Recall that collapse_obs_cov is an identity matrix)
47635  *             blas.zcopy(&self._k_states2, &self.collapse_obs_cov[0,0], &inc, &self.collapse_design[0,0], &inc)
47636  *             lapack.ztrtrs("U", "T", "N", &k_states, &k_states,             # <<<<<<<<<<<<<<
47637  *                         &self.collapse_cholesky[0,0], &self._k_states,
47638  *                         &self.collapse_design[0,0], &self._k_states,
47639  */
47640     __pyx_f_5scipy_6linalg_13cython_lapack_ztrtrs(((char *)"U"), ((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&__pyx_v_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_design.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->collapse_design.strides[1]) )))), (&__pyx_v_self->_k_states), (&__pyx_v_info));
47641 
47642     /* "statsmodels/tsa/statespace/_representation.pyx":3860
47643  *
47644  *         # Get $Z_t \equiv C^{-1}$, if necessary
47645  *         if t == 0 or self.obs_cov.shape[2] > 1 or self.design.shape[2] > 1 or reset_missing or reset:             # <<<<<<<<<<<<<<
47646  *             # Calculate $H_t^{-1} Z_t \equiv (Z_t' H_t^{-1})'$ via Cholesky solver
47647  *             blas.zcopy(&self._k_endogstates, self._design, &inc, &self.transform_design[0,0], &inc)
47648  */
47649   }
47650 
47651   /* "statsmodels/tsa/statespace/_representation.pyx":3908
47652  *         # Calculate $\bar y_t^* = \bar A_t^* y_t = C_t Z_t' H_t^{-1} y_t$
47653  *         # (unless this is a completely missing observation)
47654  *         self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
47655  *         if not self._nmissing == self.k_endog:
47656  *             # If we have some missing elements, selected_obs is already populated
47657  */
47658   __pyx_v_self->collapse_loglikelihood = __pyx_t_double_complex_from_parts(0, 0);
47659 
47660   /* "statsmodels/tsa/statespace/_representation.pyx":3909
47661  *         # (unless this is a completely missing observation)
47662  *         self.collapse_loglikelihood = 0
47663  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
47664  *             # If we have some missing elements, selected_obs is already populated
47665  *             if self._nmissing == 0:
47666  */
47667   __pyx_t_2 = ((!((__pyx_v_self->_nmissing == __pyx_v_self->k_endog) != 0)) != 0);
47668   if (__pyx_t_2) {
47669 
47670     /* "statsmodels/tsa/statespace/_representation.pyx":3911
47671  *         if not self._nmissing == self.k_endog:
47672  *             # If we have some missing elements, selected_obs is already populated
47673  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
47674  *                 blas.zcopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
47675  *             # $\\# = Z_t' H_t^{-1} y_t$
47676  */
47677     __pyx_t_2 = ((__pyx_v_self->_nmissing == 0) != 0);
47678     if (__pyx_t_2) {
47679 
47680       /* "statsmodels/tsa/statespace/_representation.pyx":3912
47681  *             # If we have some missing elements, selected_obs is already populated
47682  *             if self._nmissing == 0:
47683  *                 blas.zcopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
47684  *             # $\\# = Z_t' H_t^{-1} y_t$
47685  *             blas.zgemv("T", &self._k_endog, &k_states,
47686  */
47687       if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3912, __pyx_L1_error)}
47688       __pyx_t_8 = 0;
47689       __pyx_t_9 = __pyx_v_t;
47690       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3912, __pyx_L1_error)}
47691       __pyx_t_7 = 0;
47692       __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_self->k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->obs.data) + __pyx_t_8)) ) + __pyx_t_9 * __pyx_v_self->obs.strides[1]) )))), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_7 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
47693 
47694       /* "statsmodels/tsa/statespace/_representation.pyx":3911
47695  *         if not self._nmissing == self.k_endog:
47696  *             # If we have some missing elements, selected_obs is already populated
47697  *             if self._nmissing == 0:             # <<<<<<<<<<<<<<
47698  *                 blas.zcopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
47699  *             # $\\# = Z_t' H_t^{-1} y_t$
47700  */
47701     }
47702 
47703     /* "statsmodels/tsa/statespace/_representation.pyx":3915
47704  *             # $\\# = Z_t' H_t^{-1} y_t$
47705  *             blas.zgemv("T", &self._k_endog, &k_states,
47706  *                   &alpha, &self.transform_design[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
47707  *                           &self.selected_obs[0], &inc,
47708  *                   &beta, &self.collapse_obs[0], &inc)
47709  */
47710     if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3915, __pyx_L1_error)}
47711     __pyx_t_7 = 0;
47712     __pyx_t_8 = 0;
47713 
47714     /* "statsmodels/tsa/statespace/_representation.pyx":3916
47715  *             blas.zgemv("T", &self._k_endog, &k_states,
47716  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
47717  *                           &self.selected_obs[0], &inc,             # <<<<<<<<<<<<<<
47718  *                   &beta, &self.collapse_obs[0], &inc)
47719  *             # $y_t^* = C_t \\#$
47720  */
47721     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3916, __pyx_L1_error)}
47722     __pyx_t_15 = 0;
47723 
47724     /* "statsmodels/tsa/statespace/_representation.pyx":3917
47725  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
47726  *                           &self.selected_obs[0], &inc,
47727  *                   &beta, &self.collapse_obs[0], &inc)             # <<<<<<<<<<<<<<
47728  *             # $y_t^* = C_t \\#$
47729  *             blas.ztrmv("U", "N", "N", &k_states,
47730  */
47731     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3917, __pyx_L1_error)}
47732     __pyx_t_16 = 0;
47733 
47734     /* "statsmodels/tsa/statespace/_representation.pyx":3914
47735  *                 blas.zcopy(&self.k_endog, &self.obs[0,t], &inc, &self.selected_obs[0], &inc)
47736  *             # $\\# = Z_t' H_t^{-1} y_t$
47737  *             blas.zgemv("T", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
47738  *                   &alpha, &self.transform_design[0,0], &self._k_endog,
47739  *                           &self.selected_obs[0], &inc,
47740  */
47741     __pyx_f_5scipy_6linalg_11cython_blas_zgemv(((char *)"T"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&__pyx_v_alpha), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_design.data) + __pyx_t_7)) ) + __pyx_t_8 * __pyx_v_self->transform_design.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc), (&__pyx_v_beta), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_16 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc));
47742 
47743     /* "statsmodels/tsa/statespace/_representation.pyx":3920
47744  *             # $y_t^* = C_t \\#$
47745  *             blas.ztrmv("U", "N", "N", &k_states,
47746  *                                 &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
47747  *                                 &self.collapse_obs[0], &inc)
47748  *
47749  */
47750     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3920, __pyx_L1_error)}
47751     __pyx_t_16 = 0;
47752     __pyx_t_15 = 0;
47753 
47754     /* "statsmodels/tsa/statespace/_representation.pyx":3921
47755  *             blas.ztrmv("U", "N", "N", &k_states,
47756  *                                 &self.collapse_cholesky[0,0], &self._k_states,
47757  *                                 &self.collapse_obs[0], &inc)             # <<<<<<<<<<<<<<
47758  *
47759  *             # Get residuals for loglikelihood calculation
47760  */
47761     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3921, __pyx_L1_error)}
47762     __pyx_t_8 = 0;
47763 
47764     /* "statsmodels/tsa/statespace/_representation.pyx":3919
47765  *                   &beta, &self.collapse_obs[0], &inc)
47766  *             # $y_t^* = C_t \\#$
47767  *             blas.ztrmv("U", "N", "N", &k_states,             # <<<<<<<<<<<<<<
47768  *                                 &self.collapse_cholesky[0,0], &self._k_states,
47769  *                                 &self.collapse_obs[0], &inc)
47770  */
47771     __pyx_f_5scipy_6linalg_11cython_blas_ztrmv(((char *)"U"), ((char *)"N"), ((char *)"N"), (&__pyx_v_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_8 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc));
47772 
47773     /* "statsmodels/tsa/statespace/_representation.pyx":3933
47774  *
47775  *             # $ \\# = C_t' y_t^*$
47776  *             blas.zcopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)             # <<<<<<<<<<<<<<
47777  *             blas.ztrmv("U", "T", "N", &k_states,
47778  *                                 &self.collapse_cholesky[0,0], &self._k_states,
47779  */
47780     if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3933, __pyx_L1_error)}
47781     __pyx_t_8 = 0;
47782     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3933, __pyx_L1_error)}
47783     __pyx_t_15 = 0;
47784     __pyx_f_5scipy_6linalg_11cython_blas_zcopy((&__pyx_v_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_8 * __pyx_v_self->collapse_obs.strides[0]) )))), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_15 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc));
47785 
47786     /* "statsmodels/tsa/statespace/_representation.pyx":3935
47787  *             blas.zcopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)
47788  *             blas.ztrmv("U", "T", "N", &k_states,
47789  *                                 &self.collapse_cholesky[0,0], &self._k_states,             # <<<<<<<<<<<<<<
47790  *                                 &self.collapse_obs_tmp[0], &inc)
47791  *
47792  */
47793     if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3935, __pyx_L1_error)}
47794     __pyx_t_15 = 0;
47795     __pyx_t_8 = 0;
47796 
47797     /* "statsmodels/tsa/statespace/_representation.pyx":3936
47798  *             blas.ztrmv("U", "T", "N", &k_states,
47799  *                                 &self.collapse_cholesky[0,0], &self._k_states,
47800  *                                 &self.collapse_obs_tmp[0], &inc)             # <<<<<<<<<<<<<<
47801  *
47802  *             # $e_t = - Z_t C_t' y_t^* + y_t$
47803  */
47804     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3936, __pyx_L1_error)}
47805     __pyx_t_16 = 0;
47806 
47807     /* "statsmodels/tsa/statespace/_representation.pyx":3934
47808  *             # $ \\# = C_t' y_t^*$
47809  *             blas.zcopy(&k_states, &self.collapse_obs[0], &inc, &self.collapse_obs_tmp[0], &inc)
47810  *             blas.ztrmv("U", "T", "N", &k_states,             # <<<<<<<<<<<<<<
47811  *                                 &self.collapse_cholesky[0,0], &self._k_states,
47812  *                                 &self.collapse_obs_tmp[0], &inc)
47813  */
47814     __pyx_f_5scipy_6linalg_11cython_blas_ztrmv(((char *)"U"), ((char *)"T"), ((char *)"N"), (&__pyx_v_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_cholesky.data) + __pyx_t_15)) ) + __pyx_t_8 * __pyx_v_self->collapse_cholesky.strides[1]) )))), (&__pyx_v_self->_k_states), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_16 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc));
47815 
47816     /* "statsmodels/tsa/statespace/_representation.pyx":3941
47817  *             blas.zgemv("N", &self._k_endog, &k_states,
47818  *                   &gamma, self._design, &self._k_endog,
47819  *                           &self.collapse_obs_tmp[0], &inc,             # <<<<<<<<<<<<<<
47820  *                   &alpha, &self.selected_obs[0], &inc)
47821  *
47822  */
47823     if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3941, __pyx_L1_error)}
47824     __pyx_t_16 = 0;
47825 
47826     /* "statsmodels/tsa/statespace/_representation.pyx":3942
47827  *                   &gamma, self._design, &self._k_endog,
47828  *                           &self.collapse_obs_tmp[0], &inc,
47829  *                   &alpha, &self.selected_obs[0], &inc)             # <<<<<<<<<<<<<<
47830  *
47831  *             # Calculate e_t' H_t^{-1} e_t via Cholesky solver
47832  */
47833     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3942, __pyx_L1_error)}
47834     __pyx_t_8 = 0;
47835 
47836     /* "statsmodels/tsa/statespace/_representation.pyx":3939
47837  *
47838  *             # $e_t = - Z_t C_t' y_t^* + y_t$
47839  *             blas.zgemv("N", &self._k_endog, &k_states,             # <<<<<<<<<<<<<<
47840  *                   &gamma, self._design, &self._k_endog,
47841  *                           &self.collapse_obs_tmp[0], &inc,
47842  */
47843     __pyx_f_5scipy_6linalg_11cython_blas_zgemv(((char *)"N"), (&__pyx_v_self->_k_endog), (&__pyx_v_k_states), (&__pyx_v_gamma), __pyx_v_self->_design, (&__pyx_v_self->_k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs_tmp.data + __pyx_t_16 * __pyx_v_self->collapse_obs_tmp.strides[0]) )))), (&__pyx_v_inc), (&__pyx_v_alpha), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_8 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_inc));
47844 
47845     /* "statsmodels/tsa/statespace/_representation.pyx":3950
47846  *             # solve of $L x = e_t$  where L is lower triangular
47847  *             lapack.ztrtrs("L", "N", "N", &self._k_endog, &inc,
47848  *                         &self.transform_cholesky[0,0], &self._k_endog,             # <<<<<<<<<<<<<<
47849  *                         &self.selected_obs[0], &self._k_endog,
47850  *                         &info)
47851  */
47852     if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3950, __pyx_L1_error)}
47853     __pyx_t_8 = 0;
47854     __pyx_t_16 = 0;
47855 
47856     /* "statsmodels/tsa/statespace/_representation.pyx":3951
47857  *             lapack.ztrtrs("L", "N", "N", &self._k_endog, &inc,
47858  *                         &self.transform_cholesky[0,0], &self._k_endog,
47859  *                         &self.selected_obs[0], &self._k_endog,             # <<<<<<<<<<<<<<
47860  *                         &info)
47861  *
47862  */
47863     if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3951, __pyx_L1_error)}
47864     __pyx_t_15 = 0;
47865 
47866     /* "statsmodels/tsa/statespace/_representation.pyx":3949
47867  *             # We have $L$ in `transform_cholesky`, so we want to do a linear
47868  *             # solve of $L x = e_t$  where L is lower triangular
47869  *             lapack.ztrtrs("L", "N", "N", &self._k_endog, &inc,             # <<<<<<<<<<<<<<
47870  *                         &self.transform_cholesky[0,0], &self._k_endog,
47871  *                         &self.selected_obs[0], &self._k_endog,
47872  */
47873     __pyx_f_5scipy_6linalg_13cython_lapack_ztrtrs(((char *)"L"), ((char *)"N"), ((char *)"N"), (&__pyx_v_self->_k_endog), (&__pyx_v_inc), (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->transform_cholesky.data) + __pyx_t_8)) ) + __pyx_t_16 * __pyx_v_self->transform_cholesky.strides[1]) )))), (&__pyx_v_self->_k_endog), (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) )))), (&__pyx_v_self->_k_endog), (&__pyx_v_info));
47874 
47875     /* "statsmodels/tsa/statespace/_representation.pyx":3957
47876  *
47877  *             # $e_t' H_t^{-1} e_t = (L^{-1} e_t)' L^{-1} e_t = \sum_i e_{i,t}**2$
47878  *             self.collapse_loglikelihood = 0             # <<<<<<<<<<<<<<
47879  *             for i in range(self._k_endog):
47880  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2
47881  */
47882     __pyx_v_self->collapse_loglikelihood = __pyx_t_double_complex_from_parts(0, 0);
47883 
47884     /* "statsmodels/tsa/statespace/_representation.pyx":3958
47885  *             # $e_t' H_t^{-1} e_t = (L^{-1} e_t)' L^{-1} e_t = \sum_i e_{i,t}**2$
47886  *             self.collapse_loglikelihood = 0
47887  *             for i in range(self._k_endog):             # <<<<<<<<<<<<<<
47888  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2
47889  *
47890  */
47891     __pyx_t_1 = __pyx_v_self->_k_endog;
47892     __pyx_t_5 = __pyx_t_1;
47893     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
47894       __pyx_v_i = __pyx_t_6;
47895 
47896       /* "statsmodels/tsa/statespace/_representation.pyx":3959
47897  *             self.collapse_loglikelihood = 0
47898  *             for i in range(self._k_endog):
47899  *                 self.collapse_loglikelihood = self.collapse_loglikelihood + self.selected_obs[i]**2             # <<<<<<<<<<<<<<
47900  *
47901  *             # (p-m) log( 2*pi) + log( |H_t| )
47902  */
47903       if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3959, __pyx_L1_error)}
47904       __pyx_t_15 = __pyx_v_i;
47905       __pyx_v_self->collapse_loglikelihood = __Pyx_c_sum_double(__pyx_v_self->collapse_loglikelihood, __Pyx_c_pow_double((*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->selected_obs.data + __pyx_t_15 * __pyx_v_self->selected_obs.strides[0]) ))), __pyx_t_double_complex_from_parts(2, 0)));
47906     }
47907 
47908     /* "statsmodels/tsa/statespace/_representation.pyx":3962
47909  *
47910  *             # (p-m) log( 2*pi) + log( |H_t| )
47911  *             self.collapse_loglikelihood = (             # <<<<<<<<<<<<<<
47912  *                 self.collapse_loglikelihood +
47913  *                 (self._k_endog - k_states)*zlog(2*NPY_PI) +
47914  */
47915     __pyx_v_self->collapse_loglikelihood = __Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_self->collapse_loglikelihood, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts((__pyx_v_self->_k_endog - __pyx_v_k_states), 0), __pyx_f_11statsmodels_3src_4math_zlog(__pyx_t_double_complex_from_parts((2.0 * NPY_PI), 0)))), __pyx_v_self->transform_determinant);
47916 
47917     /* "statsmodels/tsa/statespace/_representation.pyx":3969
47918  *
47919  *             # -0.5 * ...
47920  *             self.collapse_loglikelihood = -0.5 * self.collapse_loglikelihood             # <<<<<<<<<<<<<<
47921  *
47922  *         # Set pointers
47923  */
47924     __pyx_v_self->collapse_loglikelihood = __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(-0.5, 0), __pyx_v_self->collapse_loglikelihood);
47925 
47926     /* "statsmodels/tsa/statespace/_representation.pyx":3909
47927  *         # (unless this is a completely missing observation)
47928  *         self.collapse_loglikelihood = 0
47929  *         if not self._nmissing == self.k_endog:             # <<<<<<<<<<<<<<
47930  *             # If we have some missing elements, selected_obs is already populated
47931  *             if self._nmissing == 0:
47932  */
47933   }
47934 
47935   /* "statsmodels/tsa/statespace/_representation.pyx":3972
47936  *
47937  *         # Set pointers
47938  *         self._obs = &self.collapse_obs[0]             # <<<<<<<<<<<<<<
47939  *         self._design = &self.collapse_design[0,0]
47940  *         self._obs_cov = &self.collapse_obs_cov[0,0]
47941  */
47942   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3972, __pyx_L1_error)}
47943   __pyx_t_15 = 0;
47944   __pyx_v_self->_obs = (&(*((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_self->collapse_obs.data + __pyx_t_15 * __pyx_v_self->collapse_obs.strides[0]) ))));
47945 
47946   /* "statsmodels/tsa/statespace/_representation.pyx":3973
47947  *         # Set pointers
47948  *         self._obs = &self.collapse_obs[0]
47949  *         self._design = &self.collapse_design[0,0]             # <<<<<<<<<<<<<<
47950  *         self._obs_cov = &self.collapse_obs_cov[0,0]
47951  *
47952  */
47953   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3973, __pyx_L1_error)}
47954   __pyx_t_15 = 0;
47955   __pyx_t_16 = 0;
47956   __pyx_v_self->_design = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_design.data) + __pyx_t_15)) ) + __pyx_t_16 * __pyx_v_self->collapse_design.strides[1]) ))));
47957 
47958   /* "statsmodels/tsa/statespace/_representation.pyx":3974
47959  *         self._obs = &self.collapse_obs[0]
47960  *         self._design = &self.collapse_design[0,0]
47961  *         self._obs_cov = &self.collapse_obs_cov[0,0]             # <<<<<<<<<<<<<<
47962  *
47963  *         # TODO can I replace this with k_states? I think I should be able to
47964  */
47965   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3974, __pyx_L1_error)}
47966   __pyx_t_16 = 0;
47967   __pyx_t_15 = 0;
47968   __pyx_v_self->_obs_cov = (&(*((__pyx_t_double_complex *) ( /* dim=1 */ (( /* dim=0 */ ((char *) (((__pyx_t_double_complex *) __pyx_v_self->collapse_obs_cov.data) + __pyx_t_16)) ) + __pyx_t_15 * __pyx_v_self->collapse_obs_cov.strides[1]) ))));
47969 
47970   /* "statsmodels/tsa/statespace/_representation.pyx":3977
47971  *
47972  *         # TODO can I replace this with k_states? I think I should be able to
47973  *         return self._k_states             # <<<<<<<<<<<<<<
47974  *
47975  * # ### Selected covariance matrice
47976  */
47977   __pyx_r = __pyx_v_self->_k_states;
47978   goto __pyx_L0;
47979 
47980   /* "statsmodels/tsa/statespace/_representation.pyx":3784
47981  *         self._obs_intercept = &self.transform_obs_intercept[0]
47982  *
47983  *     cdef int transform_generalized_collapse(self, unsigned int t, unsigned int previous_t, unsigned int reset=True) except *:             # <<<<<<<<<<<<<<
47984  *         # Note: this assumes that initialize_object_pointers has *already* been done
47985  *         # Note: this assumes that select_missing has *already* been done
47986  */
47987 
47988   /* function exit code */
47989   __pyx_L1_error:;
47990   __Pyx_XDECREF(__pyx_t_3);
47991   __Pyx_XDECREF(__pyx_t_10);
47992   __Pyx_XDECREF(__pyx_t_11);
47993   __Pyx_XDECREF(__pyx_t_12);
47994   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transform_generalized_collapse", __pyx_clineno, __pyx_lineno, __pyx_filename);
47995   __pyx_r = 0;
47996   __pyx_L0:;
47997   __Pyx_RefNannyFinishContext();
47998   return __pyx_r;
47999 }
48000 
48001 /* "statsmodels/tsa/statespace/_representation.pxd":246
48002  * cdef class zStatespace(object):
48003  *     # Statespace dimensions
48004  *     cdef readonly int nobs, k_endog, k_states, k_posdef             # <<<<<<<<<<<<<<
48005  *
48006  *     # Statespace representation matrices
48007  */
48008 
48009 /* Python wrapper */
48010 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4nobs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4nobs_1__get__(PyObject * __pyx_v_self)48011 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4nobs_1__get__(PyObject *__pyx_v_self) {
48012   PyObject *__pyx_r = 0;
48013   __Pyx_RefNannyDeclarations
48014   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48015   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4nobs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48016 
48017   /* function exit code */
48018   __Pyx_RefNannyFinishContext();
48019   return __pyx_r;
48020 }
48021 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48022 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4nobs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48023   PyObject *__pyx_r = NULL;
48024   __Pyx_RefNannyDeclarations
48025   PyObject *__pyx_t_1 = NULL;
48026   int __pyx_lineno = 0;
48027   const char *__pyx_filename = NULL;
48028   int __pyx_clineno = 0;
48029   __Pyx_RefNannySetupContext("__get__", 0);
48030   __Pyx_XDECREF(__pyx_r);
48031   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nobs); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 246, __pyx_L1_error)
48032   __Pyx_GOTREF(__pyx_t_1);
48033   __pyx_r = __pyx_t_1;
48034   __pyx_t_1 = 0;
48035   goto __pyx_L0;
48036 
48037   /* function exit code */
48038   __pyx_L1_error:;
48039   __Pyx_XDECREF(__pyx_t_1);
48040   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.nobs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48041   __pyx_r = NULL;
48042   __pyx_L0:;
48043   __Pyx_XGIVEREF(__pyx_r);
48044   __Pyx_RefNannyFinishContext();
48045   return __pyx_r;
48046 }
48047 
48048 /* Python wrapper */
48049 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7k_endog_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7k_endog_1__get__(PyObject * __pyx_v_self)48050 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7k_endog_1__get__(PyObject *__pyx_v_self) {
48051   PyObject *__pyx_r = 0;
48052   __Pyx_RefNannyDeclarations
48053   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48054   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7k_endog___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48055 
48056   /* function exit code */
48057   __Pyx_RefNannyFinishContext();
48058   return __pyx_r;
48059 }
48060 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48061 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48062   PyObject *__pyx_r = NULL;
48063   __Pyx_RefNannyDeclarations
48064   PyObject *__pyx_t_1 = NULL;
48065   int __pyx_lineno = 0;
48066   const char *__pyx_filename = NULL;
48067   int __pyx_clineno = 0;
48068   __Pyx_RefNannySetupContext("__get__", 0);
48069   __Pyx_XDECREF(__pyx_r);
48070   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_endog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 246, __pyx_L1_error)
48071   __Pyx_GOTREF(__pyx_t_1);
48072   __pyx_r = __pyx_t_1;
48073   __pyx_t_1 = 0;
48074   goto __pyx_L0;
48075 
48076   /* function exit code */
48077   __pyx_L1_error:;
48078   __Pyx_XDECREF(__pyx_t_1);
48079   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.k_endog.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48080   __pyx_r = NULL;
48081   __pyx_L0:;
48082   __Pyx_XGIVEREF(__pyx_r);
48083   __Pyx_RefNannyFinishContext();
48084   return __pyx_r;
48085 }
48086 
48087 /* Python wrapper */
48088 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_states_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_states_1__get__(PyObject * __pyx_v_self)48089 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_states_1__get__(PyObject *__pyx_v_self) {
48090   PyObject *__pyx_r = 0;
48091   __Pyx_RefNannyDeclarations
48092   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48093   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_states___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48094 
48095   /* function exit code */
48096   __Pyx_RefNannyFinishContext();
48097   return __pyx_r;
48098 }
48099 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48100 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48101   PyObject *__pyx_r = NULL;
48102   __Pyx_RefNannyDeclarations
48103   PyObject *__pyx_t_1 = NULL;
48104   int __pyx_lineno = 0;
48105   const char *__pyx_filename = NULL;
48106   int __pyx_clineno = 0;
48107   __Pyx_RefNannySetupContext("__get__", 0);
48108   __Pyx_XDECREF(__pyx_r);
48109   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 246, __pyx_L1_error)
48110   __Pyx_GOTREF(__pyx_t_1);
48111   __pyx_r = __pyx_t_1;
48112   __pyx_t_1 = 0;
48113   goto __pyx_L0;
48114 
48115   /* function exit code */
48116   __pyx_L1_error:;
48117   __Pyx_XDECREF(__pyx_t_1);
48118   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.k_states.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48119   __pyx_r = NULL;
48120   __pyx_L0:;
48121   __Pyx_XGIVEREF(__pyx_r);
48122   __Pyx_RefNannyFinishContext();
48123   return __pyx_r;
48124 }
48125 
48126 /* Python wrapper */
48127 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_posdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_posdef_1__get__(PyObject * __pyx_v_self)48128 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_posdef_1__get__(PyObject *__pyx_v_self) {
48129   PyObject *__pyx_r = 0;
48130   __Pyx_RefNannyDeclarations
48131   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48132   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_posdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48133 
48134   /* function exit code */
48135   __Pyx_RefNannyFinishContext();
48136   return __pyx_r;
48137 }
48138 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48139 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48140   PyObject *__pyx_r = NULL;
48141   __Pyx_RefNannyDeclarations
48142   PyObject *__pyx_t_1 = NULL;
48143   int __pyx_lineno = 0;
48144   const char *__pyx_filename = NULL;
48145   int __pyx_clineno = 0;
48146   __Pyx_RefNannySetupContext("__get__", 0);
48147   __Pyx_XDECREF(__pyx_r);
48148   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->k_posdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 246, __pyx_L1_error)
48149   __Pyx_GOTREF(__pyx_t_1);
48150   __pyx_r = __pyx_t_1;
48151   __pyx_t_1 = 0;
48152   goto __pyx_L0;
48153 
48154   /* function exit code */
48155   __pyx_L1_error:;
48156   __Pyx_XDECREF(__pyx_t_1);
48157   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.k_posdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48158   __pyx_r = NULL;
48159   __pyx_L0:;
48160   __Pyx_XGIVEREF(__pyx_r);
48161   __Pyx_RefNannyFinishContext();
48162   return __pyx_r;
48163 }
48164 
48165 /* "statsmodels/tsa/statespace/_representation.pxd":249
48166  *
48167  *     # Statespace representation matrices
48168  *     cdef readonly np.complex128_t [::1,:] obs, obs_intercept, state_intercept             # <<<<<<<<<<<<<<
48169  *     cdef readonly np.complex128_t [:] initial_state
48170  *     cdef readonly np.complex128_t [::1,:] initial_state_cov, initial_diffuse_state_cov
48171  */
48172 
48173 /* Python wrapper */
48174 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3obs_1__get__(PyObject * __pyx_v_self)48175 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3obs_1__get__(PyObject *__pyx_v_self) {
48176   PyObject *__pyx_r = 0;
48177   __Pyx_RefNannyDeclarations
48178   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48179   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48180 
48181   /* function exit code */
48182   __Pyx_RefNannyFinishContext();
48183   return __pyx_r;
48184 }
48185 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48186 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48187   PyObject *__pyx_r = NULL;
48188   __Pyx_RefNannyDeclarations
48189   PyObject *__pyx_t_1 = NULL;
48190   int __pyx_lineno = 0;
48191   const char *__pyx_filename = NULL;
48192   int __pyx_clineno = 0;
48193   __Pyx_RefNannySetupContext("__get__", 0);
48194   __Pyx_XDECREF(__pyx_r);
48195   if (unlikely(!__pyx_v_self->obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 249, __pyx_L1_error)}
48196   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error)
48197   __Pyx_GOTREF(__pyx_t_1);
48198   __pyx_r = __pyx_t_1;
48199   __pyx_t_1 = 0;
48200   goto __pyx_L0;
48201 
48202   /* function exit code */
48203   __pyx_L1_error:;
48204   __Pyx_XDECREF(__pyx_t_1);
48205   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48206   __pyx_r = NULL;
48207   __pyx_L0:;
48208   __Pyx_XGIVEREF(__pyx_r);
48209   __Pyx_RefNannyFinishContext();
48210   return __pyx_r;
48211 }
48212 
48213 /* Python wrapper */
48214 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13obs_intercept_1__get__(PyObject * __pyx_v_self)48215 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13obs_intercept_1__get__(PyObject *__pyx_v_self) {
48216   PyObject *__pyx_r = 0;
48217   __Pyx_RefNannyDeclarations
48218   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48219   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48220 
48221   /* function exit code */
48222   __Pyx_RefNannyFinishContext();
48223   return __pyx_r;
48224 }
48225 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48226 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48227   PyObject *__pyx_r = NULL;
48228   __Pyx_RefNannyDeclarations
48229   PyObject *__pyx_t_1 = NULL;
48230   int __pyx_lineno = 0;
48231   const char *__pyx_filename = NULL;
48232   int __pyx_clineno = 0;
48233   __Pyx_RefNannySetupContext("__get__", 0);
48234   __Pyx_XDECREF(__pyx_r);
48235   if (unlikely(!__pyx_v_self->obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 249, __pyx_L1_error)}
48236   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error)
48237   __Pyx_GOTREF(__pyx_t_1);
48238   __pyx_r = __pyx_t_1;
48239   __pyx_t_1 = 0;
48240   goto __pyx_L0;
48241 
48242   /* function exit code */
48243   __pyx_L1_error:;
48244   __Pyx_XDECREF(__pyx_t_1);
48245   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48246   __pyx_r = NULL;
48247   __pyx_L0:;
48248   __Pyx_XGIVEREF(__pyx_r);
48249   __Pyx_RefNannyFinishContext();
48250   return __pyx_r;
48251 }
48252 
48253 /* Python wrapper */
48254 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15state_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15state_intercept_1__get__(PyObject * __pyx_v_self)48255 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15state_intercept_1__get__(PyObject *__pyx_v_self) {
48256   PyObject *__pyx_r = 0;
48257   __Pyx_RefNannyDeclarations
48258   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48259   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15state_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48260 
48261   /* function exit code */
48262   __Pyx_RefNannyFinishContext();
48263   return __pyx_r;
48264 }
48265 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48266 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15state_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48267   PyObject *__pyx_r = NULL;
48268   __Pyx_RefNannyDeclarations
48269   PyObject *__pyx_t_1 = NULL;
48270   int __pyx_lineno = 0;
48271   const char *__pyx_filename = NULL;
48272   int __pyx_clineno = 0;
48273   __Pyx_RefNannySetupContext("__get__", 0);
48274   __Pyx_XDECREF(__pyx_r);
48275   if (unlikely(!__pyx_v_self->state_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 249, __pyx_L1_error)}
48276   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_intercept, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 249, __pyx_L1_error)
48277   __Pyx_GOTREF(__pyx_t_1);
48278   __pyx_r = __pyx_t_1;
48279   __pyx_t_1 = 0;
48280   goto __pyx_L0;
48281 
48282   /* function exit code */
48283   __pyx_L1_error:;
48284   __Pyx_XDECREF(__pyx_t_1);
48285   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.state_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48286   __pyx_r = NULL;
48287   __pyx_L0:;
48288   __Pyx_XGIVEREF(__pyx_r);
48289   __Pyx_RefNannyFinishContext();
48290   return __pyx_r;
48291 }
48292 
48293 /* "statsmodels/tsa/statespace/_representation.pxd":250
48294  *     # Statespace representation matrices
48295  *     cdef readonly np.complex128_t [::1,:] obs, obs_intercept, state_intercept
48296  *     cdef readonly np.complex128_t [:] initial_state             # <<<<<<<<<<<<<<
48297  *     cdef readonly np.complex128_t [::1,:] initial_state_cov, initial_diffuse_state_cov
48298  *     cdef readonly np.complex128_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
48299  */
48300 
48301 /* Python wrapper */
48302 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initial_state_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initial_state_1__get__(PyObject * __pyx_v_self)48303 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initial_state_1__get__(PyObject *__pyx_v_self) {
48304   PyObject *__pyx_r = 0;
48305   __Pyx_RefNannyDeclarations
48306   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48307   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initial_state___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48308 
48309   /* function exit code */
48310   __Pyx_RefNannyFinishContext();
48311   return __pyx_r;
48312 }
48313 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48314 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initial_state___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48315   PyObject *__pyx_r = NULL;
48316   __Pyx_RefNannyDeclarations
48317   PyObject *__pyx_t_1 = NULL;
48318   int __pyx_lineno = 0;
48319   const char *__pyx_filename = NULL;
48320   int __pyx_clineno = 0;
48321   __Pyx_RefNannySetupContext("__get__", 0);
48322   __Pyx_XDECREF(__pyx_r);
48323   if (unlikely(!__pyx_v_self->initial_state.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 250, __pyx_L1_error)}
48324   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 250, __pyx_L1_error)
48325   __Pyx_GOTREF(__pyx_t_1);
48326   __pyx_r = __pyx_t_1;
48327   __pyx_t_1 = 0;
48328   goto __pyx_L0;
48329 
48330   /* function exit code */
48331   __pyx_L1_error:;
48332   __Pyx_XDECREF(__pyx_t_1);
48333   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initial_state.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48334   __pyx_r = NULL;
48335   __pyx_L0:;
48336   __Pyx_XGIVEREF(__pyx_r);
48337   __Pyx_RefNannyFinishContext();
48338   return __pyx_r;
48339 }
48340 
48341 /* "statsmodels/tsa/statespace/_representation.pxd":251
48342  *     cdef readonly np.complex128_t [::1,:] obs, obs_intercept, state_intercept
48343  *     cdef readonly np.complex128_t [:] initial_state
48344  *     cdef readonly np.complex128_t [::1,:] initial_state_cov, initial_diffuse_state_cov             # <<<<<<<<<<<<<<
48345  *     cdef readonly np.complex128_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
48346  *
48347  */
48348 
48349 /* Python wrapper */
48350 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17initial_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17initial_state_cov_1__get__(PyObject * __pyx_v_self)48351 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17initial_state_cov_1__get__(PyObject *__pyx_v_self) {
48352   PyObject *__pyx_r = 0;
48353   __Pyx_RefNannyDeclarations
48354   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48355   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17initial_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48356 
48357   /* function exit code */
48358   __Pyx_RefNannyFinishContext();
48359   return __pyx_r;
48360 }
48361 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48362 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17initial_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48363   PyObject *__pyx_r = NULL;
48364   __Pyx_RefNannyDeclarations
48365   PyObject *__pyx_t_1 = NULL;
48366   int __pyx_lineno = 0;
48367   const char *__pyx_filename = NULL;
48368   int __pyx_clineno = 0;
48369   __Pyx_RefNannySetupContext("__get__", 0);
48370   __Pyx_XDECREF(__pyx_r);
48371   if (unlikely(!__pyx_v_self->initial_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 251, __pyx_L1_error)}
48372   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 251, __pyx_L1_error)
48373   __Pyx_GOTREF(__pyx_t_1);
48374   __pyx_r = __pyx_t_1;
48375   __pyx_t_1 = 0;
48376   goto __pyx_L0;
48377 
48378   /* function exit code */
48379   __pyx_L1_error:;
48380   __Pyx_XDECREF(__pyx_t_1);
48381   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initial_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48382   __pyx_r = NULL;
48383   __pyx_L0:;
48384   __Pyx_XGIVEREF(__pyx_r);
48385   __Pyx_RefNannyFinishContext();
48386   return __pyx_r;
48387 }
48388 
48389 /* Python wrapper */
48390 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_25initial_diffuse_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_25initial_diffuse_state_cov_1__get__(PyObject * __pyx_v_self)48391 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_25initial_diffuse_state_cov_1__get__(PyObject *__pyx_v_self) {
48392   PyObject *__pyx_r = 0;
48393   __Pyx_RefNannyDeclarations
48394   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48395   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_25initial_diffuse_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48396 
48397   /* function exit code */
48398   __Pyx_RefNannyFinishContext();
48399   return __pyx_r;
48400 }
48401 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48402 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_25initial_diffuse_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48403   PyObject *__pyx_r = NULL;
48404   __Pyx_RefNannyDeclarations
48405   PyObject *__pyx_t_1 = NULL;
48406   int __pyx_lineno = 0;
48407   const char *__pyx_filename = NULL;
48408   int __pyx_clineno = 0;
48409   __Pyx_RefNannySetupContext("__get__", 0);
48410   __Pyx_XDECREF(__pyx_r);
48411   if (unlikely(!__pyx_v_self->initial_diffuse_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 251, __pyx_L1_error)}
48412   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->initial_diffuse_state_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 251, __pyx_L1_error)
48413   __Pyx_GOTREF(__pyx_t_1);
48414   __pyx_r = __pyx_t_1;
48415   __pyx_t_1 = 0;
48416   goto __pyx_L0;
48417 
48418   /* function exit code */
48419   __pyx_L1_error:;
48420   __Pyx_XDECREF(__pyx_t_1);
48421   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initial_diffuse_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48422   __pyx_r = NULL;
48423   __pyx_L0:;
48424   __Pyx_XGIVEREF(__pyx_r);
48425   __Pyx_RefNannyFinishContext();
48426   return __pyx_r;
48427 }
48428 
48429 /* "statsmodels/tsa/statespace/_representation.pxd":252
48430  *     cdef readonly np.complex128_t [:] initial_state
48431  *     cdef readonly np.complex128_t [::1,:] initial_state_cov, initial_diffuse_state_cov
48432  *     cdef readonly np.complex128_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov             # <<<<<<<<<<<<<<
48433  *
48434  *     cdef readonly int [::1,:] missing
48435  */
48436 
48437 /* Python wrapper */
48438 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6design_1__get__(PyObject * __pyx_v_self)48439 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6design_1__get__(PyObject *__pyx_v_self) {
48440   PyObject *__pyx_r = 0;
48441   __Pyx_RefNannyDeclarations
48442   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48443   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48444 
48445   /* function exit code */
48446   __Pyx_RefNannyFinishContext();
48447   return __pyx_r;
48448 }
48449 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48450 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48451   PyObject *__pyx_r = NULL;
48452   __Pyx_RefNannyDeclarations
48453   PyObject *__pyx_t_1 = NULL;
48454   int __pyx_lineno = 0;
48455   const char *__pyx_filename = NULL;
48456   int __pyx_clineno = 0;
48457   __Pyx_RefNannySetupContext("__get__", 0);
48458   __Pyx_XDECREF(__pyx_r);
48459   if (unlikely(!__pyx_v_self->design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 252, __pyx_L1_error)}
48460   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->design, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
48461   __Pyx_GOTREF(__pyx_t_1);
48462   __pyx_r = __pyx_t_1;
48463   __pyx_t_1 = 0;
48464   goto __pyx_L0;
48465 
48466   /* function exit code */
48467   __pyx_L1_error:;
48468   __Pyx_XDECREF(__pyx_t_1);
48469   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48470   __pyx_r = NULL;
48471   __pyx_L0:;
48472   __Pyx_XGIVEREF(__pyx_r);
48473   __Pyx_RefNannyFinishContext();
48474   return __pyx_r;
48475 }
48476 
48477 /* Python wrapper */
48478 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7obs_cov_1__get__(PyObject * __pyx_v_self)48479 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7obs_cov_1__get__(PyObject *__pyx_v_self) {
48480   PyObject *__pyx_r = 0;
48481   __Pyx_RefNannyDeclarations
48482   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48483   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48484 
48485   /* function exit code */
48486   __Pyx_RefNannyFinishContext();
48487   return __pyx_r;
48488 }
48489 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48490 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48491   PyObject *__pyx_r = NULL;
48492   __Pyx_RefNannyDeclarations
48493   PyObject *__pyx_t_1 = NULL;
48494   int __pyx_lineno = 0;
48495   const char *__pyx_filename = NULL;
48496   int __pyx_clineno = 0;
48497   __Pyx_RefNannySetupContext("__get__", 0);
48498   __Pyx_XDECREF(__pyx_r);
48499   if (unlikely(!__pyx_v_self->obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 252, __pyx_L1_error)}
48500   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->obs_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
48501   __Pyx_GOTREF(__pyx_t_1);
48502   __pyx_r = __pyx_t_1;
48503   __pyx_t_1 = 0;
48504   goto __pyx_L0;
48505 
48506   /* function exit code */
48507   __pyx_L1_error:;
48508   __Pyx_XDECREF(__pyx_t_1);
48509   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48510   __pyx_r = NULL;
48511   __pyx_L0:;
48512   __Pyx_XGIVEREF(__pyx_r);
48513   __Pyx_RefNannyFinishContext();
48514   return __pyx_r;
48515 }
48516 
48517 /* Python wrapper */
48518 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10transition_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10transition_1__get__(PyObject * __pyx_v_self)48519 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10transition_1__get__(PyObject *__pyx_v_self) {
48520   PyObject *__pyx_r = 0;
48521   __Pyx_RefNannyDeclarations
48522   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48523   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10transition___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48524 
48525   /* function exit code */
48526   __Pyx_RefNannyFinishContext();
48527   return __pyx_r;
48528 }
48529 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48530 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48531   PyObject *__pyx_r = NULL;
48532   __Pyx_RefNannyDeclarations
48533   PyObject *__pyx_t_1 = NULL;
48534   int __pyx_lineno = 0;
48535   const char *__pyx_filename = NULL;
48536   int __pyx_clineno = 0;
48537   __Pyx_RefNannySetupContext("__get__", 0);
48538   __Pyx_XDECREF(__pyx_r);
48539   if (unlikely(!__pyx_v_self->transition.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 252, __pyx_L1_error)}
48540   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transition, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
48541   __Pyx_GOTREF(__pyx_t_1);
48542   __pyx_r = __pyx_t_1;
48543   __pyx_t_1 = 0;
48544   goto __pyx_L0;
48545 
48546   /* function exit code */
48547   __pyx_L1_error:;
48548   __Pyx_XDECREF(__pyx_t_1);
48549   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48550   __pyx_r = NULL;
48551   __pyx_L0:;
48552   __Pyx_XGIVEREF(__pyx_r);
48553   __Pyx_RefNannyFinishContext();
48554   return __pyx_r;
48555 }
48556 
48557 /* Python wrapper */
48558 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9selection_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9selection_1__get__(PyObject * __pyx_v_self)48559 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9selection_1__get__(PyObject *__pyx_v_self) {
48560   PyObject *__pyx_r = 0;
48561   __Pyx_RefNannyDeclarations
48562   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48563   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9selection___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48564 
48565   /* function exit code */
48566   __Pyx_RefNannyFinishContext();
48567   return __pyx_r;
48568 }
48569 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48570 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9selection___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48571   PyObject *__pyx_r = NULL;
48572   __Pyx_RefNannyDeclarations
48573   PyObject *__pyx_t_1 = NULL;
48574   int __pyx_lineno = 0;
48575   const char *__pyx_filename = NULL;
48576   int __pyx_clineno = 0;
48577   __Pyx_RefNannySetupContext("__get__", 0);
48578   __Pyx_XDECREF(__pyx_r);
48579   if (unlikely(!__pyx_v_self->selection.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 252, __pyx_L1_error)}
48580   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selection, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
48581   __Pyx_GOTREF(__pyx_t_1);
48582   __pyx_r = __pyx_t_1;
48583   __pyx_t_1 = 0;
48584   goto __pyx_L0;
48585 
48586   /* function exit code */
48587   __pyx_L1_error:;
48588   __Pyx_XDECREF(__pyx_t_1);
48589   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.selection.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48590   __pyx_r = NULL;
48591   __pyx_L0:;
48592   __Pyx_XGIVEREF(__pyx_r);
48593   __Pyx_RefNannyFinishContext();
48594   return __pyx_r;
48595 }
48596 
48597 /* Python wrapper */
48598 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9state_cov_1__get__(PyObject * __pyx_v_self)48599 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9state_cov_1__get__(PyObject *__pyx_v_self) {
48600   PyObject *__pyx_r = 0;
48601   __Pyx_RefNannyDeclarations
48602   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48603   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48604 
48605   /* function exit code */
48606   __Pyx_RefNannyFinishContext();
48607   return __pyx_r;
48608 }
48609 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48610 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48611   PyObject *__pyx_r = NULL;
48612   __Pyx_RefNannyDeclarations
48613   PyObject *__pyx_t_1 = NULL;
48614   int __pyx_lineno = 0;
48615   const char *__pyx_filename = NULL;
48616   int __pyx_clineno = 0;
48617   __Pyx_RefNannySetupContext("__get__", 0);
48618   __Pyx_XDECREF(__pyx_r);
48619   if (unlikely(!__pyx_v_self->state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 252, __pyx_L1_error)}
48620   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
48621   __Pyx_GOTREF(__pyx_t_1);
48622   __pyx_r = __pyx_t_1;
48623   __pyx_t_1 = 0;
48624   goto __pyx_L0;
48625 
48626   /* function exit code */
48627   __pyx_L1_error:;
48628   __Pyx_XDECREF(__pyx_t_1);
48629   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48630   __pyx_r = NULL;
48631   __pyx_L0:;
48632   __Pyx_XGIVEREF(__pyx_r);
48633   __Pyx_RefNannyFinishContext();
48634   return __pyx_r;
48635 }
48636 
48637 /* Python wrapper */
48638 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18selected_state_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18selected_state_cov_1__get__(PyObject * __pyx_v_self)48639 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18selected_state_cov_1__get__(PyObject *__pyx_v_self) {
48640   PyObject *__pyx_r = 0;
48641   __Pyx_RefNannyDeclarations
48642   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48643   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18selected_state_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48644 
48645   /* function exit code */
48646   __Pyx_RefNannyFinishContext();
48647   return __pyx_r;
48648 }
48649 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48650 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18selected_state_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48651   PyObject *__pyx_r = NULL;
48652   __Pyx_RefNannyDeclarations
48653   PyObject *__pyx_t_1 = NULL;
48654   int __pyx_lineno = 0;
48655   const char *__pyx_filename = NULL;
48656   int __pyx_clineno = 0;
48657   __Pyx_RefNannySetupContext("__get__", 0);
48658   __Pyx_XDECREF(__pyx_r);
48659   if (unlikely(!__pyx_v_self->selected_state_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 252, __pyx_L1_error)}
48660   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_state_cov, 3, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
48661   __Pyx_GOTREF(__pyx_t_1);
48662   __pyx_r = __pyx_t_1;
48663   __pyx_t_1 = 0;
48664   goto __pyx_L0;
48665 
48666   /* function exit code */
48667   __pyx_L1_error:;
48668   __Pyx_XDECREF(__pyx_t_1);
48669   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.selected_state_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48670   __pyx_r = NULL;
48671   __pyx_L0:;
48672   __Pyx_XGIVEREF(__pyx_r);
48673   __Pyx_RefNannyFinishContext();
48674   return __pyx_r;
48675 }
48676 
48677 /* "statsmodels/tsa/statespace/_representation.pxd":254
48678  *     cdef readonly np.complex128_t [::1,:,:] design, obs_cov, transition, selection, state_cov, selected_state_cov
48679  *
48680  *     cdef readonly int [::1,:] missing             # <<<<<<<<<<<<<<
48681  *     cdef readonly int [:] nmissing
48682  *     cdef readonly int has_missing
48683  */
48684 
48685 /* Python wrapper */
48686 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7missing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7missing_1__get__(PyObject * __pyx_v_self)48687 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7missing_1__get__(PyObject *__pyx_v_self) {
48688   PyObject *__pyx_r = 0;
48689   __Pyx_RefNannyDeclarations
48690   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48691   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7missing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48692 
48693   /* function exit code */
48694   __Pyx_RefNannyFinishContext();
48695   return __pyx_r;
48696 }
48697 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48698 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48699   PyObject *__pyx_r = NULL;
48700   __Pyx_RefNannyDeclarations
48701   PyObject *__pyx_t_1 = NULL;
48702   int __pyx_lineno = 0;
48703   const char *__pyx_filename = NULL;
48704   int __pyx_clineno = 0;
48705   __Pyx_RefNannySetupContext("__get__", 0);
48706   __Pyx_XDECREF(__pyx_r);
48707   if (unlikely(!__pyx_v_self->missing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 254, __pyx_L1_error)}
48708   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->missing, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 254, __pyx_L1_error)
48709   __Pyx_GOTREF(__pyx_t_1);
48710   __pyx_r = __pyx_t_1;
48711   __pyx_t_1 = 0;
48712   goto __pyx_L0;
48713 
48714   /* function exit code */
48715   __pyx_L1_error:;
48716   __Pyx_XDECREF(__pyx_t_1);
48717   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.missing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48718   __pyx_r = NULL;
48719   __pyx_L0:;
48720   __Pyx_XGIVEREF(__pyx_r);
48721   __Pyx_RefNannyFinishContext();
48722   return __pyx_r;
48723 }
48724 
48725 /* "statsmodels/tsa/statespace/_representation.pxd":255
48726  *
48727  *     cdef readonly int [::1,:] missing
48728  *     cdef readonly int [:] nmissing             # <<<<<<<<<<<<<<
48729  *     cdef readonly int has_missing
48730  *
48731  */
48732 
48733 /* Python wrapper */
48734 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8nmissing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8nmissing_1__get__(PyObject * __pyx_v_self)48735 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8nmissing_1__get__(PyObject *__pyx_v_self) {
48736   PyObject *__pyx_r = 0;
48737   __Pyx_RefNannyDeclarations
48738   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48739   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8nmissing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48740 
48741   /* function exit code */
48742   __Pyx_RefNannyFinishContext();
48743   return __pyx_r;
48744 }
48745 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48746 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48747   PyObject *__pyx_r = NULL;
48748   __Pyx_RefNannyDeclarations
48749   PyObject *__pyx_t_1 = NULL;
48750   int __pyx_lineno = 0;
48751   const char *__pyx_filename = NULL;
48752   int __pyx_clineno = 0;
48753   __Pyx_RefNannySetupContext("__get__", 0);
48754   __Pyx_XDECREF(__pyx_r);
48755   if (unlikely(!__pyx_v_self->nmissing.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 255, __pyx_L1_error)}
48756   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->nmissing, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 255, __pyx_L1_error)
48757   __Pyx_GOTREF(__pyx_t_1);
48758   __pyx_r = __pyx_t_1;
48759   __pyx_t_1 = 0;
48760   goto __pyx_L0;
48761 
48762   /* function exit code */
48763   __pyx_L1_error:;
48764   __Pyx_XDECREF(__pyx_t_1);
48765   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.nmissing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48766   __pyx_r = NULL;
48767   __pyx_L0:;
48768   __Pyx_XGIVEREF(__pyx_r);
48769   __Pyx_RefNannyFinishContext();
48770   return __pyx_r;
48771 }
48772 
48773 /* "statsmodels/tsa/statespace/_representation.pxd":256
48774  *     cdef readonly int [::1,:] missing
48775  *     cdef readonly int [:] nmissing
48776  *     cdef readonly int has_missing             # <<<<<<<<<<<<<<
48777  *
48778  *     # Flags
48779  */
48780 
48781 /* Python wrapper */
48782 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11has_missing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11has_missing_1__get__(PyObject * __pyx_v_self)48783 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11has_missing_1__get__(PyObject *__pyx_v_self) {
48784   PyObject *__pyx_r = 0;
48785   __Pyx_RefNannyDeclarations
48786   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48787   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11has_missing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48788 
48789   /* function exit code */
48790   __Pyx_RefNannyFinishContext();
48791   return __pyx_r;
48792 }
48793 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48794 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11has_missing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48795   PyObject *__pyx_r = NULL;
48796   __Pyx_RefNannyDeclarations
48797   PyObject *__pyx_t_1 = NULL;
48798   int __pyx_lineno = 0;
48799   const char *__pyx_filename = NULL;
48800   int __pyx_clineno = 0;
48801   __Pyx_RefNannySetupContext("__get__", 0);
48802   __Pyx_XDECREF(__pyx_r);
48803   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->has_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 256, __pyx_L1_error)
48804   __Pyx_GOTREF(__pyx_t_1);
48805   __pyx_r = __pyx_t_1;
48806   __pyx_t_1 = 0;
48807   goto __pyx_L0;
48808 
48809   /* function exit code */
48810   __pyx_L1_error:;
48811   __Pyx_XDECREF(__pyx_t_1);
48812   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.has_missing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48813   __pyx_r = NULL;
48814   __pyx_L0:;
48815   __Pyx_XGIVEREF(__pyx_r);
48816   __Pyx_RefNannyFinishContext();
48817   return __pyx_r;
48818 }
48819 
48820 /* "statsmodels/tsa/statespace/_representation.pxd":259
48821  *
48822  *     # Flags
48823  *     cdef readonly int time_invariant             # <<<<<<<<<<<<<<
48824  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
48825  *     cdef public int diagonal_obs_cov
48826  */
48827 
48828 /* Python wrapper */
48829 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14time_invariant_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14time_invariant_1__get__(PyObject * __pyx_v_self)48830 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14time_invariant_1__get__(PyObject *__pyx_v_self) {
48831   PyObject *__pyx_r = 0;
48832   __Pyx_RefNannyDeclarations
48833   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48834   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14time_invariant___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48835 
48836   /* function exit code */
48837   __Pyx_RefNannyFinishContext();
48838   return __pyx_r;
48839 }
48840 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48841 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14time_invariant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48842   PyObject *__pyx_r = NULL;
48843   __Pyx_RefNannyDeclarations
48844   PyObject *__pyx_t_1 = NULL;
48845   int __pyx_lineno = 0;
48846   const char *__pyx_filename = NULL;
48847   int __pyx_clineno = 0;
48848   __Pyx_RefNannySetupContext("__get__", 0);
48849   __Pyx_XDECREF(__pyx_r);
48850   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->time_invariant); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 259, __pyx_L1_error)
48851   __Pyx_GOTREF(__pyx_t_1);
48852   __pyx_r = __pyx_t_1;
48853   __pyx_t_1 = 0;
48854   goto __pyx_L0;
48855 
48856   /* function exit code */
48857   __pyx_L1_error:;
48858   __Pyx_XDECREF(__pyx_t_1);
48859   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.time_invariant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48860   __pyx_r = NULL;
48861   __pyx_L0:;
48862   __Pyx_XGIVEREF(__pyx_r);
48863   __Pyx_RefNannyFinishContext();
48864   return __pyx_r;
48865 }
48866 
48867 /* "statsmodels/tsa/statespace/_representation.pxd":260
48868  *     # Flags
48869  *     cdef readonly int time_invariant
48870  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary             # <<<<<<<<<<<<<<
48871  *     cdef public int diagonal_obs_cov
48872  *     cdef readonly int _diagonal_obs_cov
48873  */
48874 
48875 /* Python wrapper */
48876 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialized_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialized_1__get__(PyObject * __pyx_v_self)48877 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialized_1__get__(PyObject *__pyx_v_self) {
48878   PyObject *__pyx_r = 0;
48879   __Pyx_RefNannyDeclarations
48880   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48881   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialized___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48882 
48883   /* function exit code */
48884   __Pyx_RefNannyFinishContext();
48885   return __pyx_r;
48886 }
48887 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48888 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialized___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48889   PyObject *__pyx_r = NULL;
48890   __Pyx_RefNannyDeclarations
48891   PyObject *__pyx_t_1 = NULL;
48892   int __pyx_lineno = 0;
48893   const char *__pyx_filename = NULL;
48894   int __pyx_clineno = 0;
48895   __Pyx_RefNannySetupContext("__get__", 0);
48896   __Pyx_XDECREF(__pyx_r);
48897   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 260, __pyx_L1_error)
48898   __Pyx_GOTREF(__pyx_t_1);
48899   __pyx_r = __pyx_t_1;
48900   __pyx_t_1 = 0;
48901   goto __pyx_L0;
48902 
48903   /* function exit code */
48904   __pyx_L1_error:;
48905   __Pyx_XDECREF(__pyx_t_1);
48906   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48907   __pyx_r = NULL;
48908   __pyx_L0:;
48909   __Pyx_XGIVEREF(__pyx_r);
48910   __Pyx_RefNannyFinishContext();
48911   return __pyx_r;
48912 }
48913 
48914 /* Python wrapper */
48915 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19initialized_diffuse_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19initialized_diffuse_1__get__(PyObject * __pyx_v_self)48916 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19initialized_diffuse_1__get__(PyObject *__pyx_v_self) {
48917   PyObject *__pyx_r = 0;
48918   __Pyx_RefNannyDeclarations
48919   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48920   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19initialized_diffuse___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48921 
48922   /* function exit code */
48923   __Pyx_RefNannyFinishContext();
48924   return __pyx_r;
48925 }
48926 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48927 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19initialized_diffuse___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48928   PyObject *__pyx_r = NULL;
48929   __Pyx_RefNannyDeclarations
48930   PyObject *__pyx_t_1 = NULL;
48931   int __pyx_lineno = 0;
48932   const char *__pyx_filename = NULL;
48933   int __pyx_clineno = 0;
48934   __Pyx_RefNannySetupContext("__get__", 0);
48935   __Pyx_XDECREF(__pyx_r);
48936   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_diffuse); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 260, __pyx_L1_error)
48937   __Pyx_GOTREF(__pyx_t_1);
48938   __pyx_r = __pyx_t_1;
48939   __pyx_t_1 = 0;
48940   goto __pyx_L0;
48941 
48942   /* function exit code */
48943   __pyx_L1_error:;
48944   __Pyx_XDECREF(__pyx_t_1);
48945   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialized_diffuse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48946   __pyx_r = NULL;
48947   __pyx_L0:;
48948   __Pyx_XGIVEREF(__pyx_r);
48949   __Pyx_RefNannyFinishContext();
48950   return __pyx_r;
48951 }
48952 
48953 /* Python wrapper */
48954 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22initialized_stationary_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22initialized_stationary_1__get__(PyObject * __pyx_v_self)48955 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22initialized_stationary_1__get__(PyObject *__pyx_v_self) {
48956   PyObject *__pyx_r = 0;
48957   __Pyx_RefNannyDeclarations
48958   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
48959   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22initialized_stationary___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
48960 
48961   /* function exit code */
48962   __Pyx_RefNannyFinishContext();
48963   return __pyx_r;
48964 }
48965 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)48966 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22initialized_stationary___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
48967   PyObject *__pyx_r = NULL;
48968   __Pyx_RefNannyDeclarations
48969   PyObject *__pyx_t_1 = NULL;
48970   int __pyx_lineno = 0;
48971   const char *__pyx_filename = NULL;
48972   int __pyx_clineno = 0;
48973   __Pyx_RefNannySetupContext("__get__", 0);
48974   __Pyx_XDECREF(__pyx_r);
48975   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->initialized_stationary); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 260, __pyx_L1_error)
48976   __Pyx_GOTREF(__pyx_t_1);
48977   __pyx_r = __pyx_t_1;
48978   __pyx_t_1 = 0;
48979   goto __pyx_L0;
48980 
48981   /* function exit code */
48982   __pyx_L1_error:;
48983   __Pyx_XDECREF(__pyx_t_1);
48984   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.initialized_stationary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
48985   __pyx_r = NULL;
48986   __pyx_L0:;
48987   __Pyx_XGIVEREF(__pyx_r);
48988   __Pyx_RefNannyFinishContext();
48989   return __pyx_r;
48990 }
48991 
48992 /* "statsmodels/tsa/statespace/_representation.pxd":261
48993  *     cdef readonly int time_invariant
48994  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
48995  *     cdef public int diagonal_obs_cov             # <<<<<<<<<<<<<<
48996  *     cdef readonly int _diagonal_obs_cov
48997  *     cdef public int subset_design
48998  */
48999 
49000 /* Python wrapper */
49001 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_1__get__(PyObject * __pyx_v_self)49002 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_1__get__(PyObject *__pyx_v_self) {
49003   PyObject *__pyx_r = 0;
49004   __Pyx_RefNannyDeclarations
49005   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49006   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49007 
49008   /* function exit code */
49009   __Pyx_RefNannyFinishContext();
49010   return __pyx_r;
49011 }
49012 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49013 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49014   PyObject *__pyx_r = NULL;
49015   __Pyx_RefNannyDeclarations
49016   PyObject *__pyx_t_1 = NULL;
49017   int __pyx_lineno = 0;
49018   const char *__pyx_filename = NULL;
49019   int __pyx_clineno = 0;
49020   __Pyx_RefNannySetupContext("__get__", 0);
49021   __Pyx_XDECREF(__pyx_r);
49022   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 261, __pyx_L1_error)
49023   __Pyx_GOTREF(__pyx_t_1);
49024   __pyx_r = __pyx_t_1;
49025   __pyx_t_1 = 0;
49026   goto __pyx_L0;
49027 
49028   /* function exit code */
49029   __pyx_L1_error:;
49030   __Pyx_XDECREF(__pyx_t_1);
49031   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.diagonal_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49032   __pyx_r = NULL;
49033   __pyx_L0:;
49034   __Pyx_XGIVEREF(__pyx_r);
49035   __Pyx_RefNannyFinishContext();
49036   return __pyx_r;
49037 }
49038 
49039 /* Python wrapper */
49040 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)49041 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
49042   int __pyx_r;
49043   __Pyx_RefNannyDeclarations
49044   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
49045   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
49046 
49047   /* function exit code */
49048   __Pyx_RefNannyFinishContext();
49049   return __pyx_r;
49050 }
49051 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,PyObject * __pyx_v_value)49052 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
49053   int __pyx_r;
49054   __Pyx_RefNannyDeclarations
49055   int __pyx_t_1;
49056   int __pyx_lineno = 0;
49057   const char *__pyx_filename = NULL;
49058   int __pyx_clineno = 0;
49059   __Pyx_RefNannySetupContext("__set__", 0);
49060   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 261, __pyx_L1_error)
49061   __pyx_v_self->diagonal_obs_cov = __pyx_t_1;
49062 
49063   /* function exit code */
49064   __pyx_r = 0;
49065   goto __pyx_L0;
49066   __pyx_L1_error:;
49067   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.diagonal_obs_cov.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49068   __pyx_r = -1;
49069   __pyx_L0:;
49070   __Pyx_RefNannyFinishContext();
49071   return __pyx_r;
49072 }
49073 
49074 /* "statsmodels/tsa/statespace/_representation.pxd":262
49075  *     cdef readonly int initialized, initialized_diffuse, initialized_stationary
49076  *     cdef public int diagonal_obs_cov
49077  *     cdef readonly int _diagonal_obs_cov             # <<<<<<<<<<<<<<
49078  *     cdef public int subset_design
49079  *     cdef public int companion_transition
49080  */
49081 
49082 /* Python wrapper */
49083 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17_diagonal_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17_diagonal_obs_cov_1__get__(PyObject * __pyx_v_self)49084 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17_diagonal_obs_cov_1__get__(PyObject *__pyx_v_self) {
49085   PyObject *__pyx_r = 0;
49086   __Pyx_RefNannyDeclarations
49087   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49088   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17_diagonal_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49089 
49090   /* function exit code */
49091   __Pyx_RefNannyFinishContext();
49092   return __pyx_r;
49093 }
49094 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49095 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17_diagonal_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49096   PyObject *__pyx_r = NULL;
49097   __Pyx_RefNannyDeclarations
49098   PyObject *__pyx_t_1 = NULL;
49099   int __pyx_lineno = 0;
49100   const char *__pyx_filename = NULL;
49101   int __pyx_clineno = 0;
49102   __Pyx_RefNannySetupContext("__get__", 0);
49103   __Pyx_XDECREF(__pyx_r);
49104   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_diagonal_obs_cov); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 262, __pyx_L1_error)
49105   __Pyx_GOTREF(__pyx_t_1);
49106   __pyx_r = __pyx_t_1;
49107   __pyx_t_1 = 0;
49108   goto __pyx_L0;
49109 
49110   /* function exit code */
49111   __pyx_L1_error:;
49112   __Pyx_XDECREF(__pyx_t_1);
49113   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._diagonal_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49114   __pyx_r = NULL;
49115   __pyx_L0:;
49116   __Pyx_XGIVEREF(__pyx_r);
49117   __Pyx_RefNannyFinishContext();
49118   return __pyx_r;
49119 }
49120 
49121 /* "statsmodels/tsa/statespace/_representation.pxd":263
49122  *     cdef public int diagonal_obs_cov
49123  *     cdef readonly int _diagonal_obs_cov
49124  *     cdef public int subset_design             # <<<<<<<<<<<<<<
49125  *     cdef public int companion_transition
49126  *
49127  */
49128 
49129 /* Python wrapper */
49130 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_1__get__(PyObject * __pyx_v_self)49131 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_1__get__(PyObject *__pyx_v_self) {
49132   PyObject *__pyx_r = 0;
49133   __Pyx_RefNannyDeclarations
49134   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49135   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49136 
49137   /* function exit code */
49138   __Pyx_RefNannyFinishContext();
49139   return __pyx_r;
49140 }
49141 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49142 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49143   PyObject *__pyx_r = NULL;
49144   __Pyx_RefNannyDeclarations
49145   PyObject *__pyx_t_1 = NULL;
49146   int __pyx_lineno = 0;
49147   const char *__pyx_filename = NULL;
49148   int __pyx_clineno = 0;
49149   __Pyx_RefNannySetupContext("__get__", 0);
49150   __Pyx_XDECREF(__pyx_r);
49151   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->subset_design); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 263, __pyx_L1_error)
49152   __Pyx_GOTREF(__pyx_t_1);
49153   __pyx_r = __pyx_t_1;
49154   __pyx_t_1 = 0;
49155   goto __pyx_L0;
49156 
49157   /* function exit code */
49158   __pyx_L1_error:;
49159   __Pyx_XDECREF(__pyx_t_1);
49160   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.subset_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49161   __pyx_r = NULL;
49162   __pyx_L0:;
49163   __Pyx_XGIVEREF(__pyx_r);
49164   __Pyx_RefNannyFinishContext();
49165   return __pyx_r;
49166 }
49167 
49168 /* Python wrapper */
49169 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)49170 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
49171   int __pyx_r;
49172   __Pyx_RefNannyDeclarations
49173   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
49174   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
49175 
49176   /* function exit code */
49177   __Pyx_RefNannyFinishContext();
49178   return __pyx_r;
49179 }
49180 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,PyObject * __pyx_v_value)49181 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
49182   int __pyx_r;
49183   __Pyx_RefNannyDeclarations
49184   int __pyx_t_1;
49185   int __pyx_lineno = 0;
49186   const char *__pyx_filename = NULL;
49187   int __pyx_clineno = 0;
49188   __Pyx_RefNannySetupContext("__set__", 0);
49189   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 263, __pyx_L1_error)
49190   __pyx_v_self->subset_design = __pyx_t_1;
49191 
49192   /* function exit code */
49193   __pyx_r = 0;
49194   goto __pyx_L0;
49195   __pyx_L1_error:;
49196   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.subset_design.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49197   __pyx_r = -1;
49198   __pyx_L0:;
49199   __Pyx_RefNannyFinishContext();
49200   return __pyx_r;
49201 }
49202 
49203 /* "statsmodels/tsa/statespace/_representation.pxd":264
49204  *     cdef readonly int _diagonal_obs_cov
49205  *     cdef public int subset_design
49206  *     cdef public int companion_transition             # <<<<<<<<<<<<<<
49207  *
49208  *     # Temporary arrays
49209  */
49210 
49211 /* Python wrapper */
49212 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_1__get__(PyObject * __pyx_v_self)49213 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_1__get__(PyObject *__pyx_v_self) {
49214   PyObject *__pyx_r = 0;
49215   __Pyx_RefNannyDeclarations
49216   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49217   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49218 
49219   /* function exit code */
49220   __Pyx_RefNannyFinishContext();
49221   return __pyx_r;
49222 }
49223 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49224 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49225   PyObject *__pyx_r = NULL;
49226   __Pyx_RefNannyDeclarations
49227   PyObject *__pyx_t_1 = NULL;
49228   int __pyx_lineno = 0;
49229   const char *__pyx_filename = NULL;
49230   int __pyx_clineno = 0;
49231   __Pyx_RefNannySetupContext("__get__", 0);
49232   __Pyx_XDECREF(__pyx_r);
49233   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->companion_transition); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 264, __pyx_L1_error)
49234   __Pyx_GOTREF(__pyx_t_1);
49235   __pyx_r = __pyx_t_1;
49236   __pyx_t_1 = 0;
49237   goto __pyx_L0;
49238 
49239   /* function exit code */
49240   __pyx_L1_error:;
49241   __Pyx_XDECREF(__pyx_t_1);
49242   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.companion_transition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49243   __pyx_r = NULL;
49244   __pyx_L0:;
49245   __Pyx_XGIVEREF(__pyx_r);
49246   __Pyx_RefNannyFinishContext();
49247   return __pyx_r;
49248 }
49249 
49250 /* Python wrapper */
49251 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)49252 static int __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
49253   int __pyx_r;
49254   __Pyx_RefNannyDeclarations
49255   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
49256   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_2__set__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
49257 
49258   /* function exit code */
49259   __Pyx_RefNannyFinishContext();
49260   return __pyx_r;
49261 }
49262 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self,PyObject * __pyx_v_value)49263 static int __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_2__set__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self, PyObject *__pyx_v_value) {
49264   int __pyx_r;
49265   __Pyx_RefNannyDeclarations
49266   int __pyx_t_1;
49267   int __pyx_lineno = 0;
49268   const char *__pyx_filename = NULL;
49269   int __pyx_clineno = 0;
49270   __Pyx_RefNannySetupContext("__set__", 0);
49271   __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 264, __pyx_L1_error)
49272   __pyx_v_self->companion_transition = __pyx_t_1;
49273 
49274   /* function exit code */
49275   __pyx_r = 0;
49276   goto __pyx_L0;
49277   __pyx_L1_error:;
49278   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.companion_transition.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49279   __pyx_r = -1;
49280   __pyx_L0:;
49281   __Pyx_RefNannyFinishContext();
49282   return __pyx_r;
49283 }
49284 
49285 /* "statsmodels/tsa/statespace/_representation.pxd":270
49286  *
49287  *     # Temporary selection arrays
49288  *     cdef readonly np.complex128_t [:] selected_obs             # <<<<<<<<<<<<<<
49289  *     cdef readonly np.complex128_t [:] selected_obs_intercept
49290  *     cdef readonly np.complex128_t [:] selected_design
49291  */
49292 
49293 /* Python wrapper */
49294 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12selected_obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12selected_obs_1__get__(PyObject * __pyx_v_self)49295 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12selected_obs_1__get__(PyObject *__pyx_v_self) {
49296   PyObject *__pyx_r = 0;
49297   __Pyx_RefNannyDeclarations
49298   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49299   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12selected_obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49300 
49301   /* function exit code */
49302   __Pyx_RefNannyFinishContext();
49303   return __pyx_r;
49304 }
49305 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49306 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12selected_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49307   PyObject *__pyx_r = NULL;
49308   __Pyx_RefNannyDeclarations
49309   PyObject *__pyx_t_1 = NULL;
49310   int __pyx_lineno = 0;
49311   const char *__pyx_filename = NULL;
49312   int __pyx_clineno = 0;
49313   __Pyx_RefNannySetupContext("__get__", 0);
49314   __Pyx_XDECREF(__pyx_r);
49315   if (unlikely(!__pyx_v_self->selected_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 270, __pyx_L1_error)}
49316   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 270, __pyx_L1_error)
49317   __Pyx_GOTREF(__pyx_t_1);
49318   __pyx_r = __pyx_t_1;
49319   __pyx_t_1 = 0;
49320   goto __pyx_L0;
49321 
49322   /* function exit code */
49323   __pyx_L1_error:;
49324   __Pyx_XDECREF(__pyx_t_1);
49325   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.selected_obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49326   __pyx_r = NULL;
49327   __pyx_L0:;
49328   __Pyx_XGIVEREF(__pyx_r);
49329   __Pyx_RefNannyFinishContext();
49330   return __pyx_r;
49331 }
49332 
49333 /* "statsmodels/tsa/statespace/_representation.pxd":271
49334  *     # Temporary selection arrays
49335  *     cdef readonly np.complex128_t [:] selected_obs
49336  *     cdef readonly np.complex128_t [:] selected_obs_intercept             # <<<<<<<<<<<<<<
49337  *     cdef readonly np.complex128_t [:] selected_design
49338  *     cdef readonly np.complex128_t [:] selected_obs_cov
49339  */
49340 
49341 /* Python wrapper */
49342 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22selected_obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22selected_obs_intercept_1__get__(PyObject * __pyx_v_self)49343 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22selected_obs_intercept_1__get__(PyObject *__pyx_v_self) {
49344   PyObject *__pyx_r = 0;
49345   __Pyx_RefNannyDeclarations
49346   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49347   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22selected_obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49348 
49349   /* function exit code */
49350   __Pyx_RefNannyFinishContext();
49351   return __pyx_r;
49352 }
49353 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49354 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22selected_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49355   PyObject *__pyx_r = NULL;
49356   __Pyx_RefNannyDeclarations
49357   PyObject *__pyx_t_1 = NULL;
49358   int __pyx_lineno = 0;
49359   const char *__pyx_filename = NULL;
49360   int __pyx_clineno = 0;
49361   __Pyx_RefNannySetupContext("__get__", 0);
49362   __Pyx_XDECREF(__pyx_r);
49363   if (unlikely(!__pyx_v_self->selected_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 271, __pyx_L1_error)}
49364   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 271, __pyx_L1_error)
49365   __Pyx_GOTREF(__pyx_t_1);
49366   __pyx_r = __pyx_t_1;
49367   __pyx_t_1 = 0;
49368   goto __pyx_L0;
49369 
49370   /* function exit code */
49371   __pyx_L1_error:;
49372   __Pyx_XDECREF(__pyx_t_1);
49373   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.selected_obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49374   __pyx_r = NULL;
49375   __pyx_L0:;
49376   __Pyx_XGIVEREF(__pyx_r);
49377   __Pyx_RefNannyFinishContext();
49378   return __pyx_r;
49379 }
49380 
49381 /* "statsmodels/tsa/statespace/_representation.pxd":272
49382  *     cdef readonly np.complex128_t [:] selected_obs
49383  *     cdef readonly np.complex128_t [:] selected_obs_intercept
49384  *     cdef readonly np.complex128_t [:] selected_design             # <<<<<<<<<<<<<<
49385  *     cdef readonly np.complex128_t [:] selected_obs_cov
49386  *
49387  */
49388 
49389 /* Python wrapper */
49390 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15selected_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15selected_design_1__get__(PyObject * __pyx_v_self)49391 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15selected_design_1__get__(PyObject *__pyx_v_self) {
49392   PyObject *__pyx_r = 0;
49393   __Pyx_RefNannyDeclarations
49394   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49395   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15selected_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49396 
49397   /* function exit code */
49398   __Pyx_RefNannyFinishContext();
49399   return __pyx_r;
49400 }
49401 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49402 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15selected_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49403   PyObject *__pyx_r = NULL;
49404   __Pyx_RefNannyDeclarations
49405   PyObject *__pyx_t_1 = NULL;
49406   int __pyx_lineno = 0;
49407   const char *__pyx_filename = NULL;
49408   int __pyx_clineno = 0;
49409   __Pyx_RefNannySetupContext("__get__", 0);
49410   __Pyx_XDECREF(__pyx_r);
49411   if (unlikely(!__pyx_v_self->selected_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 272, __pyx_L1_error)}
49412   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_design, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 272, __pyx_L1_error)
49413   __Pyx_GOTREF(__pyx_t_1);
49414   __pyx_r = __pyx_t_1;
49415   __pyx_t_1 = 0;
49416   goto __pyx_L0;
49417 
49418   /* function exit code */
49419   __pyx_L1_error:;
49420   __Pyx_XDECREF(__pyx_t_1);
49421   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.selected_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49422   __pyx_r = NULL;
49423   __pyx_L0:;
49424   __Pyx_XGIVEREF(__pyx_r);
49425   __Pyx_RefNannyFinishContext();
49426   return __pyx_r;
49427 }
49428 
49429 /* "statsmodels/tsa/statespace/_representation.pxd":273
49430  *     cdef readonly np.complex128_t [:] selected_obs_intercept
49431  *     cdef readonly np.complex128_t [:] selected_design
49432  *     cdef readonly np.complex128_t [:] selected_obs_cov             # <<<<<<<<<<<<<<
49433  *
49434  *     # Temporary transformation arrays
49435  */
49436 
49437 /* Python wrapper */
49438 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16selected_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16selected_obs_cov_1__get__(PyObject * __pyx_v_self)49439 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16selected_obs_cov_1__get__(PyObject *__pyx_v_self) {
49440   PyObject *__pyx_r = 0;
49441   __Pyx_RefNannyDeclarations
49442   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49443   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16selected_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49444 
49445   /* function exit code */
49446   __Pyx_RefNannyFinishContext();
49447   return __pyx_r;
49448 }
49449 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49450 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16selected_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49451   PyObject *__pyx_r = NULL;
49452   __Pyx_RefNannyDeclarations
49453   PyObject *__pyx_t_1 = NULL;
49454   int __pyx_lineno = 0;
49455   const char *__pyx_filename = NULL;
49456   int __pyx_clineno = 0;
49457   __Pyx_RefNannySetupContext("__get__", 0);
49458   __Pyx_XDECREF(__pyx_r);
49459   if (unlikely(!__pyx_v_self->selected_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 273, __pyx_L1_error)}
49460   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->selected_obs_cov, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error)
49461   __Pyx_GOTREF(__pyx_t_1);
49462   __pyx_r = __pyx_t_1;
49463   __pyx_t_1 = 0;
49464   goto __pyx_L0;
49465 
49466   /* function exit code */
49467   __pyx_L1_error:;
49468   __Pyx_XDECREF(__pyx_t_1);
49469   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.selected_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49470   __pyx_r = NULL;
49471   __pyx_L0:;
49472   __Pyx_XGIVEREF(__pyx_r);
49473   __Pyx_RefNannyFinishContext();
49474   return __pyx_r;
49475 }
49476 
49477 /* "statsmodels/tsa/statespace/_representation.pxd":276
49478  *
49479  *     # Temporary transformation arrays
49480  *     cdef readonly np.complex128_t [::1,:] transform_cholesky             # <<<<<<<<<<<<<<
49481  *     cdef readonly np.complex128_t [::1,:] transform_obs_cov
49482  *     cdef readonly np.complex128_t [::1,:] transform_design
49483  */
49484 
49485 /* Python wrapper */
49486 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18transform_cholesky_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18transform_cholesky_1__get__(PyObject * __pyx_v_self)49487 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18transform_cholesky_1__get__(PyObject *__pyx_v_self) {
49488   PyObject *__pyx_r = 0;
49489   __Pyx_RefNannyDeclarations
49490   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49491   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18transform_cholesky___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49492 
49493   /* function exit code */
49494   __Pyx_RefNannyFinishContext();
49495   return __pyx_r;
49496 }
49497 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49498 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18transform_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49499   PyObject *__pyx_r = NULL;
49500   __Pyx_RefNannyDeclarations
49501   PyObject *__pyx_t_1 = NULL;
49502   int __pyx_lineno = 0;
49503   const char *__pyx_filename = NULL;
49504   int __pyx_clineno = 0;
49505   __Pyx_RefNannySetupContext("__get__", 0);
49506   __Pyx_XDECREF(__pyx_r);
49507   if (unlikely(!__pyx_v_self->transform_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 276, __pyx_L1_error)}
49508   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error)
49509   __Pyx_GOTREF(__pyx_t_1);
49510   __pyx_r = __pyx_t_1;
49511   __pyx_t_1 = 0;
49512   goto __pyx_L0;
49513 
49514   /* function exit code */
49515   __pyx_L1_error:;
49516   __Pyx_XDECREF(__pyx_t_1);
49517   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transform_cholesky.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49518   __pyx_r = NULL;
49519   __pyx_L0:;
49520   __Pyx_XGIVEREF(__pyx_r);
49521   __Pyx_RefNannyFinishContext();
49522   return __pyx_r;
49523 }
49524 
49525 /* "statsmodels/tsa/statespace/_representation.pxd":277
49526  *     # Temporary transformation arrays
49527  *     cdef readonly np.complex128_t [::1,:] transform_cholesky
49528  *     cdef readonly np.complex128_t [::1,:] transform_obs_cov             # <<<<<<<<<<<<<<
49529  *     cdef readonly np.complex128_t [::1,:] transform_design
49530  *     cdef readonly np.complex128_t [:] transform_obs_intercept
49531  */
49532 
49533 /* Python wrapper */
49534 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17transform_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17transform_obs_cov_1__get__(PyObject * __pyx_v_self)49535 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17transform_obs_cov_1__get__(PyObject *__pyx_v_self) {
49536   PyObject *__pyx_r = 0;
49537   __Pyx_RefNannyDeclarations
49538   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49539   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17transform_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49540 
49541   /* function exit code */
49542   __Pyx_RefNannyFinishContext();
49543   return __pyx_r;
49544 }
49545 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49546 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17transform_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49547   PyObject *__pyx_r = NULL;
49548   __Pyx_RefNannyDeclarations
49549   PyObject *__pyx_t_1 = NULL;
49550   int __pyx_lineno = 0;
49551   const char *__pyx_filename = NULL;
49552   int __pyx_clineno = 0;
49553   __Pyx_RefNannySetupContext("__get__", 0);
49554   __Pyx_XDECREF(__pyx_r);
49555   if (unlikely(!__pyx_v_self->transform_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 277, __pyx_L1_error)}
49556   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 277, __pyx_L1_error)
49557   __Pyx_GOTREF(__pyx_t_1);
49558   __pyx_r = __pyx_t_1;
49559   __pyx_t_1 = 0;
49560   goto __pyx_L0;
49561 
49562   /* function exit code */
49563   __pyx_L1_error:;
49564   __Pyx_XDECREF(__pyx_t_1);
49565   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transform_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49566   __pyx_r = NULL;
49567   __pyx_L0:;
49568   __Pyx_XGIVEREF(__pyx_r);
49569   __Pyx_RefNannyFinishContext();
49570   return __pyx_r;
49571 }
49572 
49573 /* "statsmodels/tsa/statespace/_representation.pxd":278
49574  *     cdef readonly np.complex128_t [::1,:] transform_cholesky
49575  *     cdef readonly np.complex128_t [::1,:] transform_obs_cov
49576  *     cdef readonly np.complex128_t [::1,:] transform_design             # <<<<<<<<<<<<<<
49577  *     cdef readonly np.complex128_t [:] transform_obs_intercept
49578  *     cdef readonly np.complex128_t transform_determinant
49579  */
49580 
49581 /* Python wrapper */
49582 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16transform_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16transform_design_1__get__(PyObject * __pyx_v_self)49583 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16transform_design_1__get__(PyObject *__pyx_v_self) {
49584   PyObject *__pyx_r = 0;
49585   __Pyx_RefNannyDeclarations
49586   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49587   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16transform_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49588 
49589   /* function exit code */
49590   __Pyx_RefNannyFinishContext();
49591   return __pyx_r;
49592 }
49593 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49594 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16transform_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49595   PyObject *__pyx_r = NULL;
49596   __Pyx_RefNannyDeclarations
49597   PyObject *__pyx_t_1 = NULL;
49598   int __pyx_lineno = 0;
49599   const char *__pyx_filename = NULL;
49600   int __pyx_clineno = 0;
49601   __Pyx_RefNannySetupContext("__get__", 0);
49602   __Pyx_XDECREF(__pyx_r);
49603   if (unlikely(!__pyx_v_self->transform_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 278, __pyx_L1_error)}
49604   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_design, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 278, __pyx_L1_error)
49605   __Pyx_GOTREF(__pyx_t_1);
49606   __pyx_r = __pyx_t_1;
49607   __pyx_t_1 = 0;
49608   goto __pyx_L0;
49609 
49610   /* function exit code */
49611   __pyx_L1_error:;
49612   __Pyx_XDECREF(__pyx_t_1);
49613   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transform_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49614   __pyx_r = NULL;
49615   __pyx_L0:;
49616   __Pyx_XGIVEREF(__pyx_r);
49617   __Pyx_RefNannyFinishContext();
49618   return __pyx_r;
49619 }
49620 
49621 /* "statsmodels/tsa/statespace/_representation.pxd":279
49622  *     cdef readonly np.complex128_t [::1,:] transform_obs_cov
49623  *     cdef readonly np.complex128_t [::1,:] transform_design
49624  *     cdef readonly np.complex128_t [:] transform_obs_intercept             # <<<<<<<<<<<<<<
49625  *     cdef readonly np.complex128_t transform_determinant
49626  *
49627  */
49628 
49629 /* Python wrapper */
49630 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_23transform_obs_intercept_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_23transform_obs_intercept_1__get__(PyObject * __pyx_v_self)49631 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_23transform_obs_intercept_1__get__(PyObject *__pyx_v_self) {
49632   PyObject *__pyx_r = 0;
49633   __Pyx_RefNannyDeclarations
49634   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49635   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_23transform_obs_intercept___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49636 
49637   /* function exit code */
49638   __Pyx_RefNannyFinishContext();
49639   return __pyx_r;
49640 }
49641 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49642 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_23transform_obs_intercept___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49643   PyObject *__pyx_r = NULL;
49644   __Pyx_RefNannyDeclarations
49645   PyObject *__pyx_t_1 = NULL;
49646   int __pyx_lineno = 0;
49647   const char *__pyx_filename = NULL;
49648   int __pyx_clineno = 0;
49649   __Pyx_RefNannySetupContext("__get__", 0);
49650   __Pyx_XDECREF(__pyx_r);
49651   if (unlikely(!__pyx_v_self->transform_obs_intercept.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 279, __pyx_L1_error)}
49652   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->transform_obs_intercept, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 279, __pyx_L1_error)
49653   __Pyx_GOTREF(__pyx_t_1);
49654   __pyx_r = __pyx_t_1;
49655   __pyx_t_1 = 0;
49656   goto __pyx_L0;
49657 
49658   /* function exit code */
49659   __pyx_L1_error:;
49660   __Pyx_XDECREF(__pyx_t_1);
49661   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transform_obs_intercept.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49662   __pyx_r = NULL;
49663   __pyx_L0:;
49664   __Pyx_XGIVEREF(__pyx_r);
49665   __Pyx_RefNannyFinishContext();
49666   return __pyx_r;
49667 }
49668 
49669 /* "statsmodels/tsa/statespace/_representation.pxd":280
49670  *     cdef readonly np.complex128_t [::1,:] transform_design
49671  *     cdef readonly np.complex128_t [:] transform_obs_intercept
49672  *     cdef readonly np.complex128_t transform_determinant             # <<<<<<<<<<<<<<
49673  *
49674  *     cdef readonly np.complex128_t [:] collapse_obs
49675  */
49676 
49677 /* Python wrapper */
49678 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_21transform_determinant_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_21transform_determinant_1__get__(PyObject * __pyx_v_self)49679 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_21transform_determinant_1__get__(PyObject *__pyx_v_self) {
49680   PyObject *__pyx_r = 0;
49681   __Pyx_RefNannyDeclarations
49682   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49683   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_21transform_determinant___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49684 
49685   /* function exit code */
49686   __Pyx_RefNannyFinishContext();
49687   return __pyx_r;
49688 }
49689 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49690 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_21transform_determinant___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49691   PyObject *__pyx_r = NULL;
49692   __Pyx_RefNannyDeclarations
49693   PyObject *__pyx_t_1 = NULL;
49694   int __pyx_lineno = 0;
49695   const char *__pyx_filename = NULL;
49696   int __pyx_clineno = 0;
49697   __Pyx_RefNannySetupContext("__get__", 0);
49698   __Pyx_XDECREF(__pyx_r);
49699   __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_self->transform_determinant); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 280, __pyx_L1_error)
49700   __Pyx_GOTREF(__pyx_t_1);
49701   __pyx_r = __pyx_t_1;
49702   __pyx_t_1 = 0;
49703   goto __pyx_L0;
49704 
49705   /* function exit code */
49706   __pyx_L1_error:;
49707   __Pyx_XDECREF(__pyx_t_1);
49708   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.transform_determinant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49709   __pyx_r = NULL;
49710   __pyx_L0:;
49711   __Pyx_XGIVEREF(__pyx_r);
49712   __Pyx_RefNannyFinishContext();
49713   return __pyx_r;
49714 }
49715 
49716 /* "statsmodels/tsa/statespace/_representation.pxd":282
49717  *     cdef readonly np.complex128_t transform_determinant
49718  *
49719  *     cdef readonly np.complex128_t [:] collapse_obs             # <<<<<<<<<<<<<<
49720  *     cdef readonly np.complex128_t [:] collapse_obs_tmp
49721  *     cdef readonly np.complex128_t [::1,:] collapse_design
49722  */
49723 
49724 /* Python wrapper */
49725 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12collapse_obs_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12collapse_obs_1__get__(PyObject * __pyx_v_self)49726 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12collapse_obs_1__get__(PyObject *__pyx_v_self) {
49727   PyObject *__pyx_r = 0;
49728   __Pyx_RefNannyDeclarations
49729   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49730   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12collapse_obs___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49731 
49732   /* function exit code */
49733   __Pyx_RefNannyFinishContext();
49734   return __pyx_r;
49735 }
49736 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49737 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12collapse_obs___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49738   PyObject *__pyx_r = NULL;
49739   __Pyx_RefNannyDeclarations
49740   PyObject *__pyx_t_1 = NULL;
49741   int __pyx_lineno = 0;
49742   const char *__pyx_filename = NULL;
49743   int __pyx_clineno = 0;
49744   __Pyx_RefNannySetupContext("__get__", 0);
49745   __Pyx_XDECREF(__pyx_r);
49746   if (unlikely(!__pyx_v_self->collapse_obs.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 282, __pyx_L1_error)}
49747   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 282, __pyx_L1_error)
49748   __Pyx_GOTREF(__pyx_t_1);
49749   __pyx_r = __pyx_t_1;
49750   __pyx_t_1 = 0;
49751   goto __pyx_L0;
49752 
49753   /* function exit code */
49754   __pyx_L1_error:;
49755   __Pyx_XDECREF(__pyx_t_1);
49756   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.collapse_obs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49757   __pyx_r = NULL;
49758   __pyx_L0:;
49759   __Pyx_XGIVEREF(__pyx_r);
49760   __Pyx_RefNannyFinishContext();
49761   return __pyx_r;
49762 }
49763 
49764 /* "statsmodels/tsa/statespace/_representation.pxd":283
49765  *
49766  *     cdef readonly np.complex128_t [:] collapse_obs
49767  *     cdef readonly np.complex128_t [:] collapse_obs_tmp             # <<<<<<<<<<<<<<
49768  *     cdef readonly np.complex128_t [::1,:] collapse_design
49769  *     cdef readonly np.complex128_t [::1,:] collapse_obs_cov
49770  */
49771 
49772 /* Python wrapper */
49773 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_tmp_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_tmp_1__get__(PyObject * __pyx_v_self)49774 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_tmp_1__get__(PyObject *__pyx_v_self) {
49775   PyObject *__pyx_r = 0;
49776   __Pyx_RefNannyDeclarations
49777   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49778   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_tmp___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49779 
49780   /* function exit code */
49781   __Pyx_RefNannyFinishContext();
49782   return __pyx_r;
49783 }
49784 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49785 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_tmp___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49786   PyObject *__pyx_r = NULL;
49787   __Pyx_RefNannyDeclarations
49788   PyObject *__pyx_t_1 = NULL;
49789   int __pyx_lineno = 0;
49790   const char *__pyx_filename = NULL;
49791   int __pyx_clineno = 0;
49792   __Pyx_RefNannySetupContext("__get__", 0);
49793   __Pyx_XDECREF(__pyx_r);
49794   if (unlikely(!__pyx_v_self->collapse_obs_tmp.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 283, __pyx_L1_error)}
49795   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_tmp, 1, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 283, __pyx_L1_error)
49796   __Pyx_GOTREF(__pyx_t_1);
49797   __pyx_r = __pyx_t_1;
49798   __pyx_t_1 = 0;
49799   goto __pyx_L0;
49800 
49801   /* function exit code */
49802   __pyx_L1_error:;
49803   __Pyx_XDECREF(__pyx_t_1);
49804   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.collapse_obs_tmp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49805   __pyx_r = NULL;
49806   __pyx_L0:;
49807   __Pyx_XGIVEREF(__pyx_r);
49808   __Pyx_RefNannyFinishContext();
49809   return __pyx_r;
49810 }
49811 
49812 /* "statsmodels/tsa/statespace/_representation.pxd":284
49813  *     cdef readonly np.complex128_t [:] collapse_obs
49814  *     cdef readonly np.complex128_t [:] collapse_obs_tmp
49815  *     cdef readonly np.complex128_t [::1,:] collapse_design             # <<<<<<<<<<<<<<
49816  *     cdef readonly np.complex128_t [::1,:] collapse_obs_cov
49817  *     cdef readonly np.complex128_t [::1,:] collapse_cholesky
49818  */
49819 
49820 /* Python wrapper */
49821 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15collapse_design_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15collapse_design_1__get__(PyObject * __pyx_v_self)49822 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15collapse_design_1__get__(PyObject *__pyx_v_self) {
49823   PyObject *__pyx_r = 0;
49824   __Pyx_RefNannyDeclarations
49825   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49826   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15collapse_design___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49827 
49828   /* function exit code */
49829   __Pyx_RefNannyFinishContext();
49830   return __pyx_r;
49831 }
49832 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49833 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15collapse_design___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49834   PyObject *__pyx_r = NULL;
49835   __Pyx_RefNannyDeclarations
49836   PyObject *__pyx_t_1 = NULL;
49837   int __pyx_lineno = 0;
49838   const char *__pyx_filename = NULL;
49839   int __pyx_clineno = 0;
49840   __Pyx_RefNannySetupContext("__get__", 0);
49841   __Pyx_XDECREF(__pyx_r);
49842   if (unlikely(!__pyx_v_self->collapse_design.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 284, __pyx_L1_error)}
49843   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_design, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 284, __pyx_L1_error)
49844   __Pyx_GOTREF(__pyx_t_1);
49845   __pyx_r = __pyx_t_1;
49846   __pyx_t_1 = 0;
49847   goto __pyx_L0;
49848 
49849   /* function exit code */
49850   __pyx_L1_error:;
49851   __Pyx_XDECREF(__pyx_t_1);
49852   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.collapse_design.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49853   __pyx_r = NULL;
49854   __pyx_L0:;
49855   __Pyx_XGIVEREF(__pyx_r);
49856   __Pyx_RefNannyFinishContext();
49857   return __pyx_r;
49858 }
49859 
49860 /* "statsmodels/tsa/statespace/_representation.pxd":285
49861  *     cdef readonly np.complex128_t [:] collapse_obs_tmp
49862  *     cdef readonly np.complex128_t [::1,:] collapse_design
49863  *     cdef readonly np.complex128_t [::1,:] collapse_obs_cov             # <<<<<<<<<<<<<<
49864  *     cdef readonly np.complex128_t [::1,:] collapse_cholesky
49865  *     cdef readonly np.complex128_t collapse_loglikelihood
49866  */
49867 
49868 /* Python wrapper */
49869 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_cov_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_cov_1__get__(PyObject * __pyx_v_self)49870 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_cov_1__get__(PyObject *__pyx_v_self) {
49871   PyObject *__pyx_r = 0;
49872   __Pyx_RefNannyDeclarations
49873   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49874   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_cov___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49875 
49876   /* function exit code */
49877   __Pyx_RefNannyFinishContext();
49878   return __pyx_r;
49879 }
49880 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49881 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_cov___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49882   PyObject *__pyx_r = NULL;
49883   __Pyx_RefNannyDeclarations
49884   PyObject *__pyx_t_1 = NULL;
49885   int __pyx_lineno = 0;
49886   const char *__pyx_filename = NULL;
49887   int __pyx_clineno = 0;
49888   __Pyx_RefNannySetupContext("__get__", 0);
49889   __Pyx_XDECREF(__pyx_r);
49890   if (unlikely(!__pyx_v_self->collapse_obs_cov.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 285, __pyx_L1_error)}
49891   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_obs_cov, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 285, __pyx_L1_error)
49892   __Pyx_GOTREF(__pyx_t_1);
49893   __pyx_r = __pyx_t_1;
49894   __pyx_t_1 = 0;
49895   goto __pyx_L0;
49896 
49897   /* function exit code */
49898   __pyx_L1_error:;
49899   __Pyx_XDECREF(__pyx_t_1);
49900   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.collapse_obs_cov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49901   __pyx_r = NULL;
49902   __pyx_L0:;
49903   __Pyx_XGIVEREF(__pyx_r);
49904   __Pyx_RefNannyFinishContext();
49905   return __pyx_r;
49906 }
49907 
49908 /* "statsmodels/tsa/statespace/_representation.pxd":286
49909  *     cdef readonly np.complex128_t [::1,:] collapse_design
49910  *     cdef readonly np.complex128_t [::1,:] collapse_obs_cov
49911  *     cdef readonly np.complex128_t [::1,:] collapse_cholesky             # <<<<<<<<<<<<<<
49912  *     cdef readonly np.complex128_t collapse_loglikelihood
49913  *
49914  */
49915 
49916 /* Python wrapper */
49917 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17collapse_cholesky_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17collapse_cholesky_1__get__(PyObject * __pyx_v_self)49918 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17collapse_cholesky_1__get__(PyObject *__pyx_v_self) {
49919   PyObject *__pyx_r = 0;
49920   __Pyx_RefNannyDeclarations
49921   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49922   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17collapse_cholesky___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49923 
49924   /* function exit code */
49925   __Pyx_RefNannyFinishContext();
49926   return __pyx_r;
49927 }
49928 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49929 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17collapse_cholesky___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49930   PyObject *__pyx_r = NULL;
49931   __Pyx_RefNannyDeclarations
49932   PyObject *__pyx_t_1 = NULL;
49933   int __pyx_lineno = 0;
49934   const char *__pyx_filename = NULL;
49935   int __pyx_clineno = 0;
49936   __Pyx_RefNannySetupContext("__get__", 0);
49937   __Pyx_XDECREF(__pyx_r);
49938   if (unlikely(!__pyx_v_self->collapse_cholesky.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(1, 286, __pyx_L1_error)}
49939   __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->collapse_cholesky, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 286, __pyx_L1_error)
49940   __Pyx_GOTREF(__pyx_t_1);
49941   __pyx_r = __pyx_t_1;
49942   __pyx_t_1 = 0;
49943   goto __pyx_L0;
49944 
49945   /* function exit code */
49946   __pyx_L1_error:;
49947   __Pyx_XDECREF(__pyx_t_1);
49948   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.collapse_cholesky.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49949   __pyx_r = NULL;
49950   __pyx_L0:;
49951   __Pyx_XGIVEREF(__pyx_r);
49952   __Pyx_RefNannyFinishContext();
49953   return __pyx_r;
49954 }
49955 
49956 /* "statsmodels/tsa/statespace/_representation.pxd":287
49957  *     cdef readonly np.complex128_t [::1,:] collapse_obs_cov
49958  *     cdef readonly np.complex128_t [::1,:] collapse_cholesky
49959  *     cdef readonly np.complex128_t collapse_loglikelihood             # <<<<<<<<<<<<<<
49960  *
49961  *     # Pointers
49962  */
49963 
49964 /* Python wrapper */
49965 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22collapse_loglikelihood_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22collapse_loglikelihood_1__get__(PyObject * __pyx_v_self)49966 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22collapse_loglikelihood_1__get__(PyObject *__pyx_v_self) {
49967   PyObject *__pyx_r = 0;
49968   __Pyx_RefNannyDeclarations
49969   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
49970   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22collapse_loglikelihood___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
49971 
49972   /* function exit code */
49973   __Pyx_RefNannyFinishContext();
49974   return __pyx_r;
49975 }
49976 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)49977 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22collapse_loglikelihood___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
49978   PyObject *__pyx_r = NULL;
49979   __Pyx_RefNannyDeclarations
49980   PyObject *__pyx_t_1 = NULL;
49981   int __pyx_lineno = 0;
49982   const char *__pyx_filename = NULL;
49983   int __pyx_clineno = 0;
49984   __Pyx_RefNannySetupContext("__get__", 0);
49985   __Pyx_XDECREF(__pyx_r);
49986   __pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_self->collapse_loglikelihood); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
49987   __Pyx_GOTREF(__pyx_t_1);
49988   __pyx_r = __pyx_t_1;
49989   __pyx_t_1 = 0;
49990   goto __pyx_L0;
49991 
49992   /* function exit code */
49993   __pyx_L1_error:;
49994   __Pyx_XDECREF(__pyx_t_1);
49995   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.collapse_loglikelihood.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
49996   __pyx_r = NULL;
49997   __pyx_L0:;
49998   __Pyx_XGIVEREF(__pyx_r);
49999   __Pyx_RefNannyFinishContext();
50000   return __pyx_r;
50001 }
50002 
50003 /* "statsmodels/tsa/statespace/_representation.pxd":304
50004  *
50005  *     # Current location
50006  *     cdef readonly int t             # <<<<<<<<<<<<<<
50007  *     cdef readonly int _previous_t
50008  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
50009  */
50010 
50011 /* Python wrapper */
50012 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1t_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1t_1__get__(PyObject * __pyx_v_self)50013 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1t_1__get__(PyObject *__pyx_v_self) {
50014   PyObject *__pyx_r = 0;
50015   __Pyx_RefNannyDeclarations
50016   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50017   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1t___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50018 
50019   /* function exit code */
50020   __Pyx_RefNannyFinishContext();
50021   return __pyx_r;
50022 }
50023 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50024 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50025   PyObject *__pyx_r = NULL;
50026   __Pyx_RefNannyDeclarations
50027   PyObject *__pyx_t_1 = NULL;
50028   int __pyx_lineno = 0;
50029   const char *__pyx_filename = NULL;
50030   int __pyx_clineno = 0;
50031   __Pyx_RefNannySetupContext("__get__", 0);
50032   __Pyx_XDECREF(__pyx_r);
50033   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 304, __pyx_L1_error)
50034   __Pyx_GOTREF(__pyx_t_1);
50035   __pyx_r = __pyx_t_1;
50036   __pyx_t_1 = 0;
50037   goto __pyx_L0;
50038 
50039   /* function exit code */
50040   __pyx_L1_error:;
50041   __Pyx_XDECREF(__pyx_t_1);
50042   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace.t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50043   __pyx_r = NULL;
50044   __pyx_L0:;
50045   __Pyx_XGIVEREF(__pyx_r);
50046   __Pyx_RefNannyFinishContext();
50047   return __pyx_r;
50048 }
50049 
50050 /* "statsmodels/tsa/statespace/_representation.pxd":305
50051  *     # Current location
50052  *     cdef readonly int t
50053  *     cdef readonly int _previous_t             # <<<<<<<<<<<<<<
50054  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
50055  *     cdef readonly int _nmissing
50056  */
50057 
50058 /* Python wrapper */
50059 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11_previous_t_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11_previous_t_1__get__(PyObject * __pyx_v_self)50060 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11_previous_t_1__get__(PyObject *__pyx_v_self) {
50061   PyObject *__pyx_r = 0;
50062   __Pyx_RefNannyDeclarations
50063   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50064   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11_previous_t___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50065 
50066   /* function exit code */
50067   __Pyx_RefNannyFinishContext();
50068   return __pyx_r;
50069 }
50070 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50071 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11_previous_t___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50072   PyObject *__pyx_r = NULL;
50073   __Pyx_RefNannyDeclarations
50074   PyObject *__pyx_t_1 = NULL;
50075   int __pyx_lineno = 0;
50076   const char *__pyx_filename = NULL;
50077   int __pyx_clineno = 0;
50078   __Pyx_RefNannySetupContext("__get__", 0);
50079   __Pyx_XDECREF(__pyx_r);
50080   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_previous_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 305, __pyx_L1_error)
50081   __Pyx_GOTREF(__pyx_t_1);
50082   __pyx_r = __pyx_t_1;
50083   __pyx_t_1 = 0;
50084   goto __pyx_L0;
50085 
50086   /* function exit code */
50087   __pyx_L1_error:;
50088   __Pyx_XDECREF(__pyx_t_1);
50089   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._previous_t.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50090   __pyx_r = NULL;
50091   __pyx_L0:;
50092   __Pyx_XGIVEREF(__pyx_r);
50093   __Pyx_RefNannyFinishContext();
50094   return __pyx_r;
50095 }
50096 
50097 /* "statsmodels/tsa/statespace/_representation.pxd":306
50098  *     cdef readonly int t
50099  *     cdef readonly int _previous_t
50100  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef             # <<<<<<<<<<<<<<
50101  *     cdef readonly int _nmissing
50102  *
50103  */
50104 
50105 /* Python wrapper */
50106 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8_k_endog_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8_k_endog_1__get__(PyObject * __pyx_v_self)50107 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8_k_endog_1__get__(PyObject *__pyx_v_self) {
50108   PyObject *__pyx_r = 0;
50109   __Pyx_RefNannyDeclarations
50110   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50111   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8_k_endog___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50112 
50113   /* function exit code */
50114   __Pyx_RefNannyFinishContext();
50115   return __pyx_r;
50116 }
50117 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50118 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8_k_endog___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50119   PyObject *__pyx_r = NULL;
50120   __Pyx_RefNannyDeclarations
50121   PyObject *__pyx_t_1 = NULL;
50122   int __pyx_lineno = 0;
50123   const char *__pyx_filename = NULL;
50124   int __pyx_clineno = 0;
50125   __Pyx_RefNannySetupContext("__get__", 0);
50126   __Pyx_XDECREF(__pyx_r);
50127   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endog); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
50128   __Pyx_GOTREF(__pyx_t_1);
50129   __pyx_r = __pyx_t_1;
50130   __pyx_t_1 = 0;
50131   goto __pyx_L0;
50132 
50133   /* function exit code */
50134   __pyx_L1_error:;
50135   __Pyx_XDECREF(__pyx_t_1);
50136   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._k_endog.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50137   __pyx_r = NULL;
50138   __pyx_L0:;
50139   __Pyx_XGIVEREF(__pyx_r);
50140   __Pyx_RefNannyFinishContext();
50141   return __pyx_r;
50142 }
50143 
50144 /* Python wrapper */
50145 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_states_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_states_1__get__(PyObject * __pyx_v_self)50146 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_states_1__get__(PyObject *__pyx_v_self) {
50147   PyObject *__pyx_r = 0;
50148   __Pyx_RefNannyDeclarations
50149   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50150   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_states___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50151 
50152   /* function exit code */
50153   __Pyx_RefNannyFinishContext();
50154   return __pyx_r;
50155 }
50156 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50157 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_states___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50158   PyObject *__pyx_r = NULL;
50159   __Pyx_RefNannyDeclarations
50160   PyObject *__pyx_t_1 = NULL;
50161   int __pyx_lineno = 0;
50162   const char *__pyx_filename = NULL;
50163   int __pyx_clineno = 0;
50164   __Pyx_RefNannySetupContext("__get__", 0);
50165   __Pyx_XDECREF(__pyx_r);
50166   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
50167   __Pyx_GOTREF(__pyx_t_1);
50168   __pyx_r = __pyx_t_1;
50169   __pyx_t_1 = 0;
50170   goto __pyx_L0;
50171 
50172   /* function exit code */
50173   __pyx_L1_error:;
50174   __Pyx_XDECREF(__pyx_t_1);
50175   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._k_states.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50176   __pyx_r = NULL;
50177   __pyx_L0:;
50178   __Pyx_XGIVEREF(__pyx_r);
50179   __Pyx_RefNannyFinishContext();
50180   return __pyx_r;
50181 }
50182 
50183 /* Python wrapper */
50184 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_posdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_posdef_1__get__(PyObject * __pyx_v_self)50185 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_posdef_1__get__(PyObject *__pyx_v_self) {
50186   PyObject *__pyx_r = 0;
50187   __Pyx_RefNannyDeclarations
50188   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50189   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_posdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50190 
50191   /* function exit code */
50192   __Pyx_RefNannyFinishContext();
50193   return __pyx_r;
50194 }
50195 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50196 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_posdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50197   PyObject *__pyx_r = NULL;
50198   __Pyx_RefNannyDeclarations
50199   PyObject *__pyx_t_1 = NULL;
50200   int __pyx_lineno = 0;
50201   const char *__pyx_filename = NULL;
50202   int __pyx_clineno = 0;
50203   __Pyx_RefNannySetupContext("__get__", 0);
50204   __Pyx_XDECREF(__pyx_r);
50205   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_posdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
50206   __Pyx_GOTREF(__pyx_t_1);
50207   __pyx_r = __pyx_t_1;
50208   __pyx_t_1 = 0;
50209   goto __pyx_L0;
50210 
50211   /* function exit code */
50212   __pyx_L1_error:;
50213   __Pyx_XDECREF(__pyx_t_1);
50214   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._k_posdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50215   __pyx_r = NULL;
50216   __pyx_L0:;
50217   __Pyx_XGIVEREF(__pyx_r);
50218   __Pyx_RefNannyFinishContext();
50219   return __pyx_r;
50220 }
50221 
50222 /* Python wrapper */
50223 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_endog2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_endog2_1__get__(PyObject * __pyx_v_self)50224 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_endog2_1__get__(PyObject *__pyx_v_self) {
50225   PyObject *__pyx_r = 0;
50226   __Pyx_RefNannyDeclarations
50227   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50228   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_endog2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50229 
50230   /* function exit code */
50231   __Pyx_RefNannyFinishContext();
50232   return __pyx_r;
50233 }
50234 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50235 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_endog2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50236   PyObject *__pyx_r = NULL;
50237   __Pyx_RefNannyDeclarations
50238   PyObject *__pyx_t_1 = NULL;
50239   int __pyx_lineno = 0;
50240   const char *__pyx_filename = NULL;
50241   int __pyx_clineno = 0;
50242   __Pyx_RefNannySetupContext("__get__", 0);
50243   __Pyx_XDECREF(__pyx_r);
50244   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endog2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
50245   __Pyx_GOTREF(__pyx_t_1);
50246   __pyx_r = __pyx_t_1;
50247   __pyx_t_1 = 0;
50248   goto __pyx_L0;
50249 
50250   /* function exit code */
50251   __pyx_L1_error:;
50252   __Pyx_XDECREF(__pyx_t_1);
50253   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._k_endog2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50254   __pyx_r = NULL;
50255   __pyx_L0:;
50256   __Pyx_XGIVEREF(__pyx_r);
50257   __Pyx_RefNannyFinishContext();
50258   return __pyx_r;
50259 }
50260 
50261 /* Python wrapper */
50262 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_states2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_states2_1__get__(PyObject * __pyx_v_self)50263 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_states2_1__get__(PyObject *__pyx_v_self) {
50264   PyObject *__pyx_r = 0;
50265   __Pyx_RefNannyDeclarations
50266   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50267   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_states2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50268 
50269   /* function exit code */
50270   __Pyx_RefNannyFinishContext();
50271   return __pyx_r;
50272 }
50273 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50274 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_states2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50275   PyObject *__pyx_r = NULL;
50276   __Pyx_RefNannyDeclarations
50277   PyObject *__pyx_t_1 = NULL;
50278   int __pyx_lineno = 0;
50279   const char *__pyx_filename = NULL;
50280   int __pyx_clineno = 0;
50281   __Pyx_RefNannySetupContext("__get__", 0);
50282   __Pyx_XDECREF(__pyx_r);
50283   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_states2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
50284   __Pyx_GOTREF(__pyx_t_1);
50285   __pyx_r = __pyx_t_1;
50286   __pyx_t_1 = 0;
50287   goto __pyx_L0;
50288 
50289   /* function exit code */
50290   __pyx_L1_error:;
50291   __Pyx_XDECREF(__pyx_t_1);
50292   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._k_states2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50293   __pyx_r = NULL;
50294   __pyx_L0:;
50295   __Pyx_XGIVEREF(__pyx_r);
50296   __Pyx_RefNannyFinishContext();
50297   return __pyx_r;
50298 }
50299 
50300 /* Python wrapper */
50301 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_posdef2_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_posdef2_1__get__(PyObject * __pyx_v_self)50302 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_posdef2_1__get__(PyObject *__pyx_v_self) {
50303   PyObject *__pyx_r = 0;
50304   __Pyx_RefNannyDeclarations
50305   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50306   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_posdef2___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50307 
50308   /* function exit code */
50309   __Pyx_RefNannyFinishContext();
50310   return __pyx_r;
50311 }
50312 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50313 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_posdef2___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50314   PyObject *__pyx_r = NULL;
50315   __Pyx_RefNannyDeclarations
50316   PyObject *__pyx_t_1 = NULL;
50317   int __pyx_lineno = 0;
50318   const char *__pyx_filename = NULL;
50319   int __pyx_clineno = 0;
50320   __Pyx_RefNannySetupContext("__get__", 0);
50321   __Pyx_XDECREF(__pyx_r);
50322   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_posdef2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
50323   __Pyx_GOTREF(__pyx_t_1);
50324   __pyx_r = __pyx_t_1;
50325   __pyx_t_1 = 0;
50326   goto __pyx_L0;
50327 
50328   /* function exit code */
50329   __pyx_L1_error:;
50330   __Pyx_XDECREF(__pyx_t_1);
50331   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._k_posdef2.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50332   __pyx_r = NULL;
50333   __pyx_L0:;
50334   __Pyx_XGIVEREF(__pyx_r);
50335   __Pyx_RefNannyFinishContext();
50336   return __pyx_r;
50337 }
50338 
50339 /* Python wrapper */
50340 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14_k_endogstates_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14_k_endogstates_1__get__(PyObject * __pyx_v_self)50341 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14_k_endogstates_1__get__(PyObject *__pyx_v_self) {
50342   PyObject *__pyx_r = 0;
50343   __Pyx_RefNannyDeclarations
50344   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50345   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14_k_endogstates___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50346 
50347   /* function exit code */
50348   __Pyx_RefNannyFinishContext();
50349   return __pyx_r;
50350 }
50351 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50352 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14_k_endogstates___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50353   PyObject *__pyx_r = NULL;
50354   __Pyx_RefNannyDeclarations
50355   PyObject *__pyx_t_1 = NULL;
50356   int __pyx_lineno = 0;
50357   const char *__pyx_filename = NULL;
50358   int __pyx_clineno = 0;
50359   __Pyx_RefNannySetupContext("__get__", 0);
50360   __Pyx_XDECREF(__pyx_r);
50361   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_endogstates); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
50362   __Pyx_GOTREF(__pyx_t_1);
50363   __pyx_r = __pyx_t_1;
50364   __pyx_t_1 = 0;
50365   goto __pyx_L0;
50366 
50367   /* function exit code */
50368   __pyx_L1_error:;
50369   __Pyx_XDECREF(__pyx_t_1);
50370   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._k_endogstates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50371   __pyx_r = NULL;
50372   __pyx_L0:;
50373   __Pyx_XGIVEREF(__pyx_r);
50374   __Pyx_RefNannyFinishContext();
50375   return __pyx_r;
50376 }
50377 
50378 /* Python wrapper */
50379 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15_k_statesposdef_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15_k_statesposdef_1__get__(PyObject * __pyx_v_self)50380 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15_k_statesposdef_1__get__(PyObject *__pyx_v_self) {
50381   PyObject *__pyx_r = 0;
50382   __Pyx_RefNannyDeclarations
50383   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50384   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15_k_statesposdef___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50385 
50386   /* function exit code */
50387   __Pyx_RefNannyFinishContext();
50388   return __pyx_r;
50389 }
50390 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50391 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15_k_statesposdef___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50392   PyObject *__pyx_r = NULL;
50393   __Pyx_RefNannyDeclarations
50394   PyObject *__pyx_t_1 = NULL;
50395   int __pyx_lineno = 0;
50396   const char *__pyx_filename = NULL;
50397   int __pyx_clineno = 0;
50398   __Pyx_RefNannySetupContext("__get__", 0);
50399   __Pyx_XDECREF(__pyx_r);
50400   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_k_statesposdef); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
50401   __Pyx_GOTREF(__pyx_t_1);
50402   __pyx_r = __pyx_t_1;
50403   __pyx_t_1 = 0;
50404   goto __pyx_L0;
50405 
50406   /* function exit code */
50407   __pyx_L1_error:;
50408   __Pyx_XDECREF(__pyx_t_1);
50409   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._k_statesposdef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50410   __pyx_r = NULL;
50411   __pyx_L0:;
50412   __Pyx_XGIVEREF(__pyx_r);
50413   __Pyx_RefNannyFinishContext();
50414   return __pyx_r;
50415 }
50416 
50417 /* "statsmodels/tsa/statespace/_representation.pxd":307
50418  *     cdef readonly int _previous_t
50419  *     cdef readonly int _k_endog, _k_states, _k_posdef, _k_endog2, _k_states2, _k_posdef2, _k_endogstates, _k_statesposdef
50420  *     cdef readonly int _nmissing             # <<<<<<<<<<<<<<
50421  *
50422  *     # Functions
50423  */
50424 
50425 /* Python wrapper */
50426 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_nmissing_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_nmissing_1__get__(PyObject * __pyx_v_self)50427 static PyObject *__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_nmissing_1__get__(PyObject *__pyx_v_self) {
50428   PyObject *__pyx_r = 0;
50429   __Pyx_RefNannyDeclarations
50430   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
50431   __pyx_r = __pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_nmissing___get__(((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)__pyx_v_self));
50432 
50433   /* function exit code */
50434   __Pyx_RefNannyFinishContext();
50435   return __pyx_r;
50436 }
50437 
__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace * __pyx_v_self)50438 static PyObject *__pyx_pf_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_nmissing___get__(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *__pyx_v_self) {
50439   PyObject *__pyx_r = NULL;
50440   __Pyx_RefNannyDeclarations
50441   PyObject *__pyx_t_1 = NULL;
50442   int __pyx_lineno = 0;
50443   const char *__pyx_filename = NULL;
50444   int __pyx_clineno = 0;
50445   __Pyx_RefNannySetupContext("__get__", 0);
50446   __Pyx_XDECREF(__pyx_r);
50447   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_nmissing); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 307, __pyx_L1_error)
50448   __Pyx_GOTREF(__pyx_t_1);
50449   __pyx_r = __pyx_t_1;
50450   __pyx_t_1 = 0;
50451   goto __pyx_L0;
50452 
50453   /* function exit code */
50454   __pyx_L1_error:;
50455   __Pyx_XDECREF(__pyx_t_1);
50456   __Pyx_AddTraceback("statsmodels.tsa.statespace._representation.zStatespace._nmissing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
50457   __pyx_r = NULL;
50458   __pyx_L0:;
50459   __Pyx_XGIVEREF(__pyx_r);
50460   __Pyx_RefNannyFinishContext();
50461   return __pyx_r;
50462 }
50463 
50464 /* "statsmodels/tsa/statespace/_representation.pyx":3980
50465  *
50466  * # ### Selected covariance matrice
50467  * cdef int zselect_cov(int k, int k_posdef,             # <<<<<<<<<<<<<<
50468  *                               np.complex128_t * tmp,
50469  *                               np.complex128_t * selection,
50470  */
50471 
__pyx_f_11statsmodels_3tsa_10statespace_15_representation_zselect_cov(int __pyx_v_k,int __pyx_v_k_posdef,__pyx_t_double_complex * __pyx_v_tmp,__pyx_t_double_complex * __pyx_v_selection,__pyx_t_double_complex * __pyx_v_cov,__pyx_t_double_complex * __pyx_v_selected_cov)50472 static int __pyx_f_11statsmodels_3tsa_10statespace_15_representation_zselect_cov(int __pyx_v_k, int __pyx_v_k_posdef, __pyx_t_double_complex *__pyx_v_tmp, __pyx_t_double_complex *__pyx_v_selection, __pyx_t_double_complex *__pyx_v_cov, __pyx_t_double_complex *__pyx_v_selected_cov) {
50473   __pyx_t_double_complex __pyx_v_alpha;
50474   __pyx_t_double_complex __pyx_v_beta;
50475   int __pyx_r;
50476   __Pyx_RefNannyDeclarations
50477   int __pyx_t_1;
50478   __Pyx_RefNannySetupContext("zselect_cov", 0);
50479 
50480   /* "statsmodels/tsa/statespace/_representation.pyx":3986
50481  *                               np.complex128_t * selected_cov):
50482  *     cdef:
50483  *         np.complex128_t alpha = 1.0             # <<<<<<<<<<<<<<
50484  *         np.complex128_t beta = 0.0
50485  *
50486  */
50487   __pyx_v_alpha = __pyx_t_double_complex_from_parts(1.0, 0);
50488 
50489   /* "statsmodels/tsa/statespace/_representation.pyx":3987
50490  *     cdef:
50491  *         np.complex128_t alpha = 1.0
50492  *         np.complex128_t beta = 0.0             # <<<<<<<<<<<<<<
50493  *
50494  *     # Only need to do something if there is a covariance matrix
50495  */
50496   __pyx_v_beta = __pyx_t_double_complex_from_parts(0.0, 0);
50497 
50498   /* "statsmodels/tsa/statespace/_representation.pyx":3991
50499  *     # Only need to do something if there is a covariance matrix
50500  *     # (i.e k_posdof == 0)
50501  *     if k_posdef > 0:             # <<<<<<<<<<<<<<
50502  *
50503  *         # #### Calculate selected state covariance matrix
50504  */
50505   __pyx_t_1 = ((__pyx_v_k_posdef > 0) != 0);
50506   if (__pyx_t_1) {
50507 
50508     /* "statsmodels/tsa/statespace/_representation.pyx":4007
50509  *         # $\\#_0 = 1.0 * R_t Q_t$
50510  *         # $(m \times r) = (m \times r) (r \times r)$
50511  *         blas.zgemm("N", "N", &k, &k_posdef, &k_posdef,             # <<<<<<<<<<<<<<
50512  *               &alpha, selection, &k,
50513  *                       cov, &k_posdef,
50514  */
50515     __pyx_f_5scipy_6linalg_11cython_blas_zgemm(((char *)"N"), ((char *)"N"), (&__pyx_v_k), (&__pyx_v_k_posdef), (&__pyx_v_k_posdef), (&__pyx_v_alpha), __pyx_v_selection, (&__pyx_v_k), __pyx_v_cov, (&__pyx_v_k_posdef), (&__pyx_v_beta), __pyx_v_tmp, (&__pyx_v_k));
50516 
50517     /* "statsmodels/tsa/statespace/_representation.pyx":4013
50518  *         # $Q_t^* = 1.0 * \\#_0 R_t'$
50519  *         # $(m \times m) = (m \times r) (m \times r)'$
50520  *         blas.zgemm("N", "T", &k, &k, &k_posdef,             # <<<<<<<<<<<<<<
50521  *               &alpha, tmp, &k,
50522  *                       selection, &k,
50523  */
50524     __pyx_f_5scipy_6linalg_11cython_blas_zgemm(((char *)"N"), ((char *)"T"), (&__pyx_v_k), (&__pyx_v_k), (&__pyx_v_k_posdef), (&__pyx_v_alpha), __pyx_v_tmp, (&__pyx_v_k), __pyx_v_selection, (&__pyx_v_k), (&__pyx_v_beta), __pyx_v_selected_cov, (&__pyx_v_k));
50525 
50526     /* "statsmodels/tsa/statespace/_representation.pyx":3991
50527  *     # Only need to do something if there is a covariance matrix
50528  *     # (i.e k_posdof == 0)
50529  *     if k_posdef > 0:             # <<<<<<<<<<<<<<
50530  *
50531  *         # #### Calculate selected state covariance matrix
50532  */
50533   }
50534 
50535   /* "statsmodels/tsa/statespace/_representation.pyx":3980
50536  *
50537  * # ### Selected covariance matrice
50538  * cdef int zselect_cov(int k, int k_posdef,             # <<<<<<<<<<<<<<
50539  *                               np.complex128_t * tmp,
50540  *                               np.complex128_t * selection,
50541  */
50542 
50543   /* function exit code */
50544   __pyx_r = 0;
50545   __Pyx_RefNannyFinishContext();
50546   return __pyx_r;
50547 }
50548 
50549 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":735
50550  * ctypedef npy_cdouble     complex_t
50551  *
50552  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
50553  *     return PyArray_MultiIterNew(1, <void*>a)
50554  *
50555  */
50556 
__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject * __pyx_v_a)50557 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
50558   PyObject *__pyx_r = NULL;
50559   __Pyx_RefNannyDeclarations
50560   PyObject *__pyx_t_1 = NULL;
50561   int __pyx_lineno = 0;
50562   const char *__pyx_filename = NULL;
50563   int __pyx_clineno = 0;
50564   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
50565 
50566   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":736
50567  *
50568  * cdef inline object PyArray_MultiIterNew1(a):
50569  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
50570  *
50571  * cdef inline object PyArray_MultiIterNew2(a, b):
50572  */
50573   __Pyx_XDECREF(__pyx_r);
50574   __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error)
50575   __Pyx_GOTREF(__pyx_t_1);
50576   __pyx_r = __pyx_t_1;
50577   __pyx_t_1 = 0;
50578   goto __pyx_L0;
50579 
50580   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":735
50581  * ctypedef npy_cdouble     complex_t
50582  *
50583  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
50584  *     return PyArray_MultiIterNew(1, <void*>a)
50585  *
50586  */
50587 
50588   /* function exit code */
50589   __pyx_L1_error:;
50590   __Pyx_XDECREF(__pyx_t_1);
50591   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
50592   __pyx_r = 0;
50593   __pyx_L0:;
50594   __Pyx_XGIVEREF(__pyx_r);
50595   __Pyx_RefNannyFinishContext();
50596   return __pyx_r;
50597 }
50598 
50599 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":738
50600  *     return PyArray_MultiIterNew(1, <void*>a)
50601  *
50602  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
50603  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
50604  *
50605  */
50606 
__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject * __pyx_v_a,PyObject * __pyx_v_b)50607 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
50608   PyObject *__pyx_r = NULL;
50609   __Pyx_RefNannyDeclarations
50610   PyObject *__pyx_t_1 = NULL;
50611   int __pyx_lineno = 0;
50612   const char *__pyx_filename = NULL;
50613   int __pyx_clineno = 0;
50614   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
50615 
50616   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":739
50617  *
50618  * cdef inline object PyArray_MultiIterNew2(a, b):
50619  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
50620  *
50621  * cdef inline object PyArray_MultiIterNew3(a, b, c):
50622  */
50623   __Pyx_XDECREF(__pyx_r);
50624   __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error)
50625   __Pyx_GOTREF(__pyx_t_1);
50626   __pyx_r = __pyx_t_1;
50627   __pyx_t_1 = 0;
50628   goto __pyx_L0;
50629 
50630   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":738
50631  *     return PyArray_MultiIterNew(1, <void*>a)
50632  *
50633  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
50634  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
50635  *
50636  */
50637 
50638   /* function exit code */
50639   __pyx_L1_error:;
50640   __Pyx_XDECREF(__pyx_t_1);
50641   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
50642   __pyx_r = 0;
50643   __pyx_L0:;
50644   __Pyx_XGIVEREF(__pyx_r);
50645   __Pyx_RefNannyFinishContext();
50646   return __pyx_r;
50647 }
50648 
50649 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":741
50650  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
50651  *
50652  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
50653  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
50654  *
50655  */
50656 
__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c)50657 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
50658   PyObject *__pyx_r = NULL;
50659   __Pyx_RefNannyDeclarations
50660   PyObject *__pyx_t_1 = NULL;
50661   int __pyx_lineno = 0;
50662   const char *__pyx_filename = NULL;
50663   int __pyx_clineno = 0;
50664   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
50665 
50666   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":742
50667  *
50668  * cdef inline object PyArray_MultiIterNew3(a, b, c):
50669  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
50670  *
50671  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
50672  */
50673   __Pyx_XDECREF(__pyx_r);
50674   __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error)
50675   __Pyx_GOTREF(__pyx_t_1);
50676   __pyx_r = __pyx_t_1;
50677   __pyx_t_1 = 0;
50678   goto __pyx_L0;
50679 
50680   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":741
50681  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
50682  *
50683  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
50684  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
50685  *
50686  */
50687 
50688   /* function exit code */
50689   __pyx_L1_error:;
50690   __Pyx_XDECREF(__pyx_t_1);
50691   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
50692   __pyx_r = 0;
50693   __pyx_L0:;
50694   __Pyx_XGIVEREF(__pyx_r);
50695   __Pyx_RefNannyFinishContext();
50696   return __pyx_r;
50697 }
50698 
50699 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":744
50700  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
50701  *
50702  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
50703  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
50704  *
50705  */
50706 
__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d)50707 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
50708   PyObject *__pyx_r = NULL;
50709   __Pyx_RefNannyDeclarations
50710   PyObject *__pyx_t_1 = NULL;
50711   int __pyx_lineno = 0;
50712   const char *__pyx_filename = NULL;
50713   int __pyx_clineno = 0;
50714   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
50715 
50716   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":745
50717  *
50718  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
50719  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
50720  *
50721  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
50722  */
50723   __Pyx_XDECREF(__pyx_r);
50724   __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error)
50725   __Pyx_GOTREF(__pyx_t_1);
50726   __pyx_r = __pyx_t_1;
50727   __pyx_t_1 = 0;
50728   goto __pyx_L0;
50729 
50730   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":744
50731  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
50732  *
50733  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
50734  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
50735  *
50736  */
50737 
50738   /* function exit code */
50739   __pyx_L1_error:;
50740   __Pyx_XDECREF(__pyx_t_1);
50741   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
50742   __pyx_r = 0;
50743   __pyx_L0:;
50744   __Pyx_XGIVEREF(__pyx_r);
50745   __Pyx_RefNannyFinishContext();
50746   return __pyx_r;
50747 }
50748 
50749 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":747
50750  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
50751  *
50752  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
50753  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
50754  *
50755  */
50756 
__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d,PyObject * __pyx_v_e)50757 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
50758   PyObject *__pyx_r = NULL;
50759   __Pyx_RefNannyDeclarations
50760   PyObject *__pyx_t_1 = NULL;
50761   int __pyx_lineno = 0;
50762   const char *__pyx_filename = NULL;
50763   int __pyx_clineno = 0;
50764   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
50765 
50766   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":748
50767  *
50768  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
50769  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
50770  *
50771  * cdef inline tuple PyDataType_SHAPE(dtype d):
50772  */
50773   __Pyx_XDECREF(__pyx_r);
50774   __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error)
50775   __Pyx_GOTREF(__pyx_t_1);
50776   __pyx_r = __pyx_t_1;
50777   __pyx_t_1 = 0;
50778   goto __pyx_L0;
50779 
50780   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":747
50781  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
50782  *
50783  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
50784  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
50785  *
50786  */
50787 
50788   /* function exit code */
50789   __pyx_L1_error:;
50790   __Pyx_XDECREF(__pyx_t_1);
50791   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
50792   __pyx_r = 0;
50793   __pyx_L0:;
50794   __Pyx_XGIVEREF(__pyx_r);
50795   __Pyx_RefNannyFinishContext();
50796   return __pyx_r;
50797 }
50798 
50799 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":750
50800  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
50801  *
50802  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
50803  *     if PyDataType_HASSUBARRAY(d):
50804  *         return <tuple>d.subarray.shape
50805  */
50806 
__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr * __pyx_v_d)50807 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
50808   PyObject *__pyx_r = NULL;
50809   __Pyx_RefNannyDeclarations
50810   int __pyx_t_1;
50811   __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
50812 
50813   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":751
50814  *
50815  * cdef inline tuple PyDataType_SHAPE(dtype d):
50816  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
50817  *         return <tuple>d.subarray.shape
50818  *     else:
50819  */
50820   __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
50821   if (__pyx_t_1) {
50822 
50823     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":752
50824  * cdef inline tuple PyDataType_SHAPE(dtype d):
50825  *     if PyDataType_HASSUBARRAY(d):
50826  *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
50827  *     else:
50828  *         return ()
50829  */
50830     __Pyx_XDECREF(__pyx_r);
50831     __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
50832     __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
50833     goto __pyx_L0;
50834 
50835     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":751
50836  *
50837  * cdef inline tuple PyDataType_SHAPE(dtype d):
50838  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
50839  *         return <tuple>d.subarray.shape
50840  *     else:
50841  */
50842   }
50843 
50844   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":754
50845  *         return <tuple>d.subarray.shape
50846  *     else:
50847  *         return ()             # <<<<<<<<<<<<<<
50848  *
50849  *
50850  */
50851   /*else*/ {
50852     __Pyx_XDECREF(__pyx_r);
50853     __Pyx_INCREF(__pyx_empty_tuple);
50854     __pyx_r = __pyx_empty_tuple;
50855     goto __pyx_L0;
50856   }
50857 
50858   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":750
50859  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
50860  *
50861  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
50862  *     if PyDataType_HASSUBARRAY(d):
50863  *         return <tuple>d.subarray.shape
50864  */
50865 
50866   /* function exit code */
50867   __pyx_L0:;
50868   __Pyx_XGIVEREF(__pyx_r);
50869   __Pyx_RefNannyFinishContext();
50870   return __pyx_r;
50871 }
50872 
50873 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":929
50874  *     int _import_umath() except -1
50875  *
50876  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
50877  *     Py_INCREF(base) # important to do this before stealing the reference below!
50878  *     PyArray_SetBaseObject(arr, base)
50879  */
50880 
__pyx_f_5numpy_set_array_base(PyArrayObject * __pyx_v_arr,PyObject * __pyx_v_base)50881 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
50882   __Pyx_RefNannyDeclarations
50883   __Pyx_RefNannySetupContext("set_array_base", 0);
50884 
50885   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":930
50886  *
50887  * cdef inline void set_array_base(ndarray arr, object base):
50888  *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
50889  *     PyArray_SetBaseObject(arr, base)
50890  *
50891  */
50892   Py_INCREF(__pyx_v_base);
50893 
50894   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":931
50895  * cdef inline void set_array_base(ndarray arr, object base):
50896  *     Py_INCREF(base) # important to do this before stealing the reference below!
50897  *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
50898  *
50899  * cdef inline object get_array_base(ndarray arr):
50900  */
50901   (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
50902 
50903   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":929
50904  *     int _import_umath() except -1
50905  *
50906  * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
50907  *     Py_INCREF(base) # important to do this before stealing the reference below!
50908  *     PyArray_SetBaseObject(arr, base)
50909  */
50910 
50911   /* function exit code */
50912   __Pyx_RefNannyFinishContext();
50913 }
50914 
50915 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":933
50916  *     PyArray_SetBaseObject(arr, base)
50917  *
50918  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
50919  *     base = PyArray_BASE(arr)
50920  *     if base is NULL:
50921  */
50922 
__pyx_f_5numpy_get_array_base(PyArrayObject * __pyx_v_arr)50923 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
50924   PyObject *__pyx_v_base;
50925   PyObject *__pyx_r = NULL;
50926   __Pyx_RefNannyDeclarations
50927   int __pyx_t_1;
50928   __Pyx_RefNannySetupContext("get_array_base", 0);
50929 
50930   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":934
50931  *
50932  * cdef inline object get_array_base(ndarray arr):
50933  *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
50934  *     if base is NULL:
50935  *         return None
50936  */
50937   __pyx_v_base = PyArray_BASE(__pyx_v_arr);
50938 
50939   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":935
50940  * cdef inline object get_array_base(ndarray arr):
50941  *     base = PyArray_BASE(arr)
50942  *     if base is NULL:             # <<<<<<<<<<<<<<
50943  *         return None
50944  *     return <object>base
50945  */
50946   __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
50947   if (__pyx_t_1) {
50948 
50949     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":936
50950  *     base = PyArray_BASE(arr)
50951  *     if base is NULL:
50952  *         return None             # <<<<<<<<<<<<<<
50953  *     return <object>base
50954  *
50955  */
50956     __Pyx_XDECREF(__pyx_r);
50957     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
50958     goto __pyx_L0;
50959 
50960     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":935
50961  * cdef inline object get_array_base(ndarray arr):
50962  *     base = PyArray_BASE(arr)
50963  *     if base is NULL:             # <<<<<<<<<<<<<<
50964  *         return None
50965  *     return <object>base
50966  */
50967   }
50968 
50969   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":937
50970  *     if base is NULL:
50971  *         return None
50972  *     return <object>base             # <<<<<<<<<<<<<<
50973  *
50974  * # Versions of the import_* functions which are more suitable for
50975  */
50976   __Pyx_XDECREF(__pyx_r);
50977   __Pyx_INCREF(((PyObject *)__pyx_v_base));
50978   __pyx_r = ((PyObject *)__pyx_v_base);
50979   goto __pyx_L0;
50980 
50981   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":933
50982  *     PyArray_SetBaseObject(arr, base)
50983  *
50984  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
50985  *     base = PyArray_BASE(arr)
50986  *     if base is NULL:
50987  */
50988 
50989   /* function exit code */
50990   __pyx_L0:;
50991   __Pyx_XGIVEREF(__pyx_r);
50992   __Pyx_RefNannyFinishContext();
50993   return __pyx_r;
50994 }
50995 
50996 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":941
50997  * # Versions of the import_* functions which are more suitable for
50998  * # Cython code.
50999  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
51000  *     try:
51001  *         __pyx_import_array()
51002  */
51003 
__pyx_f_5numpy_import_array(void)51004 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
51005   int __pyx_r;
51006   __Pyx_RefNannyDeclarations
51007   PyObject *__pyx_t_1 = NULL;
51008   PyObject *__pyx_t_2 = NULL;
51009   PyObject *__pyx_t_3 = NULL;
51010   int __pyx_t_4;
51011   PyObject *__pyx_t_5 = NULL;
51012   PyObject *__pyx_t_6 = NULL;
51013   PyObject *__pyx_t_7 = NULL;
51014   PyObject *__pyx_t_8 = NULL;
51015   int __pyx_lineno = 0;
51016   const char *__pyx_filename = NULL;
51017   int __pyx_clineno = 0;
51018   __Pyx_RefNannySetupContext("import_array", 0);
51019 
51020   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":942
51021  * # Cython code.
51022  * cdef inline int import_array() except -1:
51023  *     try:             # <<<<<<<<<<<<<<
51024  *         __pyx_import_array()
51025  *     except Exception:
51026  */
51027   {
51028     __Pyx_PyThreadState_declare
51029     __Pyx_PyThreadState_assign
51030     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
51031     __Pyx_XGOTREF(__pyx_t_1);
51032     __Pyx_XGOTREF(__pyx_t_2);
51033     __Pyx_XGOTREF(__pyx_t_3);
51034     /*try:*/ {
51035 
51036       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":943
51037  * cdef inline int import_array() except -1:
51038  *     try:
51039  *         __pyx_import_array()             # <<<<<<<<<<<<<<
51040  *     except Exception:
51041  *         raise ImportError("numpy.core.multiarray failed to import")
51042  */
51043       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error)
51044 
51045       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":942
51046  * # Cython code.
51047  * cdef inline int import_array() except -1:
51048  *     try:             # <<<<<<<<<<<<<<
51049  *         __pyx_import_array()
51050  *     except Exception:
51051  */
51052     }
51053     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
51054     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51055     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51056     goto __pyx_L8_try_end;
51057     __pyx_L3_error:;
51058 
51059     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":944
51060  *     try:
51061  *         __pyx_import_array()
51062  *     except Exception:             # <<<<<<<<<<<<<<
51063  *         raise ImportError("numpy.core.multiarray failed to import")
51064  *
51065  */
51066     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
51067     if (__pyx_t_4) {
51068       __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
51069       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error)
51070       __Pyx_GOTREF(__pyx_t_5);
51071       __Pyx_GOTREF(__pyx_t_6);
51072       __Pyx_GOTREF(__pyx_t_7);
51073 
51074       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":945
51075  *         __pyx_import_array()
51076  *     except Exception:
51077  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
51078  *
51079  * cdef inline int import_umath() except -1:
51080  */
51081       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error)
51082       __Pyx_GOTREF(__pyx_t_8);
51083       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
51084       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
51085       __PYX_ERR(2, 945, __pyx_L5_except_error)
51086     }
51087     goto __pyx_L5_except_error;
51088     __pyx_L5_except_error:;
51089 
51090     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":942
51091  * # Cython code.
51092  * cdef inline int import_array() except -1:
51093  *     try:             # <<<<<<<<<<<<<<
51094  *         __pyx_import_array()
51095  *     except Exception:
51096  */
51097     __Pyx_XGIVEREF(__pyx_t_1);
51098     __Pyx_XGIVEREF(__pyx_t_2);
51099     __Pyx_XGIVEREF(__pyx_t_3);
51100     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
51101     goto __pyx_L1_error;
51102     __pyx_L8_try_end:;
51103   }
51104 
51105   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":941
51106  * # Versions of the import_* functions which are more suitable for
51107  * # Cython code.
51108  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
51109  *     try:
51110  *         __pyx_import_array()
51111  */
51112 
51113   /* function exit code */
51114   __pyx_r = 0;
51115   goto __pyx_L0;
51116   __pyx_L1_error:;
51117   __Pyx_XDECREF(__pyx_t_5);
51118   __Pyx_XDECREF(__pyx_t_6);
51119   __Pyx_XDECREF(__pyx_t_7);
51120   __Pyx_XDECREF(__pyx_t_8);
51121   __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
51122   __pyx_r = -1;
51123   __pyx_L0:;
51124   __Pyx_RefNannyFinishContext();
51125   return __pyx_r;
51126 }
51127 
51128 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":947
51129  *         raise ImportError("numpy.core.multiarray failed to import")
51130  *
51131  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
51132  *     try:
51133  *         _import_umath()
51134  */
51135 
__pyx_f_5numpy_import_umath(void)51136 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
51137   int __pyx_r;
51138   __Pyx_RefNannyDeclarations
51139   PyObject *__pyx_t_1 = NULL;
51140   PyObject *__pyx_t_2 = NULL;
51141   PyObject *__pyx_t_3 = NULL;
51142   int __pyx_t_4;
51143   PyObject *__pyx_t_5 = NULL;
51144   PyObject *__pyx_t_6 = NULL;
51145   PyObject *__pyx_t_7 = NULL;
51146   PyObject *__pyx_t_8 = NULL;
51147   int __pyx_lineno = 0;
51148   const char *__pyx_filename = NULL;
51149   int __pyx_clineno = 0;
51150   __Pyx_RefNannySetupContext("import_umath", 0);
51151 
51152   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":948
51153  *
51154  * cdef inline int import_umath() except -1:
51155  *     try:             # <<<<<<<<<<<<<<
51156  *         _import_umath()
51157  *     except Exception:
51158  */
51159   {
51160     __Pyx_PyThreadState_declare
51161     __Pyx_PyThreadState_assign
51162     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
51163     __Pyx_XGOTREF(__pyx_t_1);
51164     __Pyx_XGOTREF(__pyx_t_2);
51165     __Pyx_XGOTREF(__pyx_t_3);
51166     /*try:*/ {
51167 
51168       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":949
51169  * cdef inline int import_umath() except -1:
51170  *     try:
51171  *         _import_umath()             # <<<<<<<<<<<<<<
51172  *     except Exception:
51173  *         raise ImportError("numpy.core.umath failed to import")
51174  */
51175       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error)
51176 
51177       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":948
51178  *
51179  * cdef inline int import_umath() except -1:
51180  *     try:             # <<<<<<<<<<<<<<
51181  *         _import_umath()
51182  *     except Exception:
51183  */
51184     }
51185     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
51186     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51187     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51188     goto __pyx_L8_try_end;
51189     __pyx_L3_error:;
51190 
51191     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":950
51192  *     try:
51193  *         _import_umath()
51194  *     except Exception:             # <<<<<<<<<<<<<<
51195  *         raise ImportError("numpy.core.umath failed to import")
51196  *
51197  */
51198     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
51199     if (__pyx_t_4) {
51200       __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
51201       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error)
51202       __Pyx_GOTREF(__pyx_t_5);
51203       __Pyx_GOTREF(__pyx_t_6);
51204       __Pyx_GOTREF(__pyx_t_7);
51205 
51206       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":951
51207  *         _import_umath()
51208  *     except Exception:
51209  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
51210  *
51211  * cdef inline int import_ufunc() except -1:
51212  */
51213       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error)
51214       __Pyx_GOTREF(__pyx_t_8);
51215       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
51216       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
51217       __PYX_ERR(2, 951, __pyx_L5_except_error)
51218     }
51219     goto __pyx_L5_except_error;
51220     __pyx_L5_except_error:;
51221 
51222     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":948
51223  *
51224  * cdef inline int import_umath() except -1:
51225  *     try:             # <<<<<<<<<<<<<<
51226  *         _import_umath()
51227  *     except Exception:
51228  */
51229     __Pyx_XGIVEREF(__pyx_t_1);
51230     __Pyx_XGIVEREF(__pyx_t_2);
51231     __Pyx_XGIVEREF(__pyx_t_3);
51232     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
51233     goto __pyx_L1_error;
51234     __pyx_L8_try_end:;
51235   }
51236 
51237   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":947
51238  *         raise ImportError("numpy.core.multiarray failed to import")
51239  *
51240  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
51241  *     try:
51242  *         _import_umath()
51243  */
51244 
51245   /* function exit code */
51246   __pyx_r = 0;
51247   goto __pyx_L0;
51248   __pyx_L1_error:;
51249   __Pyx_XDECREF(__pyx_t_5);
51250   __Pyx_XDECREF(__pyx_t_6);
51251   __Pyx_XDECREF(__pyx_t_7);
51252   __Pyx_XDECREF(__pyx_t_8);
51253   __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
51254   __pyx_r = -1;
51255   __pyx_L0:;
51256   __Pyx_RefNannyFinishContext();
51257   return __pyx_r;
51258 }
51259 
51260 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":953
51261  *         raise ImportError("numpy.core.umath failed to import")
51262  *
51263  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
51264  *     try:
51265  *         _import_umath()
51266  */
51267 
__pyx_f_5numpy_import_ufunc(void)51268 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
51269   int __pyx_r;
51270   __Pyx_RefNannyDeclarations
51271   PyObject *__pyx_t_1 = NULL;
51272   PyObject *__pyx_t_2 = NULL;
51273   PyObject *__pyx_t_3 = NULL;
51274   int __pyx_t_4;
51275   PyObject *__pyx_t_5 = NULL;
51276   PyObject *__pyx_t_6 = NULL;
51277   PyObject *__pyx_t_7 = NULL;
51278   PyObject *__pyx_t_8 = NULL;
51279   int __pyx_lineno = 0;
51280   const char *__pyx_filename = NULL;
51281   int __pyx_clineno = 0;
51282   __Pyx_RefNannySetupContext("import_ufunc", 0);
51283 
51284   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":954
51285  *
51286  * cdef inline int import_ufunc() except -1:
51287  *     try:             # <<<<<<<<<<<<<<
51288  *         _import_umath()
51289  *     except Exception:
51290  */
51291   {
51292     __Pyx_PyThreadState_declare
51293     __Pyx_PyThreadState_assign
51294     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
51295     __Pyx_XGOTREF(__pyx_t_1);
51296     __Pyx_XGOTREF(__pyx_t_2);
51297     __Pyx_XGOTREF(__pyx_t_3);
51298     /*try:*/ {
51299 
51300       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":955
51301  * cdef inline int import_ufunc() except -1:
51302  *     try:
51303  *         _import_umath()             # <<<<<<<<<<<<<<
51304  *     except Exception:
51305  *         raise ImportError("numpy.core.umath failed to import")
51306  */
51307       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error)
51308 
51309       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":954
51310  *
51311  * cdef inline int import_ufunc() except -1:
51312  *     try:             # <<<<<<<<<<<<<<
51313  *         _import_umath()
51314  *     except Exception:
51315  */
51316     }
51317     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
51318     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51319     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51320     goto __pyx_L8_try_end;
51321     __pyx_L3_error:;
51322 
51323     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":956
51324  *     try:
51325  *         _import_umath()
51326  *     except Exception:             # <<<<<<<<<<<<<<
51327  *         raise ImportError("numpy.core.umath failed to import")
51328  *
51329  */
51330     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
51331     if (__pyx_t_4) {
51332       __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
51333       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error)
51334       __Pyx_GOTREF(__pyx_t_5);
51335       __Pyx_GOTREF(__pyx_t_6);
51336       __Pyx_GOTREF(__pyx_t_7);
51337 
51338       /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":957
51339  *         _import_umath()
51340  *     except Exception:
51341  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
51342  *
51343  * cdef extern from *:
51344  */
51345       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error)
51346       __Pyx_GOTREF(__pyx_t_8);
51347       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
51348       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
51349       __PYX_ERR(2, 957, __pyx_L5_except_error)
51350     }
51351     goto __pyx_L5_except_error;
51352     __pyx_L5_except_error:;
51353 
51354     /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":954
51355  *
51356  * cdef inline int import_ufunc() except -1:
51357  *     try:             # <<<<<<<<<<<<<<
51358  *         _import_umath()
51359  *     except Exception:
51360  */
51361     __Pyx_XGIVEREF(__pyx_t_1);
51362     __Pyx_XGIVEREF(__pyx_t_2);
51363     __Pyx_XGIVEREF(__pyx_t_3);
51364     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
51365     goto __pyx_L1_error;
51366     __pyx_L8_try_end:;
51367   }
51368 
51369   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":953
51370  *         raise ImportError("numpy.core.umath failed to import")
51371  *
51372  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
51373  *     try:
51374  *         _import_umath()
51375  */
51376 
51377   /* function exit code */
51378   __pyx_r = 0;
51379   goto __pyx_L0;
51380   __pyx_L1_error:;
51381   __Pyx_XDECREF(__pyx_t_5);
51382   __Pyx_XDECREF(__pyx_t_6);
51383   __Pyx_XDECREF(__pyx_t_7);
51384   __Pyx_XDECREF(__pyx_t_8);
51385   __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
51386   __pyx_r = -1;
51387   __pyx_L0:;
51388   __Pyx_RefNannyFinishContext();
51389   return __pyx_r;
51390 }
51391 
51392 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":967
51393  *
51394  *
51395  * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
51396  *     """
51397  *     Cython equivalent of `isinstance(obj, np.timedelta64)`
51398  */
51399 
__pyx_f_5numpy_is_timedelta64_object(PyObject * __pyx_v_obj)51400 static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
51401   int __pyx_r;
51402   __Pyx_RefNannyDeclarations
51403   __Pyx_RefNannySetupContext("is_timedelta64_object", 0);
51404 
51405   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":979
51406  *     bool
51407  *     """
51408  *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
51409  *
51410  *
51411  */
51412   __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
51413   goto __pyx_L0;
51414 
51415   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":967
51416  *
51417  *
51418  * cdef inline bint is_timedelta64_object(object obj):             # <<<<<<<<<<<<<<
51419  *     """
51420  *     Cython equivalent of `isinstance(obj, np.timedelta64)`
51421  */
51422 
51423   /* function exit code */
51424   __pyx_L0:;
51425   __Pyx_RefNannyFinishContext();
51426   return __pyx_r;
51427 }
51428 
51429 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":982
51430  *
51431  *
51432  * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
51433  *     """
51434  *     Cython equivalent of `isinstance(obj, np.datetime64)`
51435  */
51436 
__pyx_f_5numpy_is_datetime64_object(PyObject * __pyx_v_obj)51437 static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
51438   int __pyx_r;
51439   __Pyx_RefNannyDeclarations
51440   __Pyx_RefNannySetupContext("is_datetime64_object", 0);
51441 
51442   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":994
51443  *     bool
51444  *     """
51445  *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
51446  *
51447  *
51448  */
51449   __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
51450   goto __pyx_L0;
51451 
51452   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":982
51453  *
51454  *
51455  * cdef inline bint is_datetime64_object(object obj):             # <<<<<<<<<<<<<<
51456  *     """
51457  *     Cython equivalent of `isinstance(obj, np.datetime64)`
51458  */
51459 
51460   /* function exit code */
51461   __pyx_L0:;
51462   __Pyx_RefNannyFinishContext();
51463   return __pyx_r;
51464 }
51465 
51466 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":997
51467  *
51468  *
51469  * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
51470  *     """
51471  *     returns the int64 value underlying scalar numpy datetime64 object
51472  */
51473 
__pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_v_obj)51474 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
51475   npy_datetime __pyx_r;
51476 
51477   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":1004
51478  *     also needed.  That can be found using `get_datetime64_unit`.
51479  *     """
51480  *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
51481  *
51482  *
51483  */
51484   __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
51485   goto __pyx_L0;
51486 
51487   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":997
51488  *
51489  *
51490  * cdef inline npy_datetime get_datetime64_value(object obj) nogil:             # <<<<<<<<<<<<<<
51491  *     """
51492  *     returns the int64 value underlying scalar numpy datetime64 object
51493  */
51494 
51495   /* function exit code */
51496   __pyx_L0:;
51497   return __pyx_r;
51498 }
51499 
51500 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":1007
51501  *
51502  *
51503  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
51504  *     """
51505  *     returns the int64 value underlying scalar numpy timedelta64 object
51506  */
51507 
__pyx_f_5numpy_get_timedelta64_value(PyObject * __pyx_v_obj)51508 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
51509   npy_timedelta __pyx_r;
51510 
51511   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":1011
51512  *     returns the int64 value underlying scalar numpy timedelta64 object
51513  *     """
51514  *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
51515  *
51516  *
51517  */
51518   __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
51519   goto __pyx_L0;
51520 
51521   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":1007
51522  *
51523  *
51524  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil:             # <<<<<<<<<<<<<<
51525  *     """
51526  *     returns the int64 value underlying scalar numpy timedelta64 object
51527  */
51528 
51529   /* function exit code */
51530   __pyx_L0:;
51531   return __pyx_r;
51532 }
51533 
51534 /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":1014
51535  *
51536  *
51537  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
51538  *     """
51539  *     returns the unit part of the dtype for a numpy datetime64 object.
51540  */
51541 
__pyx_f_5numpy_get_datetime64_unit(PyObject * __pyx_v_obj)51542 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
51543   NPY_DATETIMEUNIT __pyx_r;
51544 
51545   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":1018
51546  *     returns the unit part of the dtype for a numpy datetime64 object.
51547  *     """
51548  *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
51549  */
51550   __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
51551   goto __pyx_L0;
51552 
51553   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":1014
51554  *
51555  *
51556  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil:             # <<<<<<<<<<<<<<
51557  *     """
51558  *     returns the unit part of the dtype for a numpy datetime64 object.
51559  */
51560 
51561   /* function exit code */
51562   __pyx_L0:;
51563   return __pyx_r;
51564 }
51565 
51566 /* "statsmodels/src/math.pxd":12
51567  *     np.npy_cdouble npy_cexp(np.npy_cdouble z) nogil
51568  *
51569  * cdef inline np.float64_t zabs(np.complex128_t z) nogil:             # <<<<<<<<<<<<<<
51570  *     return npy_cabs((<np.npy_cdouble *> &z)[0])
51571  *
51572  */
51573 
__pyx_f_11statsmodels_3src_4math_zabs(__pyx_t_double_complex __pyx_v_z)51574 static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_11statsmodels_3src_4math_zabs(__pyx_t_double_complex __pyx_v_z) {
51575   __pyx_t_5numpy_float64_t __pyx_r;
51576 
51577   /* "statsmodels/src/math.pxd":13
51578  *
51579  * cdef inline np.float64_t zabs(np.complex128_t z) nogil:
51580  *     return npy_cabs((<np.npy_cdouble *> &z)[0])             # <<<<<<<<<<<<<<
51581  *
51582  * cdef inline np.complex128_t zlog(np.complex128_t z) nogil:
51583  */
51584   __pyx_r = npy_cabs((((npy_cdouble *)(&__pyx_v_z))[0]));
51585   goto __pyx_L0;
51586 
51587   /* "statsmodels/src/math.pxd":12
51588  *     np.npy_cdouble npy_cexp(np.npy_cdouble z) nogil
51589  *
51590  * cdef inline np.float64_t zabs(np.complex128_t z) nogil:             # <<<<<<<<<<<<<<
51591  *     return npy_cabs((<np.npy_cdouble *> &z)[0])
51592  *
51593  */
51594 
51595   /* function exit code */
51596   __pyx_L0:;
51597   return __pyx_r;
51598 }
51599 
51600 /* "statsmodels/src/math.pxd":15
51601  *     return npy_cabs((<np.npy_cdouble *> &z)[0])
51602  *
51603  * cdef inline np.complex128_t zlog(np.complex128_t z) nogil:             # <<<<<<<<<<<<<<
51604  *     cdef np.npy_cdouble x
51605  *     x = npy_clog((<np.npy_cdouble*> &z)[0])
51606  */
51607 
__pyx_f_11statsmodels_3src_4math_zlog(__pyx_t_double_complex __pyx_v_z)51608 static CYTHON_INLINE __pyx_t_double_complex __pyx_f_11statsmodels_3src_4math_zlog(__pyx_t_double_complex __pyx_v_z) {
51609   npy_cdouble __pyx_v_x;
51610   __pyx_t_double_complex __pyx_r;
51611 
51612   /* "statsmodels/src/math.pxd":17
51613  * cdef inline np.complex128_t zlog(np.complex128_t z) nogil:
51614  *     cdef np.npy_cdouble x
51615  *     x = npy_clog((<np.npy_cdouble*> &z)[0])             # <<<<<<<<<<<<<<
51616  *     return (<np.complex128_t *> &x)[0]
51617  *
51618  */
51619   __pyx_v_x = npy_clog((((npy_cdouble *)(&__pyx_v_z))[0]));
51620 
51621   /* "statsmodels/src/math.pxd":18
51622  *     cdef np.npy_cdouble x
51623  *     x = npy_clog((<np.npy_cdouble*> &z)[0])
51624  *     return (<np.complex128_t *> &x)[0]             # <<<<<<<<<<<<<<
51625  *
51626  * cdef inline np.complex128_t zexp(np.complex128_t z) nogil:
51627  */
51628   __pyx_r = (((__pyx_t_double_complex *)(&__pyx_v_x))[0]);
51629   goto __pyx_L0;
51630 
51631   /* "statsmodels/src/math.pxd":15
51632  *     return npy_cabs((<np.npy_cdouble *> &z)[0])
51633  *
51634  * cdef inline np.complex128_t zlog(np.complex128_t z) nogil:             # <<<<<<<<<<<<<<
51635  *     cdef np.npy_cdouble x
51636  *     x = npy_clog((<np.npy_cdouble*> &z)[0])
51637  */
51638 
51639   /* function exit code */
51640   __pyx_L0:;
51641   return __pyx_r;
51642 }
51643 
51644 /* "statsmodels/src/math.pxd":20
51645  *     return (<np.complex128_t *> &x)[0]
51646  *
51647  * cdef inline np.complex128_t zexp(np.complex128_t z) nogil:             # <<<<<<<<<<<<<<
51648  *     cdef np.npy_cdouble x
51649  *     x = npy_cexp((<np.npy_cdouble*> &z)[0])
51650  */
51651 
__pyx_f_11statsmodels_3src_4math_zexp(__pyx_t_double_complex __pyx_v_z)51652 static CYTHON_INLINE __pyx_t_double_complex __pyx_f_11statsmodels_3src_4math_zexp(__pyx_t_double_complex __pyx_v_z) {
51653   npy_cdouble __pyx_v_x;
51654   __pyx_t_double_complex __pyx_r;
51655 
51656   /* "statsmodels/src/math.pxd":22
51657  * cdef inline np.complex128_t zexp(np.complex128_t z) nogil:
51658  *     cdef np.npy_cdouble x
51659  *     x = npy_cexp((<np.npy_cdouble*> &z)[0])             # <<<<<<<<<<<<<<
51660  *     return (<np.complex128_t *> &x)[0]
51661  */
51662   __pyx_v_x = npy_cexp((((npy_cdouble *)(&__pyx_v_z))[0]));
51663 
51664   /* "statsmodels/src/math.pxd":23
51665  *     cdef np.npy_cdouble x
51666  *     x = npy_cexp((<np.npy_cdouble*> &z)[0])
51667  *     return (<np.complex128_t *> &x)[0]             # <<<<<<<<<<<<<<
51668  */
51669   __pyx_r = (((__pyx_t_double_complex *)(&__pyx_v_x))[0]);
51670   goto __pyx_L0;
51671 
51672   /* "statsmodels/src/math.pxd":20
51673  *     return (<np.complex128_t *> &x)[0]
51674  *
51675  * cdef inline np.complex128_t zexp(np.complex128_t z) nogil:             # <<<<<<<<<<<<<<
51676  *     cdef np.npy_cdouble x
51677  *     x = npy_cexp((<np.npy_cdouble*> &z)[0])
51678  */
51679 
51680   /* function exit code */
51681   __pyx_L0:;
51682   return __pyx_r;
51683 }
51684 
51685 /* "View.MemoryView":122
51686  *         cdef bint dtype_is_object
51687  *
51688  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
51689  *                   mode="c", bint allocate_buffer=True):
51690  *
51691  */
51692 
51693 /* Python wrapper */
51694 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_array___cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)51695 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
51696   PyObject *__pyx_v_shape = 0;
51697   Py_ssize_t __pyx_v_itemsize;
51698   PyObject *__pyx_v_format = 0;
51699   PyObject *__pyx_v_mode = 0;
51700   int __pyx_v_allocate_buffer;
51701   int __pyx_lineno = 0;
51702   const char *__pyx_filename = NULL;
51703   int __pyx_clineno = 0;
51704   int __pyx_r;
51705   __Pyx_RefNannyDeclarations
51706   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
51707   {
51708     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
51709     PyObject* values[5] = {0,0,0,0,0};
51710     values[3] = ((PyObject *)__pyx_n_s_c);
51711     if (unlikely(__pyx_kwds)) {
51712       Py_ssize_t kw_args;
51713       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
51714       switch (pos_args) {
51715         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
51716         CYTHON_FALLTHROUGH;
51717         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
51718         CYTHON_FALLTHROUGH;
51719         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
51720         CYTHON_FALLTHROUGH;
51721         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
51722         CYTHON_FALLTHROUGH;
51723         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
51724         CYTHON_FALLTHROUGH;
51725         case  0: break;
51726         default: goto __pyx_L5_argtuple_error;
51727       }
51728       kw_args = PyDict_Size(__pyx_kwds);
51729       switch (pos_args) {
51730         case  0:
51731         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
51732         else goto __pyx_L5_argtuple_error;
51733         CYTHON_FALLTHROUGH;
51734         case  1:
51735         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
51736         else {
51737           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(3, 122, __pyx_L3_error)
51738         }
51739         CYTHON_FALLTHROUGH;
51740         case  2:
51741         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
51742         else {
51743           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(3, 122, __pyx_L3_error)
51744         }
51745         CYTHON_FALLTHROUGH;
51746         case  3:
51747         if (kw_args > 0) {
51748           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
51749           if (value) { values[3] = value; kw_args--; }
51750         }
51751         CYTHON_FALLTHROUGH;
51752         case  4:
51753         if (kw_args > 0) {
51754           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
51755           if (value) { values[4] = value; kw_args--; }
51756         }
51757       }
51758       if (unlikely(kw_args > 0)) {
51759         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(3, 122, __pyx_L3_error)
51760       }
51761     } else {
51762       switch (PyTuple_GET_SIZE(__pyx_args)) {
51763         case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
51764         CYTHON_FALLTHROUGH;
51765         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
51766         CYTHON_FALLTHROUGH;
51767         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
51768         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
51769         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
51770         break;
51771         default: goto __pyx_L5_argtuple_error;
51772       }
51773     }
51774     __pyx_v_shape = ((PyObject*)values[0]);
51775     __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 122, __pyx_L3_error)
51776     __pyx_v_format = values[2];
51777     __pyx_v_mode = values[3];
51778     if (values[4]) {
51779       __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 123, __pyx_L3_error)
51780     } else {
51781 
51782       /* "View.MemoryView":123
51783  *
51784  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
51785  *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
51786  *
51787  *         cdef int idx
51788  */
51789       __pyx_v_allocate_buffer = ((int)1);
51790     }
51791   }
51792   goto __pyx_L4_argument_unpacking_done;
51793   __pyx_L5_argtuple_error:;
51794   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 122, __pyx_L3_error)
51795   __pyx_L3_error:;
51796   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
51797   __Pyx_RefNannyFinishContext();
51798   return -1;
51799   __pyx_L4_argument_unpacking_done:;
51800   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(3, 122, __pyx_L1_error)
51801   if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
51802     PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(3, 122, __pyx_L1_error)
51803   }
51804   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
51805 
51806   /* "View.MemoryView":122
51807  *         cdef bint dtype_is_object
51808  *
51809  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
51810  *                   mode="c", bint allocate_buffer=True):
51811  *
51812  */
51813 
51814   /* function exit code */
51815   goto __pyx_L0;
51816   __pyx_L1_error:;
51817   __pyx_r = -1;
51818   __pyx_L0:;
51819   __Pyx_RefNannyFinishContext();
51820   return __pyx_r;
51821 }
51822 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj * __pyx_v_self,PyObject * __pyx_v_shape,Py_ssize_t __pyx_v_itemsize,PyObject * __pyx_v_format,PyObject * __pyx_v_mode,int __pyx_v_allocate_buffer)51823 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
51824   int __pyx_v_idx;
51825   Py_ssize_t __pyx_v_i;
51826   Py_ssize_t __pyx_v_dim;
51827   PyObject **__pyx_v_p;
51828   char __pyx_v_order;
51829   int __pyx_r;
51830   __Pyx_RefNannyDeclarations
51831   Py_ssize_t __pyx_t_1;
51832   int __pyx_t_2;
51833   PyObject *__pyx_t_3 = NULL;
51834   int __pyx_t_4;
51835   PyObject *__pyx_t_5 = NULL;
51836   PyObject *__pyx_t_6 = NULL;
51837   char *__pyx_t_7;
51838   int __pyx_t_8;
51839   Py_ssize_t __pyx_t_9;
51840   PyObject *__pyx_t_10 = NULL;
51841   Py_ssize_t __pyx_t_11;
51842   int __pyx_lineno = 0;
51843   const char *__pyx_filename = NULL;
51844   int __pyx_clineno = 0;
51845   __Pyx_RefNannySetupContext("__cinit__", 0);
51846   __Pyx_INCREF(__pyx_v_format);
51847 
51848   /* "View.MemoryView":129
51849  *         cdef PyObject **p
51850  *
51851  *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
51852  *         self.itemsize = itemsize
51853  *
51854  */
51855   if (unlikely(__pyx_v_shape == Py_None)) {
51856     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
51857     __PYX_ERR(3, 129, __pyx_L1_error)
51858   }
51859   __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 129, __pyx_L1_error)
51860   __pyx_v_self->ndim = ((int)__pyx_t_1);
51861 
51862   /* "View.MemoryView":130
51863  *
51864  *         self.ndim = <int> len(shape)
51865  *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
51866  *
51867  *         if not self.ndim:
51868  */
51869   __pyx_v_self->itemsize = __pyx_v_itemsize;
51870 
51871   /* "View.MemoryView":132
51872  *         self.itemsize = itemsize
51873  *
51874  *         if not self.ndim:             # <<<<<<<<<<<<<<
51875  *             raise ValueError("Empty shape tuple for cython.array")
51876  *
51877  */
51878   __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
51879   if (unlikely(__pyx_t_2)) {
51880 
51881     /* "View.MemoryView":133
51882  *
51883  *         if not self.ndim:
51884  *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
51885  *
51886  *         if itemsize <= 0:
51887  */
51888     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 133, __pyx_L1_error)
51889     __Pyx_GOTREF(__pyx_t_3);
51890     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
51891     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51892     __PYX_ERR(3, 133, __pyx_L1_error)
51893 
51894     /* "View.MemoryView":132
51895  *         self.itemsize = itemsize
51896  *
51897  *         if not self.ndim:             # <<<<<<<<<<<<<<
51898  *             raise ValueError("Empty shape tuple for cython.array")
51899  *
51900  */
51901   }
51902 
51903   /* "View.MemoryView":135
51904  *             raise ValueError("Empty shape tuple for cython.array")
51905  *
51906  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
51907  *             raise ValueError("itemsize <= 0 for cython.array")
51908  *
51909  */
51910   __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
51911   if (unlikely(__pyx_t_2)) {
51912 
51913     /* "View.MemoryView":136
51914  *
51915  *         if itemsize <= 0:
51916  *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
51917  *
51918  *         if not isinstance(format, bytes):
51919  */
51920     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 136, __pyx_L1_error)
51921     __Pyx_GOTREF(__pyx_t_3);
51922     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
51923     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51924     __PYX_ERR(3, 136, __pyx_L1_error)
51925 
51926     /* "View.MemoryView":135
51927  *             raise ValueError("Empty shape tuple for cython.array")
51928  *
51929  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
51930  *             raise ValueError("itemsize <= 0 for cython.array")
51931  *
51932  */
51933   }
51934 
51935   /* "View.MemoryView":138
51936  *             raise ValueError("itemsize <= 0 for cython.array")
51937  *
51938  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
51939  *             format = format.encode('ASCII')
51940  *         self._format = format  # keep a reference to the byte string
51941  */
51942   __pyx_t_2 = PyBytes_Check(__pyx_v_format);
51943   __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
51944   if (__pyx_t_4) {
51945 
51946     /* "View.MemoryView":139
51947  *
51948  *         if not isinstance(format, bytes):
51949  *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
51950  *         self._format = format  # keep a reference to the byte string
51951  *         self.format = self._format
51952  */
51953     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 139, __pyx_L1_error)
51954     __Pyx_GOTREF(__pyx_t_5);
51955     __pyx_t_6 = NULL;
51956     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
51957       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
51958       if (likely(__pyx_t_6)) {
51959         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
51960         __Pyx_INCREF(__pyx_t_6);
51961         __Pyx_INCREF(function);
51962         __Pyx_DECREF_SET(__pyx_t_5, function);
51963       }
51964     }
51965     __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
51966     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
51967     if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 139, __pyx_L1_error)
51968     __Pyx_GOTREF(__pyx_t_3);
51969     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51970     __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
51971     __pyx_t_3 = 0;
51972 
51973     /* "View.MemoryView":138
51974  *             raise ValueError("itemsize <= 0 for cython.array")
51975  *
51976  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
51977  *             format = format.encode('ASCII')
51978  *         self._format = format  # keep a reference to the byte string
51979  */
51980   }
51981 
51982   /* "View.MemoryView":140
51983  *         if not isinstance(format, bytes):
51984  *             format = format.encode('ASCII')
51985  *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
51986  *         self.format = self._format
51987  *
51988  */
51989   if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(3, 140, __pyx_L1_error)
51990   __pyx_t_3 = __pyx_v_format;
51991   __Pyx_INCREF(__pyx_t_3);
51992   __Pyx_GIVEREF(__pyx_t_3);
51993   __Pyx_GOTREF(__pyx_v_self->_format);
51994   __Pyx_DECREF(__pyx_v_self->_format);
51995   __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
51996   __pyx_t_3 = 0;
51997 
51998   /* "View.MemoryView":141
51999  *             format = format.encode('ASCII')
52000  *         self._format = format  # keep a reference to the byte string
52001  *         self.format = self._format             # <<<<<<<<<<<<<<
52002  *
52003  *
52004  */
52005   if (unlikely(__pyx_v_self->_format == Py_None)) {
52006     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
52007     __PYX_ERR(3, 141, __pyx_L1_error)
52008   }
52009   __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(3, 141, __pyx_L1_error)
52010   __pyx_v_self->format = __pyx_t_7;
52011 
52012   /* "View.MemoryView":144
52013  *
52014  *
52015  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
52016  *         self._strides = self._shape + self.ndim
52017  *
52018  */
52019   __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
52020 
52021   /* "View.MemoryView":145
52022  *
52023  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
52024  *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
52025  *
52026  *         if not self._shape:
52027  */
52028   __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
52029 
52030   /* "View.MemoryView":147
52031  *         self._strides = self._shape + self.ndim
52032  *
52033  *         if not self._shape:             # <<<<<<<<<<<<<<
52034  *             raise MemoryError("unable to allocate shape and strides.")
52035  *
52036  */
52037   __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
52038   if (unlikely(__pyx_t_4)) {
52039 
52040     /* "View.MemoryView":148
52041  *
52042  *         if not self._shape:
52043  *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
52044  *
52045  *
52046  */
52047     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 148, __pyx_L1_error)
52048     __Pyx_GOTREF(__pyx_t_3);
52049     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
52050     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
52051     __PYX_ERR(3, 148, __pyx_L1_error)
52052 
52053     /* "View.MemoryView":147
52054  *         self._strides = self._shape + self.ndim
52055  *
52056  *         if not self._shape:             # <<<<<<<<<<<<<<
52057  *             raise MemoryError("unable to allocate shape and strides.")
52058  *
52059  */
52060   }
52061 
52062   /* "View.MemoryView":151
52063  *
52064  *
52065  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
52066  *             if dim <= 0:
52067  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
52068  */
52069   __pyx_t_8 = 0;
52070   __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
52071   for (;;) {
52072     if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
52073     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
52074     __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(3, 151, __pyx_L1_error)
52075     #else
52076     __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 151, __pyx_L1_error)
52077     __Pyx_GOTREF(__pyx_t_5);
52078     #endif
52079     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 151, __pyx_L1_error)
52080     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
52081     __pyx_v_dim = __pyx_t_9;
52082     __pyx_v_idx = __pyx_t_8;
52083     __pyx_t_8 = (__pyx_t_8 + 1);
52084 
52085     /* "View.MemoryView":152
52086  *
52087  *         for idx, dim in enumerate(shape):
52088  *             if dim <= 0:             # <<<<<<<<<<<<<<
52089  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
52090  *             self._shape[idx] = dim
52091  */
52092     __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
52093     if (unlikely(__pyx_t_4)) {
52094 
52095       /* "View.MemoryView":153
52096  *         for idx, dim in enumerate(shape):
52097  *             if dim <= 0:
52098  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))             # <<<<<<<<<<<<<<
52099  *             self._shape[idx] = dim
52100  *
52101  */
52102       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 153, __pyx_L1_error)
52103       __Pyx_GOTREF(__pyx_t_5);
52104       __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 153, __pyx_L1_error)
52105       __Pyx_GOTREF(__pyx_t_6);
52106       __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 153, __pyx_L1_error)
52107       __Pyx_GOTREF(__pyx_t_10);
52108       __Pyx_GIVEREF(__pyx_t_5);
52109       PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
52110       __Pyx_GIVEREF(__pyx_t_6);
52111       PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
52112       __pyx_t_5 = 0;
52113       __pyx_t_6 = 0;
52114       __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 153, __pyx_L1_error)
52115       __Pyx_GOTREF(__pyx_t_6);
52116       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
52117       __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 153, __pyx_L1_error)
52118       __Pyx_GOTREF(__pyx_t_10);
52119       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
52120       __Pyx_Raise(__pyx_t_10, 0, 0, 0);
52121       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
52122       __PYX_ERR(3, 153, __pyx_L1_error)
52123 
52124       /* "View.MemoryView":152
52125  *
52126  *         for idx, dim in enumerate(shape):
52127  *             if dim <= 0:             # <<<<<<<<<<<<<<
52128  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
52129  *             self._shape[idx] = dim
52130  */
52131     }
52132 
52133     /* "View.MemoryView":154
52134  *             if dim <= 0:
52135  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
52136  *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
52137  *
52138  *         cdef char order
52139  */
52140     (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
52141 
52142     /* "View.MemoryView":151
52143  *
52144  *
52145  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
52146  *             if dim <= 0:
52147  *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
52148  */
52149   }
52150   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
52151 
52152   /* "View.MemoryView":157
52153  *
52154  *         cdef char order
52155  *         if mode == 'fortran':             # <<<<<<<<<<<<<<
52156  *             order = b'F'
52157  *             self.mode = u'fortran'
52158  */
52159   __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 157, __pyx_L1_error)
52160   if (__pyx_t_4) {
52161 
52162     /* "View.MemoryView":158
52163  *         cdef char order
52164  *         if mode == 'fortran':
52165  *             order = b'F'             # <<<<<<<<<<<<<<
52166  *             self.mode = u'fortran'
52167  *         elif mode == 'c':
52168  */
52169     __pyx_v_order = 'F';
52170 
52171     /* "View.MemoryView":159
52172  *         if mode == 'fortran':
52173  *             order = b'F'
52174  *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
52175  *         elif mode == 'c':
52176  *             order = b'C'
52177  */
52178     __Pyx_INCREF(__pyx_n_u_fortran);
52179     __Pyx_GIVEREF(__pyx_n_u_fortran);
52180     __Pyx_GOTREF(__pyx_v_self->mode);
52181     __Pyx_DECREF(__pyx_v_self->mode);
52182     __pyx_v_self->mode = __pyx_n_u_fortran;
52183 
52184     /* "View.MemoryView":157
52185  *
52186  *         cdef char order
52187  *         if mode == 'fortran':             # <<<<<<<<<<<<<<
52188  *             order = b'F'
52189  *             self.mode = u'fortran'
52190  */
52191     goto __pyx_L10;
52192   }
52193 
52194   /* "View.MemoryView":160
52195  *             order = b'F'
52196  *             self.mode = u'fortran'
52197  *         elif mode == 'c':             # <<<<<<<<<<<<<<
52198  *             order = b'C'
52199  *             self.mode = u'c'
52200  */
52201   __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(3, 160, __pyx_L1_error)
52202   if (likely(__pyx_t_4)) {
52203 
52204     /* "View.MemoryView":161
52205  *             self.mode = u'fortran'
52206  *         elif mode == 'c':
52207  *             order = b'C'             # <<<<<<<<<<<<<<
52208  *             self.mode = u'c'
52209  *         else:
52210  */
52211     __pyx_v_order = 'C';
52212 
52213     /* "View.MemoryView":162
52214  *         elif mode == 'c':
52215  *             order = b'C'
52216  *             self.mode = u'c'             # <<<<<<<<<<<<<<
52217  *         else:
52218  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
52219  */
52220     __Pyx_INCREF(__pyx_n_u_c);
52221     __Pyx_GIVEREF(__pyx_n_u_c);
52222     __Pyx_GOTREF(__pyx_v_self->mode);
52223     __Pyx_DECREF(__pyx_v_self->mode);
52224     __pyx_v_self->mode = __pyx_n_u_c;
52225 
52226     /* "View.MemoryView":160
52227  *             order = b'F'
52228  *             self.mode = u'fortran'
52229  *         elif mode == 'c':             # <<<<<<<<<<<<<<
52230  *             order = b'C'
52231  *             self.mode = u'c'
52232  */
52233     goto __pyx_L10;
52234   }
52235 
52236   /* "View.MemoryView":164
52237  *             self.mode = u'c'
52238  *         else:
52239  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)             # <<<<<<<<<<<<<<
52240  *
52241  *         self.len = fill_contig_strides_array(self._shape, self._strides,
52242  */
52243   /*else*/ {
52244     __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 164, __pyx_L1_error)
52245     __Pyx_GOTREF(__pyx_t_3);
52246     __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 164, __pyx_L1_error)
52247     __Pyx_GOTREF(__pyx_t_10);
52248     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
52249     __Pyx_Raise(__pyx_t_10, 0, 0, 0);
52250     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
52251     __PYX_ERR(3, 164, __pyx_L1_error)
52252   }
52253   __pyx_L10:;
52254 
52255   /* "View.MemoryView":166
52256  *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
52257  *
52258  *         self.len = fill_contig_strides_array(self._shape, self._strides,             # <<<<<<<<<<<<<<
52259  *                                              itemsize, self.ndim, order)
52260  *
52261  */
52262   __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
52263 
52264   /* "View.MemoryView":169
52265  *                                              itemsize, self.ndim, order)
52266  *
52267  *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
52268  *         self.dtype_is_object = format == b'O'
52269  *         if allocate_buffer:
52270  */
52271   __pyx_v_self->free_data = __pyx_v_allocate_buffer;
52272 
52273   /* "View.MemoryView":170
52274  *
52275  *         self.free_data = allocate_buffer
52276  *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
52277  *         if allocate_buffer:
52278  *
52279  */
52280   __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 170, __pyx_L1_error)
52281   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 170, __pyx_L1_error)
52282   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
52283   __pyx_v_self->dtype_is_object = __pyx_t_4;
52284 
52285   /* "View.MemoryView":171
52286  *         self.free_data = allocate_buffer
52287  *         self.dtype_is_object = format == b'O'
52288  *         if allocate_buffer:             # <<<<<<<<<<<<<<
52289  *
52290  *
52291  */
52292   __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
52293   if (__pyx_t_4) {
52294 
52295     /* "View.MemoryView":174
52296  *
52297  *
52298  *             self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
52299  *             if not self.data:
52300  *                 raise MemoryError("unable to allocate array data.")
52301  */
52302     __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
52303 
52304     /* "View.MemoryView":175
52305  *
52306  *             self.data = <char *>malloc(self.len)
52307  *             if not self.data:             # <<<<<<<<<<<<<<
52308  *                 raise MemoryError("unable to allocate array data.")
52309  *
52310  */
52311     __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
52312     if (unlikely(__pyx_t_4)) {
52313 
52314       /* "View.MemoryView":176
52315  *             self.data = <char *>malloc(self.len)
52316  *             if not self.data:
52317  *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
52318  *
52319  *             if self.dtype_is_object:
52320  */
52321       __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 176, __pyx_L1_error)
52322       __Pyx_GOTREF(__pyx_t_10);
52323       __Pyx_Raise(__pyx_t_10, 0, 0, 0);
52324       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
52325       __PYX_ERR(3, 176, __pyx_L1_error)
52326 
52327       /* "View.MemoryView":175
52328  *
52329  *             self.data = <char *>malloc(self.len)
52330  *             if not self.data:             # <<<<<<<<<<<<<<
52331  *                 raise MemoryError("unable to allocate array data.")
52332  *
52333  */
52334     }
52335 
52336     /* "View.MemoryView":178
52337  *                 raise MemoryError("unable to allocate array data.")
52338  *
52339  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
52340  *                 p = <PyObject **> self.data
52341  *                 for i in range(self.len / itemsize):
52342  */
52343     __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
52344     if (__pyx_t_4) {
52345 
52346       /* "View.MemoryView":179
52347  *
52348  *             if self.dtype_is_object:
52349  *                 p = <PyObject **> self.data             # <<<<<<<<<<<<<<
52350  *                 for i in range(self.len / itemsize):
52351  *                     p[i] = Py_None
52352  */
52353       __pyx_v_p = ((PyObject **)__pyx_v_self->data);
52354 
52355       /* "View.MemoryView":180
52356  *             if self.dtype_is_object:
52357  *                 p = <PyObject **> self.data
52358  *                 for i in range(self.len / itemsize):             # <<<<<<<<<<<<<<
52359  *                     p[i] = Py_None
52360  *                     Py_INCREF(Py_None)
52361  */
52362       if (unlikely(__pyx_v_itemsize == 0)) {
52363         PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
52364         __PYX_ERR(3, 180, __pyx_L1_error)
52365       }
52366       else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
52367         PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
52368         __PYX_ERR(3, 180, __pyx_L1_error)
52369       }
52370       __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
52371       __pyx_t_9 = __pyx_t_1;
52372       for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
52373         __pyx_v_i = __pyx_t_11;
52374 
52375         /* "View.MemoryView":181
52376  *                 p = <PyObject **> self.data
52377  *                 for i in range(self.len / itemsize):
52378  *                     p[i] = Py_None             # <<<<<<<<<<<<<<
52379  *                     Py_INCREF(Py_None)
52380  *
52381  */
52382         (__pyx_v_p[__pyx_v_i]) = Py_None;
52383 
52384         /* "View.MemoryView":182
52385  *                 for i in range(self.len / itemsize):
52386  *                     p[i] = Py_None
52387  *                     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
52388  *
52389  *     @cname('getbuffer')
52390  */
52391         Py_INCREF(Py_None);
52392       }
52393 
52394       /* "View.MemoryView":178
52395  *                 raise MemoryError("unable to allocate array data.")
52396  *
52397  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
52398  *                 p = <PyObject **> self.data
52399  *                 for i in range(self.len / itemsize):
52400  */
52401     }
52402 
52403     /* "View.MemoryView":171
52404  *         self.free_data = allocate_buffer
52405  *         self.dtype_is_object = format == b'O'
52406  *         if allocate_buffer:             # <<<<<<<<<<<<<<
52407  *
52408  *
52409  */
52410   }
52411 
52412   /* "View.MemoryView":122
52413  *         cdef bint dtype_is_object
52414  *
52415  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
52416  *                   mode="c", bint allocate_buffer=True):
52417  *
52418  */
52419 
52420   /* function exit code */
52421   __pyx_r = 0;
52422   goto __pyx_L0;
52423   __pyx_L1_error:;
52424   __Pyx_XDECREF(__pyx_t_3);
52425   __Pyx_XDECREF(__pyx_t_5);
52426   __Pyx_XDECREF(__pyx_t_6);
52427   __Pyx_XDECREF(__pyx_t_10);
52428   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52429   __pyx_r = -1;
52430   __pyx_L0:;
52431   __Pyx_XDECREF(__pyx_v_format);
52432   __Pyx_RefNannyFinishContext();
52433   return __pyx_r;
52434 }
52435 
52436 /* "View.MemoryView":185
52437  *
52438  *     @cname('getbuffer')
52439  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
52440  *         cdef int bufmode = -1
52441  *         if self.mode == u"c":
52442  */
52443 
52444 /* Python wrapper */
52445 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
__pyx_array_getbuffer(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)52446 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
52447   int __pyx_r;
52448   __Pyx_RefNannyDeclarations
52449   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
52450   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
52451 
52452   /* function exit code */
52453   __Pyx_RefNannyFinishContext();
52454   return __pyx_r;
52455 }
52456 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)52457 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
52458   int __pyx_v_bufmode;
52459   int __pyx_r;
52460   __Pyx_RefNannyDeclarations
52461   int __pyx_t_1;
52462   int __pyx_t_2;
52463   PyObject *__pyx_t_3 = NULL;
52464   char *__pyx_t_4;
52465   Py_ssize_t __pyx_t_5;
52466   int __pyx_t_6;
52467   Py_ssize_t *__pyx_t_7;
52468   int __pyx_lineno = 0;
52469   const char *__pyx_filename = NULL;
52470   int __pyx_clineno = 0;
52471   if (__pyx_v_info == NULL) {
52472     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
52473     return -1;
52474   }
52475   __Pyx_RefNannySetupContext("__getbuffer__", 0);
52476   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
52477   __Pyx_GIVEREF(__pyx_v_info->obj);
52478 
52479   /* "View.MemoryView":186
52480  *     @cname('getbuffer')
52481  *     def __getbuffer__(self, Py_buffer *info, int flags):
52482  *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
52483  *         if self.mode == u"c":
52484  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52485  */
52486   __pyx_v_bufmode = -1;
52487 
52488   /* "View.MemoryView":187
52489  *     def __getbuffer__(self, Py_buffer *info, int flags):
52490  *         cdef int bufmode = -1
52491  *         if self.mode == u"c":             # <<<<<<<<<<<<<<
52492  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52493  *         elif self.mode == u"fortran":
52494  */
52495   __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 187, __pyx_L1_error)
52496   __pyx_t_2 = (__pyx_t_1 != 0);
52497   if (__pyx_t_2) {
52498 
52499     /* "View.MemoryView":188
52500  *         cdef int bufmode = -1
52501  *         if self.mode == u"c":
52502  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
52503  *         elif self.mode == u"fortran":
52504  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52505  */
52506     __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
52507 
52508     /* "View.MemoryView":187
52509  *     def __getbuffer__(self, Py_buffer *info, int flags):
52510  *         cdef int bufmode = -1
52511  *         if self.mode == u"c":             # <<<<<<<<<<<<<<
52512  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52513  *         elif self.mode == u"fortran":
52514  */
52515     goto __pyx_L3;
52516   }
52517 
52518   /* "View.MemoryView":189
52519  *         if self.mode == u"c":
52520  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52521  *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
52522  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52523  *         if not (flags & bufmode):
52524  */
52525   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 189, __pyx_L1_error)
52526   __pyx_t_1 = (__pyx_t_2 != 0);
52527   if (__pyx_t_1) {
52528 
52529     /* "View.MemoryView":190
52530  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52531  *         elif self.mode == u"fortran":
52532  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
52533  *         if not (flags & bufmode):
52534  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
52535  */
52536     __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
52537 
52538     /* "View.MemoryView":189
52539  *         if self.mode == u"c":
52540  *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52541  *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
52542  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52543  *         if not (flags & bufmode):
52544  */
52545   }
52546   __pyx_L3:;
52547 
52548   /* "View.MemoryView":191
52549  *         elif self.mode == u"fortran":
52550  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52551  *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
52552  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
52553  *         info.buf = self.data
52554  */
52555   __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
52556   if (unlikely(__pyx_t_1)) {
52557 
52558     /* "View.MemoryView":192
52559  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52560  *         if not (flags & bufmode):
52561  *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
52562  *         info.buf = self.data
52563  *         info.len = self.len
52564  */
52565     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 192, __pyx_L1_error)
52566     __Pyx_GOTREF(__pyx_t_3);
52567     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
52568     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
52569     __PYX_ERR(3, 192, __pyx_L1_error)
52570 
52571     /* "View.MemoryView":191
52572  *         elif self.mode == u"fortran":
52573  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
52574  *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
52575  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
52576  *         info.buf = self.data
52577  */
52578   }
52579 
52580   /* "View.MemoryView":193
52581  *         if not (flags & bufmode):
52582  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
52583  *         info.buf = self.data             # <<<<<<<<<<<<<<
52584  *         info.len = self.len
52585  *         info.ndim = self.ndim
52586  */
52587   __pyx_t_4 = __pyx_v_self->data;
52588   __pyx_v_info->buf = __pyx_t_4;
52589 
52590   /* "View.MemoryView":194
52591  *             raise ValueError("Can only create a buffer that is contiguous in memory.")
52592  *         info.buf = self.data
52593  *         info.len = self.len             # <<<<<<<<<<<<<<
52594  *         info.ndim = self.ndim
52595  *         info.shape = self._shape
52596  */
52597   __pyx_t_5 = __pyx_v_self->len;
52598   __pyx_v_info->len = __pyx_t_5;
52599 
52600   /* "View.MemoryView":195
52601  *         info.buf = self.data
52602  *         info.len = self.len
52603  *         info.ndim = self.ndim             # <<<<<<<<<<<<<<
52604  *         info.shape = self._shape
52605  *         info.strides = self._strides
52606  */
52607   __pyx_t_6 = __pyx_v_self->ndim;
52608   __pyx_v_info->ndim = __pyx_t_6;
52609 
52610   /* "View.MemoryView":196
52611  *         info.len = self.len
52612  *         info.ndim = self.ndim
52613  *         info.shape = self._shape             # <<<<<<<<<<<<<<
52614  *         info.strides = self._strides
52615  *         info.suboffsets = NULL
52616  */
52617   __pyx_t_7 = __pyx_v_self->_shape;
52618   __pyx_v_info->shape = __pyx_t_7;
52619 
52620   /* "View.MemoryView":197
52621  *         info.ndim = self.ndim
52622  *         info.shape = self._shape
52623  *         info.strides = self._strides             # <<<<<<<<<<<<<<
52624  *         info.suboffsets = NULL
52625  *         info.itemsize = self.itemsize
52626  */
52627   __pyx_t_7 = __pyx_v_self->_strides;
52628   __pyx_v_info->strides = __pyx_t_7;
52629 
52630   /* "View.MemoryView":198
52631  *         info.shape = self._shape
52632  *         info.strides = self._strides
52633  *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
52634  *         info.itemsize = self.itemsize
52635  *         info.readonly = 0
52636  */
52637   __pyx_v_info->suboffsets = NULL;
52638 
52639   /* "View.MemoryView":199
52640  *         info.strides = self._strides
52641  *         info.suboffsets = NULL
52642  *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
52643  *         info.readonly = 0
52644  *
52645  */
52646   __pyx_t_5 = __pyx_v_self->itemsize;
52647   __pyx_v_info->itemsize = __pyx_t_5;
52648 
52649   /* "View.MemoryView":200
52650  *         info.suboffsets = NULL
52651  *         info.itemsize = self.itemsize
52652  *         info.readonly = 0             # <<<<<<<<<<<<<<
52653  *
52654  *         if flags & PyBUF_FORMAT:
52655  */
52656   __pyx_v_info->readonly = 0;
52657 
52658   /* "View.MemoryView":202
52659  *         info.readonly = 0
52660  *
52661  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
52662  *             info.format = self.format
52663  *         else:
52664  */
52665   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
52666   if (__pyx_t_1) {
52667 
52668     /* "View.MemoryView":203
52669  *
52670  *         if flags & PyBUF_FORMAT:
52671  *             info.format = self.format             # <<<<<<<<<<<<<<
52672  *         else:
52673  *             info.format = NULL
52674  */
52675     __pyx_t_4 = __pyx_v_self->format;
52676     __pyx_v_info->format = __pyx_t_4;
52677 
52678     /* "View.MemoryView":202
52679  *         info.readonly = 0
52680  *
52681  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
52682  *             info.format = self.format
52683  *         else:
52684  */
52685     goto __pyx_L5;
52686   }
52687 
52688   /* "View.MemoryView":205
52689  *             info.format = self.format
52690  *         else:
52691  *             info.format = NULL             # <<<<<<<<<<<<<<
52692  *
52693  *         info.obj = self
52694  */
52695   /*else*/ {
52696     __pyx_v_info->format = NULL;
52697   }
52698   __pyx_L5:;
52699 
52700   /* "View.MemoryView":207
52701  *             info.format = NULL
52702  *
52703  *         info.obj = self             # <<<<<<<<<<<<<<
52704  *
52705  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
52706  */
52707   __Pyx_INCREF(((PyObject *)__pyx_v_self));
52708   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
52709   __Pyx_GOTREF(__pyx_v_info->obj);
52710   __Pyx_DECREF(__pyx_v_info->obj);
52711   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
52712 
52713   /* "View.MemoryView":185
52714  *
52715  *     @cname('getbuffer')
52716  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
52717  *         cdef int bufmode = -1
52718  *         if self.mode == u"c":
52719  */
52720 
52721   /* function exit code */
52722   __pyx_r = 0;
52723   goto __pyx_L0;
52724   __pyx_L1_error:;
52725   __Pyx_XDECREF(__pyx_t_3);
52726   __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52727   __pyx_r = -1;
52728   if (__pyx_v_info->obj != NULL) {
52729     __Pyx_GOTREF(__pyx_v_info->obj);
52730     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
52731   }
52732   goto __pyx_L2;
52733   __pyx_L0:;
52734   if (__pyx_v_info->obj == Py_None) {
52735     __Pyx_GOTREF(__pyx_v_info->obj);
52736     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
52737   }
52738   __pyx_L2:;
52739   __Pyx_RefNannyFinishContext();
52740   return __pyx_r;
52741 }
52742 
52743 /* "View.MemoryView":211
52744  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
52745  *
52746  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
52747  *         if self.callback_free_data != NULL:
52748  *             self.callback_free_data(self.data)
52749  */
52750 
52751 /* Python wrapper */
52752 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_array___dealloc__(PyObject * __pyx_v_self)52753 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
52754   __Pyx_RefNannyDeclarations
52755   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
52756   __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
52757 
52758   /* function exit code */
52759   __Pyx_RefNannyFinishContext();
52760 }
52761 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj * __pyx_v_self)52762 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
52763   __Pyx_RefNannyDeclarations
52764   int __pyx_t_1;
52765   __Pyx_RefNannySetupContext("__dealloc__", 0);
52766 
52767   /* "View.MemoryView":212
52768  *
52769  *     def __dealloc__(array self):
52770  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
52771  *             self.callback_free_data(self.data)
52772  *         elif self.free_data:
52773  */
52774   __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
52775   if (__pyx_t_1) {
52776 
52777     /* "View.MemoryView":213
52778  *     def __dealloc__(array self):
52779  *         if self.callback_free_data != NULL:
52780  *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
52781  *         elif self.free_data:
52782  *             if self.dtype_is_object:
52783  */
52784     __pyx_v_self->callback_free_data(__pyx_v_self->data);
52785 
52786     /* "View.MemoryView":212
52787  *
52788  *     def __dealloc__(array self):
52789  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
52790  *             self.callback_free_data(self.data)
52791  *         elif self.free_data:
52792  */
52793     goto __pyx_L3;
52794   }
52795 
52796   /* "View.MemoryView":214
52797  *         if self.callback_free_data != NULL:
52798  *             self.callback_free_data(self.data)
52799  *         elif self.free_data:             # <<<<<<<<<<<<<<
52800  *             if self.dtype_is_object:
52801  *                 refcount_objects_in_slice(self.data, self._shape,
52802  */
52803   __pyx_t_1 = (__pyx_v_self->free_data != 0);
52804   if (__pyx_t_1) {
52805 
52806     /* "View.MemoryView":215
52807  *             self.callback_free_data(self.data)
52808  *         elif self.free_data:
52809  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
52810  *                 refcount_objects_in_slice(self.data, self._shape,
52811  *                                           self._strides, self.ndim, False)
52812  */
52813     __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
52814     if (__pyx_t_1) {
52815 
52816       /* "View.MemoryView":216
52817  *         elif self.free_data:
52818  *             if self.dtype_is_object:
52819  *                 refcount_objects_in_slice(self.data, self._shape,             # <<<<<<<<<<<<<<
52820  *                                           self._strides, self.ndim, False)
52821  *             free(self.data)
52822  */
52823       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
52824 
52825       /* "View.MemoryView":215
52826  *             self.callback_free_data(self.data)
52827  *         elif self.free_data:
52828  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
52829  *                 refcount_objects_in_slice(self.data, self._shape,
52830  *                                           self._strides, self.ndim, False)
52831  */
52832     }
52833 
52834     /* "View.MemoryView":218
52835  *                 refcount_objects_in_slice(self.data, self._shape,
52836  *                                           self._strides, self.ndim, False)
52837  *             free(self.data)             # <<<<<<<<<<<<<<
52838  *         PyObject_Free(self._shape)
52839  *
52840  */
52841     free(__pyx_v_self->data);
52842 
52843     /* "View.MemoryView":214
52844  *         if self.callback_free_data != NULL:
52845  *             self.callback_free_data(self.data)
52846  *         elif self.free_data:             # <<<<<<<<<<<<<<
52847  *             if self.dtype_is_object:
52848  *                 refcount_objects_in_slice(self.data, self._shape,
52849  */
52850   }
52851   __pyx_L3:;
52852 
52853   /* "View.MemoryView":219
52854  *                                           self._strides, self.ndim, False)
52855  *             free(self.data)
52856  *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
52857  *
52858  *     @property
52859  */
52860   PyObject_Free(__pyx_v_self->_shape);
52861 
52862   /* "View.MemoryView":211
52863  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
52864  *
52865  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
52866  *         if self.callback_free_data != NULL:
52867  *             self.callback_free_data(self.data)
52868  */
52869 
52870   /* function exit code */
52871   __Pyx_RefNannyFinishContext();
52872 }
52873 
52874 /* "View.MemoryView":222
52875  *
52876  *     @property
52877  *     def memview(self):             # <<<<<<<<<<<<<<
52878  *         return self.get_memview()
52879  *
52880  */
52881 
52882 /* Python wrapper */
52883 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject * __pyx_v_self)52884 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
52885   PyObject *__pyx_r = 0;
52886   __Pyx_RefNannyDeclarations
52887   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
52888   __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
52889 
52890   /* function exit code */
52891   __Pyx_RefNannyFinishContext();
52892   return __pyx_r;
52893 }
52894 
__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj * __pyx_v_self)52895 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
52896   PyObject *__pyx_r = NULL;
52897   __Pyx_RefNannyDeclarations
52898   PyObject *__pyx_t_1 = NULL;
52899   int __pyx_lineno = 0;
52900   const char *__pyx_filename = NULL;
52901   int __pyx_clineno = 0;
52902   __Pyx_RefNannySetupContext("__get__", 0);
52903 
52904   /* "View.MemoryView":223
52905  *     @property
52906  *     def memview(self):
52907  *         return self.get_memview()             # <<<<<<<<<<<<<<
52908  *
52909  *     @cname('get_memview')
52910  */
52911   __Pyx_XDECREF(__pyx_r);
52912   __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 223, __pyx_L1_error)
52913   __Pyx_GOTREF(__pyx_t_1);
52914   __pyx_r = __pyx_t_1;
52915   __pyx_t_1 = 0;
52916   goto __pyx_L0;
52917 
52918   /* "View.MemoryView":222
52919  *
52920  *     @property
52921  *     def memview(self):             # <<<<<<<<<<<<<<
52922  *         return self.get_memview()
52923  *
52924  */
52925 
52926   /* function exit code */
52927   __pyx_L1_error:;
52928   __Pyx_XDECREF(__pyx_t_1);
52929   __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52930   __pyx_r = NULL;
52931   __pyx_L0:;
52932   __Pyx_XGIVEREF(__pyx_r);
52933   __Pyx_RefNannyFinishContext();
52934   return __pyx_r;
52935 }
52936 
52937 /* "View.MemoryView":226
52938  *
52939  *     @cname('get_memview')
52940  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
52941  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
52942  *         return  memoryview(self, flags, self.dtype_is_object)
52943  */
52944 
__pyx_array_get_memview(struct __pyx_array_obj * __pyx_v_self)52945 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
52946   int __pyx_v_flags;
52947   PyObject *__pyx_r = NULL;
52948   __Pyx_RefNannyDeclarations
52949   PyObject *__pyx_t_1 = NULL;
52950   PyObject *__pyx_t_2 = NULL;
52951   PyObject *__pyx_t_3 = NULL;
52952   int __pyx_lineno = 0;
52953   const char *__pyx_filename = NULL;
52954   int __pyx_clineno = 0;
52955   __Pyx_RefNannySetupContext("get_memview", 0);
52956 
52957   /* "View.MemoryView":227
52958  *     @cname('get_memview')
52959  *     cdef get_memview(self):
52960  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
52961  *         return  memoryview(self, flags, self.dtype_is_object)
52962  *
52963  */
52964   __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
52965 
52966   /* "View.MemoryView":228
52967  *     cdef get_memview(self):
52968  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
52969  *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
52970  *
52971  *     def __len__(self):
52972  */
52973   __Pyx_XDECREF(__pyx_r);
52974   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 228, __pyx_L1_error)
52975   __Pyx_GOTREF(__pyx_t_1);
52976   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 228, __pyx_L1_error)
52977   __Pyx_GOTREF(__pyx_t_2);
52978   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 228, __pyx_L1_error)
52979   __Pyx_GOTREF(__pyx_t_3);
52980   __Pyx_INCREF(((PyObject *)__pyx_v_self));
52981   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
52982   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
52983   __Pyx_GIVEREF(__pyx_t_1);
52984   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
52985   __Pyx_GIVEREF(__pyx_t_2);
52986   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
52987   __pyx_t_1 = 0;
52988   __pyx_t_2 = 0;
52989   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 228, __pyx_L1_error)
52990   __Pyx_GOTREF(__pyx_t_2);
52991   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
52992   __pyx_r = __pyx_t_2;
52993   __pyx_t_2 = 0;
52994   goto __pyx_L0;
52995 
52996   /* "View.MemoryView":226
52997  *
52998  *     @cname('get_memview')
52999  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
53000  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
53001  *         return  memoryview(self, flags, self.dtype_is_object)
53002  */
53003 
53004   /* function exit code */
53005   __pyx_L1_error:;
53006   __Pyx_XDECREF(__pyx_t_1);
53007   __Pyx_XDECREF(__pyx_t_2);
53008   __Pyx_XDECREF(__pyx_t_3);
53009   __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
53010   __pyx_r = 0;
53011   __pyx_L0:;
53012   __Pyx_XGIVEREF(__pyx_r);
53013   __Pyx_RefNannyFinishContext();
53014   return __pyx_r;
53015 }
53016 
53017 /* "View.MemoryView":230
53018  *         return  memoryview(self, flags, self.dtype_is_object)
53019  *
53020  *     def __len__(self):             # <<<<<<<<<<<<<<
53021  *         return self._shape[0]
53022  *
53023  */
53024 
53025 /* Python wrapper */
53026 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
__pyx_array___len__(PyObject * __pyx_v_self)53027 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
53028   Py_ssize_t __pyx_r;
53029   __Pyx_RefNannyDeclarations
53030   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
53031   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
53032 
53033   /* function exit code */
53034   __Pyx_RefNannyFinishContext();
53035   return __pyx_r;
53036 }
53037 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj * __pyx_v_self)53038 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
53039   Py_ssize_t __pyx_r;
53040   __Pyx_RefNannyDeclarations
53041   __Pyx_RefNannySetupContext("__len__", 0);
53042 
53043   /* "View.MemoryView":231
53044  *
53045  *     def __len__(self):
53046  *         return self._shape[0]             # <<<<<<<<<<<<<<
53047  *
53048  *     def __getattr__(self, attr):
53049  */
53050   __pyx_r = (__pyx_v_self->_shape[0]);
53051   goto __pyx_L0;
53052 
53053   /* "View.MemoryView":230
53054  *         return  memoryview(self, flags, self.dtype_is_object)
53055  *
53056  *     def __len__(self):             # <<<<<<<<<<<<<<
53057  *         return self._shape[0]
53058  *
53059  */
53060 
53061   /* function exit code */
53062   __pyx_L0:;
53063   __Pyx_RefNannyFinishContext();
53064   return __pyx_r;
53065 }
53066 
53067 /* "View.MemoryView":233
53068  *         return self._shape[0]
53069  *
53070  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
53071  *         return getattr(self.memview, attr)
53072  *
53073  */
53074 
53075 /* Python wrapper */
53076 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
__pyx_array___getattr__(PyObject * __pyx_v_self,PyObject * __pyx_v_attr)53077 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
53078   PyObject *__pyx_r = 0;
53079   __Pyx_RefNannyDeclarations
53080   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
53081   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
53082 
53083   /* function exit code */
53084   __Pyx_RefNannyFinishContext();
53085   return __pyx_r;
53086 }
53087 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj * __pyx_v_self,PyObject * __pyx_v_attr)53088 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
53089   PyObject *__pyx_r = NULL;
53090   __Pyx_RefNannyDeclarations
53091   PyObject *__pyx_t_1 = NULL;
53092   PyObject *__pyx_t_2 = NULL;
53093   int __pyx_lineno = 0;
53094   const char *__pyx_filename = NULL;
53095   int __pyx_clineno = 0;
53096   __Pyx_RefNannySetupContext("__getattr__", 0);
53097 
53098   /* "View.MemoryView":234
53099  *
53100  *     def __getattr__(self, attr):
53101  *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
53102  *
53103  *     def __getitem__(self, item):
53104  */
53105   __Pyx_XDECREF(__pyx_r);
53106   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 234, __pyx_L1_error)
53107   __Pyx_GOTREF(__pyx_t_1);
53108   __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 234, __pyx_L1_error)
53109   __Pyx_GOTREF(__pyx_t_2);
53110   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53111   __pyx_r = __pyx_t_2;
53112   __pyx_t_2 = 0;
53113   goto __pyx_L0;
53114 
53115   /* "View.MemoryView":233
53116  *         return self._shape[0]
53117  *
53118  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
53119  *         return getattr(self.memview, attr)
53120  *
53121  */
53122 
53123   /* function exit code */
53124   __pyx_L1_error:;
53125   __Pyx_XDECREF(__pyx_t_1);
53126   __Pyx_XDECREF(__pyx_t_2);
53127   __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53128   __pyx_r = NULL;
53129   __pyx_L0:;
53130   __Pyx_XGIVEREF(__pyx_r);
53131   __Pyx_RefNannyFinishContext();
53132   return __pyx_r;
53133 }
53134 
53135 /* "View.MemoryView":236
53136  *         return getattr(self.memview, attr)
53137  *
53138  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
53139  *         return self.memview[item]
53140  *
53141  */
53142 
53143 /* Python wrapper */
53144 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
__pyx_array___getitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_item)53145 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
53146   PyObject *__pyx_r = 0;
53147   __Pyx_RefNannyDeclarations
53148   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
53149   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
53150 
53151   /* function exit code */
53152   __Pyx_RefNannyFinishContext();
53153   return __pyx_r;
53154 }
53155 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj * __pyx_v_self,PyObject * __pyx_v_item)53156 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
53157   PyObject *__pyx_r = NULL;
53158   __Pyx_RefNannyDeclarations
53159   PyObject *__pyx_t_1 = NULL;
53160   PyObject *__pyx_t_2 = NULL;
53161   int __pyx_lineno = 0;
53162   const char *__pyx_filename = NULL;
53163   int __pyx_clineno = 0;
53164   __Pyx_RefNannySetupContext("__getitem__", 0);
53165 
53166   /* "View.MemoryView":237
53167  *
53168  *     def __getitem__(self, item):
53169  *         return self.memview[item]             # <<<<<<<<<<<<<<
53170  *
53171  *     def __setitem__(self, item, value):
53172  */
53173   __Pyx_XDECREF(__pyx_r);
53174   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 237, __pyx_L1_error)
53175   __Pyx_GOTREF(__pyx_t_1);
53176   __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 237, __pyx_L1_error)
53177   __Pyx_GOTREF(__pyx_t_2);
53178   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53179   __pyx_r = __pyx_t_2;
53180   __pyx_t_2 = 0;
53181   goto __pyx_L0;
53182 
53183   /* "View.MemoryView":236
53184  *         return getattr(self.memview, attr)
53185  *
53186  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
53187  *         return self.memview[item]
53188  *
53189  */
53190 
53191   /* function exit code */
53192   __pyx_L1_error:;
53193   __Pyx_XDECREF(__pyx_t_1);
53194   __Pyx_XDECREF(__pyx_t_2);
53195   __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53196   __pyx_r = NULL;
53197   __pyx_L0:;
53198   __Pyx_XGIVEREF(__pyx_r);
53199   __Pyx_RefNannyFinishContext();
53200   return __pyx_r;
53201 }
53202 
53203 /* "View.MemoryView":239
53204  *         return self.memview[item]
53205  *
53206  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
53207  *         self.memview[item] = value
53208  *
53209  */
53210 
53211 /* Python wrapper */
53212 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
__pyx_array___setitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_item,PyObject * __pyx_v_value)53213 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
53214   int __pyx_r;
53215   __Pyx_RefNannyDeclarations
53216   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
53217   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
53218 
53219   /* function exit code */
53220   __Pyx_RefNannyFinishContext();
53221   return __pyx_r;
53222 }
53223 
__pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj * __pyx_v_self,PyObject * __pyx_v_item,PyObject * __pyx_v_value)53224 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
53225   int __pyx_r;
53226   __Pyx_RefNannyDeclarations
53227   PyObject *__pyx_t_1 = NULL;
53228   int __pyx_lineno = 0;
53229   const char *__pyx_filename = NULL;
53230   int __pyx_clineno = 0;
53231   __Pyx_RefNannySetupContext("__setitem__", 0);
53232 
53233   /* "View.MemoryView":240
53234  *
53235  *     def __setitem__(self, item, value):
53236  *         self.memview[item] = value             # <<<<<<<<<<<<<<
53237  *
53238  *
53239  */
53240   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 240, __pyx_L1_error)
53241   __Pyx_GOTREF(__pyx_t_1);
53242   if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(3, 240, __pyx_L1_error)
53243   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53244 
53245   /* "View.MemoryView":239
53246  *         return self.memview[item]
53247  *
53248  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
53249  *         self.memview[item] = value
53250  *
53251  */
53252 
53253   /* function exit code */
53254   __pyx_r = 0;
53255   goto __pyx_L0;
53256   __pyx_L1_error:;
53257   __Pyx_XDECREF(__pyx_t_1);
53258   __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53259   __pyx_r = -1;
53260   __pyx_L0:;
53261   __Pyx_RefNannyFinishContext();
53262   return __pyx_r;
53263 }
53264 
53265 /* "(tree fragment)":1
53266  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
53267  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
53268  * def __setstate_cython__(self, __pyx_state):
53269  */
53270 
53271 /* Python wrapper */
53272 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw___pyx_array_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)53273 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
53274   PyObject *__pyx_r = 0;
53275   __Pyx_RefNannyDeclarations
53276   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
53277   __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
53278 
53279   /* function exit code */
53280   __Pyx_RefNannyFinishContext();
53281   return __pyx_r;
53282 }
53283 
__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj * __pyx_v_self)53284 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
53285   PyObject *__pyx_r = NULL;
53286   __Pyx_RefNannyDeclarations
53287   PyObject *__pyx_t_1 = NULL;
53288   int __pyx_lineno = 0;
53289   const char *__pyx_filename = NULL;
53290   int __pyx_clineno = 0;
53291   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
53292 
53293   /* "(tree fragment)":2
53294  * def __reduce_cython__(self):
53295  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
53296  * def __setstate_cython__(self, __pyx_state):
53297  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
53298  */
53299   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2, __pyx_L1_error)
53300   __Pyx_GOTREF(__pyx_t_1);
53301   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
53302   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53303   __PYX_ERR(3, 2, __pyx_L1_error)
53304 
53305   /* "(tree fragment)":1
53306  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
53307  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
53308  * def __setstate_cython__(self, __pyx_state):
53309  */
53310 
53311   /* function exit code */
53312   __pyx_L1_error:;
53313   __Pyx_XDECREF(__pyx_t_1);
53314   __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53315   __pyx_r = NULL;
53316   __Pyx_XGIVEREF(__pyx_r);
53317   __Pyx_RefNannyFinishContext();
53318   return __pyx_r;
53319 }
53320 
53321 /* "(tree fragment)":3
53322  * def __reduce_cython__(self):
53323  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
53324  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
53325  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
53326  */
53327 
53328 /* Python wrapper */
53329 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw___pyx_array_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)53330 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
53331   PyObject *__pyx_r = 0;
53332   __Pyx_RefNannyDeclarations
53333   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
53334   __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
53335 
53336   /* function exit code */
53337   __Pyx_RefNannyFinishContext();
53338   return __pyx_r;
53339 }
53340 
__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)53341 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
53342   PyObject *__pyx_r = NULL;
53343   __Pyx_RefNannyDeclarations
53344   PyObject *__pyx_t_1 = NULL;
53345   int __pyx_lineno = 0;
53346   const char *__pyx_filename = NULL;
53347   int __pyx_clineno = 0;
53348   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
53349 
53350   /* "(tree fragment)":4
53351  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
53352  * def __setstate_cython__(self, __pyx_state):
53353  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
53354  */
53355   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4, __pyx_L1_error)
53356   __Pyx_GOTREF(__pyx_t_1);
53357   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
53358   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53359   __PYX_ERR(3, 4, __pyx_L1_error)
53360 
53361   /* "(tree fragment)":3
53362  * def __reduce_cython__(self):
53363  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
53364  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
53365  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
53366  */
53367 
53368   /* function exit code */
53369   __pyx_L1_error:;
53370   __Pyx_XDECREF(__pyx_t_1);
53371   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53372   __pyx_r = NULL;
53373   __Pyx_XGIVEREF(__pyx_r);
53374   __Pyx_RefNannyFinishContext();
53375   return __pyx_r;
53376 }
53377 
53378 /* "View.MemoryView":244
53379  *
53380  * @cname("__pyx_array_new")
53381  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
53382  *                           char *mode, char *buf):
53383  *     cdef array result
53384  */
53385 
__pyx_array_new(PyObject * __pyx_v_shape,Py_ssize_t __pyx_v_itemsize,char * __pyx_v_format,char * __pyx_v_mode,char * __pyx_v_buf)53386 static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
53387   struct __pyx_array_obj *__pyx_v_result = 0;
53388   struct __pyx_array_obj *__pyx_r = NULL;
53389   __Pyx_RefNannyDeclarations
53390   int __pyx_t_1;
53391   PyObject *__pyx_t_2 = NULL;
53392   PyObject *__pyx_t_3 = NULL;
53393   PyObject *__pyx_t_4 = NULL;
53394   PyObject *__pyx_t_5 = NULL;
53395   int __pyx_lineno = 0;
53396   const char *__pyx_filename = NULL;
53397   int __pyx_clineno = 0;
53398   __Pyx_RefNannySetupContext("array_cwrapper", 0);
53399 
53400   /* "View.MemoryView":248
53401  *     cdef array result
53402  *
53403  *     if buf == NULL:             # <<<<<<<<<<<<<<
53404  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
53405  *     else:
53406  */
53407   __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
53408   if (__pyx_t_1) {
53409 
53410     /* "View.MemoryView":249
53411  *
53412  *     if buf == NULL:
53413  *         result = array(shape, itemsize, format, mode.decode('ASCII'))             # <<<<<<<<<<<<<<
53414  *     else:
53415  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
53416  */
53417     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 249, __pyx_L1_error)
53418     __Pyx_GOTREF(__pyx_t_2);
53419     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 249, __pyx_L1_error)
53420     __Pyx_GOTREF(__pyx_t_3);
53421     __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 249, __pyx_L1_error)
53422     __Pyx_GOTREF(__pyx_t_4);
53423     __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 249, __pyx_L1_error)
53424     __Pyx_GOTREF(__pyx_t_5);
53425     __Pyx_INCREF(__pyx_v_shape);
53426     __Pyx_GIVEREF(__pyx_v_shape);
53427     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
53428     __Pyx_GIVEREF(__pyx_t_2);
53429     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
53430     __Pyx_GIVEREF(__pyx_t_3);
53431     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
53432     __Pyx_GIVEREF(__pyx_t_4);
53433     PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
53434     __pyx_t_2 = 0;
53435     __pyx_t_3 = 0;
53436     __pyx_t_4 = 0;
53437     __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 249, __pyx_L1_error)
53438     __Pyx_GOTREF(__pyx_t_4);
53439     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
53440     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
53441     __pyx_t_4 = 0;
53442 
53443     /* "View.MemoryView":248
53444  *     cdef array result
53445  *
53446  *     if buf == NULL:             # <<<<<<<<<<<<<<
53447  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
53448  *     else:
53449  */
53450     goto __pyx_L3;
53451   }
53452 
53453   /* "View.MemoryView":251
53454  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
53455  *     else:
53456  *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
53457  *                        allocate_buffer=False)
53458  *         result.data = buf
53459  */
53460   /*else*/ {
53461     __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 251, __pyx_L1_error)
53462     __Pyx_GOTREF(__pyx_t_4);
53463     __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 251, __pyx_L1_error)
53464     __Pyx_GOTREF(__pyx_t_5);
53465     __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 251, __pyx_L1_error)
53466     __Pyx_GOTREF(__pyx_t_3);
53467     __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 251, __pyx_L1_error)
53468     __Pyx_GOTREF(__pyx_t_2);
53469     __Pyx_INCREF(__pyx_v_shape);
53470     __Pyx_GIVEREF(__pyx_v_shape);
53471     PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
53472     __Pyx_GIVEREF(__pyx_t_4);
53473     PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
53474     __Pyx_GIVEREF(__pyx_t_5);
53475     PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
53476     __Pyx_GIVEREF(__pyx_t_3);
53477     PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
53478     __pyx_t_4 = 0;
53479     __pyx_t_5 = 0;
53480     __pyx_t_3 = 0;
53481 
53482     /* "View.MemoryView":252
53483  *     else:
53484  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
53485  *                        allocate_buffer=False)             # <<<<<<<<<<<<<<
53486  *         result.data = buf
53487  *
53488  */
53489     __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 252, __pyx_L1_error)
53490     __Pyx_GOTREF(__pyx_t_3);
53491     if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(3, 252, __pyx_L1_error)
53492 
53493     /* "View.MemoryView":251
53494  *         result = array(shape, itemsize, format, mode.decode('ASCII'))
53495  *     else:
53496  *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
53497  *                        allocate_buffer=False)
53498  *         result.data = buf
53499  */
53500     __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 251, __pyx_L1_error)
53501     __Pyx_GOTREF(__pyx_t_5);
53502     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
53503     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
53504     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
53505     __pyx_t_5 = 0;
53506 
53507     /* "View.MemoryView":253
53508  *         result = array(shape, itemsize, format, mode.decode('ASCII'),
53509  *                        allocate_buffer=False)
53510  *         result.data = buf             # <<<<<<<<<<<<<<
53511  *
53512  *     return result
53513  */
53514     __pyx_v_result->data = __pyx_v_buf;
53515   }
53516   __pyx_L3:;
53517 
53518   /* "View.MemoryView":255
53519  *         result.data = buf
53520  *
53521  *     return result             # <<<<<<<<<<<<<<
53522  *
53523  *
53524  */
53525   __Pyx_XDECREF(((PyObject *)__pyx_r));
53526   __Pyx_INCREF(((PyObject *)__pyx_v_result));
53527   __pyx_r = __pyx_v_result;
53528   goto __pyx_L0;
53529 
53530   /* "View.MemoryView":244
53531  *
53532  * @cname("__pyx_array_new")
53533  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
53534  *                           char *mode, char *buf):
53535  *     cdef array result
53536  */
53537 
53538   /* function exit code */
53539   __pyx_L1_error:;
53540   __Pyx_XDECREF(__pyx_t_2);
53541   __Pyx_XDECREF(__pyx_t_3);
53542   __Pyx_XDECREF(__pyx_t_4);
53543   __Pyx_XDECREF(__pyx_t_5);
53544   __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
53545   __pyx_r = 0;
53546   __pyx_L0:;
53547   __Pyx_XDECREF((PyObject *)__pyx_v_result);
53548   __Pyx_XGIVEREF((PyObject *)__pyx_r);
53549   __Pyx_RefNannyFinishContext();
53550   return __pyx_r;
53551 }
53552 
53553 /* "View.MemoryView":281
53554  * cdef class Enum(object):
53555  *     cdef object name
53556  *     def __init__(self, name):             # <<<<<<<<<<<<<<
53557  *         self.name = name
53558  *     def __repr__(self):
53559  */
53560 
53561 /* Python wrapper */
53562 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_MemviewEnum___init__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)53563 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
53564   PyObject *__pyx_v_name = 0;
53565   int __pyx_lineno = 0;
53566   const char *__pyx_filename = NULL;
53567   int __pyx_clineno = 0;
53568   int __pyx_r;
53569   __Pyx_RefNannyDeclarations
53570   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
53571   {
53572     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
53573     PyObject* values[1] = {0};
53574     if (unlikely(__pyx_kwds)) {
53575       Py_ssize_t kw_args;
53576       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
53577       switch (pos_args) {
53578         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
53579         CYTHON_FALLTHROUGH;
53580         case  0: break;
53581         default: goto __pyx_L5_argtuple_error;
53582       }
53583       kw_args = PyDict_Size(__pyx_kwds);
53584       switch (pos_args) {
53585         case  0:
53586         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
53587         else goto __pyx_L5_argtuple_error;
53588       }
53589       if (unlikely(kw_args > 0)) {
53590         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(3, 281, __pyx_L3_error)
53591       }
53592     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
53593       goto __pyx_L5_argtuple_error;
53594     } else {
53595       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
53596     }
53597     __pyx_v_name = values[0];
53598   }
53599   goto __pyx_L4_argument_unpacking_done;
53600   __pyx_L5_argtuple_error:;
53601   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 281, __pyx_L3_error)
53602   __pyx_L3_error:;
53603   __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53604   __Pyx_RefNannyFinishContext();
53605   return -1;
53606   __pyx_L4_argument_unpacking_done:;
53607   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
53608 
53609   /* function exit code */
53610   __Pyx_RefNannyFinishContext();
53611   return __pyx_r;
53612 }
53613 
__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj * __pyx_v_self,PyObject * __pyx_v_name)53614 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
53615   int __pyx_r;
53616   __Pyx_RefNannyDeclarations
53617   __Pyx_RefNannySetupContext("__init__", 0);
53618 
53619   /* "View.MemoryView":282
53620  *     cdef object name
53621  *     def __init__(self, name):
53622  *         self.name = name             # <<<<<<<<<<<<<<
53623  *     def __repr__(self):
53624  *         return self.name
53625  */
53626   __Pyx_INCREF(__pyx_v_name);
53627   __Pyx_GIVEREF(__pyx_v_name);
53628   __Pyx_GOTREF(__pyx_v_self->name);
53629   __Pyx_DECREF(__pyx_v_self->name);
53630   __pyx_v_self->name = __pyx_v_name;
53631 
53632   /* "View.MemoryView":281
53633  * cdef class Enum(object):
53634  *     cdef object name
53635  *     def __init__(self, name):             # <<<<<<<<<<<<<<
53636  *         self.name = name
53637  *     def __repr__(self):
53638  */
53639 
53640   /* function exit code */
53641   __pyx_r = 0;
53642   __Pyx_RefNannyFinishContext();
53643   return __pyx_r;
53644 }
53645 
53646 /* "View.MemoryView":283
53647  *     def __init__(self, name):
53648  *         self.name = name
53649  *     def __repr__(self):             # <<<<<<<<<<<<<<
53650  *         return self.name
53651  *
53652  */
53653 
53654 /* Python wrapper */
53655 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
__pyx_MemviewEnum___repr__(PyObject * __pyx_v_self)53656 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
53657   PyObject *__pyx_r = 0;
53658   __Pyx_RefNannyDeclarations
53659   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
53660   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
53661 
53662   /* function exit code */
53663   __Pyx_RefNannyFinishContext();
53664   return __pyx_r;
53665 }
53666 
__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj * __pyx_v_self)53667 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
53668   PyObject *__pyx_r = NULL;
53669   __Pyx_RefNannyDeclarations
53670   __Pyx_RefNannySetupContext("__repr__", 0);
53671 
53672   /* "View.MemoryView":284
53673  *         self.name = name
53674  *     def __repr__(self):
53675  *         return self.name             # <<<<<<<<<<<<<<
53676  *
53677  * cdef generic = Enum("<strided and direct or indirect>")
53678  */
53679   __Pyx_XDECREF(__pyx_r);
53680   __Pyx_INCREF(__pyx_v_self->name);
53681   __pyx_r = __pyx_v_self->name;
53682   goto __pyx_L0;
53683 
53684   /* "View.MemoryView":283
53685  *     def __init__(self, name):
53686  *         self.name = name
53687  *     def __repr__(self):             # <<<<<<<<<<<<<<
53688  *         return self.name
53689  *
53690  */
53691 
53692   /* function exit code */
53693   __pyx_L0:;
53694   __Pyx_XGIVEREF(__pyx_r);
53695   __Pyx_RefNannyFinishContext();
53696   return __pyx_r;
53697 }
53698 
53699 /* "(tree fragment)":1
53700  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
53701  *     cdef tuple state
53702  *     cdef object _dict
53703  */
53704 
53705 /* Python wrapper */
53706 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)53707 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
53708   PyObject *__pyx_r = 0;
53709   __Pyx_RefNannyDeclarations
53710   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
53711   __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
53712 
53713   /* function exit code */
53714   __Pyx_RefNannyFinishContext();
53715   return __pyx_r;
53716 }
53717 
__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj * __pyx_v_self)53718 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
53719   PyObject *__pyx_v_state = 0;
53720   PyObject *__pyx_v__dict = 0;
53721   int __pyx_v_use_setstate;
53722   PyObject *__pyx_r = NULL;
53723   __Pyx_RefNannyDeclarations
53724   PyObject *__pyx_t_1 = NULL;
53725   int __pyx_t_2;
53726   int __pyx_t_3;
53727   PyObject *__pyx_t_4 = NULL;
53728   PyObject *__pyx_t_5 = NULL;
53729   int __pyx_lineno = 0;
53730   const char *__pyx_filename = NULL;
53731   int __pyx_clineno = 0;
53732   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
53733 
53734   /* "(tree fragment)":5
53735  *     cdef object _dict
53736  *     cdef bint use_setstate
53737  *     state = (self.name,)             # <<<<<<<<<<<<<<
53738  *     _dict = getattr(self, '__dict__', None)
53739  *     if _dict is not None:
53740  */
53741   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 5, __pyx_L1_error)
53742   __Pyx_GOTREF(__pyx_t_1);
53743   __Pyx_INCREF(__pyx_v_self->name);
53744   __Pyx_GIVEREF(__pyx_v_self->name);
53745   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
53746   __pyx_v_state = ((PyObject*)__pyx_t_1);
53747   __pyx_t_1 = 0;
53748 
53749   /* "(tree fragment)":6
53750  *     cdef bint use_setstate
53751  *     state = (self.name,)
53752  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
53753  *     if _dict is not None:
53754  *         state += (_dict,)
53755  */
53756   __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 6, __pyx_L1_error)
53757   __Pyx_GOTREF(__pyx_t_1);
53758   __pyx_v__dict = __pyx_t_1;
53759   __pyx_t_1 = 0;
53760 
53761   /* "(tree fragment)":7
53762  *     state = (self.name,)
53763  *     _dict = getattr(self, '__dict__', None)
53764  *     if _dict is not None:             # <<<<<<<<<<<<<<
53765  *         state += (_dict,)
53766  *         use_setstate = True
53767  */
53768   __pyx_t_2 = (__pyx_v__dict != Py_None);
53769   __pyx_t_3 = (__pyx_t_2 != 0);
53770   if (__pyx_t_3) {
53771 
53772     /* "(tree fragment)":8
53773  *     _dict = getattr(self, '__dict__', None)
53774  *     if _dict is not None:
53775  *         state += (_dict,)             # <<<<<<<<<<<<<<
53776  *         use_setstate = True
53777  *     else:
53778  */
53779     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 8, __pyx_L1_error)
53780     __Pyx_GOTREF(__pyx_t_1);
53781     __Pyx_INCREF(__pyx_v__dict);
53782     __Pyx_GIVEREF(__pyx_v__dict);
53783     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
53784     __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 8, __pyx_L1_error)
53785     __Pyx_GOTREF(__pyx_t_4);
53786     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53787     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
53788     __pyx_t_4 = 0;
53789 
53790     /* "(tree fragment)":9
53791  *     if _dict is not None:
53792  *         state += (_dict,)
53793  *         use_setstate = True             # <<<<<<<<<<<<<<
53794  *     else:
53795  *         use_setstate = self.name is not None
53796  */
53797     __pyx_v_use_setstate = 1;
53798 
53799     /* "(tree fragment)":7
53800  *     state = (self.name,)
53801  *     _dict = getattr(self, '__dict__', None)
53802  *     if _dict is not None:             # <<<<<<<<<<<<<<
53803  *         state += (_dict,)
53804  *         use_setstate = True
53805  */
53806     goto __pyx_L3;
53807   }
53808 
53809   /* "(tree fragment)":11
53810  *         use_setstate = True
53811  *     else:
53812  *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
53813  *     if use_setstate:
53814  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
53815  */
53816   /*else*/ {
53817     __pyx_t_3 = (__pyx_v_self->name != Py_None);
53818     __pyx_v_use_setstate = __pyx_t_3;
53819   }
53820   __pyx_L3:;
53821 
53822   /* "(tree fragment)":12
53823  *     else:
53824  *         use_setstate = self.name is not None
53825  *     if use_setstate:             # <<<<<<<<<<<<<<
53826  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
53827  *     else:
53828  */
53829   __pyx_t_3 = (__pyx_v_use_setstate != 0);
53830   if (__pyx_t_3) {
53831 
53832     /* "(tree fragment)":13
53833  *         use_setstate = self.name is not None
53834  *     if use_setstate:
53835  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state             # <<<<<<<<<<<<<<
53836  *     else:
53837  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
53838  */
53839     __Pyx_XDECREF(__pyx_r);
53840     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 13, __pyx_L1_error)
53841     __Pyx_GOTREF(__pyx_t_4);
53842     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 13, __pyx_L1_error)
53843     __Pyx_GOTREF(__pyx_t_1);
53844     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
53845     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
53846     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
53847     __Pyx_INCREF(__pyx_int_184977713);
53848     __Pyx_GIVEREF(__pyx_int_184977713);
53849     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
53850     __Pyx_INCREF(Py_None);
53851     __Pyx_GIVEREF(Py_None);
53852     PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
53853     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 13, __pyx_L1_error)
53854     __Pyx_GOTREF(__pyx_t_5);
53855     __Pyx_GIVEREF(__pyx_t_4);
53856     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
53857     __Pyx_GIVEREF(__pyx_t_1);
53858     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
53859     __Pyx_INCREF(__pyx_v_state);
53860     __Pyx_GIVEREF(__pyx_v_state);
53861     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
53862     __pyx_t_4 = 0;
53863     __pyx_t_1 = 0;
53864     __pyx_r = __pyx_t_5;
53865     __pyx_t_5 = 0;
53866     goto __pyx_L0;
53867 
53868     /* "(tree fragment)":12
53869  *     else:
53870  *         use_setstate = self.name is not None
53871  *     if use_setstate:             # <<<<<<<<<<<<<<
53872  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
53873  *     else:
53874  */
53875   }
53876 
53877   /* "(tree fragment)":15
53878  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
53879  *     else:
53880  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)             # <<<<<<<<<<<<<<
53881  * def __setstate_cython__(self, __pyx_state):
53882  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
53883  */
53884   /*else*/ {
53885     __Pyx_XDECREF(__pyx_r);
53886     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 15, __pyx_L1_error)
53887     __Pyx_GOTREF(__pyx_t_5);
53888     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 15, __pyx_L1_error)
53889     __Pyx_GOTREF(__pyx_t_1);
53890     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
53891     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
53892     PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
53893     __Pyx_INCREF(__pyx_int_184977713);
53894     __Pyx_GIVEREF(__pyx_int_184977713);
53895     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
53896     __Pyx_INCREF(__pyx_v_state);
53897     __Pyx_GIVEREF(__pyx_v_state);
53898     PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
53899     __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 15, __pyx_L1_error)
53900     __Pyx_GOTREF(__pyx_t_4);
53901     __Pyx_GIVEREF(__pyx_t_5);
53902     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
53903     __Pyx_GIVEREF(__pyx_t_1);
53904     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
53905     __pyx_t_5 = 0;
53906     __pyx_t_1 = 0;
53907     __pyx_r = __pyx_t_4;
53908     __pyx_t_4 = 0;
53909     goto __pyx_L0;
53910   }
53911 
53912   /* "(tree fragment)":1
53913  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
53914  *     cdef tuple state
53915  *     cdef object _dict
53916  */
53917 
53918   /* function exit code */
53919   __pyx_L1_error:;
53920   __Pyx_XDECREF(__pyx_t_1);
53921   __Pyx_XDECREF(__pyx_t_4);
53922   __Pyx_XDECREF(__pyx_t_5);
53923   __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53924   __pyx_r = NULL;
53925   __pyx_L0:;
53926   __Pyx_XDECREF(__pyx_v_state);
53927   __Pyx_XDECREF(__pyx_v__dict);
53928   __Pyx_XGIVEREF(__pyx_r);
53929   __Pyx_RefNannyFinishContext();
53930   return __pyx_r;
53931 }
53932 
53933 /* "(tree fragment)":16
53934  *     else:
53935  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
53936  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
53937  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
53938  */
53939 
53940 /* Python wrapper */
53941 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)53942 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
53943   PyObject *__pyx_r = 0;
53944   __Pyx_RefNannyDeclarations
53945   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
53946   __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
53947 
53948   /* function exit code */
53949   __Pyx_RefNannyFinishContext();
53950   return __pyx_r;
53951 }
53952 
__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj * __pyx_v_self,PyObject * __pyx_v___pyx_state)53953 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
53954   PyObject *__pyx_r = NULL;
53955   __Pyx_RefNannyDeclarations
53956   PyObject *__pyx_t_1 = NULL;
53957   int __pyx_lineno = 0;
53958   const char *__pyx_filename = NULL;
53959   int __pyx_clineno = 0;
53960   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
53961 
53962   /* "(tree fragment)":17
53963  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
53964  * def __setstate_cython__(self, __pyx_state):
53965  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
53966  */
53967   if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(3, 17, __pyx_L1_error)
53968   __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 17, __pyx_L1_error)
53969   __Pyx_GOTREF(__pyx_t_1);
53970   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
53971 
53972   /* "(tree fragment)":16
53973  *     else:
53974  *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
53975  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
53976  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
53977  */
53978 
53979   /* function exit code */
53980   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
53981   goto __pyx_L0;
53982   __pyx_L1_error:;
53983   __Pyx_XDECREF(__pyx_t_1);
53984   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53985   __pyx_r = NULL;
53986   __pyx_L0:;
53987   __Pyx_XGIVEREF(__pyx_r);
53988   __Pyx_RefNannyFinishContext();
53989   return __pyx_r;
53990 }
53991 
53992 /* "View.MemoryView":298
53993  *
53994  * @cname('__pyx_align_pointer')
53995  * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
53996  *     "Align pointer memory on a given boundary"
53997  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
53998  */
53999 
__pyx_align_pointer(void * __pyx_v_memory,size_t __pyx_v_alignment)54000 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
54001   Py_intptr_t __pyx_v_aligned_p;
54002   size_t __pyx_v_offset;
54003   void *__pyx_r;
54004   int __pyx_t_1;
54005 
54006   /* "View.MemoryView":300
54007  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
54008  *     "Align pointer memory on a given boundary"
54009  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory             # <<<<<<<<<<<<<<
54010  *     cdef size_t offset
54011  *
54012  */
54013   __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
54014 
54015   /* "View.MemoryView":304
54016  *
54017  *     with cython.cdivision(True):
54018  *         offset = aligned_p % alignment             # <<<<<<<<<<<<<<
54019  *
54020  *     if offset > 0:
54021  */
54022   __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
54023 
54024   /* "View.MemoryView":306
54025  *         offset = aligned_p % alignment
54026  *
54027  *     if offset > 0:             # <<<<<<<<<<<<<<
54028  *         aligned_p += alignment - offset
54029  *
54030  */
54031   __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
54032   if (__pyx_t_1) {
54033 
54034     /* "View.MemoryView":307
54035  *
54036  *     if offset > 0:
54037  *         aligned_p += alignment - offset             # <<<<<<<<<<<<<<
54038  *
54039  *     return <void *> aligned_p
54040  */
54041     __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
54042 
54043     /* "View.MemoryView":306
54044  *         offset = aligned_p % alignment
54045  *
54046  *     if offset > 0:             # <<<<<<<<<<<<<<
54047  *         aligned_p += alignment - offset
54048  *
54049  */
54050   }
54051 
54052   /* "View.MemoryView":309
54053  *         aligned_p += alignment - offset
54054  *
54055  *     return <void *> aligned_p             # <<<<<<<<<<<<<<
54056  *
54057  *
54058  */
54059   __pyx_r = ((void *)__pyx_v_aligned_p);
54060   goto __pyx_L0;
54061 
54062   /* "View.MemoryView":298
54063  *
54064  * @cname('__pyx_align_pointer')
54065  * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
54066  *     "Align pointer memory on a given boundary"
54067  *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
54068  */
54069 
54070   /* function exit code */
54071   __pyx_L0:;
54072   return __pyx_r;
54073 }
54074 
54075 /* "View.MemoryView":345
54076  *     cdef __Pyx_TypeInfo *typeinfo
54077  *
54078  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
54079  *         self.obj = obj
54080  *         self.flags = flags
54081  */
54082 
54083 /* Python wrapper */
54084 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_memoryview___cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)54085 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
54086   PyObject *__pyx_v_obj = 0;
54087   int __pyx_v_flags;
54088   int __pyx_v_dtype_is_object;
54089   int __pyx_lineno = 0;
54090   const char *__pyx_filename = NULL;
54091   int __pyx_clineno = 0;
54092   int __pyx_r;
54093   __Pyx_RefNannyDeclarations
54094   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
54095   {
54096     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
54097     PyObject* values[3] = {0,0,0};
54098     if (unlikely(__pyx_kwds)) {
54099       Py_ssize_t kw_args;
54100       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
54101       switch (pos_args) {
54102         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
54103         CYTHON_FALLTHROUGH;
54104         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
54105         CYTHON_FALLTHROUGH;
54106         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
54107         CYTHON_FALLTHROUGH;
54108         case  0: break;
54109         default: goto __pyx_L5_argtuple_error;
54110       }
54111       kw_args = PyDict_Size(__pyx_kwds);
54112       switch (pos_args) {
54113         case  0:
54114         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
54115         else goto __pyx_L5_argtuple_error;
54116         CYTHON_FALLTHROUGH;
54117         case  1:
54118         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
54119         else {
54120           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(3, 345, __pyx_L3_error)
54121         }
54122         CYTHON_FALLTHROUGH;
54123         case  2:
54124         if (kw_args > 0) {
54125           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
54126           if (value) { values[2] = value; kw_args--; }
54127         }
54128       }
54129       if (unlikely(kw_args > 0)) {
54130         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(3, 345, __pyx_L3_error)
54131       }
54132     } else {
54133       switch (PyTuple_GET_SIZE(__pyx_args)) {
54134         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
54135         CYTHON_FALLTHROUGH;
54136         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
54137         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
54138         break;
54139         default: goto __pyx_L5_argtuple_error;
54140       }
54141     }
54142     __pyx_v_obj = values[0];
54143     __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 345, __pyx_L3_error)
54144     if (values[2]) {
54145       __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 345, __pyx_L3_error)
54146     } else {
54147       __pyx_v_dtype_is_object = ((int)0);
54148     }
54149   }
54150   goto __pyx_L4_argument_unpacking_done;
54151   __pyx_L5_argtuple_error:;
54152   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 345, __pyx_L3_error)
54153   __pyx_L3_error:;
54154   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54155   __Pyx_RefNannyFinishContext();
54156   return -1;
54157   __pyx_L4_argument_unpacking_done:;
54158   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
54159 
54160   /* function exit code */
54161   __Pyx_RefNannyFinishContext();
54162   return __pyx_r;
54163 }
54164 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_obj,int __pyx_v_flags,int __pyx_v_dtype_is_object)54165 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
54166   int __pyx_r;
54167   __Pyx_RefNannyDeclarations
54168   int __pyx_t_1;
54169   int __pyx_t_2;
54170   int __pyx_t_3;
54171   int __pyx_t_4;
54172   int __pyx_lineno = 0;
54173   const char *__pyx_filename = NULL;
54174   int __pyx_clineno = 0;
54175   __Pyx_RefNannySetupContext("__cinit__", 0);
54176 
54177   /* "View.MemoryView":346
54178  *
54179  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
54180  *         self.obj = obj             # <<<<<<<<<<<<<<
54181  *         self.flags = flags
54182  *         if type(self) is memoryview or obj is not None:
54183  */
54184   __Pyx_INCREF(__pyx_v_obj);
54185   __Pyx_GIVEREF(__pyx_v_obj);
54186   __Pyx_GOTREF(__pyx_v_self->obj);
54187   __Pyx_DECREF(__pyx_v_self->obj);
54188   __pyx_v_self->obj = __pyx_v_obj;
54189 
54190   /* "View.MemoryView":347
54191  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
54192  *         self.obj = obj
54193  *         self.flags = flags             # <<<<<<<<<<<<<<
54194  *         if type(self) is memoryview or obj is not None:
54195  *             __Pyx_GetBuffer(obj, &self.view, flags)
54196  */
54197   __pyx_v_self->flags = __pyx_v_flags;
54198 
54199   /* "View.MemoryView":348
54200  *         self.obj = obj
54201  *         self.flags = flags
54202  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
54203  *             __Pyx_GetBuffer(obj, &self.view, flags)
54204  *             if <PyObject *> self.view.obj == NULL:
54205  */
54206   __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
54207   __pyx_t_3 = (__pyx_t_2 != 0);
54208   if (!__pyx_t_3) {
54209   } else {
54210     __pyx_t_1 = __pyx_t_3;
54211     goto __pyx_L4_bool_binop_done;
54212   }
54213   __pyx_t_3 = (__pyx_v_obj != Py_None);
54214   __pyx_t_2 = (__pyx_t_3 != 0);
54215   __pyx_t_1 = __pyx_t_2;
54216   __pyx_L4_bool_binop_done:;
54217   if (__pyx_t_1) {
54218 
54219     /* "View.MemoryView":349
54220  *         self.flags = flags
54221  *         if type(self) is memoryview or obj is not None:
54222  *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
54223  *             if <PyObject *> self.view.obj == NULL:
54224  *                 (<__pyx_buffer *> &self.view).obj = Py_None
54225  */
54226     __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 349, __pyx_L1_error)
54227 
54228     /* "View.MemoryView":350
54229  *         if type(self) is memoryview or obj is not None:
54230  *             __Pyx_GetBuffer(obj, &self.view, flags)
54231  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
54232  *                 (<__pyx_buffer *> &self.view).obj = Py_None
54233  *                 Py_INCREF(Py_None)
54234  */
54235     __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
54236     if (__pyx_t_1) {
54237 
54238       /* "View.MemoryView":351
54239  *             __Pyx_GetBuffer(obj, &self.view, flags)
54240  *             if <PyObject *> self.view.obj == NULL:
54241  *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
54242  *                 Py_INCREF(Py_None)
54243  *
54244  */
54245       ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
54246 
54247       /* "View.MemoryView":352
54248  *             if <PyObject *> self.view.obj == NULL:
54249  *                 (<__pyx_buffer *> &self.view).obj = Py_None
54250  *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
54251  *
54252  *         global __pyx_memoryview_thread_locks_used
54253  */
54254       Py_INCREF(Py_None);
54255 
54256       /* "View.MemoryView":350
54257  *         if type(self) is memoryview or obj is not None:
54258  *             __Pyx_GetBuffer(obj, &self.view, flags)
54259  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
54260  *                 (<__pyx_buffer *> &self.view).obj = Py_None
54261  *                 Py_INCREF(Py_None)
54262  */
54263     }
54264 
54265     /* "View.MemoryView":348
54266  *         self.obj = obj
54267  *         self.flags = flags
54268  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
54269  *             __Pyx_GetBuffer(obj, &self.view, flags)
54270  *             if <PyObject *> self.view.obj == NULL:
54271  */
54272   }
54273 
54274   /* "View.MemoryView":355
54275  *
54276  *         global __pyx_memoryview_thread_locks_used
54277  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
54278  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
54279  *             __pyx_memoryview_thread_locks_used += 1
54280  */
54281   __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
54282   if (__pyx_t_1) {
54283 
54284     /* "View.MemoryView":356
54285  *         global __pyx_memoryview_thread_locks_used
54286  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
54287  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
54288  *             __pyx_memoryview_thread_locks_used += 1
54289  *         if self.lock is NULL:
54290  */
54291     __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
54292 
54293     /* "View.MemoryView":357
54294  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
54295  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
54296  *             __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
54297  *         if self.lock is NULL:
54298  *             self.lock = PyThread_allocate_lock()
54299  */
54300     __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
54301 
54302     /* "View.MemoryView":355
54303  *
54304  *         global __pyx_memoryview_thread_locks_used
54305  *         if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
54306  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
54307  *             __pyx_memoryview_thread_locks_used += 1
54308  */
54309   }
54310 
54311   /* "View.MemoryView":358
54312  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
54313  *             __pyx_memoryview_thread_locks_used += 1
54314  *         if self.lock is NULL:             # <<<<<<<<<<<<<<
54315  *             self.lock = PyThread_allocate_lock()
54316  *             if self.lock is NULL:
54317  */
54318   __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
54319   if (__pyx_t_1) {
54320 
54321     /* "View.MemoryView":359
54322  *             __pyx_memoryview_thread_locks_used += 1
54323  *         if self.lock is NULL:
54324  *             self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
54325  *             if self.lock is NULL:
54326  *                 raise MemoryError
54327  */
54328     __pyx_v_self->lock = PyThread_allocate_lock();
54329 
54330     /* "View.MemoryView":360
54331  *         if self.lock is NULL:
54332  *             self.lock = PyThread_allocate_lock()
54333  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
54334  *                 raise MemoryError
54335  *
54336  */
54337     __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
54338     if (unlikely(__pyx_t_1)) {
54339 
54340       /* "View.MemoryView":361
54341  *             self.lock = PyThread_allocate_lock()
54342  *             if self.lock is NULL:
54343  *                 raise MemoryError             # <<<<<<<<<<<<<<
54344  *
54345  *         if flags & PyBUF_FORMAT:
54346  */
54347       PyErr_NoMemory(); __PYX_ERR(3, 361, __pyx_L1_error)
54348 
54349       /* "View.MemoryView":360
54350  *         if self.lock is NULL:
54351  *             self.lock = PyThread_allocate_lock()
54352  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
54353  *                 raise MemoryError
54354  *
54355  */
54356     }
54357 
54358     /* "View.MemoryView":358
54359  *             self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
54360  *             __pyx_memoryview_thread_locks_used += 1
54361  *         if self.lock is NULL:             # <<<<<<<<<<<<<<
54362  *             self.lock = PyThread_allocate_lock()
54363  *             if self.lock is NULL:
54364  */
54365   }
54366 
54367   /* "View.MemoryView":363
54368  *                 raise MemoryError
54369  *
54370  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
54371  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
54372  *         else:
54373  */
54374   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
54375   if (__pyx_t_1) {
54376 
54377     /* "View.MemoryView":364
54378  *
54379  *         if flags & PyBUF_FORMAT:
54380  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
54381  *         else:
54382  *             self.dtype_is_object = dtype_is_object
54383  */
54384     __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
54385     if (__pyx_t_2) {
54386     } else {
54387       __pyx_t_1 = __pyx_t_2;
54388       goto __pyx_L11_bool_binop_done;
54389     }
54390     __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
54391     __pyx_t_1 = __pyx_t_2;
54392     __pyx_L11_bool_binop_done:;
54393     __pyx_v_self->dtype_is_object = __pyx_t_1;
54394 
54395     /* "View.MemoryView":363
54396  *                 raise MemoryError
54397  *
54398  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
54399  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
54400  *         else:
54401  */
54402     goto __pyx_L10;
54403   }
54404 
54405   /* "View.MemoryView":366
54406  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
54407  *         else:
54408  *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
54409  *
54410  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
54411  */
54412   /*else*/ {
54413     __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
54414   }
54415   __pyx_L10:;
54416 
54417   /* "View.MemoryView":368
54418  *             self.dtype_is_object = dtype_is_object
54419  *
54420  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(             # <<<<<<<<<<<<<<
54421  *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
54422  *         self.typeinfo = NULL
54423  */
54424   __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
54425 
54426   /* "View.MemoryView":370
54427  *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
54428  *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
54429  *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
54430  *
54431  *     def __dealloc__(memoryview self):
54432  */
54433   __pyx_v_self->typeinfo = NULL;
54434 
54435   /* "View.MemoryView":345
54436  *     cdef __Pyx_TypeInfo *typeinfo
54437  *
54438  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
54439  *         self.obj = obj
54440  *         self.flags = flags
54441  */
54442 
54443   /* function exit code */
54444   __pyx_r = 0;
54445   goto __pyx_L0;
54446   __pyx_L1_error:;
54447   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54448   __pyx_r = -1;
54449   __pyx_L0:;
54450   __Pyx_RefNannyFinishContext();
54451   return __pyx_r;
54452 }
54453 
54454 /* "View.MemoryView":372
54455  *         self.typeinfo = NULL
54456  *
54457  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
54458  *         if self.obj is not None:
54459  *             __Pyx_ReleaseBuffer(&self.view)
54460  */
54461 
54462 /* Python wrapper */
54463 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___dealloc__(PyObject * __pyx_v_self)54464 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
54465   __Pyx_RefNannyDeclarations
54466   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
54467   __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
54468 
54469   /* function exit code */
54470   __Pyx_RefNannyFinishContext();
54471 }
54472 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj * __pyx_v_self)54473 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
54474   int __pyx_v_i;
54475   __Pyx_RefNannyDeclarations
54476   int __pyx_t_1;
54477   int __pyx_t_2;
54478   int __pyx_t_3;
54479   int __pyx_t_4;
54480   int __pyx_t_5;
54481   PyThread_type_lock __pyx_t_6;
54482   PyThread_type_lock __pyx_t_7;
54483   __Pyx_RefNannySetupContext("__dealloc__", 0);
54484 
54485   /* "View.MemoryView":373
54486  *
54487  *     def __dealloc__(memoryview self):
54488  *         if self.obj is not None:             # <<<<<<<<<<<<<<
54489  *             __Pyx_ReleaseBuffer(&self.view)
54490  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
54491  */
54492   __pyx_t_1 = (__pyx_v_self->obj != Py_None);
54493   __pyx_t_2 = (__pyx_t_1 != 0);
54494   if (__pyx_t_2) {
54495 
54496     /* "View.MemoryView":374
54497  *     def __dealloc__(memoryview self):
54498  *         if self.obj is not None:
54499  *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
54500  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
54501  *
54502  */
54503     __Pyx_ReleaseBuffer((&__pyx_v_self->view));
54504 
54505     /* "View.MemoryView":373
54506  *
54507  *     def __dealloc__(memoryview self):
54508  *         if self.obj is not None:             # <<<<<<<<<<<<<<
54509  *             __Pyx_ReleaseBuffer(&self.view)
54510  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
54511  */
54512     goto __pyx_L3;
54513   }
54514 
54515   /* "View.MemoryView":375
54516  *         if self.obj is not None:
54517  *             __Pyx_ReleaseBuffer(&self.view)
54518  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
54519  *
54520  *             (<__pyx_buffer *> &self.view).obj = NULL
54521  */
54522   __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
54523   if (__pyx_t_2) {
54524 
54525     /* "View.MemoryView":377
54526  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
54527  *
54528  *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
54529  *             Py_DECREF(Py_None)
54530  *
54531  */
54532     ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
54533 
54534     /* "View.MemoryView":378
54535  *
54536  *             (<__pyx_buffer *> &self.view).obj = NULL
54537  *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
54538  *
54539  *         cdef int i
54540  */
54541     Py_DECREF(Py_None);
54542 
54543     /* "View.MemoryView":375
54544  *         if self.obj is not None:
54545  *             __Pyx_ReleaseBuffer(&self.view)
54546  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
54547  *
54548  *             (<__pyx_buffer *> &self.view).obj = NULL
54549  */
54550   }
54551   __pyx_L3:;
54552 
54553   /* "View.MemoryView":382
54554  *         cdef int i
54555  *         global __pyx_memoryview_thread_locks_used
54556  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
54557  *             for i in range(__pyx_memoryview_thread_locks_used):
54558  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
54559  */
54560   __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
54561   if (__pyx_t_2) {
54562 
54563     /* "View.MemoryView":383
54564  *         global __pyx_memoryview_thread_locks_used
54565  *         if self.lock != NULL:
54566  *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
54567  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
54568  *                     __pyx_memoryview_thread_locks_used -= 1
54569  */
54570     __pyx_t_3 = __pyx_memoryview_thread_locks_used;
54571     __pyx_t_4 = __pyx_t_3;
54572     for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
54573       __pyx_v_i = __pyx_t_5;
54574 
54575       /* "View.MemoryView":384
54576  *         if self.lock != NULL:
54577  *             for i in range(__pyx_memoryview_thread_locks_used):
54578  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
54579  *                     __pyx_memoryview_thread_locks_used -= 1
54580  *                     if i != __pyx_memoryview_thread_locks_used:
54581  */
54582       __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
54583       if (__pyx_t_2) {
54584 
54585         /* "View.MemoryView":385
54586  *             for i in range(__pyx_memoryview_thread_locks_used):
54587  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
54588  *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
54589  *                     if i != __pyx_memoryview_thread_locks_used:
54590  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
54591  */
54592         __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
54593 
54594         /* "View.MemoryView":386
54595  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
54596  *                     __pyx_memoryview_thread_locks_used -= 1
54597  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
54598  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
54599  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
54600  */
54601         __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
54602         if (__pyx_t_2) {
54603 
54604           /* "View.MemoryView":388
54605  *                     if i != __pyx_memoryview_thread_locks_used:
54606  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
54607  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
54608  *                     break
54609  *             else:
54610  */
54611           __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
54612           __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
54613 
54614           /* "View.MemoryView":387
54615  *                     __pyx_memoryview_thread_locks_used -= 1
54616  *                     if i != __pyx_memoryview_thread_locks_used:
54617  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
54618  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
54619  *                     break
54620  */
54621           (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
54622           (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
54623 
54624           /* "View.MemoryView":386
54625  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
54626  *                     __pyx_memoryview_thread_locks_used -= 1
54627  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
54628  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
54629  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
54630  */
54631         }
54632 
54633         /* "View.MemoryView":389
54634  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
54635  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
54636  *                     break             # <<<<<<<<<<<<<<
54637  *             else:
54638  *                 PyThread_free_lock(self.lock)
54639  */
54640         goto __pyx_L6_break;
54641 
54642         /* "View.MemoryView":384
54643  *         if self.lock != NULL:
54644  *             for i in range(__pyx_memoryview_thread_locks_used):
54645  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
54646  *                     __pyx_memoryview_thread_locks_used -= 1
54647  *                     if i != __pyx_memoryview_thread_locks_used:
54648  */
54649       }
54650     }
54651     /*else*/ {
54652 
54653       /* "View.MemoryView":391
54654  *                     break
54655  *             else:
54656  *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
54657  *
54658  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
54659  */
54660       PyThread_free_lock(__pyx_v_self->lock);
54661     }
54662     __pyx_L6_break:;
54663 
54664     /* "View.MemoryView":382
54665  *         cdef int i
54666  *         global __pyx_memoryview_thread_locks_used
54667  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
54668  *             for i in range(__pyx_memoryview_thread_locks_used):
54669  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
54670  */
54671   }
54672 
54673   /* "View.MemoryView":372
54674  *         self.typeinfo = NULL
54675  *
54676  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
54677  *         if self.obj is not None:
54678  *             __Pyx_ReleaseBuffer(&self.view)
54679  */
54680 
54681   /* function exit code */
54682   __Pyx_RefNannyFinishContext();
54683 }
54684 
54685 /* "View.MemoryView":393
54686  *                 PyThread_free_lock(self.lock)
54687  *
54688  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
54689  *         cdef Py_ssize_t dim
54690  *         cdef char *itemp = <char *> self.view.buf
54691  */
54692 
__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index)54693 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
54694   Py_ssize_t __pyx_v_dim;
54695   char *__pyx_v_itemp;
54696   PyObject *__pyx_v_idx = NULL;
54697   char *__pyx_r;
54698   __Pyx_RefNannyDeclarations
54699   Py_ssize_t __pyx_t_1;
54700   PyObject *__pyx_t_2 = NULL;
54701   Py_ssize_t __pyx_t_3;
54702   PyObject *(*__pyx_t_4)(PyObject *);
54703   PyObject *__pyx_t_5 = NULL;
54704   Py_ssize_t __pyx_t_6;
54705   char *__pyx_t_7;
54706   int __pyx_lineno = 0;
54707   const char *__pyx_filename = NULL;
54708   int __pyx_clineno = 0;
54709   __Pyx_RefNannySetupContext("get_item_pointer", 0);
54710 
54711   /* "View.MemoryView":395
54712  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
54713  *         cdef Py_ssize_t dim
54714  *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
54715  *
54716  *         for dim, idx in enumerate(index):
54717  */
54718   __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
54719 
54720   /* "View.MemoryView":397
54721  *         cdef char *itemp = <char *> self.view.buf
54722  *
54723  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
54724  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
54725  *
54726  */
54727   __pyx_t_1 = 0;
54728   if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
54729     __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
54730     __pyx_t_4 = NULL;
54731   } else {
54732     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 397, __pyx_L1_error)
54733     __Pyx_GOTREF(__pyx_t_2);
54734     __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 397, __pyx_L1_error)
54735   }
54736   for (;;) {
54737     if (likely(!__pyx_t_4)) {
54738       if (likely(PyList_CheckExact(__pyx_t_2))) {
54739         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
54740         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
54741         __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(3, 397, __pyx_L1_error)
54742         #else
54743         __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 397, __pyx_L1_error)
54744         __Pyx_GOTREF(__pyx_t_5);
54745         #endif
54746       } else {
54747         if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
54748         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
54749         __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(3, 397, __pyx_L1_error)
54750         #else
54751         __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 397, __pyx_L1_error)
54752         __Pyx_GOTREF(__pyx_t_5);
54753         #endif
54754       }
54755     } else {
54756       __pyx_t_5 = __pyx_t_4(__pyx_t_2);
54757       if (unlikely(!__pyx_t_5)) {
54758         PyObject* exc_type = PyErr_Occurred();
54759         if (exc_type) {
54760           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
54761           else __PYX_ERR(3, 397, __pyx_L1_error)
54762         }
54763         break;
54764       }
54765       __Pyx_GOTREF(__pyx_t_5);
54766     }
54767     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
54768     __pyx_t_5 = 0;
54769     __pyx_v_dim = __pyx_t_1;
54770     __pyx_t_1 = (__pyx_t_1 + 1);
54771 
54772     /* "View.MemoryView":398
54773  *
54774  *         for dim, idx in enumerate(index):
54775  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
54776  *
54777  *         return itemp
54778  */
54779     __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 398, __pyx_L1_error)
54780     __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(3, 398, __pyx_L1_error)
54781     __pyx_v_itemp = __pyx_t_7;
54782 
54783     /* "View.MemoryView":397
54784  *         cdef char *itemp = <char *> self.view.buf
54785  *
54786  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
54787  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
54788  *
54789  */
54790   }
54791   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
54792 
54793   /* "View.MemoryView":400
54794  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
54795  *
54796  *         return itemp             # <<<<<<<<<<<<<<
54797  *
54798  *
54799  */
54800   __pyx_r = __pyx_v_itemp;
54801   goto __pyx_L0;
54802 
54803   /* "View.MemoryView":393
54804  *                 PyThread_free_lock(self.lock)
54805  *
54806  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
54807  *         cdef Py_ssize_t dim
54808  *         cdef char *itemp = <char *> self.view.buf
54809  */
54810 
54811   /* function exit code */
54812   __pyx_L1_error:;
54813   __Pyx_XDECREF(__pyx_t_2);
54814   __Pyx_XDECREF(__pyx_t_5);
54815   __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
54816   __pyx_r = NULL;
54817   __pyx_L0:;
54818   __Pyx_XDECREF(__pyx_v_idx);
54819   __Pyx_RefNannyFinishContext();
54820   return __pyx_r;
54821 }
54822 
54823 /* "View.MemoryView":403
54824  *
54825  *
54826  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
54827  *         if index is Ellipsis:
54828  *             return self
54829  */
54830 
54831 /* Python wrapper */
54832 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
__pyx_memoryview___getitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_index)54833 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
54834   PyObject *__pyx_r = 0;
54835   __Pyx_RefNannyDeclarations
54836   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
54837   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
54838 
54839   /* function exit code */
54840   __Pyx_RefNannyFinishContext();
54841   return __pyx_r;
54842 }
54843 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index)54844 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
54845   PyObject *__pyx_v_have_slices = NULL;
54846   PyObject *__pyx_v_indices = NULL;
54847   char *__pyx_v_itemp;
54848   PyObject *__pyx_r = NULL;
54849   __Pyx_RefNannyDeclarations
54850   int __pyx_t_1;
54851   int __pyx_t_2;
54852   PyObject *__pyx_t_3 = NULL;
54853   PyObject *__pyx_t_4 = NULL;
54854   PyObject *__pyx_t_5 = NULL;
54855   char *__pyx_t_6;
54856   int __pyx_lineno = 0;
54857   const char *__pyx_filename = NULL;
54858   int __pyx_clineno = 0;
54859   __Pyx_RefNannySetupContext("__getitem__", 0);
54860 
54861   /* "View.MemoryView":404
54862  *
54863  *     def __getitem__(memoryview self, object index):
54864  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
54865  *             return self
54866  *
54867  */
54868   __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
54869   __pyx_t_2 = (__pyx_t_1 != 0);
54870   if (__pyx_t_2) {
54871 
54872     /* "View.MemoryView":405
54873  *     def __getitem__(memoryview self, object index):
54874  *         if index is Ellipsis:
54875  *             return self             # <<<<<<<<<<<<<<
54876  *
54877  *         have_slices, indices = _unellipsify(index, self.view.ndim)
54878  */
54879     __Pyx_XDECREF(__pyx_r);
54880     __Pyx_INCREF(((PyObject *)__pyx_v_self));
54881     __pyx_r = ((PyObject *)__pyx_v_self);
54882     goto __pyx_L0;
54883 
54884     /* "View.MemoryView":404
54885  *
54886  *     def __getitem__(memoryview self, object index):
54887  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
54888  *             return self
54889  *
54890  */
54891   }
54892 
54893   /* "View.MemoryView":407
54894  *             return self
54895  *
54896  *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
54897  *
54898  *         cdef char *itemp
54899  */
54900   __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 407, __pyx_L1_error)
54901   __Pyx_GOTREF(__pyx_t_3);
54902   if (likely(__pyx_t_3 != Py_None)) {
54903     PyObject* sequence = __pyx_t_3;
54904     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
54905     if (unlikely(size != 2)) {
54906       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
54907       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
54908       __PYX_ERR(3, 407, __pyx_L1_error)
54909     }
54910     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
54911     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
54912     __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
54913     __Pyx_INCREF(__pyx_t_4);
54914     __Pyx_INCREF(__pyx_t_5);
54915     #else
54916     __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 407, __pyx_L1_error)
54917     __Pyx_GOTREF(__pyx_t_4);
54918     __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 407, __pyx_L1_error)
54919     __Pyx_GOTREF(__pyx_t_5);
54920     #endif
54921     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
54922   } else {
54923     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 407, __pyx_L1_error)
54924   }
54925   __pyx_v_have_slices = __pyx_t_4;
54926   __pyx_t_4 = 0;
54927   __pyx_v_indices = __pyx_t_5;
54928   __pyx_t_5 = 0;
54929 
54930   /* "View.MemoryView":410
54931  *
54932  *         cdef char *itemp
54933  *         if have_slices:             # <<<<<<<<<<<<<<
54934  *             return memview_slice(self, indices)
54935  *         else:
54936  */
54937   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(3, 410, __pyx_L1_error)
54938   if (__pyx_t_2) {
54939 
54940     /* "View.MemoryView":411
54941  *         cdef char *itemp
54942  *         if have_slices:
54943  *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
54944  *         else:
54945  *             itemp = self.get_item_pointer(indices)
54946  */
54947     __Pyx_XDECREF(__pyx_r);
54948     __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 411, __pyx_L1_error)
54949     __Pyx_GOTREF(__pyx_t_3);
54950     __pyx_r = __pyx_t_3;
54951     __pyx_t_3 = 0;
54952     goto __pyx_L0;
54953 
54954     /* "View.MemoryView":410
54955  *
54956  *         cdef char *itemp
54957  *         if have_slices:             # <<<<<<<<<<<<<<
54958  *             return memview_slice(self, indices)
54959  *         else:
54960  */
54961   }
54962 
54963   /* "View.MemoryView":413
54964  *             return memview_slice(self, indices)
54965  *         else:
54966  *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
54967  *             return self.convert_item_to_object(itemp)
54968  *
54969  */
54970   /*else*/ {
54971     __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(3, 413, __pyx_L1_error)
54972     __pyx_v_itemp = __pyx_t_6;
54973 
54974     /* "View.MemoryView":414
54975  *         else:
54976  *             itemp = self.get_item_pointer(indices)
54977  *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
54978  *
54979  *     def __setitem__(memoryview self, object index, object value):
54980  */
54981     __Pyx_XDECREF(__pyx_r);
54982     __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 414, __pyx_L1_error)
54983     __Pyx_GOTREF(__pyx_t_3);
54984     __pyx_r = __pyx_t_3;
54985     __pyx_t_3 = 0;
54986     goto __pyx_L0;
54987   }
54988 
54989   /* "View.MemoryView":403
54990  *
54991  *
54992  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
54993  *         if index is Ellipsis:
54994  *             return self
54995  */
54996 
54997   /* function exit code */
54998   __pyx_L1_error:;
54999   __Pyx_XDECREF(__pyx_t_3);
55000   __Pyx_XDECREF(__pyx_t_4);
55001   __Pyx_XDECREF(__pyx_t_5);
55002   __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55003   __pyx_r = NULL;
55004   __pyx_L0:;
55005   __Pyx_XDECREF(__pyx_v_have_slices);
55006   __Pyx_XDECREF(__pyx_v_indices);
55007   __Pyx_XGIVEREF(__pyx_r);
55008   __Pyx_RefNannyFinishContext();
55009   return __pyx_r;
55010 }
55011 
55012 /* "View.MemoryView":416
55013  *             return self.convert_item_to_object(itemp)
55014  *
55015  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
55016  *         if self.view.readonly:
55017  *             raise TypeError("Cannot assign to read-only memoryview")
55018  */
55019 
55020 /* Python wrapper */
55021 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
__pyx_memoryview___setitem__(PyObject * __pyx_v_self,PyObject * __pyx_v_index,PyObject * __pyx_v_value)55022 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
55023   int __pyx_r;
55024   __Pyx_RefNannyDeclarations
55025   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
55026   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
55027 
55028   /* function exit code */
55029   __Pyx_RefNannyFinishContext();
55030   return __pyx_r;
55031 }
55032 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index,PyObject * __pyx_v_value)55033 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
55034   PyObject *__pyx_v_have_slices = NULL;
55035   PyObject *__pyx_v_obj = NULL;
55036   int __pyx_r;
55037   __Pyx_RefNannyDeclarations
55038   int __pyx_t_1;
55039   PyObject *__pyx_t_2 = NULL;
55040   PyObject *__pyx_t_3 = NULL;
55041   PyObject *__pyx_t_4 = NULL;
55042   int __pyx_lineno = 0;
55043   const char *__pyx_filename = NULL;
55044   int __pyx_clineno = 0;
55045   __Pyx_RefNannySetupContext("__setitem__", 0);
55046   __Pyx_INCREF(__pyx_v_index);
55047 
55048   /* "View.MemoryView":417
55049  *
55050  *     def __setitem__(memoryview self, object index, object value):
55051  *         if self.view.readonly:             # <<<<<<<<<<<<<<
55052  *             raise TypeError("Cannot assign to read-only memoryview")
55053  *
55054  */
55055   __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
55056   if (unlikely(__pyx_t_1)) {
55057 
55058     /* "View.MemoryView":418
55059  *     def __setitem__(memoryview self, object index, object value):
55060  *         if self.view.readonly:
55061  *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
55062  *
55063  *         have_slices, index = _unellipsify(index, self.view.ndim)
55064  */
55065     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 418, __pyx_L1_error)
55066     __Pyx_GOTREF(__pyx_t_2);
55067     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
55068     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55069     __PYX_ERR(3, 418, __pyx_L1_error)
55070 
55071     /* "View.MemoryView":417
55072  *
55073  *     def __setitem__(memoryview self, object index, object value):
55074  *         if self.view.readonly:             # <<<<<<<<<<<<<<
55075  *             raise TypeError("Cannot assign to read-only memoryview")
55076  *
55077  */
55078   }
55079 
55080   /* "View.MemoryView":420
55081  *             raise TypeError("Cannot assign to read-only memoryview")
55082  *
55083  *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
55084  *
55085  *         if have_slices:
55086  */
55087   __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 420, __pyx_L1_error)
55088   __Pyx_GOTREF(__pyx_t_2);
55089   if (likely(__pyx_t_2 != Py_None)) {
55090     PyObject* sequence = __pyx_t_2;
55091     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
55092     if (unlikely(size != 2)) {
55093       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
55094       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
55095       __PYX_ERR(3, 420, __pyx_L1_error)
55096     }
55097     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
55098     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
55099     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
55100     __Pyx_INCREF(__pyx_t_3);
55101     __Pyx_INCREF(__pyx_t_4);
55102     #else
55103     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 420, __pyx_L1_error)
55104     __Pyx_GOTREF(__pyx_t_3);
55105     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 420, __pyx_L1_error)
55106     __Pyx_GOTREF(__pyx_t_4);
55107     #endif
55108     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55109   } else {
55110     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 420, __pyx_L1_error)
55111   }
55112   __pyx_v_have_slices = __pyx_t_3;
55113   __pyx_t_3 = 0;
55114   __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
55115   __pyx_t_4 = 0;
55116 
55117   /* "View.MemoryView":422
55118  *         have_slices, index = _unellipsify(index, self.view.ndim)
55119  *
55120  *         if have_slices:             # <<<<<<<<<<<<<<
55121  *             obj = self.is_slice(value)
55122  *             if obj:
55123  */
55124   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 422, __pyx_L1_error)
55125   if (__pyx_t_1) {
55126 
55127     /* "View.MemoryView":423
55128  *
55129  *         if have_slices:
55130  *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
55131  *             if obj:
55132  *                 self.setitem_slice_assignment(self[index], obj)
55133  */
55134     __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 423, __pyx_L1_error)
55135     __Pyx_GOTREF(__pyx_t_2);
55136     __pyx_v_obj = __pyx_t_2;
55137     __pyx_t_2 = 0;
55138 
55139     /* "View.MemoryView":424
55140  *         if have_slices:
55141  *             obj = self.is_slice(value)
55142  *             if obj:             # <<<<<<<<<<<<<<
55143  *                 self.setitem_slice_assignment(self[index], obj)
55144  *             else:
55145  */
55146     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 424, __pyx_L1_error)
55147     if (__pyx_t_1) {
55148 
55149       /* "View.MemoryView":425
55150  *             obj = self.is_slice(value)
55151  *             if obj:
55152  *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
55153  *             else:
55154  *                 self.setitem_slice_assign_scalar(self[index], value)
55155  */
55156       __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 425, __pyx_L1_error)
55157       __Pyx_GOTREF(__pyx_t_2);
55158       __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 425, __pyx_L1_error)
55159       __Pyx_GOTREF(__pyx_t_4);
55160       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55161       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
55162 
55163       /* "View.MemoryView":424
55164  *         if have_slices:
55165  *             obj = self.is_slice(value)
55166  *             if obj:             # <<<<<<<<<<<<<<
55167  *                 self.setitem_slice_assignment(self[index], obj)
55168  *             else:
55169  */
55170       goto __pyx_L5;
55171     }
55172 
55173     /* "View.MemoryView":427
55174  *                 self.setitem_slice_assignment(self[index], obj)
55175  *             else:
55176  *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
55177  *         else:
55178  *             self.setitem_indexed(index, value)
55179  */
55180     /*else*/ {
55181       __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 427, __pyx_L1_error)
55182       __Pyx_GOTREF(__pyx_t_4);
55183       if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(3, 427, __pyx_L1_error)
55184       __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 427, __pyx_L1_error)
55185       __Pyx_GOTREF(__pyx_t_2);
55186       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
55187       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55188     }
55189     __pyx_L5:;
55190 
55191     /* "View.MemoryView":422
55192  *         have_slices, index = _unellipsify(index, self.view.ndim)
55193  *
55194  *         if have_slices:             # <<<<<<<<<<<<<<
55195  *             obj = self.is_slice(value)
55196  *             if obj:
55197  */
55198     goto __pyx_L4;
55199   }
55200 
55201   /* "View.MemoryView":429
55202  *                 self.setitem_slice_assign_scalar(self[index], value)
55203  *         else:
55204  *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
55205  *
55206  *     cdef is_slice(self, obj):
55207  */
55208   /*else*/ {
55209     __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 429, __pyx_L1_error)
55210     __Pyx_GOTREF(__pyx_t_2);
55211     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55212   }
55213   __pyx_L4:;
55214 
55215   /* "View.MemoryView":416
55216  *             return self.convert_item_to_object(itemp)
55217  *
55218  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
55219  *         if self.view.readonly:
55220  *             raise TypeError("Cannot assign to read-only memoryview")
55221  */
55222 
55223   /* function exit code */
55224   __pyx_r = 0;
55225   goto __pyx_L0;
55226   __pyx_L1_error:;
55227   __Pyx_XDECREF(__pyx_t_2);
55228   __Pyx_XDECREF(__pyx_t_3);
55229   __Pyx_XDECREF(__pyx_t_4);
55230   __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55231   __pyx_r = -1;
55232   __pyx_L0:;
55233   __Pyx_XDECREF(__pyx_v_have_slices);
55234   __Pyx_XDECREF(__pyx_v_obj);
55235   __Pyx_XDECREF(__pyx_v_index);
55236   __Pyx_RefNannyFinishContext();
55237   return __pyx_r;
55238 }
55239 
55240 /* "View.MemoryView":431
55241  *             self.setitem_indexed(index, value)
55242  *
55243  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
55244  *         if not isinstance(obj, memoryview):
55245  *             try:
55246  */
55247 
__pyx_memoryview_is_slice(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_obj)55248 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
55249   PyObject *__pyx_r = NULL;
55250   __Pyx_RefNannyDeclarations
55251   int __pyx_t_1;
55252   int __pyx_t_2;
55253   PyObject *__pyx_t_3 = NULL;
55254   PyObject *__pyx_t_4 = NULL;
55255   PyObject *__pyx_t_5 = NULL;
55256   PyObject *__pyx_t_6 = NULL;
55257   PyObject *__pyx_t_7 = NULL;
55258   PyObject *__pyx_t_8 = NULL;
55259   int __pyx_t_9;
55260   int __pyx_lineno = 0;
55261   const char *__pyx_filename = NULL;
55262   int __pyx_clineno = 0;
55263   __Pyx_RefNannySetupContext("is_slice", 0);
55264   __Pyx_INCREF(__pyx_v_obj);
55265 
55266   /* "View.MemoryView":432
55267  *
55268  *     cdef is_slice(self, obj):
55269  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
55270  *             try:
55271  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
55272  */
55273   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
55274   __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
55275   if (__pyx_t_2) {
55276 
55277     /* "View.MemoryView":433
55278  *     cdef is_slice(self, obj):
55279  *         if not isinstance(obj, memoryview):
55280  *             try:             # <<<<<<<<<<<<<<
55281  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
55282  *                                  self.dtype_is_object)
55283  */
55284     {
55285       __Pyx_PyThreadState_declare
55286       __Pyx_PyThreadState_assign
55287       __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
55288       __Pyx_XGOTREF(__pyx_t_3);
55289       __Pyx_XGOTREF(__pyx_t_4);
55290       __Pyx_XGOTREF(__pyx_t_5);
55291       /*try:*/ {
55292 
55293         /* "View.MemoryView":434
55294  *         if not isinstance(obj, memoryview):
55295  *             try:
55296  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
55297  *                                  self.dtype_is_object)
55298  *             except TypeError:
55299  */
55300         __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 434, __pyx_L4_error)
55301         __Pyx_GOTREF(__pyx_t_6);
55302 
55303         /* "View.MemoryView":435
55304  *             try:
55305  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
55306  *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
55307  *             except TypeError:
55308  *                 return None
55309  */
55310         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 435, __pyx_L4_error)
55311         __Pyx_GOTREF(__pyx_t_7);
55312 
55313         /* "View.MemoryView":434
55314  *         if not isinstance(obj, memoryview):
55315  *             try:
55316  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
55317  *                                  self.dtype_is_object)
55318  *             except TypeError:
55319  */
55320         __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 434, __pyx_L4_error)
55321         __Pyx_GOTREF(__pyx_t_8);
55322         __Pyx_INCREF(__pyx_v_obj);
55323         __Pyx_GIVEREF(__pyx_v_obj);
55324         PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
55325         __Pyx_GIVEREF(__pyx_t_6);
55326         PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
55327         __Pyx_GIVEREF(__pyx_t_7);
55328         PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
55329         __pyx_t_6 = 0;
55330         __pyx_t_7 = 0;
55331         __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 434, __pyx_L4_error)
55332         __Pyx_GOTREF(__pyx_t_7);
55333         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
55334         __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
55335         __pyx_t_7 = 0;
55336 
55337         /* "View.MemoryView":433
55338  *     cdef is_slice(self, obj):
55339  *         if not isinstance(obj, memoryview):
55340  *             try:             # <<<<<<<<<<<<<<
55341  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
55342  *                                  self.dtype_is_object)
55343  */
55344       }
55345       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
55346       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
55347       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
55348       goto __pyx_L9_try_end;
55349       __pyx_L4_error:;
55350       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
55351       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
55352       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
55353 
55354       /* "View.MemoryView":436
55355  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
55356  *                                  self.dtype_is_object)
55357  *             except TypeError:             # <<<<<<<<<<<<<<
55358  *                 return None
55359  *
55360  */
55361       __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
55362       if (__pyx_t_9) {
55363         __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
55364         if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(3, 436, __pyx_L6_except_error)
55365         __Pyx_GOTREF(__pyx_t_7);
55366         __Pyx_GOTREF(__pyx_t_8);
55367         __Pyx_GOTREF(__pyx_t_6);
55368 
55369         /* "View.MemoryView":437
55370  *                                  self.dtype_is_object)
55371  *             except TypeError:
55372  *                 return None             # <<<<<<<<<<<<<<
55373  *
55374  *         return obj
55375  */
55376         __Pyx_XDECREF(__pyx_r);
55377         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
55378         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
55379         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
55380         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
55381         goto __pyx_L7_except_return;
55382       }
55383       goto __pyx_L6_except_error;
55384       __pyx_L6_except_error:;
55385 
55386       /* "View.MemoryView":433
55387  *     cdef is_slice(self, obj):
55388  *         if not isinstance(obj, memoryview):
55389  *             try:             # <<<<<<<<<<<<<<
55390  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
55391  *                                  self.dtype_is_object)
55392  */
55393       __Pyx_XGIVEREF(__pyx_t_3);
55394       __Pyx_XGIVEREF(__pyx_t_4);
55395       __Pyx_XGIVEREF(__pyx_t_5);
55396       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
55397       goto __pyx_L1_error;
55398       __pyx_L7_except_return:;
55399       __Pyx_XGIVEREF(__pyx_t_3);
55400       __Pyx_XGIVEREF(__pyx_t_4);
55401       __Pyx_XGIVEREF(__pyx_t_5);
55402       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
55403       goto __pyx_L0;
55404       __pyx_L9_try_end:;
55405     }
55406 
55407     /* "View.MemoryView":432
55408  *
55409  *     cdef is_slice(self, obj):
55410  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
55411  *             try:
55412  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
55413  */
55414   }
55415 
55416   /* "View.MemoryView":439
55417  *                 return None
55418  *
55419  *         return obj             # <<<<<<<<<<<<<<
55420  *
55421  *     cdef setitem_slice_assignment(self, dst, src):
55422  */
55423   __Pyx_XDECREF(__pyx_r);
55424   __Pyx_INCREF(__pyx_v_obj);
55425   __pyx_r = __pyx_v_obj;
55426   goto __pyx_L0;
55427 
55428   /* "View.MemoryView":431
55429  *             self.setitem_indexed(index, value)
55430  *
55431  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
55432  *         if not isinstance(obj, memoryview):
55433  *             try:
55434  */
55435 
55436   /* function exit code */
55437   __pyx_L1_error:;
55438   __Pyx_XDECREF(__pyx_t_6);
55439   __Pyx_XDECREF(__pyx_t_7);
55440   __Pyx_XDECREF(__pyx_t_8);
55441   __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
55442   __pyx_r = 0;
55443   __pyx_L0:;
55444   __Pyx_XDECREF(__pyx_v_obj);
55445   __Pyx_XGIVEREF(__pyx_r);
55446   __Pyx_RefNannyFinishContext();
55447   return __pyx_r;
55448 }
55449 
55450 /* "View.MemoryView":441
55451  *         return obj
55452  *
55453  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
55454  *         cdef __Pyx_memviewslice dst_slice
55455  *         cdef __Pyx_memviewslice src_slice
55456  */
55457 
__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_dst,PyObject * __pyx_v_src)55458 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
55459   __Pyx_memviewslice __pyx_v_dst_slice;
55460   __Pyx_memviewslice __pyx_v_src_slice;
55461   PyObject *__pyx_r = NULL;
55462   __Pyx_RefNannyDeclarations
55463   __Pyx_memviewslice *__pyx_t_1;
55464   __Pyx_memviewslice *__pyx_t_2;
55465   PyObject *__pyx_t_3 = NULL;
55466   int __pyx_t_4;
55467   int __pyx_t_5;
55468   int __pyx_t_6;
55469   int __pyx_lineno = 0;
55470   const char *__pyx_filename = NULL;
55471   int __pyx_clineno = 0;
55472   __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
55473 
55474   /* "View.MemoryView":445
55475  *         cdef __Pyx_memviewslice src_slice
55476  *
55477  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
55478  *                                  get_slice_from_memview(dst, &dst_slice)[0],
55479  *                                  src.ndim, dst.ndim, self.dtype_is_object)
55480  */
55481   if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(3, 445, __pyx_L1_error)
55482   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(3, 445, __pyx_L1_error)
55483 
55484   /* "View.MemoryView":446
55485  *
55486  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
55487  *                                  get_slice_from_memview(dst, &dst_slice)[0],             # <<<<<<<<<<<<<<
55488  *                                  src.ndim, dst.ndim, self.dtype_is_object)
55489  *
55490  */
55491   if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(3, 446, __pyx_L1_error)
55492   __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(3, 446, __pyx_L1_error)
55493 
55494   /* "View.MemoryView":447
55495  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
55496  *                                  get_slice_from_memview(dst, &dst_slice)[0],
55497  *                                  src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
55498  *
55499  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
55500  */
55501   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 447, __pyx_L1_error)
55502   __Pyx_GOTREF(__pyx_t_3);
55503   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 447, __pyx_L1_error)
55504   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
55505   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 447, __pyx_L1_error)
55506   __Pyx_GOTREF(__pyx_t_3);
55507   __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 447, __pyx_L1_error)
55508   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
55509 
55510   /* "View.MemoryView":445
55511  *         cdef __Pyx_memviewslice src_slice
55512  *
55513  *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
55514  *                                  get_slice_from_memview(dst, &dst_slice)[0],
55515  *                                  src.ndim, dst.ndim, self.dtype_is_object)
55516  */
55517   __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 445, __pyx_L1_error)
55518 
55519   /* "View.MemoryView":441
55520  *         return obj
55521  *
55522  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
55523  *         cdef __Pyx_memviewslice dst_slice
55524  *         cdef __Pyx_memviewslice src_slice
55525  */
55526 
55527   /* function exit code */
55528   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
55529   goto __pyx_L0;
55530   __pyx_L1_error:;
55531   __Pyx_XDECREF(__pyx_t_3);
55532   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
55533   __pyx_r = 0;
55534   __pyx_L0:;
55535   __Pyx_XGIVEREF(__pyx_r);
55536   __Pyx_RefNannyFinishContext();
55537   return __pyx_r;
55538 }
55539 
55540 /* "View.MemoryView":449
55541  *                                  src.ndim, dst.ndim, self.dtype_is_object)
55542  *
55543  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
55544  *         cdef int array[128]
55545  *         cdef void *tmp = NULL
55546  */
55547 
__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj * __pyx_v_self,struct __pyx_memoryview_obj * __pyx_v_dst,PyObject * __pyx_v_value)55548 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
55549   int __pyx_v_array[0x80];
55550   void *__pyx_v_tmp;
55551   void *__pyx_v_item;
55552   __Pyx_memviewslice *__pyx_v_dst_slice;
55553   __Pyx_memviewslice __pyx_v_tmp_slice;
55554   PyObject *__pyx_r = NULL;
55555   __Pyx_RefNannyDeclarations
55556   __Pyx_memviewslice *__pyx_t_1;
55557   int __pyx_t_2;
55558   PyObject *__pyx_t_3 = NULL;
55559   int __pyx_t_4;
55560   int __pyx_t_5;
55561   char const *__pyx_t_6;
55562   PyObject *__pyx_t_7 = NULL;
55563   PyObject *__pyx_t_8 = NULL;
55564   PyObject *__pyx_t_9 = NULL;
55565   PyObject *__pyx_t_10 = NULL;
55566   PyObject *__pyx_t_11 = NULL;
55567   PyObject *__pyx_t_12 = NULL;
55568   int __pyx_lineno = 0;
55569   const char *__pyx_filename = NULL;
55570   int __pyx_clineno = 0;
55571   __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
55572 
55573   /* "View.MemoryView":451
55574  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
55575  *         cdef int array[128]
55576  *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
55577  *         cdef void *item
55578  *
55579  */
55580   __pyx_v_tmp = NULL;
55581 
55582   /* "View.MemoryView":456
55583  *         cdef __Pyx_memviewslice *dst_slice
55584  *         cdef __Pyx_memviewslice tmp_slice
55585  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
55586  *
55587  *         if <size_t>self.view.itemsize > sizeof(array):
55588  */
55589   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(3, 456, __pyx_L1_error)
55590   __pyx_v_dst_slice = __pyx_t_1;
55591 
55592   /* "View.MemoryView":458
55593  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
55594  *
55595  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
55596  *             tmp = PyMem_Malloc(self.view.itemsize)
55597  *             if tmp == NULL:
55598  */
55599   __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
55600   if (__pyx_t_2) {
55601 
55602     /* "View.MemoryView":459
55603  *
55604  *         if <size_t>self.view.itemsize > sizeof(array):
55605  *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
55606  *             if tmp == NULL:
55607  *                 raise MemoryError
55608  */
55609     __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
55610 
55611     /* "View.MemoryView":460
55612  *         if <size_t>self.view.itemsize > sizeof(array):
55613  *             tmp = PyMem_Malloc(self.view.itemsize)
55614  *             if tmp == NULL:             # <<<<<<<<<<<<<<
55615  *                 raise MemoryError
55616  *             item = tmp
55617  */
55618     __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
55619     if (unlikely(__pyx_t_2)) {
55620 
55621       /* "View.MemoryView":461
55622  *             tmp = PyMem_Malloc(self.view.itemsize)
55623  *             if tmp == NULL:
55624  *                 raise MemoryError             # <<<<<<<<<<<<<<
55625  *             item = tmp
55626  *         else:
55627  */
55628       PyErr_NoMemory(); __PYX_ERR(3, 461, __pyx_L1_error)
55629 
55630       /* "View.MemoryView":460
55631  *         if <size_t>self.view.itemsize > sizeof(array):
55632  *             tmp = PyMem_Malloc(self.view.itemsize)
55633  *             if tmp == NULL:             # <<<<<<<<<<<<<<
55634  *                 raise MemoryError
55635  *             item = tmp
55636  */
55637     }
55638 
55639     /* "View.MemoryView":462
55640  *             if tmp == NULL:
55641  *                 raise MemoryError
55642  *             item = tmp             # <<<<<<<<<<<<<<
55643  *         else:
55644  *             item = <void *> array
55645  */
55646     __pyx_v_item = __pyx_v_tmp;
55647 
55648     /* "View.MemoryView":458
55649  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
55650  *
55651  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
55652  *             tmp = PyMem_Malloc(self.view.itemsize)
55653  *             if tmp == NULL:
55654  */
55655     goto __pyx_L3;
55656   }
55657 
55658   /* "View.MemoryView":464
55659  *             item = tmp
55660  *         else:
55661  *             item = <void *> array             # <<<<<<<<<<<<<<
55662  *
55663  *         try:
55664  */
55665   /*else*/ {
55666     __pyx_v_item = ((void *)__pyx_v_array);
55667   }
55668   __pyx_L3:;
55669 
55670   /* "View.MemoryView":466
55671  *             item = <void *> array
55672  *
55673  *         try:             # <<<<<<<<<<<<<<
55674  *             if self.dtype_is_object:
55675  *                 (<PyObject **> item)[0] = <PyObject *> value
55676  */
55677   /*try:*/ {
55678 
55679     /* "View.MemoryView":467
55680  *
55681  *         try:
55682  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
55683  *                 (<PyObject **> item)[0] = <PyObject *> value
55684  *             else:
55685  */
55686     __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
55687     if (__pyx_t_2) {
55688 
55689       /* "View.MemoryView":468
55690  *         try:
55691  *             if self.dtype_is_object:
55692  *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
55693  *             else:
55694  *                 self.assign_item_from_object(<char *> item, value)
55695  */
55696       (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
55697 
55698       /* "View.MemoryView":467
55699  *
55700  *         try:
55701  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
55702  *                 (<PyObject **> item)[0] = <PyObject *> value
55703  *             else:
55704  */
55705       goto __pyx_L8;
55706     }
55707 
55708     /* "View.MemoryView":470
55709  *                 (<PyObject **> item)[0] = <PyObject *> value
55710  *             else:
55711  *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
55712  *
55713  *
55714  */
55715     /*else*/ {
55716       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 470, __pyx_L6_error)
55717       __Pyx_GOTREF(__pyx_t_3);
55718       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
55719     }
55720     __pyx_L8:;
55721 
55722     /* "View.MemoryView":474
55723  *
55724  *
55725  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
55726  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
55727  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
55728  */
55729     __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
55730     if (__pyx_t_2) {
55731 
55732       /* "View.MemoryView":475
55733  *
55734  *             if self.view.suboffsets != NULL:
55735  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
55736  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
55737  *                                 item, self.dtype_is_object)
55738  */
55739       __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 475, __pyx_L6_error)
55740       __Pyx_GOTREF(__pyx_t_3);
55741       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
55742 
55743       /* "View.MemoryView":474
55744  *
55745  *
55746  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
55747  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
55748  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
55749  */
55750     }
55751 
55752     /* "View.MemoryView":476
55753  *             if self.view.suboffsets != NULL:
55754  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
55755  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
55756  *                                 item, self.dtype_is_object)
55757  *         finally:
55758  */
55759     __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
55760   }
55761 
55762   /* "View.MemoryView":479
55763  *                                 item, self.dtype_is_object)
55764  *         finally:
55765  *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
55766  *
55767  *     cdef setitem_indexed(self, index, value):
55768  */
55769   /*finally:*/ {
55770     /*normal exit:*/{
55771       PyMem_Free(__pyx_v_tmp);
55772       goto __pyx_L7;
55773     }
55774     __pyx_L6_error:;
55775     /*exception exit:*/{
55776       __Pyx_PyThreadState_declare
55777       __Pyx_PyThreadState_assign
55778       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
55779       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
55780       if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
55781       if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
55782       __Pyx_XGOTREF(__pyx_t_7);
55783       __Pyx_XGOTREF(__pyx_t_8);
55784       __Pyx_XGOTREF(__pyx_t_9);
55785       __Pyx_XGOTREF(__pyx_t_10);
55786       __Pyx_XGOTREF(__pyx_t_11);
55787       __Pyx_XGOTREF(__pyx_t_12);
55788       __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
55789       {
55790         PyMem_Free(__pyx_v_tmp);
55791       }
55792       if (PY_MAJOR_VERSION >= 3) {
55793         __Pyx_XGIVEREF(__pyx_t_10);
55794         __Pyx_XGIVEREF(__pyx_t_11);
55795         __Pyx_XGIVEREF(__pyx_t_12);
55796         __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
55797       }
55798       __Pyx_XGIVEREF(__pyx_t_7);
55799       __Pyx_XGIVEREF(__pyx_t_8);
55800       __Pyx_XGIVEREF(__pyx_t_9);
55801       __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
55802       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
55803       __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
55804       goto __pyx_L1_error;
55805     }
55806     __pyx_L7:;
55807   }
55808 
55809   /* "View.MemoryView":449
55810  *                                  src.ndim, dst.ndim, self.dtype_is_object)
55811  *
55812  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
55813  *         cdef int array[128]
55814  *         cdef void *tmp = NULL
55815  */
55816 
55817   /* function exit code */
55818   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
55819   goto __pyx_L0;
55820   __pyx_L1_error:;
55821   __Pyx_XDECREF(__pyx_t_3);
55822   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
55823   __pyx_r = 0;
55824   __pyx_L0:;
55825   __Pyx_XGIVEREF(__pyx_r);
55826   __Pyx_RefNannyFinishContext();
55827   return __pyx_r;
55828 }
55829 
55830 /* "View.MemoryView":481
55831  *             PyMem_Free(tmp)
55832  *
55833  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
55834  *         cdef char *itemp = self.get_item_pointer(index)
55835  *         self.assign_item_from_object(itemp, value)
55836  */
55837 
__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj * __pyx_v_self,PyObject * __pyx_v_index,PyObject * __pyx_v_value)55838 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
55839   char *__pyx_v_itemp;
55840   PyObject *__pyx_r = NULL;
55841   __Pyx_RefNannyDeclarations
55842   char *__pyx_t_1;
55843   PyObject *__pyx_t_2 = NULL;
55844   int __pyx_lineno = 0;
55845   const char *__pyx_filename = NULL;
55846   int __pyx_clineno = 0;
55847   __Pyx_RefNannySetupContext("setitem_indexed", 0);
55848 
55849   /* "View.MemoryView":482
55850  *
55851  *     cdef setitem_indexed(self, index, value):
55852  *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
55853  *         self.assign_item_from_object(itemp, value)
55854  *
55855  */
55856   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(3, 482, __pyx_L1_error)
55857   __pyx_v_itemp = __pyx_t_1;
55858 
55859   /* "View.MemoryView":483
55860  *     cdef setitem_indexed(self, index, value):
55861  *         cdef char *itemp = self.get_item_pointer(index)
55862  *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
55863  *
55864  *     cdef convert_item_to_object(self, char *itemp):
55865  */
55866   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 483, __pyx_L1_error)
55867   __Pyx_GOTREF(__pyx_t_2);
55868   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55869 
55870   /* "View.MemoryView":481
55871  *             PyMem_Free(tmp)
55872  *
55873  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
55874  *         cdef char *itemp = self.get_item_pointer(index)
55875  *         self.assign_item_from_object(itemp, value)
55876  */
55877 
55878   /* function exit code */
55879   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
55880   goto __pyx_L0;
55881   __pyx_L1_error:;
55882   __Pyx_XDECREF(__pyx_t_2);
55883   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
55884   __pyx_r = 0;
55885   __pyx_L0:;
55886   __Pyx_XGIVEREF(__pyx_r);
55887   __Pyx_RefNannyFinishContext();
55888   return __pyx_r;
55889 }
55890 
55891 /* "View.MemoryView":485
55892  *         self.assign_item_from_object(itemp, value)
55893  *
55894  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
55895  *         """Only used if instantiated manually by the user, or if Cython doesn't
55896  *         know how to convert the type"""
55897  */
55898 
__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj * __pyx_v_self,char * __pyx_v_itemp)55899 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
55900   PyObject *__pyx_v_struct = NULL;
55901   PyObject *__pyx_v_bytesitem = 0;
55902   PyObject *__pyx_v_result = NULL;
55903   PyObject *__pyx_r = NULL;
55904   __Pyx_RefNannyDeclarations
55905   PyObject *__pyx_t_1 = NULL;
55906   PyObject *__pyx_t_2 = NULL;
55907   PyObject *__pyx_t_3 = NULL;
55908   PyObject *__pyx_t_4 = NULL;
55909   PyObject *__pyx_t_5 = NULL;
55910   PyObject *__pyx_t_6 = NULL;
55911   PyObject *__pyx_t_7 = NULL;
55912   int __pyx_t_8;
55913   PyObject *__pyx_t_9 = NULL;
55914   size_t __pyx_t_10;
55915   int __pyx_t_11;
55916   int __pyx_lineno = 0;
55917   const char *__pyx_filename = NULL;
55918   int __pyx_clineno = 0;
55919   __Pyx_RefNannySetupContext("convert_item_to_object", 0);
55920 
55921   /* "View.MemoryView":488
55922  *         """Only used if instantiated manually by the user, or if Cython doesn't
55923  *         know how to convert the type"""
55924  *         import struct             # <<<<<<<<<<<<<<
55925  *         cdef bytes bytesitem
55926  *
55927  */
55928   __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 488, __pyx_L1_error)
55929   __Pyx_GOTREF(__pyx_t_1);
55930   __pyx_v_struct = __pyx_t_1;
55931   __pyx_t_1 = 0;
55932 
55933   /* "View.MemoryView":491
55934  *         cdef bytes bytesitem
55935  *
55936  *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
55937  *         try:
55938  *             result = struct.unpack(self.view.format, bytesitem)
55939  */
55940   __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 491, __pyx_L1_error)
55941   __Pyx_GOTREF(__pyx_t_1);
55942   __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
55943   __pyx_t_1 = 0;
55944 
55945   /* "View.MemoryView":492
55946  *
55947  *         bytesitem = itemp[:self.view.itemsize]
55948  *         try:             # <<<<<<<<<<<<<<
55949  *             result = struct.unpack(self.view.format, bytesitem)
55950  *         except struct.error:
55951  */
55952   {
55953     __Pyx_PyThreadState_declare
55954     __Pyx_PyThreadState_assign
55955     __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
55956     __Pyx_XGOTREF(__pyx_t_2);
55957     __Pyx_XGOTREF(__pyx_t_3);
55958     __Pyx_XGOTREF(__pyx_t_4);
55959     /*try:*/ {
55960 
55961       /* "View.MemoryView":493
55962  *         bytesitem = itemp[:self.view.itemsize]
55963  *         try:
55964  *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
55965  *         except struct.error:
55966  *             raise ValueError("Unable to convert item to object")
55967  */
55968       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 493, __pyx_L3_error)
55969       __Pyx_GOTREF(__pyx_t_5);
55970       __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 493, __pyx_L3_error)
55971       __Pyx_GOTREF(__pyx_t_6);
55972       __pyx_t_7 = NULL;
55973       __pyx_t_8 = 0;
55974       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
55975         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
55976         if (likely(__pyx_t_7)) {
55977           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
55978           __Pyx_INCREF(__pyx_t_7);
55979           __Pyx_INCREF(function);
55980           __Pyx_DECREF_SET(__pyx_t_5, function);
55981           __pyx_t_8 = 1;
55982         }
55983       }
55984       #if CYTHON_FAST_PYCALL
55985       if (PyFunction_Check(__pyx_t_5)) {
55986         PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
55987         __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 493, __pyx_L3_error)
55988         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
55989         __Pyx_GOTREF(__pyx_t_1);
55990         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
55991       } else
55992       #endif
55993       #if CYTHON_FAST_PYCCALL
55994       if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
55995         PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
55996         __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 493, __pyx_L3_error)
55997         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
55998         __Pyx_GOTREF(__pyx_t_1);
55999         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
56000       } else
56001       #endif
56002       {
56003         __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 493, __pyx_L3_error)
56004         __Pyx_GOTREF(__pyx_t_9);
56005         if (__pyx_t_7) {
56006           __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
56007         }
56008         __Pyx_GIVEREF(__pyx_t_6);
56009         PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
56010         __Pyx_INCREF(__pyx_v_bytesitem);
56011         __Pyx_GIVEREF(__pyx_v_bytesitem);
56012         PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
56013         __pyx_t_6 = 0;
56014         __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 493, __pyx_L3_error)
56015         __Pyx_GOTREF(__pyx_t_1);
56016         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
56017       }
56018       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
56019       __pyx_v_result = __pyx_t_1;
56020       __pyx_t_1 = 0;
56021 
56022       /* "View.MemoryView":492
56023  *
56024  *         bytesitem = itemp[:self.view.itemsize]
56025  *         try:             # <<<<<<<<<<<<<<
56026  *             result = struct.unpack(self.view.format, bytesitem)
56027  *         except struct.error:
56028  */
56029     }
56030 
56031     /* "View.MemoryView":497
56032  *             raise ValueError("Unable to convert item to object")
56033  *         else:
56034  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
56035  *                 return result[0]
56036  *             return result
56037  */
56038     /*else:*/ {
56039       __pyx_t_10 = strlen(__pyx_v_self->view.format);
56040       __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
56041       if (__pyx_t_11) {
56042 
56043         /* "View.MemoryView":498
56044  *         else:
56045  *             if len(self.view.format) == 1:
56046  *                 return result[0]             # <<<<<<<<<<<<<<
56047  *             return result
56048  *
56049  */
56050         __Pyx_XDECREF(__pyx_r);
56051         __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 498, __pyx_L5_except_error)
56052         __Pyx_GOTREF(__pyx_t_1);
56053         __pyx_r = __pyx_t_1;
56054         __pyx_t_1 = 0;
56055         goto __pyx_L6_except_return;
56056 
56057         /* "View.MemoryView":497
56058  *             raise ValueError("Unable to convert item to object")
56059  *         else:
56060  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
56061  *                 return result[0]
56062  *             return result
56063  */
56064       }
56065 
56066       /* "View.MemoryView":499
56067  *             if len(self.view.format) == 1:
56068  *                 return result[0]
56069  *             return result             # <<<<<<<<<<<<<<
56070  *
56071  *     cdef assign_item_from_object(self, char *itemp, object value):
56072  */
56073       __Pyx_XDECREF(__pyx_r);
56074       __Pyx_INCREF(__pyx_v_result);
56075       __pyx_r = __pyx_v_result;
56076       goto __pyx_L6_except_return;
56077     }
56078     __pyx_L3_error:;
56079     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
56080     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
56081     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
56082     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
56083     __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
56084 
56085     /* "View.MemoryView":494
56086  *         try:
56087  *             result = struct.unpack(self.view.format, bytesitem)
56088  *         except struct.error:             # <<<<<<<<<<<<<<
56089  *             raise ValueError("Unable to convert item to object")
56090  *         else:
56091  */
56092     __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
56093     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 494, __pyx_L5_except_error)
56094     __Pyx_GOTREF(__pyx_t_6);
56095     __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
56096     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
56097     __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
56098     __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
56099     if (__pyx_t_8) {
56100       __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
56101       if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(3, 494, __pyx_L5_except_error)
56102       __Pyx_GOTREF(__pyx_t_9);
56103       __Pyx_GOTREF(__pyx_t_5);
56104       __Pyx_GOTREF(__pyx_t_1);
56105 
56106       /* "View.MemoryView":495
56107  *             result = struct.unpack(self.view.format, bytesitem)
56108  *         except struct.error:
56109  *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
56110  *         else:
56111  *             if len(self.view.format) == 1:
56112  */
56113       __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 495, __pyx_L5_except_error)
56114       __Pyx_GOTREF(__pyx_t_6);
56115       __Pyx_Raise(__pyx_t_6, 0, 0, 0);
56116       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
56117       __PYX_ERR(3, 495, __pyx_L5_except_error)
56118     }
56119     goto __pyx_L5_except_error;
56120     __pyx_L5_except_error:;
56121 
56122     /* "View.MemoryView":492
56123  *
56124  *         bytesitem = itemp[:self.view.itemsize]
56125  *         try:             # <<<<<<<<<<<<<<
56126  *             result = struct.unpack(self.view.format, bytesitem)
56127  *         except struct.error:
56128  */
56129     __Pyx_XGIVEREF(__pyx_t_2);
56130     __Pyx_XGIVEREF(__pyx_t_3);
56131     __Pyx_XGIVEREF(__pyx_t_4);
56132     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
56133     goto __pyx_L1_error;
56134     __pyx_L6_except_return:;
56135     __Pyx_XGIVEREF(__pyx_t_2);
56136     __Pyx_XGIVEREF(__pyx_t_3);
56137     __Pyx_XGIVEREF(__pyx_t_4);
56138     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
56139     goto __pyx_L0;
56140   }
56141 
56142   /* "View.MemoryView":485
56143  *         self.assign_item_from_object(itemp, value)
56144  *
56145  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
56146  *         """Only used if instantiated manually by the user, or if Cython doesn't
56147  *         know how to convert the type"""
56148  */
56149 
56150   /* function exit code */
56151   __pyx_L1_error:;
56152   __Pyx_XDECREF(__pyx_t_1);
56153   __Pyx_XDECREF(__pyx_t_5);
56154   __Pyx_XDECREF(__pyx_t_6);
56155   __Pyx_XDECREF(__pyx_t_7);
56156   __Pyx_XDECREF(__pyx_t_9);
56157   __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
56158   __pyx_r = 0;
56159   __pyx_L0:;
56160   __Pyx_XDECREF(__pyx_v_struct);
56161   __Pyx_XDECREF(__pyx_v_bytesitem);
56162   __Pyx_XDECREF(__pyx_v_result);
56163   __Pyx_XGIVEREF(__pyx_r);
56164   __Pyx_RefNannyFinishContext();
56165   return __pyx_r;
56166 }
56167 
56168 /* "View.MemoryView":501
56169  *             return result
56170  *
56171  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
56172  *         """Only used if instantiated manually by the user, or if Cython doesn't
56173  *         know how to convert the type"""
56174  */
56175 
__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj * __pyx_v_self,char * __pyx_v_itemp,PyObject * __pyx_v_value)56176 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
56177   PyObject *__pyx_v_struct = NULL;
56178   char __pyx_v_c;
56179   PyObject *__pyx_v_bytesvalue = 0;
56180   Py_ssize_t __pyx_v_i;
56181   PyObject *__pyx_r = NULL;
56182   __Pyx_RefNannyDeclarations
56183   PyObject *__pyx_t_1 = NULL;
56184   int __pyx_t_2;
56185   int __pyx_t_3;
56186   PyObject *__pyx_t_4 = NULL;
56187   PyObject *__pyx_t_5 = NULL;
56188   PyObject *__pyx_t_6 = NULL;
56189   int __pyx_t_7;
56190   PyObject *__pyx_t_8 = NULL;
56191   Py_ssize_t __pyx_t_9;
56192   PyObject *__pyx_t_10 = NULL;
56193   char *__pyx_t_11;
56194   char *__pyx_t_12;
56195   char *__pyx_t_13;
56196   char *__pyx_t_14;
56197   int __pyx_lineno = 0;
56198   const char *__pyx_filename = NULL;
56199   int __pyx_clineno = 0;
56200   __Pyx_RefNannySetupContext("assign_item_from_object", 0);
56201 
56202   /* "View.MemoryView":504
56203  *         """Only used if instantiated manually by the user, or if Cython doesn't
56204  *         know how to convert the type"""
56205  *         import struct             # <<<<<<<<<<<<<<
56206  *         cdef char c
56207  *         cdef bytes bytesvalue
56208  */
56209   __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 504, __pyx_L1_error)
56210   __Pyx_GOTREF(__pyx_t_1);
56211   __pyx_v_struct = __pyx_t_1;
56212   __pyx_t_1 = 0;
56213 
56214   /* "View.MemoryView":509
56215  *         cdef Py_ssize_t i
56216  *
56217  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
56218  *             bytesvalue = struct.pack(self.view.format, *value)
56219  *         else:
56220  */
56221   __pyx_t_2 = PyTuple_Check(__pyx_v_value);
56222   __pyx_t_3 = (__pyx_t_2 != 0);
56223   if (__pyx_t_3) {
56224 
56225     /* "View.MemoryView":510
56226  *
56227  *         if isinstance(value, tuple):
56228  *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
56229  *         else:
56230  *             bytesvalue = struct.pack(self.view.format, value)
56231  */
56232     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 510, __pyx_L1_error)
56233     __Pyx_GOTREF(__pyx_t_1);
56234     __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 510, __pyx_L1_error)
56235     __Pyx_GOTREF(__pyx_t_4);
56236     __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 510, __pyx_L1_error)
56237     __Pyx_GOTREF(__pyx_t_5);
56238     __Pyx_GIVEREF(__pyx_t_4);
56239     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
56240     __pyx_t_4 = 0;
56241     __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 510, __pyx_L1_error)
56242     __Pyx_GOTREF(__pyx_t_4);
56243     __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 510, __pyx_L1_error)
56244     __Pyx_GOTREF(__pyx_t_6);
56245     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
56246     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
56247     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 510, __pyx_L1_error)
56248     __Pyx_GOTREF(__pyx_t_4);
56249     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56250     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
56251     if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(3, 510, __pyx_L1_error)
56252     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
56253     __pyx_t_4 = 0;
56254 
56255     /* "View.MemoryView":509
56256  *         cdef Py_ssize_t i
56257  *
56258  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
56259  *             bytesvalue = struct.pack(self.view.format, *value)
56260  *         else:
56261  */
56262     goto __pyx_L3;
56263   }
56264 
56265   /* "View.MemoryView":512
56266  *             bytesvalue = struct.pack(self.view.format, *value)
56267  *         else:
56268  *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
56269  *
56270  *         for i, c in enumerate(bytesvalue):
56271  */
56272   /*else*/ {
56273     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 512, __pyx_L1_error)
56274     __Pyx_GOTREF(__pyx_t_6);
56275     __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 512, __pyx_L1_error)
56276     __Pyx_GOTREF(__pyx_t_1);
56277     __pyx_t_5 = NULL;
56278     __pyx_t_7 = 0;
56279     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
56280       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
56281       if (likely(__pyx_t_5)) {
56282         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
56283         __Pyx_INCREF(__pyx_t_5);
56284         __Pyx_INCREF(function);
56285         __Pyx_DECREF_SET(__pyx_t_6, function);
56286         __pyx_t_7 = 1;
56287       }
56288     }
56289     #if CYTHON_FAST_PYCALL
56290     if (PyFunction_Check(__pyx_t_6)) {
56291       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
56292       __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 512, __pyx_L1_error)
56293       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
56294       __Pyx_GOTREF(__pyx_t_4);
56295       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56296     } else
56297     #endif
56298     #if CYTHON_FAST_PYCCALL
56299     if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
56300       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
56301       __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 512, __pyx_L1_error)
56302       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
56303       __Pyx_GOTREF(__pyx_t_4);
56304       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56305     } else
56306     #endif
56307     {
56308       __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 512, __pyx_L1_error)
56309       __Pyx_GOTREF(__pyx_t_8);
56310       if (__pyx_t_5) {
56311         __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
56312       }
56313       __Pyx_GIVEREF(__pyx_t_1);
56314       PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
56315       __Pyx_INCREF(__pyx_v_value);
56316       __Pyx_GIVEREF(__pyx_v_value);
56317       PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
56318       __pyx_t_1 = 0;
56319       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 512, __pyx_L1_error)
56320       __Pyx_GOTREF(__pyx_t_4);
56321       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
56322     }
56323     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
56324     if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(3, 512, __pyx_L1_error)
56325     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
56326     __pyx_t_4 = 0;
56327   }
56328   __pyx_L3:;
56329 
56330   /* "View.MemoryView":514
56331  *             bytesvalue = struct.pack(self.view.format, value)
56332  *
56333  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
56334  *             itemp[i] = c
56335  *
56336  */
56337   __pyx_t_9 = 0;
56338   if (unlikely(__pyx_v_bytesvalue == Py_None)) {
56339     PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
56340     __PYX_ERR(3, 514, __pyx_L1_error)
56341   }
56342   __Pyx_INCREF(__pyx_v_bytesvalue);
56343   __pyx_t_10 = __pyx_v_bytesvalue;
56344   __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
56345   __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
56346   for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
56347     __pyx_t_11 = __pyx_t_14;
56348     __pyx_v_c = (__pyx_t_11[0]);
56349 
56350     /* "View.MemoryView":515
56351  *
56352  *         for i, c in enumerate(bytesvalue):
56353  *             itemp[i] = c             # <<<<<<<<<<<<<<
56354  *
56355  *     @cname('getbuffer')
56356  */
56357     __pyx_v_i = __pyx_t_9;
56358 
56359     /* "View.MemoryView":514
56360  *             bytesvalue = struct.pack(self.view.format, value)
56361  *
56362  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
56363  *             itemp[i] = c
56364  *
56365  */
56366     __pyx_t_9 = (__pyx_t_9 + 1);
56367 
56368     /* "View.MemoryView":515
56369  *
56370  *         for i, c in enumerate(bytesvalue):
56371  *             itemp[i] = c             # <<<<<<<<<<<<<<
56372  *
56373  *     @cname('getbuffer')
56374  */
56375     (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
56376   }
56377   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
56378 
56379   /* "View.MemoryView":501
56380  *             return result
56381  *
56382  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
56383  *         """Only used if instantiated manually by the user, or if Cython doesn't
56384  *         know how to convert the type"""
56385  */
56386 
56387   /* function exit code */
56388   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
56389   goto __pyx_L0;
56390   __pyx_L1_error:;
56391   __Pyx_XDECREF(__pyx_t_1);
56392   __Pyx_XDECREF(__pyx_t_4);
56393   __Pyx_XDECREF(__pyx_t_5);
56394   __Pyx_XDECREF(__pyx_t_6);
56395   __Pyx_XDECREF(__pyx_t_8);
56396   __Pyx_XDECREF(__pyx_t_10);
56397   __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
56398   __pyx_r = 0;
56399   __pyx_L0:;
56400   __Pyx_XDECREF(__pyx_v_struct);
56401   __Pyx_XDECREF(__pyx_v_bytesvalue);
56402   __Pyx_XGIVEREF(__pyx_r);
56403   __Pyx_RefNannyFinishContext();
56404   return __pyx_r;
56405 }
56406 
56407 /* "View.MemoryView":518
56408  *
56409  *     @cname('getbuffer')
56410  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
56411  *         if flags & PyBUF_WRITABLE and self.view.readonly:
56412  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
56413  */
56414 
56415 /* Python wrapper */
56416 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
__pyx_memoryview_getbuffer(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)56417 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
56418   int __pyx_r;
56419   __Pyx_RefNannyDeclarations
56420   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
56421   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
56422 
56423   /* function exit code */
56424   __Pyx_RefNannyFinishContext();
56425   return __pyx_r;
56426 }
56427 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)56428 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
56429   int __pyx_r;
56430   __Pyx_RefNannyDeclarations
56431   int __pyx_t_1;
56432   int __pyx_t_2;
56433   PyObject *__pyx_t_3 = NULL;
56434   Py_ssize_t *__pyx_t_4;
56435   char *__pyx_t_5;
56436   void *__pyx_t_6;
56437   int __pyx_t_7;
56438   Py_ssize_t __pyx_t_8;
56439   int __pyx_lineno = 0;
56440   const char *__pyx_filename = NULL;
56441   int __pyx_clineno = 0;
56442   if (__pyx_v_info == NULL) {
56443     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
56444     return -1;
56445   }
56446   __Pyx_RefNannySetupContext("__getbuffer__", 0);
56447   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
56448   __Pyx_GIVEREF(__pyx_v_info->obj);
56449 
56450   /* "View.MemoryView":519
56451  *     @cname('getbuffer')
56452  *     def __getbuffer__(self, Py_buffer *info, int flags):
56453  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
56454  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
56455  *
56456  */
56457   __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
56458   if (__pyx_t_2) {
56459   } else {
56460     __pyx_t_1 = __pyx_t_2;
56461     goto __pyx_L4_bool_binop_done;
56462   }
56463   __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
56464   __pyx_t_1 = __pyx_t_2;
56465   __pyx_L4_bool_binop_done:;
56466   if (unlikely(__pyx_t_1)) {
56467 
56468     /* "View.MemoryView":520
56469  *     def __getbuffer__(self, Py_buffer *info, int flags):
56470  *         if flags & PyBUF_WRITABLE and self.view.readonly:
56471  *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
56472  *
56473  *         if flags & PyBUF_ND:
56474  */
56475     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 520, __pyx_L1_error)
56476     __Pyx_GOTREF(__pyx_t_3);
56477     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
56478     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
56479     __PYX_ERR(3, 520, __pyx_L1_error)
56480 
56481     /* "View.MemoryView":519
56482  *     @cname('getbuffer')
56483  *     def __getbuffer__(self, Py_buffer *info, int flags):
56484  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
56485  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
56486  *
56487  */
56488   }
56489 
56490   /* "View.MemoryView":522
56491  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
56492  *
56493  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
56494  *             info.shape = self.view.shape
56495  *         else:
56496  */
56497   __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
56498   if (__pyx_t_1) {
56499 
56500     /* "View.MemoryView":523
56501  *
56502  *         if flags & PyBUF_ND:
56503  *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
56504  *         else:
56505  *             info.shape = NULL
56506  */
56507     __pyx_t_4 = __pyx_v_self->view.shape;
56508     __pyx_v_info->shape = __pyx_t_4;
56509 
56510     /* "View.MemoryView":522
56511  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
56512  *
56513  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
56514  *             info.shape = self.view.shape
56515  *         else:
56516  */
56517     goto __pyx_L6;
56518   }
56519 
56520   /* "View.MemoryView":525
56521  *             info.shape = self.view.shape
56522  *         else:
56523  *             info.shape = NULL             # <<<<<<<<<<<<<<
56524  *
56525  *         if flags & PyBUF_STRIDES:
56526  */
56527   /*else*/ {
56528     __pyx_v_info->shape = NULL;
56529   }
56530   __pyx_L6:;
56531 
56532   /* "View.MemoryView":527
56533  *             info.shape = NULL
56534  *
56535  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
56536  *             info.strides = self.view.strides
56537  *         else:
56538  */
56539   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
56540   if (__pyx_t_1) {
56541 
56542     /* "View.MemoryView":528
56543  *
56544  *         if flags & PyBUF_STRIDES:
56545  *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
56546  *         else:
56547  *             info.strides = NULL
56548  */
56549     __pyx_t_4 = __pyx_v_self->view.strides;
56550     __pyx_v_info->strides = __pyx_t_4;
56551 
56552     /* "View.MemoryView":527
56553  *             info.shape = NULL
56554  *
56555  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
56556  *             info.strides = self.view.strides
56557  *         else:
56558  */
56559     goto __pyx_L7;
56560   }
56561 
56562   /* "View.MemoryView":530
56563  *             info.strides = self.view.strides
56564  *         else:
56565  *             info.strides = NULL             # <<<<<<<<<<<<<<
56566  *
56567  *         if flags & PyBUF_INDIRECT:
56568  */
56569   /*else*/ {
56570     __pyx_v_info->strides = NULL;
56571   }
56572   __pyx_L7:;
56573 
56574   /* "View.MemoryView":532
56575  *             info.strides = NULL
56576  *
56577  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
56578  *             info.suboffsets = self.view.suboffsets
56579  *         else:
56580  */
56581   __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
56582   if (__pyx_t_1) {
56583 
56584     /* "View.MemoryView":533
56585  *
56586  *         if flags & PyBUF_INDIRECT:
56587  *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
56588  *         else:
56589  *             info.suboffsets = NULL
56590  */
56591     __pyx_t_4 = __pyx_v_self->view.suboffsets;
56592     __pyx_v_info->suboffsets = __pyx_t_4;
56593 
56594     /* "View.MemoryView":532
56595  *             info.strides = NULL
56596  *
56597  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
56598  *             info.suboffsets = self.view.suboffsets
56599  *         else:
56600  */
56601     goto __pyx_L8;
56602   }
56603 
56604   /* "View.MemoryView":535
56605  *             info.suboffsets = self.view.suboffsets
56606  *         else:
56607  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
56608  *
56609  *         if flags & PyBUF_FORMAT:
56610  */
56611   /*else*/ {
56612     __pyx_v_info->suboffsets = NULL;
56613   }
56614   __pyx_L8:;
56615 
56616   /* "View.MemoryView":537
56617  *             info.suboffsets = NULL
56618  *
56619  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
56620  *             info.format = self.view.format
56621  *         else:
56622  */
56623   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
56624   if (__pyx_t_1) {
56625 
56626     /* "View.MemoryView":538
56627  *
56628  *         if flags & PyBUF_FORMAT:
56629  *             info.format = self.view.format             # <<<<<<<<<<<<<<
56630  *         else:
56631  *             info.format = NULL
56632  */
56633     __pyx_t_5 = __pyx_v_self->view.format;
56634     __pyx_v_info->format = __pyx_t_5;
56635 
56636     /* "View.MemoryView":537
56637  *             info.suboffsets = NULL
56638  *
56639  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
56640  *             info.format = self.view.format
56641  *         else:
56642  */
56643     goto __pyx_L9;
56644   }
56645 
56646   /* "View.MemoryView":540
56647  *             info.format = self.view.format
56648  *         else:
56649  *             info.format = NULL             # <<<<<<<<<<<<<<
56650  *
56651  *         info.buf = self.view.buf
56652  */
56653   /*else*/ {
56654     __pyx_v_info->format = NULL;
56655   }
56656   __pyx_L9:;
56657 
56658   /* "View.MemoryView":542
56659  *             info.format = NULL
56660  *
56661  *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
56662  *         info.ndim = self.view.ndim
56663  *         info.itemsize = self.view.itemsize
56664  */
56665   __pyx_t_6 = __pyx_v_self->view.buf;
56666   __pyx_v_info->buf = __pyx_t_6;
56667 
56668   /* "View.MemoryView":543
56669  *
56670  *         info.buf = self.view.buf
56671  *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
56672  *         info.itemsize = self.view.itemsize
56673  *         info.len = self.view.len
56674  */
56675   __pyx_t_7 = __pyx_v_self->view.ndim;
56676   __pyx_v_info->ndim = __pyx_t_7;
56677 
56678   /* "View.MemoryView":544
56679  *         info.buf = self.view.buf
56680  *         info.ndim = self.view.ndim
56681  *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
56682  *         info.len = self.view.len
56683  *         info.readonly = self.view.readonly
56684  */
56685   __pyx_t_8 = __pyx_v_self->view.itemsize;
56686   __pyx_v_info->itemsize = __pyx_t_8;
56687 
56688   /* "View.MemoryView":545
56689  *         info.ndim = self.view.ndim
56690  *         info.itemsize = self.view.itemsize
56691  *         info.len = self.view.len             # <<<<<<<<<<<<<<
56692  *         info.readonly = self.view.readonly
56693  *         info.obj = self
56694  */
56695   __pyx_t_8 = __pyx_v_self->view.len;
56696   __pyx_v_info->len = __pyx_t_8;
56697 
56698   /* "View.MemoryView":546
56699  *         info.itemsize = self.view.itemsize
56700  *         info.len = self.view.len
56701  *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
56702  *         info.obj = self
56703  *
56704  */
56705   __pyx_t_1 = __pyx_v_self->view.readonly;
56706   __pyx_v_info->readonly = __pyx_t_1;
56707 
56708   /* "View.MemoryView":547
56709  *         info.len = self.view.len
56710  *         info.readonly = self.view.readonly
56711  *         info.obj = self             # <<<<<<<<<<<<<<
56712  *
56713  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
56714  */
56715   __Pyx_INCREF(((PyObject *)__pyx_v_self));
56716   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
56717   __Pyx_GOTREF(__pyx_v_info->obj);
56718   __Pyx_DECREF(__pyx_v_info->obj);
56719   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
56720 
56721   /* "View.MemoryView":518
56722  *
56723  *     @cname('getbuffer')
56724  *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
56725  *         if flags & PyBUF_WRITABLE and self.view.readonly:
56726  *             raise ValueError("Cannot create writable memory view from read-only memoryview")
56727  */
56728 
56729   /* function exit code */
56730   __pyx_r = 0;
56731   goto __pyx_L0;
56732   __pyx_L1_error:;
56733   __Pyx_XDECREF(__pyx_t_3);
56734   __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56735   __pyx_r = -1;
56736   if (__pyx_v_info->obj != NULL) {
56737     __Pyx_GOTREF(__pyx_v_info->obj);
56738     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
56739   }
56740   goto __pyx_L2;
56741   __pyx_L0:;
56742   if (__pyx_v_info->obj == Py_None) {
56743     __Pyx_GOTREF(__pyx_v_info->obj);
56744     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
56745   }
56746   __pyx_L2:;
56747   __Pyx_RefNannyFinishContext();
56748   return __pyx_r;
56749 }
56750 
56751 /* "View.MemoryView":553
56752  *
56753  *     @property
56754  *     def T(self):             # <<<<<<<<<<<<<<
56755  *         cdef _memoryviewslice result = memoryview_copy(self)
56756  *         transpose_memslice(&result.from_slice)
56757  */
56758 
56759 /* Python wrapper */
56760 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject * __pyx_v_self)56761 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
56762   PyObject *__pyx_r = 0;
56763   __Pyx_RefNannyDeclarations
56764   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
56765   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
56766 
56767   /* function exit code */
56768   __Pyx_RefNannyFinishContext();
56769   return __pyx_r;
56770 }
56771 
__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj * __pyx_v_self)56772 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
56773   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
56774   PyObject *__pyx_r = NULL;
56775   __Pyx_RefNannyDeclarations
56776   PyObject *__pyx_t_1 = NULL;
56777   int __pyx_t_2;
56778   int __pyx_lineno = 0;
56779   const char *__pyx_filename = NULL;
56780   int __pyx_clineno = 0;
56781   __Pyx_RefNannySetupContext("__get__", 0);
56782 
56783   /* "View.MemoryView":554
56784  *     @property
56785  *     def T(self):
56786  *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
56787  *         transpose_memslice(&result.from_slice)
56788  *         return result
56789  */
56790   __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 554, __pyx_L1_error)
56791   __Pyx_GOTREF(__pyx_t_1);
56792   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(3, 554, __pyx_L1_error)
56793   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
56794   __pyx_t_1 = 0;
56795 
56796   /* "View.MemoryView":555
56797  *     def T(self):
56798  *         cdef _memoryviewslice result = memoryview_copy(self)
56799  *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
56800  *         return result
56801  *
56802  */
56803   __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(3, 555, __pyx_L1_error)
56804 
56805   /* "View.MemoryView":556
56806  *         cdef _memoryviewslice result = memoryview_copy(self)
56807  *         transpose_memslice(&result.from_slice)
56808  *         return result             # <<<<<<<<<<<<<<
56809  *
56810  *     @property
56811  */
56812   __Pyx_XDECREF(__pyx_r);
56813   __Pyx_INCREF(((PyObject *)__pyx_v_result));
56814   __pyx_r = ((PyObject *)__pyx_v_result);
56815   goto __pyx_L0;
56816 
56817   /* "View.MemoryView":553
56818  *
56819  *     @property
56820  *     def T(self):             # <<<<<<<<<<<<<<
56821  *         cdef _memoryviewslice result = memoryview_copy(self)
56822  *         transpose_memslice(&result.from_slice)
56823  */
56824 
56825   /* function exit code */
56826   __pyx_L1_error:;
56827   __Pyx_XDECREF(__pyx_t_1);
56828   __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56829   __pyx_r = NULL;
56830   __pyx_L0:;
56831   __Pyx_XDECREF((PyObject *)__pyx_v_result);
56832   __Pyx_XGIVEREF(__pyx_r);
56833   __Pyx_RefNannyFinishContext();
56834   return __pyx_r;
56835 }
56836 
56837 /* "View.MemoryView":559
56838  *
56839  *     @property
56840  *     def base(self):             # <<<<<<<<<<<<<<
56841  *         return self.obj
56842  *
56843  */
56844 
56845 /* Python wrapper */
56846 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject * __pyx_v_self)56847 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
56848   PyObject *__pyx_r = 0;
56849   __Pyx_RefNannyDeclarations
56850   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
56851   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
56852 
56853   /* function exit code */
56854   __Pyx_RefNannyFinishContext();
56855   return __pyx_r;
56856 }
56857 
__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj * __pyx_v_self)56858 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
56859   PyObject *__pyx_r = NULL;
56860   __Pyx_RefNannyDeclarations
56861   __Pyx_RefNannySetupContext("__get__", 0);
56862 
56863   /* "View.MemoryView":560
56864  *     @property
56865  *     def base(self):
56866  *         return self.obj             # <<<<<<<<<<<<<<
56867  *
56868  *     @property
56869  */
56870   __Pyx_XDECREF(__pyx_r);
56871   __Pyx_INCREF(__pyx_v_self->obj);
56872   __pyx_r = __pyx_v_self->obj;
56873   goto __pyx_L0;
56874 
56875   /* "View.MemoryView":559
56876  *
56877  *     @property
56878  *     def base(self):             # <<<<<<<<<<<<<<
56879  *         return self.obj
56880  *
56881  */
56882 
56883   /* function exit code */
56884   __pyx_L0:;
56885   __Pyx_XGIVEREF(__pyx_r);
56886   __Pyx_RefNannyFinishContext();
56887   return __pyx_r;
56888 }
56889 
56890 /* "View.MemoryView":563
56891  *
56892  *     @property
56893  *     def shape(self):             # <<<<<<<<<<<<<<
56894  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
56895  *
56896  */
56897 
56898 /* Python wrapper */
56899 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject * __pyx_v_self)56900 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
56901   PyObject *__pyx_r = 0;
56902   __Pyx_RefNannyDeclarations
56903   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
56904   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
56905 
56906   /* function exit code */
56907   __Pyx_RefNannyFinishContext();
56908   return __pyx_r;
56909 }
56910 
__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj * __pyx_v_self)56911 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
56912   Py_ssize_t __pyx_v_length;
56913   PyObject *__pyx_r = NULL;
56914   __Pyx_RefNannyDeclarations
56915   PyObject *__pyx_t_1 = NULL;
56916   Py_ssize_t *__pyx_t_2;
56917   Py_ssize_t *__pyx_t_3;
56918   Py_ssize_t *__pyx_t_4;
56919   PyObject *__pyx_t_5 = NULL;
56920   int __pyx_lineno = 0;
56921   const char *__pyx_filename = NULL;
56922   int __pyx_clineno = 0;
56923   __Pyx_RefNannySetupContext("__get__", 0);
56924 
56925   /* "View.MemoryView":564
56926  *     @property
56927  *     def shape(self):
56928  *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
56929  *
56930  *     @property
56931  */
56932   __Pyx_XDECREF(__pyx_r);
56933   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 564, __pyx_L1_error)
56934   __Pyx_GOTREF(__pyx_t_1);
56935   __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
56936   for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
56937     __pyx_t_2 = __pyx_t_4;
56938     __pyx_v_length = (__pyx_t_2[0]);
56939     __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 564, __pyx_L1_error)
56940     __Pyx_GOTREF(__pyx_t_5);
56941     if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(3, 564, __pyx_L1_error)
56942     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
56943   }
56944   __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 564, __pyx_L1_error)
56945   __Pyx_GOTREF(__pyx_t_5);
56946   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56947   __pyx_r = __pyx_t_5;
56948   __pyx_t_5 = 0;
56949   goto __pyx_L0;
56950 
56951   /* "View.MemoryView":563
56952  *
56953  *     @property
56954  *     def shape(self):             # <<<<<<<<<<<<<<
56955  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
56956  *
56957  */
56958 
56959   /* function exit code */
56960   __pyx_L1_error:;
56961   __Pyx_XDECREF(__pyx_t_1);
56962   __Pyx_XDECREF(__pyx_t_5);
56963   __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56964   __pyx_r = NULL;
56965   __pyx_L0:;
56966   __Pyx_XGIVEREF(__pyx_r);
56967   __Pyx_RefNannyFinishContext();
56968   return __pyx_r;
56969 }
56970 
56971 /* "View.MemoryView":567
56972  *
56973  *     @property
56974  *     def strides(self):             # <<<<<<<<<<<<<<
56975  *         if self.view.strides == NULL:
56976  *
56977  */
56978 
56979 /* Python wrapper */
56980 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject * __pyx_v_self)56981 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
56982   PyObject *__pyx_r = 0;
56983   __Pyx_RefNannyDeclarations
56984   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
56985   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
56986 
56987   /* function exit code */
56988   __Pyx_RefNannyFinishContext();
56989   return __pyx_r;
56990 }
56991 
__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj * __pyx_v_self)56992 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
56993   Py_ssize_t __pyx_v_stride;
56994   PyObject *__pyx_r = NULL;
56995   __Pyx_RefNannyDeclarations
56996   int __pyx_t_1;
56997   PyObject *__pyx_t_2 = NULL;
56998   Py_ssize_t *__pyx_t_3;
56999   Py_ssize_t *__pyx_t_4;
57000   Py_ssize_t *__pyx_t_5;
57001   PyObject *__pyx_t_6 = NULL;
57002   int __pyx_lineno = 0;
57003   const char *__pyx_filename = NULL;
57004   int __pyx_clineno = 0;
57005   __Pyx_RefNannySetupContext("__get__", 0);
57006 
57007   /* "View.MemoryView":568
57008  *     @property
57009  *     def strides(self):
57010  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
57011  *
57012  *             raise ValueError("Buffer view does not expose strides")
57013  */
57014   __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
57015   if (unlikely(__pyx_t_1)) {
57016 
57017     /* "View.MemoryView":570
57018  *         if self.view.strides == NULL:
57019  *
57020  *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
57021  *
57022  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
57023  */
57024     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 570, __pyx_L1_error)
57025     __Pyx_GOTREF(__pyx_t_2);
57026     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
57027     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57028     __PYX_ERR(3, 570, __pyx_L1_error)
57029 
57030     /* "View.MemoryView":568
57031  *     @property
57032  *     def strides(self):
57033  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
57034  *
57035  *             raise ValueError("Buffer view does not expose strides")
57036  */
57037   }
57038 
57039   /* "View.MemoryView":572
57040  *             raise ValueError("Buffer view does not expose strides")
57041  *
57042  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
57043  *
57044  *     @property
57045  */
57046   __Pyx_XDECREF(__pyx_r);
57047   __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 572, __pyx_L1_error)
57048   __Pyx_GOTREF(__pyx_t_2);
57049   __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
57050   for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
57051     __pyx_t_3 = __pyx_t_5;
57052     __pyx_v_stride = (__pyx_t_3[0]);
57053     __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 572, __pyx_L1_error)
57054     __Pyx_GOTREF(__pyx_t_6);
57055     if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(3, 572, __pyx_L1_error)
57056     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
57057   }
57058   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 572, __pyx_L1_error)
57059   __Pyx_GOTREF(__pyx_t_6);
57060   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57061   __pyx_r = __pyx_t_6;
57062   __pyx_t_6 = 0;
57063   goto __pyx_L0;
57064 
57065   /* "View.MemoryView":567
57066  *
57067  *     @property
57068  *     def strides(self):             # <<<<<<<<<<<<<<
57069  *         if self.view.strides == NULL:
57070  *
57071  */
57072 
57073   /* function exit code */
57074   __pyx_L1_error:;
57075   __Pyx_XDECREF(__pyx_t_2);
57076   __Pyx_XDECREF(__pyx_t_6);
57077   __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57078   __pyx_r = NULL;
57079   __pyx_L0:;
57080   __Pyx_XGIVEREF(__pyx_r);
57081   __Pyx_RefNannyFinishContext();
57082   return __pyx_r;
57083 }
57084 
57085 /* "View.MemoryView":575
57086  *
57087  *     @property
57088  *     def suboffsets(self):             # <<<<<<<<<<<<<<
57089  *         if self.view.suboffsets == NULL:
57090  *             return (-1,) * self.view.ndim
57091  */
57092 
57093 /* Python wrapper */
57094 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject * __pyx_v_self)57095 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
57096   PyObject *__pyx_r = 0;
57097   __Pyx_RefNannyDeclarations
57098   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
57099   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
57100 
57101   /* function exit code */
57102   __Pyx_RefNannyFinishContext();
57103   return __pyx_r;
57104 }
57105 
__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj * __pyx_v_self)57106 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
57107   Py_ssize_t __pyx_v_suboffset;
57108   PyObject *__pyx_r = NULL;
57109   __Pyx_RefNannyDeclarations
57110   int __pyx_t_1;
57111   PyObject *__pyx_t_2 = NULL;
57112   PyObject *__pyx_t_3 = NULL;
57113   Py_ssize_t *__pyx_t_4;
57114   Py_ssize_t *__pyx_t_5;
57115   Py_ssize_t *__pyx_t_6;
57116   int __pyx_lineno = 0;
57117   const char *__pyx_filename = NULL;
57118   int __pyx_clineno = 0;
57119   __Pyx_RefNannySetupContext("__get__", 0);
57120 
57121   /* "View.MemoryView":576
57122  *     @property
57123  *     def suboffsets(self):
57124  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
57125  *             return (-1,) * self.view.ndim
57126  *
57127  */
57128   __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
57129   if (__pyx_t_1) {
57130 
57131     /* "View.MemoryView":577
57132  *     def suboffsets(self):
57133  *         if self.view.suboffsets == NULL:
57134  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
57135  *
57136  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
57137  */
57138     __Pyx_XDECREF(__pyx_r);
57139     __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 577, __pyx_L1_error)
57140     __Pyx_GOTREF(__pyx_t_2);
57141     __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__20, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 577, __pyx_L1_error)
57142     __Pyx_GOTREF(__pyx_t_3);
57143     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57144     __pyx_r = __pyx_t_3;
57145     __pyx_t_3 = 0;
57146     goto __pyx_L0;
57147 
57148     /* "View.MemoryView":576
57149  *     @property
57150  *     def suboffsets(self):
57151  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
57152  *             return (-1,) * self.view.ndim
57153  *
57154  */
57155   }
57156 
57157   /* "View.MemoryView":579
57158  *             return (-1,) * self.view.ndim
57159  *
57160  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
57161  *
57162  *     @property
57163  */
57164   __Pyx_XDECREF(__pyx_r);
57165   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __pyx_L1_error)
57166   __Pyx_GOTREF(__pyx_t_3);
57167   __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
57168   for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
57169     __pyx_t_4 = __pyx_t_6;
57170     __pyx_v_suboffset = (__pyx_t_4[0]);
57171     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 579, __pyx_L1_error)
57172     __Pyx_GOTREF(__pyx_t_2);
57173     if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 579, __pyx_L1_error)
57174     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57175   }
57176   __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 579, __pyx_L1_error)
57177   __Pyx_GOTREF(__pyx_t_2);
57178   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57179   __pyx_r = __pyx_t_2;
57180   __pyx_t_2 = 0;
57181   goto __pyx_L0;
57182 
57183   /* "View.MemoryView":575
57184  *
57185  *     @property
57186  *     def suboffsets(self):             # <<<<<<<<<<<<<<
57187  *         if self.view.suboffsets == NULL:
57188  *             return (-1,) * self.view.ndim
57189  */
57190 
57191   /* function exit code */
57192   __pyx_L1_error:;
57193   __Pyx_XDECREF(__pyx_t_2);
57194   __Pyx_XDECREF(__pyx_t_3);
57195   __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57196   __pyx_r = NULL;
57197   __pyx_L0:;
57198   __Pyx_XGIVEREF(__pyx_r);
57199   __Pyx_RefNannyFinishContext();
57200   return __pyx_r;
57201 }
57202 
57203 /* "View.MemoryView":582
57204  *
57205  *     @property
57206  *     def ndim(self):             # <<<<<<<<<<<<<<
57207  *         return self.view.ndim
57208  *
57209  */
57210 
57211 /* Python wrapper */
57212 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject * __pyx_v_self)57213 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
57214   PyObject *__pyx_r = 0;
57215   __Pyx_RefNannyDeclarations
57216   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
57217   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
57218 
57219   /* function exit code */
57220   __Pyx_RefNannyFinishContext();
57221   return __pyx_r;
57222 }
57223 
__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj * __pyx_v_self)57224 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
57225   PyObject *__pyx_r = NULL;
57226   __Pyx_RefNannyDeclarations
57227   PyObject *__pyx_t_1 = NULL;
57228   int __pyx_lineno = 0;
57229   const char *__pyx_filename = NULL;
57230   int __pyx_clineno = 0;
57231   __Pyx_RefNannySetupContext("__get__", 0);
57232 
57233   /* "View.MemoryView":583
57234  *     @property
57235  *     def ndim(self):
57236  *         return self.view.ndim             # <<<<<<<<<<<<<<
57237  *
57238  *     @property
57239  */
57240   __Pyx_XDECREF(__pyx_r);
57241   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 583, __pyx_L1_error)
57242   __Pyx_GOTREF(__pyx_t_1);
57243   __pyx_r = __pyx_t_1;
57244   __pyx_t_1 = 0;
57245   goto __pyx_L0;
57246 
57247   /* "View.MemoryView":582
57248  *
57249  *     @property
57250  *     def ndim(self):             # <<<<<<<<<<<<<<
57251  *         return self.view.ndim
57252  *
57253  */
57254 
57255   /* function exit code */
57256   __pyx_L1_error:;
57257   __Pyx_XDECREF(__pyx_t_1);
57258   __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57259   __pyx_r = NULL;
57260   __pyx_L0:;
57261   __Pyx_XGIVEREF(__pyx_r);
57262   __Pyx_RefNannyFinishContext();
57263   return __pyx_r;
57264 }
57265 
57266 /* "View.MemoryView":586
57267  *
57268  *     @property
57269  *     def itemsize(self):             # <<<<<<<<<<<<<<
57270  *         return self.view.itemsize
57271  *
57272  */
57273 
57274 /* Python wrapper */
57275 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject * __pyx_v_self)57276 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
57277   PyObject *__pyx_r = 0;
57278   __Pyx_RefNannyDeclarations
57279   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
57280   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
57281 
57282   /* function exit code */
57283   __Pyx_RefNannyFinishContext();
57284   return __pyx_r;
57285 }
57286 
__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj * __pyx_v_self)57287 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
57288   PyObject *__pyx_r = NULL;
57289   __Pyx_RefNannyDeclarations
57290   PyObject *__pyx_t_1 = NULL;
57291   int __pyx_lineno = 0;
57292   const char *__pyx_filename = NULL;
57293   int __pyx_clineno = 0;
57294   __Pyx_RefNannySetupContext("__get__", 0);
57295 
57296   /* "View.MemoryView":587
57297  *     @property
57298  *     def itemsize(self):
57299  *         return self.view.itemsize             # <<<<<<<<<<<<<<
57300  *
57301  *     @property
57302  */
57303   __Pyx_XDECREF(__pyx_r);
57304   __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 587, __pyx_L1_error)
57305   __Pyx_GOTREF(__pyx_t_1);
57306   __pyx_r = __pyx_t_1;
57307   __pyx_t_1 = 0;
57308   goto __pyx_L0;
57309 
57310   /* "View.MemoryView":586
57311  *
57312  *     @property
57313  *     def itemsize(self):             # <<<<<<<<<<<<<<
57314  *         return self.view.itemsize
57315  *
57316  */
57317 
57318   /* function exit code */
57319   __pyx_L1_error:;
57320   __Pyx_XDECREF(__pyx_t_1);
57321   __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57322   __pyx_r = NULL;
57323   __pyx_L0:;
57324   __Pyx_XGIVEREF(__pyx_r);
57325   __Pyx_RefNannyFinishContext();
57326   return __pyx_r;
57327 }
57328 
57329 /* "View.MemoryView":590
57330  *
57331  *     @property
57332  *     def nbytes(self):             # <<<<<<<<<<<<<<
57333  *         return self.size * self.view.itemsize
57334  *
57335  */
57336 
57337 /* Python wrapper */
57338 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject * __pyx_v_self)57339 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
57340   PyObject *__pyx_r = 0;
57341   __Pyx_RefNannyDeclarations
57342   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
57343   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
57344 
57345   /* function exit code */
57346   __Pyx_RefNannyFinishContext();
57347   return __pyx_r;
57348 }
57349 
__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj * __pyx_v_self)57350 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
57351   PyObject *__pyx_r = NULL;
57352   __Pyx_RefNannyDeclarations
57353   PyObject *__pyx_t_1 = NULL;
57354   PyObject *__pyx_t_2 = NULL;
57355   PyObject *__pyx_t_3 = NULL;
57356   int __pyx_lineno = 0;
57357   const char *__pyx_filename = NULL;
57358   int __pyx_clineno = 0;
57359   __Pyx_RefNannySetupContext("__get__", 0);
57360 
57361   /* "View.MemoryView":591
57362  *     @property
57363  *     def nbytes(self):
57364  *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
57365  *
57366  *     @property
57367  */
57368   __Pyx_XDECREF(__pyx_r);
57369   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 591, __pyx_L1_error)
57370   __Pyx_GOTREF(__pyx_t_1);
57371   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 591, __pyx_L1_error)
57372   __Pyx_GOTREF(__pyx_t_2);
57373   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 591, __pyx_L1_error)
57374   __Pyx_GOTREF(__pyx_t_3);
57375   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57376   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57377   __pyx_r = __pyx_t_3;
57378   __pyx_t_3 = 0;
57379   goto __pyx_L0;
57380 
57381   /* "View.MemoryView":590
57382  *
57383  *     @property
57384  *     def nbytes(self):             # <<<<<<<<<<<<<<
57385  *         return self.size * self.view.itemsize
57386  *
57387  */
57388 
57389   /* function exit code */
57390   __pyx_L1_error:;
57391   __Pyx_XDECREF(__pyx_t_1);
57392   __Pyx_XDECREF(__pyx_t_2);
57393   __Pyx_XDECREF(__pyx_t_3);
57394   __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57395   __pyx_r = NULL;
57396   __pyx_L0:;
57397   __Pyx_XGIVEREF(__pyx_r);
57398   __Pyx_RefNannyFinishContext();
57399   return __pyx_r;
57400 }
57401 
57402 /* "View.MemoryView":594
57403  *
57404  *     @property
57405  *     def size(self):             # <<<<<<<<<<<<<<
57406  *         if self._size is None:
57407  *             result = 1
57408  */
57409 
57410 /* Python wrapper */
57411 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject * __pyx_v_self)57412 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
57413   PyObject *__pyx_r = 0;
57414   __Pyx_RefNannyDeclarations
57415   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
57416   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
57417 
57418   /* function exit code */
57419   __Pyx_RefNannyFinishContext();
57420   return __pyx_r;
57421 }
57422 
__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj * __pyx_v_self)57423 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
57424   PyObject *__pyx_v_result = NULL;
57425   PyObject *__pyx_v_length = NULL;
57426   PyObject *__pyx_r = NULL;
57427   __Pyx_RefNannyDeclarations
57428   int __pyx_t_1;
57429   int __pyx_t_2;
57430   Py_ssize_t *__pyx_t_3;
57431   Py_ssize_t *__pyx_t_4;
57432   Py_ssize_t *__pyx_t_5;
57433   PyObject *__pyx_t_6 = NULL;
57434   int __pyx_lineno = 0;
57435   const char *__pyx_filename = NULL;
57436   int __pyx_clineno = 0;
57437   __Pyx_RefNannySetupContext("__get__", 0);
57438 
57439   /* "View.MemoryView":595
57440  *     @property
57441  *     def size(self):
57442  *         if self._size is None:             # <<<<<<<<<<<<<<
57443  *             result = 1
57444  *
57445  */
57446   __pyx_t_1 = (__pyx_v_self->_size == Py_None);
57447   __pyx_t_2 = (__pyx_t_1 != 0);
57448   if (__pyx_t_2) {
57449 
57450     /* "View.MemoryView":596
57451  *     def size(self):
57452  *         if self._size is None:
57453  *             result = 1             # <<<<<<<<<<<<<<
57454  *
57455  *             for length in self.view.shape[:self.view.ndim]:
57456  */
57457     __Pyx_INCREF(__pyx_int_1);
57458     __pyx_v_result = __pyx_int_1;
57459 
57460     /* "View.MemoryView":598
57461  *             result = 1
57462  *
57463  *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
57464  *                 result *= length
57465  *
57466  */
57467     __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
57468     for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
57469       __pyx_t_3 = __pyx_t_5;
57470       __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 598, __pyx_L1_error)
57471       __Pyx_GOTREF(__pyx_t_6);
57472       __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
57473       __pyx_t_6 = 0;
57474 
57475       /* "View.MemoryView":599
57476  *
57477  *             for length in self.view.shape[:self.view.ndim]:
57478  *                 result *= length             # <<<<<<<<<<<<<<
57479  *
57480  *             self._size = result
57481  */
57482       __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 599, __pyx_L1_error)
57483       __Pyx_GOTREF(__pyx_t_6);
57484       __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
57485       __pyx_t_6 = 0;
57486     }
57487 
57488     /* "View.MemoryView":601
57489  *                 result *= length
57490  *
57491  *             self._size = result             # <<<<<<<<<<<<<<
57492  *
57493  *         return self._size
57494  */
57495     __Pyx_INCREF(__pyx_v_result);
57496     __Pyx_GIVEREF(__pyx_v_result);
57497     __Pyx_GOTREF(__pyx_v_self->_size);
57498     __Pyx_DECREF(__pyx_v_self->_size);
57499     __pyx_v_self->_size = __pyx_v_result;
57500 
57501     /* "View.MemoryView":595
57502  *     @property
57503  *     def size(self):
57504  *         if self._size is None:             # <<<<<<<<<<<<<<
57505  *             result = 1
57506  *
57507  */
57508   }
57509 
57510   /* "View.MemoryView":603
57511  *             self._size = result
57512  *
57513  *         return self._size             # <<<<<<<<<<<<<<
57514  *
57515  *     def __len__(self):
57516  */
57517   __Pyx_XDECREF(__pyx_r);
57518   __Pyx_INCREF(__pyx_v_self->_size);
57519   __pyx_r = __pyx_v_self->_size;
57520   goto __pyx_L0;
57521 
57522   /* "View.MemoryView":594
57523  *
57524  *     @property
57525  *     def size(self):             # <<<<<<<<<<<<<<
57526  *         if self._size is None:
57527  *             result = 1
57528  */
57529 
57530   /* function exit code */
57531   __pyx_L1_error:;
57532   __Pyx_XDECREF(__pyx_t_6);
57533   __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57534   __pyx_r = NULL;
57535   __pyx_L0:;
57536   __Pyx_XDECREF(__pyx_v_result);
57537   __Pyx_XDECREF(__pyx_v_length);
57538   __Pyx_XGIVEREF(__pyx_r);
57539   __Pyx_RefNannyFinishContext();
57540   return __pyx_r;
57541 }
57542 
57543 /* "View.MemoryView":605
57544  *         return self._size
57545  *
57546  *     def __len__(self):             # <<<<<<<<<<<<<<
57547  *         if self.view.ndim >= 1:
57548  *             return self.view.shape[0]
57549  */
57550 
57551 /* Python wrapper */
57552 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___len__(PyObject * __pyx_v_self)57553 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
57554   Py_ssize_t __pyx_r;
57555   __Pyx_RefNannyDeclarations
57556   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
57557   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
57558 
57559   /* function exit code */
57560   __Pyx_RefNannyFinishContext();
57561   return __pyx_r;
57562 }
57563 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj * __pyx_v_self)57564 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
57565   Py_ssize_t __pyx_r;
57566   __Pyx_RefNannyDeclarations
57567   int __pyx_t_1;
57568   __Pyx_RefNannySetupContext("__len__", 0);
57569 
57570   /* "View.MemoryView":606
57571  *
57572  *     def __len__(self):
57573  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
57574  *             return self.view.shape[0]
57575  *
57576  */
57577   __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
57578   if (__pyx_t_1) {
57579 
57580     /* "View.MemoryView":607
57581  *     def __len__(self):
57582  *         if self.view.ndim >= 1:
57583  *             return self.view.shape[0]             # <<<<<<<<<<<<<<
57584  *
57585  *         return 0
57586  */
57587     __pyx_r = (__pyx_v_self->view.shape[0]);
57588     goto __pyx_L0;
57589 
57590     /* "View.MemoryView":606
57591  *
57592  *     def __len__(self):
57593  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
57594  *             return self.view.shape[0]
57595  *
57596  */
57597   }
57598 
57599   /* "View.MemoryView":609
57600  *             return self.view.shape[0]
57601  *
57602  *         return 0             # <<<<<<<<<<<<<<
57603  *
57604  *     def __repr__(self):
57605  */
57606   __pyx_r = 0;
57607   goto __pyx_L0;
57608 
57609   /* "View.MemoryView":605
57610  *         return self._size
57611  *
57612  *     def __len__(self):             # <<<<<<<<<<<<<<
57613  *         if self.view.ndim >= 1:
57614  *             return self.view.shape[0]
57615  */
57616 
57617   /* function exit code */
57618   __pyx_L0:;
57619   __Pyx_RefNannyFinishContext();
57620   return __pyx_r;
57621 }
57622 
57623 /* "View.MemoryView":611
57624  *         return 0
57625  *
57626  *     def __repr__(self):             # <<<<<<<<<<<<<<
57627  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
57628  *                                                id(self))
57629  */
57630 
57631 /* Python wrapper */
57632 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___repr__(PyObject * __pyx_v_self)57633 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
57634   PyObject *__pyx_r = 0;
57635   __Pyx_RefNannyDeclarations
57636   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
57637   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
57638 
57639   /* function exit code */
57640   __Pyx_RefNannyFinishContext();
57641   return __pyx_r;
57642 }
57643 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj * __pyx_v_self)57644 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
57645   PyObject *__pyx_r = NULL;
57646   __Pyx_RefNannyDeclarations
57647   PyObject *__pyx_t_1 = NULL;
57648   PyObject *__pyx_t_2 = NULL;
57649   PyObject *__pyx_t_3 = NULL;
57650   int __pyx_lineno = 0;
57651   const char *__pyx_filename = NULL;
57652   int __pyx_clineno = 0;
57653   __Pyx_RefNannySetupContext("__repr__", 0);
57654 
57655   /* "View.MemoryView":612
57656  *
57657  *     def __repr__(self):
57658  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
57659  *                                                id(self))
57660  *
57661  */
57662   __Pyx_XDECREF(__pyx_r);
57663   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 612, __pyx_L1_error)
57664   __Pyx_GOTREF(__pyx_t_1);
57665   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 612, __pyx_L1_error)
57666   __Pyx_GOTREF(__pyx_t_2);
57667   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57668   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 612, __pyx_L1_error)
57669   __Pyx_GOTREF(__pyx_t_1);
57670   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57671 
57672   /* "View.MemoryView":613
57673  *     def __repr__(self):
57674  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
57675  *                                                id(self))             # <<<<<<<<<<<<<<
57676  *
57677  *     def __str__(self):
57678  */
57679   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 613, __pyx_L1_error)
57680   __Pyx_GOTREF(__pyx_t_2);
57681 
57682   /* "View.MemoryView":612
57683  *
57684  *     def __repr__(self):
57685  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
57686  *                                                id(self))
57687  *
57688  */
57689   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 612, __pyx_L1_error)
57690   __Pyx_GOTREF(__pyx_t_3);
57691   __Pyx_GIVEREF(__pyx_t_1);
57692   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
57693   __Pyx_GIVEREF(__pyx_t_2);
57694   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
57695   __pyx_t_1 = 0;
57696   __pyx_t_2 = 0;
57697   __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 612, __pyx_L1_error)
57698   __Pyx_GOTREF(__pyx_t_2);
57699   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57700   __pyx_r = __pyx_t_2;
57701   __pyx_t_2 = 0;
57702   goto __pyx_L0;
57703 
57704   /* "View.MemoryView":611
57705  *         return 0
57706  *
57707  *     def __repr__(self):             # <<<<<<<<<<<<<<
57708  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
57709  *                                                id(self))
57710  */
57711 
57712   /* function exit code */
57713   __pyx_L1_error:;
57714   __Pyx_XDECREF(__pyx_t_1);
57715   __Pyx_XDECREF(__pyx_t_2);
57716   __Pyx_XDECREF(__pyx_t_3);
57717   __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57718   __pyx_r = NULL;
57719   __pyx_L0:;
57720   __Pyx_XGIVEREF(__pyx_r);
57721   __Pyx_RefNannyFinishContext();
57722   return __pyx_r;
57723 }
57724 
57725 /* "View.MemoryView":615
57726  *                                                id(self))
57727  *
57728  *     def __str__(self):             # <<<<<<<<<<<<<<
57729  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
57730  *
57731  */
57732 
57733 /* Python wrapper */
57734 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryview___str__(PyObject * __pyx_v_self)57735 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
57736   PyObject *__pyx_r = 0;
57737   __Pyx_RefNannyDeclarations
57738   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
57739   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
57740 
57741   /* function exit code */
57742   __Pyx_RefNannyFinishContext();
57743   return __pyx_r;
57744 }
57745 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj * __pyx_v_self)57746 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
57747   PyObject *__pyx_r = NULL;
57748   __Pyx_RefNannyDeclarations
57749   PyObject *__pyx_t_1 = NULL;
57750   PyObject *__pyx_t_2 = NULL;
57751   int __pyx_lineno = 0;
57752   const char *__pyx_filename = NULL;
57753   int __pyx_clineno = 0;
57754   __Pyx_RefNannySetupContext("__str__", 0);
57755 
57756   /* "View.MemoryView":616
57757  *
57758  *     def __str__(self):
57759  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
57760  *
57761  *
57762  */
57763   __Pyx_XDECREF(__pyx_r);
57764   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 616, __pyx_L1_error)
57765   __Pyx_GOTREF(__pyx_t_1);
57766   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 616, __pyx_L1_error)
57767   __Pyx_GOTREF(__pyx_t_2);
57768   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57769   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 616, __pyx_L1_error)
57770   __Pyx_GOTREF(__pyx_t_1);
57771   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57772   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 616, __pyx_L1_error)
57773   __Pyx_GOTREF(__pyx_t_2);
57774   __Pyx_GIVEREF(__pyx_t_1);
57775   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
57776   __pyx_t_1 = 0;
57777   __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 616, __pyx_L1_error)
57778   __Pyx_GOTREF(__pyx_t_1);
57779   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57780   __pyx_r = __pyx_t_1;
57781   __pyx_t_1 = 0;
57782   goto __pyx_L0;
57783 
57784   /* "View.MemoryView":615
57785  *                                                id(self))
57786  *
57787  *     def __str__(self):             # <<<<<<<<<<<<<<
57788  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
57789  *
57790  */
57791 
57792   /* function exit code */
57793   __pyx_L1_error:;
57794   __Pyx_XDECREF(__pyx_t_1);
57795   __Pyx_XDECREF(__pyx_t_2);
57796   __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57797   __pyx_r = NULL;
57798   __pyx_L0:;
57799   __Pyx_XGIVEREF(__pyx_r);
57800   __Pyx_RefNannyFinishContext();
57801   return __pyx_r;
57802 }
57803 
57804 /* "View.MemoryView":619
57805  *
57806  *
57807  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
57808  *         cdef __Pyx_memviewslice *mslice
57809  *         cdef __Pyx_memviewslice tmp
57810  */
57811 
57812 /* Python wrapper */
57813 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_memoryview_is_c_contig(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)57814 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
57815   PyObject *__pyx_r = 0;
57816   __Pyx_RefNannyDeclarations
57817   __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
57818   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
57819 
57820   /* function exit code */
57821   __Pyx_RefNannyFinishContext();
57822   return __pyx_r;
57823 }
57824 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj * __pyx_v_self)57825 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
57826   __Pyx_memviewslice *__pyx_v_mslice;
57827   __Pyx_memviewslice __pyx_v_tmp;
57828   PyObject *__pyx_r = NULL;
57829   __Pyx_RefNannyDeclarations
57830   __Pyx_memviewslice *__pyx_t_1;
57831   PyObject *__pyx_t_2 = NULL;
57832   int __pyx_lineno = 0;
57833   const char *__pyx_filename = NULL;
57834   int __pyx_clineno = 0;
57835   __Pyx_RefNannySetupContext("is_c_contig", 0);
57836 
57837   /* "View.MemoryView":622
57838  *         cdef __Pyx_memviewslice *mslice
57839  *         cdef __Pyx_memviewslice tmp
57840  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
57841  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
57842  *
57843  */
57844   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(3, 622, __pyx_L1_error)
57845   __pyx_v_mslice = __pyx_t_1;
57846 
57847   /* "View.MemoryView":623
57848  *         cdef __Pyx_memviewslice tmp
57849  *         mslice = get_slice_from_memview(self, &tmp)
57850  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
57851  *
57852  *     def is_f_contig(self):
57853  */
57854   __Pyx_XDECREF(__pyx_r);
57855   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 623, __pyx_L1_error)
57856   __Pyx_GOTREF(__pyx_t_2);
57857   __pyx_r = __pyx_t_2;
57858   __pyx_t_2 = 0;
57859   goto __pyx_L0;
57860 
57861   /* "View.MemoryView":619
57862  *
57863  *
57864  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
57865  *         cdef __Pyx_memviewslice *mslice
57866  *         cdef __Pyx_memviewslice tmp
57867  */
57868 
57869   /* function exit code */
57870   __pyx_L1_error:;
57871   __Pyx_XDECREF(__pyx_t_2);
57872   __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
57873   __pyx_r = NULL;
57874   __pyx_L0:;
57875   __Pyx_XGIVEREF(__pyx_r);
57876   __Pyx_RefNannyFinishContext();
57877   return __pyx_r;
57878 }
57879 
57880 /* "View.MemoryView":625
57881  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
57882  *
57883  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
57884  *         cdef __Pyx_memviewslice *mslice
57885  *         cdef __Pyx_memviewslice tmp
57886  */
57887 
57888 /* Python wrapper */
57889 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_memoryview_is_f_contig(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)57890 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
57891   PyObject *__pyx_r = 0;
57892   __Pyx_RefNannyDeclarations
57893   __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
57894   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
57895 
57896   /* function exit code */
57897   __Pyx_RefNannyFinishContext();
57898   return __pyx_r;
57899 }
57900 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj * __pyx_v_self)57901 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
57902   __Pyx_memviewslice *__pyx_v_mslice;
57903   __Pyx_memviewslice __pyx_v_tmp;
57904   PyObject *__pyx_r = NULL;
57905   __Pyx_RefNannyDeclarations
57906   __Pyx_memviewslice *__pyx_t_1;
57907   PyObject *__pyx_t_2 = NULL;
57908   int __pyx_lineno = 0;
57909   const char *__pyx_filename = NULL;
57910   int __pyx_clineno = 0;
57911   __Pyx_RefNannySetupContext("is_f_contig", 0);
57912 
57913   /* "View.MemoryView":628
57914  *         cdef __Pyx_memviewslice *mslice
57915  *         cdef __Pyx_memviewslice tmp
57916  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
57917  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
57918  *
57919  */
57920   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(3, 628, __pyx_L1_error)
57921   __pyx_v_mslice = __pyx_t_1;
57922 
57923   /* "View.MemoryView":629
57924  *         cdef __Pyx_memviewslice tmp
57925  *         mslice = get_slice_from_memview(self, &tmp)
57926  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
57927  *
57928  *     def copy(self):
57929  */
57930   __Pyx_XDECREF(__pyx_r);
57931   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 629, __pyx_L1_error)
57932   __Pyx_GOTREF(__pyx_t_2);
57933   __pyx_r = __pyx_t_2;
57934   __pyx_t_2 = 0;
57935   goto __pyx_L0;
57936 
57937   /* "View.MemoryView":625
57938  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
57939  *
57940  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
57941  *         cdef __Pyx_memviewslice *mslice
57942  *         cdef __Pyx_memviewslice tmp
57943  */
57944 
57945   /* function exit code */
57946   __pyx_L1_error:;
57947   __Pyx_XDECREF(__pyx_t_2);
57948   __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
57949   __pyx_r = NULL;
57950   __pyx_L0:;
57951   __Pyx_XGIVEREF(__pyx_r);
57952   __Pyx_RefNannyFinishContext();
57953   return __pyx_r;
57954 }
57955 
57956 /* "View.MemoryView":631
57957  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
57958  *
57959  *     def copy(self):             # <<<<<<<<<<<<<<
57960  *         cdef __Pyx_memviewslice mslice
57961  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
57962  */
57963 
57964 /* Python wrapper */
57965 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_memoryview_copy(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)57966 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
57967   PyObject *__pyx_r = 0;
57968   __Pyx_RefNannyDeclarations
57969   __Pyx_RefNannySetupContext("copy (wrapper)", 0);
57970   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
57971 
57972   /* function exit code */
57973   __Pyx_RefNannyFinishContext();
57974   return __pyx_r;
57975 }
57976 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj * __pyx_v_self)57977 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
57978   __Pyx_memviewslice __pyx_v_mslice;
57979   int __pyx_v_flags;
57980   PyObject *__pyx_r = NULL;
57981   __Pyx_RefNannyDeclarations
57982   __Pyx_memviewslice __pyx_t_1;
57983   PyObject *__pyx_t_2 = NULL;
57984   int __pyx_lineno = 0;
57985   const char *__pyx_filename = NULL;
57986   int __pyx_clineno = 0;
57987   __Pyx_RefNannySetupContext("copy", 0);
57988 
57989   /* "View.MemoryView":633
57990  *     def copy(self):
57991  *         cdef __Pyx_memviewslice mslice
57992  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
57993  *
57994  *         slice_copy(self, &mslice)
57995  */
57996   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
57997 
57998   /* "View.MemoryView":635
57999  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
58000  *
58001  *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
58002  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
58003  *                                    self.view.itemsize,
58004  */
58005   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
58006 
58007   /* "View.MemoryView":636
58008  *
58009  *         slice_copy(self, &mslice)
58010  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
58011  *                                    self.view.itemsize,
58012  *                                    flags|PyBUF_C_CONTIGUOUS,
58013  */
58014   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 636, __pyx_L1_error)
58015   __pyx_v_mslice = __pyx_t_1;
58016 
58017   /* "View.MemoryView":641
58018  *                                    self.dtype_is_object)
58019  *
58020  *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
58021  *
58022  *     def copy_fortran(self):
58023  */
58024   __Pyx_XDECREF(__pyx_r);
58025   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 641, __pyx_L1_error)
58026   __Pyx_GOTREF(__pyx_t_2);
58027   __pyx_r = __pyx_t_2;
58028   __pyx_t_2 = 0;
58029   goto __pyx_L0;
58030 
58031   /* "View.MemoryView":631
58032  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
58033  *
58034  *     def copy(self):             # <<<<<<<<<<<<<<
58035  *         cdef __Pyx_memviewslice mslice
58036  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
58037  */
58038 
58039   /* function exit code */
58040   __pyx_L1_error:;
58041   __Pyx_XDECREF(__pyx_t_2);
58042   __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
58043   __pyx_r = NULL;
58044   __pyx_L0:;
58045   __Pyx_XGIVEREF(__pyx_r);
58046   __Pyx_RefNannyFinishContext();
58047   return __pyx_r;
58048 }
58049 
58050 /* "View.MemoryView":643
58051  *         return memoryview_copy_from_slice(self, &mslice)
58052  *
58053  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
58054  *         cdef __Pyx_memviewslice src, dst
58055  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
58056  */
58057 
58058 /* Python wrapper */
58059 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_memoryview_copy_fortran(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)58060 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
58061   PyObject *__pyx_r = 0;
58062   __Pyx_RefNannyDeclarations
58063   __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
58064   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
58065 
58066   /* function exit code */
58067   __Pyx_RefNannyFinishContext();
58068   return __pyx_r;
58069 }
58070 
__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj * __pyx_v_self)58071 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
58072   __Pyx_memviewslice __pyx_v_src;
58073   __Pyx_memviewslice __pyx_v_dst;
58074   int __pyx_v_flags;
58075   PyObject *__pyx_r = NULL;
58076   __Pyx_RefNannyDeclarations
58077   __Pyx_memviewslice __pyx_t_1;
58078   PyObject *__pyx_t_2 = NULL;
58079   int __pyx_lineno = 0;
58080   const char *__pyx_filename = NULL;
58081   int __pyx_clineno = 0;
58082   __Pyx_RefNannySetupContext("copy_fortran", 0);
58083 
58084   /* "View.MemoryView":645
58085  *     def copy_fortran(self):
58086  *         cdef __Pyx_memviewslice src, dst
58087  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
58088  *
58089  *         slice_copy(self, &src)
58090  */
58091   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
58092 
58093   /* "View.MemoryView":647
58094  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
58095  *
58096  *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
58097  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
58098  *                                 self.view.itemsize,
58099  */
58100   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
58101 
58102   /* "View.MemoryView":648
58103  *
58104  *         slice_copy(self, &src)
58105  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
58106  *                                 self.view.itemsize,
58107  *                                 flags|PyBUF_F_CONTIGUOUS,
58108  */
58109   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 648, __pyx_L1_error)
58110   __pyx_v_dst = __pyx_t_1;
58111 
58112   /* "View.MemoryView":653
58113  *                                 self.dtype_is_object)
58114  *
58115  *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
58116  *
58117  *
58118  */
58119   __Pyx_XDECREF(__pyx_r);
58120   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 653, __pyx_L1_error)
58121   __Pyx_GOTREF(__pyx_t_2);
58122   __pyx_r = __pyx_t_2;
58123   __pyx_t_2 = 0;
58124   goto __pyx_L0;
58125 
58126   /* "View.MemoryView":643
58127  *         return memoryview_copy_from_slice(self, &mslice)
58128  *
58129  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
58130  *         cdef __Pyx_memviewslice src, dst
58131  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
58132  */
58133 
58134   /* function exit code */
58135   __pyx_L1_error:;
58136   __Pyx_XDECREF(__pyx_t_2);
58137   __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
58138   __pyx_r = NULL;
58139   __pyx_L0:;
58140   __Pyx_XGIVEREF(__pyx_r);
58141   __Pyx_RefNannyFinishContext();
58142   return __pyx_r;
58143 }
58144 
58145 /* "(tree fragment)":1
58146  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
58147  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
58148  * def __setstate_cython__(self, __pyx_state):
58149  */
58150 
58151 /* Python wrapper */
58152 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)58153 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
58154   PyObject *__pyx_r = 0;
58155   __Pyx_RefNannyDeclarations
58156   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
58157   __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
58158 
58159   /* function exit code */
58160   __Pyx_RefNannyFinishContext();
58161   return __pyx_r;
58162 }
58163 
__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj * __pyx_v_self)58164 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
58165   PyObject *__pyx_r = NULL;
58166   __Pyx_RefNannyDeclarations
58167   PyObject *__pyx_t_1 = NULL;
58168   int __pyx_lineno = 0;
58169   const char *__pyx_filename = NULL;
58170   int __pyx_clineno = 0;
58171   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
58172 
58173   /* "(tree fragment)":2
58174  * def __reduce_cython__(self):
58175  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
58176  * def __setstate_cython__(self, __pyx_state):
58177  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
58178  */
58179   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2, __pyx_L1_error)
58180   __Pyx_GOTREF(__pyx_t_1);
58181   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
58182   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58183   __PYX_ERR(3, 2, __pyx_L1_error)
58184 
58185   /* "(tree fragment)":1
58186  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
58187  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
58188  * def __setstate_cython__(self, __pyx_state):
58189  */
58190 
58191   /* function exit code */
58192   __pyx_L1_error:;
58193   __Pyx_XDECREF(__pyx_t_1);
58194   __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58195   __pyx_r = NULL;
58196   __Pyx_XGIVEREF(__pyx_r);
58197   __Pyx_RefNannyFinishContext();
58198   return __pyx_r;
58199 }
58200 
58201 /* "(tree fragment)":3
58202  * def __reduce_cython__(self):
58203  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
58204  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
58205  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
58206  */
58207 
58208 /* Python wrapper */
58209 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)58210 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
58211   PyObject *__pyx_r = 0;
58212   __Pyx_RefNannyDeclarations
58213   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
58214   __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
58215 
58216   /* function exit code */
58217   __Pyx_RefNannyFinishContext();
58218   return __pyx_r;
58219 }
58220 
__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)58221 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
58222   PyObject *__pyx_r = NULL;
58223   __Pyx_RefNannyDeclarations
58224   PyObject *__pyx_t_1 = NULL;
58225   int __pyx_lineno = 0;
58226   const char *__pyx_filename = NULL;
58227   int __pyx_clineno = 0;
58228   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
58229 
58230   /* "(tree fragment)":4
58231  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
58232  * def __setstate_cython__(self, __pyx_state):
58233  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
58234  */
58235   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4, __pyx_L1_error)
58236   __Pyx_GOTREF(__pyx_t_1);
58237   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
58238   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58239   __PYX_ERR(3, 4, __pyx_L1_error)
58240 
58241   /* "(tree fragment)":3
58242  * def __reduce_cython__(self):
58243  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
58244  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
58245  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
58246  */
58247 
58248   /* function exit code */
58249   __pyx_L1_error:;
58250   __Pyx_XDECREF(__pyx_t_1);
58251   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
58252   __pyx_r = NULL;
58253   __Pyx_XGIVEREF(__pyx_r);
58254   __Pyx_RefNannyFinishContext();
58255   return __pyx_r;
58256 }
58257 
58258 /* "View.MemoryView":657
58259  *
58260  * @cname('__pyx_memoryview_new')
58261  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
58262  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
58263  *     result.typeinfo = typeinfo
58264  */
58265 
__pyx_memoryview_new(PyObject * __pyx_v_o,int __pyx_v_flags,int __pyx_v_dtype_is_object,__Pyx_TypeInfo * __pyx_v_typeinfo)58266 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
58267   struct __pyx_memoryview_obj *__pyx_v_result = 0;
58268   PyObject *__pyx_r = NULL;
58269   __Pyx_RefNannyDeclarations
58270   PyObject *__pyx_t_1 = NULL;
58271   PyObject *__pyx_t_2 = NULL;
58272   PyObject *__pyx_t_3 = NULL;
58273   int __pyx_lineno = 0;
58274   const char *__pyx_filename = NULL;
58275   int __pyx_clineno = 0;
58276   __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
58277 
58278   /* "View.MemoryView":658
58279  * @cname('__pyx_memoryview_new')
58280  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
58281  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
58282  *     result.typeinfo = typeinfo
58283  *     return result
58284  */
58285   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 658, __pyx_L1_error)
58286   __Pyx_GOTREF(__pyx_t_1);
58287   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 658, __pyx_L1_error)
58288   __Pyx_GOTREF(__pyx_t_2);
58289   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 658, __pyx_L1_error)
58290   __Pyx_GOTREF(__pyx_t_3);
58291   __Pyx_INCREF(__pyx_v_o);
58292   __Pyx_GIVEREF(__pyx_v_o);
58293   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
58294   __Pyx_GIVEREF(__pyx_t_1);
58295   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
58296   __Pyx_GIVEREF(__pyx_t_2);
58297   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
58298   __pyx_t_1 = 0;
58299   __pyx_t_2 = 0;
58300   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 658, __pyx_L1_error)
58301   __Pyx_GOTREF(__pyx_t_2);
58302   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58303   __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
58304   __pyx_t_2 = 0;
58305 
58306   /* "View.MemoryView":659
58307  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
58308  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
58309  *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
58310  *     return result
58311  *
58312  */
58313   __pyx_v_result->typeinfo = __pyx_v_typeinfo;
58314 
58315   /* "View.MemoryView":660
58316  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
58317  *     result.typeinfo = typeinfo
58318  *     return result             # <<<<<<<<<<<<<<
58319  *
58320  * @cname('__pyx_memoryview_check')
58321  */
58322   __Pyx_XDECREF(__pyx_r);
58323   __Pyx_INCREF(((PyObject *)__pyx_v_result));
58324   __pyx_r = ((PyObject *)__pyx_v_result);
58325   goto __pyx_L0;
58326 
58327   /* "View.MemoryView":657
58328  *
58329  * @cname('__pyx_memoryview_new')
58330  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
58331  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
58332  *     result.typeinfo = typeinfo
58333  */
58334 
58335   /* function exit code */
58336   __pyx_L1_error:;
58337   __Pyx_XDECREF(__pyx_t_1);
58338   __Pyx_XDECREF(__pyx_t_2);
58339   __Pyx_XDECREF(__pyx_t_3);
58340   __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
58341   __pyx_r = 0;
58342   __pyx_L0:;
58343   __Pyx_XDECREF((PyObject *)__pyx_v_result);
58344   __Pyx_XGIVEREF(__pyx_r);
58345   __Pyx_RefNannyFinishContext();
58346   return __pyx_r;
58347 }
58348 
58349 /* "View.MemoryView":663
58350  *
58351  * @cname('__pyx_memoryview_check')
58352  * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
58353  *     return isinstance(o, memoryview)
58354  *
58355  */
58356 
__pyx_memoryview_check(PyObject * __pyx_v_o)58357 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
58358   int __pyx_r;
58359   __Pyx_RefNannyDeclarations
58360   int __pyx_t_1;
58361   __Pyx_RefNannySetupContext("memoryview_check", 0);
58362 
58363   /* "View.MemoryView":664
58364  * @cname('__pyx_memoryview_check')
58365  * cdef inline bint memoryview_check(object o):
58366  *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
58367  *
58368  * cdef tuple _unellipsify(object index, int ndim):
58369  */
58370   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
58371   __pyx_r = __pyx_t_1;
58372   goto __pyx_L0;
58373 
58374   /* "View.MemoryView":663
58375  *
58376  * @cname('__pyx_memoryview_check')
58377  * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
58378  *     return isinstance(o, memoryview)
58379  *
58380  */
58381 
58382   /* function exit code */
58383   __pyx_L0:;
58384   __Pyx_RefNannyFinishContext();
58385   return __pyx_r;
58386 }
58387 
58388 /* "View.MemoryView":666
58389  *     return isinstance(o, memoryview)
58390  *
58391  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
58392  *     """
58393  *     Replace all ellipses with full slices and fill incomplete indices with
58394  */
58395 
_unellipsify(PyObject * __pyx_v_index,int __pyx_v_ndim)58396 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
58397   PyObject *__pyx_v_tup = NULL;
58398   PyObject *__pyx_v_result = NULL;
58399   int __pyx_v_have_slices;
58400   int __pyx_v_seen_ellipsis;
58401   CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
58402   PyObject *__pyx_v_item = NULL;
58403   Py_ssize_t __pyx_v_nslices;
58404   PyObject *__pyx_r = NULL;
58405   __Pyx_RefNannyDeclarations
58406   int __pyx_t_1;
58407   int __pyx_t_2;
58408   PyObject *__pyx_t_3 = NULL;
58409   PyObject *__pyx_t_4 = NULL;
58410   Py_ssize_t __pyx_t_5;
58411   PyObject *(*__pyx_t_6)(PyObject *);
58412   PyObject *__pyx_t_7 = NULL;
58413   Py_ssize_t __pyx_t_8;
58414   int __pyx_t_9;
58415   int __pyx_t_10;
58416   PyObject *__pyx_t_11 = NULL;
58417   int __pyx_lineno = 0;
58418   const char *__pyx_filename = NULL;
58419   int __pyx_clineno = 0;
58420   __Pyx_RefNannySetupContext("_unellipsify", 0);
58421 
58422   /* "View.MemoryView":671
58423  *     full slices.
58424  *     """
58425  *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
58426  *         tup = (index,)
58427  *     else:
58428  */
58429   __pyx_t_1 = PyTuple_Check(__pyx_v_index);
58430   __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
58431   if (__pyx_t_2) {
58432 
58433     /* "View.MemoryView":672
58434  *     """
58435  *     if not isinstance(index, tuple):
58436  *         tup = (index,)             # <<<<<<<<<<<<<<
58437  *     else:
58438  *         tup = index
58439  */
58440     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 672, __pyx_L1_error)
58441     __Pyx_GOTREF(__pyx_t_3);
58442     __Pyx_INCREF(__pyx_v_index);
58443     __Pyx_GIVEREF(__pyx_v_index);
58444     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
58445     __pyx_v_tup = __pyx_t_3;
58446     __pyx_t_3 = 0;
58447 
58448     /* "View.MemoryView":671
58449  *     full slices.
58450  *     """
58451  *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
58452  *         tup = (index,)
58453  *     else:
58454  */
58455     goto __pyx_L3;
58456   }
58457 
58458   /* "View.MemoryView":674
58459  *         tup = (index,)
58460  *     else:
58461  *         tup = index             # <<<<<<<<<<<<<<
58462  *
58463  *     result = []
58464  */
58465   /*else*/ {
58466     __Pyx_INCREF(__pyx_v_index);
58467     __pyx_v_tup = __pyx_v_index;
58468   }
58469   __pyx_L3:;
58470 
58471   /* "View.MemoryView":676
58472  *         tup = index
58473  *
58474  *     result = []             # <<<<<<<<<<<<<<
58475  *     have_slices = False
58476  *     seen_ellipsis = False
58477  */
58478   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 676, __pyx_L1_error)
58479   __Pyx_GOTREF(__pyx_t_3);
58480   __pyx_v_result = ((PyObject*)__pyx_t_3);
58481   __pyx_t_3 = 0;
58482 
58483   /* "View.MemoryView":677
58484  *
58485  *     result = []
58486  *     have_slices = False             # <<<<<<<<<<<<<<
58487  *     seen_ellipsis = False
58488  *     for idx, item in enumerate(tup):
58489  */
58490   __pyx_v_have_slices = 0;
58491 
58492   /* "View.MemoryView":678
58493  *     result = []
58494  *     have_slices = False
58495  *     seen_ellipsis = False             # <<<<<<<<<<<<<<
58496  *     for idx, item in enumerate(tup):
58497  *         if item is Ellipsis:
58498  */
58499   __pyx_v_seen_ellipsis = 0;
58500 
58501   /* "View.MemoryView":679
58502  *     have_slices = False
58503  *     seen_ellipsis = False
58504  *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
58505  *         if item is Ellipsis:
58506  *             if not seen_ellipsis:
58507  */
58508   __Pyx_INCREF(__pyx_int_0);
58509   __pyx_t_3 = __pyx_int_0;
58510   if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
58511     __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
58512     __pyx_t_6 = NULL;
58513   } else {
58514     __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 679, __pyx_L1_error)
58515     __Pyx_GOTREF(__pyx_t_4);
58516     __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 679, __pyx_L1_error)
58517   }
58518   for (;;) {
58519     if (likely(!__pyx_t_6)) {
58520       if (likely(PyList_CheckExact(__pyx_t_4))) {
58521         if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
58522         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
58523         __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 679, __pyx_L1_error)
58524         #else
58525         __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 679, __pyx_L1_error)
58526         __Pyx_GOTREF(__pyx_t_7);
58527         #endif
58528       } else {
58529         if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
58530         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
58531         __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(3, 679, __pyx_L1_error)
58532         #else
58533         __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 679, __pyx_L1_error)
58534         __Pyx_GOTREF(__pyx_t_7);
58535         #endif
58536       }
58537     } else {
58538       __pyx_t_7 = __pyx_t_6(__pyx_t_4);
58539       if (unlikely(!__pyx_t_7)) {
58540         PyObject* exc_type = PyErr_Occurred();
58541         if (exc_type) {
58542           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
58543           else __PYX_ERR(3, 679, __pyx_L1_error)
58544         }
58545         break;
58546       }
58547       __Pyx_GOTREF(__pyx_t_7);
58548     }
58549     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
58550     __pyx_t_7 = 0;
58551     __Pyx_INCREF(__pyx_t_3);
58552     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
58553     __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 679, __pyx_L1_error)
58554     __Pyx_GOTREF(__pyx_t_7);
58555     __Pyx_DECREF(__pyx_t_3);
58556     __pyx_t_3 = __pyx_t_7;
58557     __pyx_t_7 = 0;
58558 
58559     /* "View.MemoryView":680
58560  *     seen_ellipsis = False
58561  *     for idx, item in enumerate(tup):
58562  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
58563  *             if not seen_ellipsis:
58564  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
58565  */
58566     __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
58567     __pyx_t_1 = (__pyx_t_2 != 0);
58568     if (__pyx_t_1) {
58569 
58570       /* "View.MemoryView":681
58571  *     for idx, item in enumerate(tup):
58572  *         if item is Ellipsis:
58573  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
58574  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
58575  *                 seen_ellipsis = True
58576  */
58577       __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
58578       if (__pyx_t_1) {
58579 
58580         /* "View.MemoryView":682
58581  *         if item is Ellipsis:
58582  *             if not seen_ellipsis:
58583  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
58584  *                 seen_ellipsis = True
58585  *             else:
58586  */
58587         __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 682, __pyx_L1_error)
58588         __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 682, __pyx_L1_error)
58589         __Pyx_GOTREF(__pyx_t_7);
58590         { Py_ssize_t __pyx_temp;
58591           for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
58592             __Pyx_INCREF(__pyx_slice__23);
58593             __Pyx_GIVEREF(__pyx_slice__23);
58594             PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__23);
58595           }
58596         }
58597         __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 682, __pyx_L1_error)
58598         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
58599 
58600         /* "View.MemoryView":683
58601  *             if not seen_ellipsis:
58602  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
58603  *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
58604  *             else:
58605  *                 result.append(slice(None))
58606  */
58607         __pyx_v_seen_ellipsis = 1;
58608 
58609         /* "View.MemoryView":681
58610  *     for idx, item in enumerate(tup):
58611  *         if item is Ellipsis:
58612  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
58613  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
58614  *                 seen_ellipsis = True
58615  */
58616         goto __pyx_L7;
58617       }
58618 
58619       /* "View.MemoryView":685
58620  *                 seen_ellipsis = True
58621  *             else:
58622  *                 result.append(slice(None))             # <<<<<<<<<<<<<<
58623  *             have_slices = True
58624  *         else:
58625  */
58626       /*else*/ {
58627         __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__23); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 685, __pyx_L1_error)
58628       }
58629       __pyx_L7:;
58630 
58631       /* "View.MemoryView":686
58632  *             else:
58633  *                 result.append(slice(None))
58634  *             have_slices = True             # <<<<<<<<<<<<<<
58635  *         else:
58636  *             if not isinstance(item, slice) and not PyIndex_Check(item):
58637  */
58638       __pyx_v_have_slices = 1;
58639 
58640       /* "View.MemoryView":680
58641  *     seen_ellipsis = False
58642  *     for idx, item in enumerate(tup):
58643  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
58644  *             if not seen_ellipsis:
58645  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
58646  */
58647       goto __pyx_L6;
58648     }
58649 
58650     /* "View.MemoryView":688
58651  *             have_slices = True
58652  *         else:
58653  *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
58654  *                 raise TypeError("Cannot index with type '%s'" % type(item))
58655  *
58656  */
58657     /*else*/ {
58658       __pyx_t_2 = PySlice_Check(__pyx_v_item);
58659       __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
58660       if (__pyx_t_10) {
58661       } else {
58662         __pyx_t_1 = __pyx_t_10;
58663         goto __pyx_L9_bool_binop_done;
58664       }
58665       __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
58666       __pyx_t_1 = __pyx_t_10;
58667       __pyx_L9_bool_binop_done:;
58668       if (unlikely(__pyx_t_1)) {
58669 
58670         /* "View.MemoryView":689
58671  *         else:
58672  *             if not isinstance(item, slice) and not PyIndex_Check(item):
58673  *                 raise TypeError("Cannot index with type '%s'" % type(item))             # <<<<<<<<<<<<<<
58674  *
58675  *             have_slices = have_slices or isinstance(item, slice)
58676  */
58677         __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 689, __pyx_L1_error)
58678         __Pyx_GOTREF(__pyx_t_7);
58679         __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 689, __pyx_L1_error)
58680         __Pyx_GOTREF(__pyx_t_11);
58681         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
58682         __Pyx_Raise(__pyx_t_11, 0, 0, 0);
58683         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
58684         __PYX_ERR(3, 689, __pyx_L1_error)
58685 
58686         /* "View.MemoryView":688
58687  *             have_slices = True
58688  *         else:
58689  *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
58690  *                 raise TypeError("Cannot index with type '%s'" % type(item))
58691  *
58692  */
58693       }
58694 
58695       /* "View.MemoryView":691
58696  *                 raise TypeError("Cannot index with type '%s'" % type(item))
58697  *
58698  *             have_slices = have_slices or isinstance(item, slice)             # <<<<<<<<<<<<<<
58699  *             result.append(item)
58700  *
58701  */
58702       __pyx_t_10 = (__pyx_v_have_slices != 0);
58703       if (!__pyx_t_10) {
58704       } else {
58705         __pyx_t_1 = __pyx_t_10;
58706         goto __pyx_L11_bool_binop_done;
58707       }
58708       __pyx_t_10 = PySlice_Check(__pyx_v_item);
58709       __pyx_t_2 = (__pyx_t_10 != 0);
58710       __pyx_t_1 = __pyx_t_2;
58711       __pyx_L11_bool_binop_done:;
58712       __pyx_v_have_slices = __pyx_t_1;
58713 
58714       /* "View.MemoryView":692
58715  *
58716  *             have_slices = have_slices or isinstance(item, slice)
58717  *             result.append(item)             # <<<<<<<<<<<<<<
58718  *
58719  *     nslices = ndim - len(result)
58720  */
58721       __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 692, __pyx_L1_error)
58722     }
58723     __pyx_L6:;
58724 
58725     /* "View.MemoryView":679
58726  *     have_slices = False
58727  *     seen_ellipsis = False
58728  *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
58729  *         if item is Ellipsis:
58730  *             if not seen_ellipsis:
58731  */
58732   }
58733   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
58734   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58735 
58736   /* "View.MemoryView":694
58737  *             result.append(item)
58738  *
58739  *     nslices = ndim - len(result)             # <<<<<<<<<<<<<<
58740  *     if nslices:
58741  *         result.extend([slice(None)] * nslices)
58742  */
58743   __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 694, __pyx_L1_error)
58744   __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
58745 
58746   /* "View.MemoryView":695
58747  *
58748  *     nslices = ndim - len(result)
58749  *     if nslices:             # <<<<<<<<<<<<<<
58750  *         result.extend([slice(None)] * nslices)
58751  *
58752  */
58753   __pyx_t_1 = (__pyx_v_nslices != 0);
58754   if (__pyx_t_1) {
58755 
58756     /* "View.MemoryView":696
58757  *     nslices = ndim - len(result)
58758  *     if nslices:
58759  *         result.extend([slice(None)] * nslices)             # <<<<<<<<<<<<<<
58760  *
58761  *     return have_slices or nslices, tuple(result)
58762  */
58763     __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 696, __pyx_L1_error)
58764     __Pyx_GOTREF(__pyx_t_3);
58765     { Py_ssize_t __pyx_temp;
58766       for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
58767         __Pyx_INCREF(__pyx_slice__23);
58768         __Pyx_GIVEREF(__pyx_slice__23);
58769         PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__23);
58770       }
58771     }
58772     __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 696, __pyx_L1_error)
58773     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58774 
58775     /* "View.MemoryView":695
58776  *
58777  *     nslices = ndim - len(result)
58778  *     if nslices:             # <<<<<<<<<<<<<<
58779  *         result.extend([slice(None)] * nslices)
58780  *
58781  */
58782   }
58783 
58784   /* "View.MemoryView":698
58785  *         result.extend([slice(None)] * nslices)
58786  *
58787  *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
58788  *
58789  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
58790  */
58791   __Pyx_XDECREF(__pyx_r);
58792   if (!__pyx_v_have_slices) {
58793   } else {
58794     __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 698, __pyx_L1_error)
58795     __Pyx_GOTREF(__pyx_t_4);
58796     __pyx_t_3 = __pyx_t_4;
58797     __pyx_t_4 = 0;
58798     goto __pyx_L14_bool_binop_done;
58799   }
58800   __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 698, __pyx_L1_error)
58801   __Pyx_GOTREF(__pyx_t_4);
58802   __pyx_t_3 = __pyx_t_4;
58803   __pyx_t_4 = 0;
58804   __pyx_L14_bool_binop_done:;
58805   __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 698, __pyx_L1_error)
58806   __Pyx_GOTREF(__pyx_t_4);
58807   __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 698, __pyx_L1_error)
58808   __Pyx_GOTREF(__pyx_t_11);
58809   __Pyx_GIVEREF(__pyx_t_3);
58810   PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
58811   __Pyx_GIVEREF(__pyx_t_4);
58812   PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
58813   __pyx_t_3 = 0;
58814   __pyx_t_4 = 0;
58815   __pyx_r = ((PyObject*)__pyx_t_11);
58816   __pyx_t_11 = 0;
58817   goto __pyx_L0;
58818 
58819   /* "View.MemoryView":666
58820  *     return isinstance(o, memoryview)
58821  *
58822  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
58823  *     """
58824  *     Replace all ellipses with full slices and fill incomplete indices with
58825  */
58826 
58827   /* function exit code */
58828   __pyx_L1_error:;
58829   __Pyx_XDECREF(__pyx_t_3);
58830   __Pyx_XDECREF(__pyx_t_4);
58831   __Pyx_XDECREF(__pyx_t_7);
58832   __Pyx_XDECREF(__pyx_t_11);
58833   __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
58834   __pyx_r = 0;
58835   __pyx_L0:;
58836   __Pyx_XDECREF(__pyx_v_tup);
58837   __Pyx_XDECREF(__pyx_v_result);
58838   __Pyx_XDECREF(__pyx_v_idx);
58839   __Pyx_XDECREF(__pyx_v_item);
58840   __Pyx_XGIVEREF(__pyx_r);
58841   __Pyx_RefNannyFinishContext();
58842   return __pyx_r;
58843 }
58844 
58845 /* "View.MemoryView":700
58846  *     return have_slices or nslices, tuple(result)
58847  *
58848  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
58849  *     for suboffset in suboffsets[:ndim]:
58850  *         if suboffset >= 0:
58851  */
58852 
assert_direct_dimensions(Py_ssize_t * __pyx_v_suboffsets,int __pyx_v_ndim)58853 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
58854   Py_ssize_t __pyx_v_suboffset;
58855   PyObject *__pyx_r = NULL;
58856   __Pyx_RefNannyDeclarations
58857   Py_ssize_t *__pyx_t_1;
58858   Py_ssize_t *__pyx_t_2;
58859   Py_ssize_t *__pyx_t_3;
58860   int __pyx_t_4;
58861   PyObject *__pyx_t_5 = NULL;
58862   int __pyx_lineno = 0;
58863   const char *__pyx_filename = NULL;
58864   int __pyx_clineno = 0;
58865   __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
58866 
58867   /* "View.MemoryView":701
58868  *
58869  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
58870  *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
58871  *         if suboffset >= 0:
58872  *             raise ValueError("Indirect dimensions not supported")
58873  */
58874   __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
58875   for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
58876     __pyx_t_1 = __pyx_t_3;
58877     __pyx_v_suboffset = (__pyx_t_1[0]);
58878 
58879     /* "View.MemoryView":702
58880  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
58881  *     for suboffset in suboffsets[:ndim]:
58882  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
58883  *             raise ValueError("Indirect dimensions not supported")
58884  *
58885  */
58886     __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
58887     if (unlikely(__pyx_t_4)) {
58888 
58889       /* "View.MemoryView":703
58890  *     for suboffset in suboffsets[:ndim]:
58891  *         if suboffset >= 0:
58892  *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
58893  *
58894  *
58895  */
58896       __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 703, __pyx_L1_error)
58897       __Pyx_GOTREF(__pyx_t_5);
58898       __Pyx_Raise(__pyx_t_5, 0, 0, 0);
58899       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
58900       __PYX_ERR(3, 703, __pyx_L1_error)
58901 
58902       /* "View.MemoryView":702
58903  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
58904  *     for suboffset in suboffsets[:ndim]:
58905  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
58906  *             raise ValueError("Indirect dimensions not supported")
58907  *
58908  */
58909     }
58910   }
58911 
58912   /* "View.MemoryView":700
58913  *     return have_slices or nslices, tuple(result)
58914  *
58915  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
58916  *     for suboffset in suboffsets[:ndim]:
58917  *         if suboffset >= 0:
58918  */
58919 
58920   /* function exit code */
58921   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
58922   goto __pyx_L0;
58923   __pyx_L1_error:;
58924   __Pyx_XDECREF(__pyx_t_5);
58925   __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
58926   __pyx_r = 0;
58927   __pyx_L0:;
58928   __Pyx_XGIVEREF(__pyx_r);
58929   __Pyx_RefNannyFinishContext();
58930   return __pyx_r;
58931 }
58932 
58933 /* "View.MemoryView":710
58934  *
58935  * @cname('__pyx_memview_slice')
58936  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
58937  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
58938  *     cdef bint negative_step
58939  */
58940 
__pyx_memview_slice(struct __pyx_memoryview_obj * __pyx_v_memview,PyObject * __pyx_v_indices)58941 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
58942   int __pyx_v_new_ndim;
58943   int __pyx_v_suboffset_dim;
58944   int __pyx_v_dim;
58945   __Pyx_memviewslice __pyx_v_src;
58946   __Pyx_memviewslice __pyx_v_dst;
58947   __Pyx_memviewslice *__pyx_v_p_src;
58948   struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
58949   __Pyx_memviewslice *__pyx_v_p_dst;
58950   int *__pyx_v_p_suboffset_dim;
58951   Py_ssize_t __pyx_v_start;
58952   Py_ssize_t __pyx_v_stop;
58953   Py_ssize_t __pyx_v_step;
58954   int __pyx_v_have_start;
58955   int __pyx_v_have_stop;
58956   int __pyx_v_have_step;
58957   PyObject *__pyx_v_index = NULL;
58958   struct __pyx_memoryview_obj *__pyx_r = NULL;
58959   __Pyx_RefNannyDeclarations
58960   int __pyx_t_1;
58961   int __pyx_t_2;
58962   PyObject *__pyx_t_3 = NULL;
58963   struct __pyx_memoryview_obj *__pyx_t_4;
58964   char *__pyx_t_5;
58965   int __pyx_t_6;
58966   Py_ssize_t __pyx_t_7;
58967   PyObject *(*__pyx_t_8)(PyObject *);
58968   PyObject *__pyx_t_9 = NULL;
58969   Py_ssize_t __pyx_t_10;
58970   int __pyx_t_11;
58971   Py_ssize_t __pyx_t_12;
58972   int __pyx_lineno = 0;
58973   const char *__pyx_filename = NULL;
58974   int __pyx_clineno = 0;
58975   __Pyx_RefNannySetupContext("memview_slice", 0);
58976 
58977   /* "View.MemoryView":711
58978  * @cname('__pyx_memview_slice')
58979  * cdef memoryview memview_slice(memoryview memview, object indices):
58980  *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
58981  *     cdef bint negative_step
58982  *     cdef __Pyx_memviewslice src, dst
58983  */
58984   __pyx_v_new_ndim = 0;
58985   __pyx_v_suboffset_dim = -1;
58986 
58987   /* "View.MemoryView":718
58988  *
58989  *
58990  *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
58991  *
58992  *     cdef _memoryviewslice memviewsliceobj
58993  */
58994   (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
58995 
58996   /* "View.MemoryView":722
58997  *     cdef _memoryviewslice memviewsliceobj
58998  *
58999  *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
59000  *
59001  *     if isinstance(memview, _memoryviewslice):
59002  */
59003   #ifndef CYTHON_WITHOUT_ASSERTIONS
59004   if (unlikely(!Py_OptimizeFlag)) {
59005     if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
59006       PyErr_SetNone(PyExc_AssertionError);
59007       __PYX_ERR(3, 722, __pyx_L1_error)
59008     }
59009   }
59010   #endif
59011 
59012   /* "View.MemoryView":724
59013  *     assert memview.view.ndim > 0
59014  *
59015  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
59016  *         memviewsliceobj = memview
59017  *         p_src = &memviewsliceobj.from_slice
59018  */
59019   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
59020   __pyx_t_2 = (__pyx_t_1 != 0);
59021   if (__pyx_t_2) {
59022 
59023     /* "View.MemoryView":725
59024  *
59025  *     if isinstance(memview, _memoryviewslice):
59026  *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
59027  *         p_src = &memviewsliceobj.from_slice
59028  *     else:
59029  */
59030     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(3, 725, __pyx_L1_error)
59031     __pyx_t_3 = ((PyObject *)__pyx_v_memview);
59032     __Pyx_INCREF(__pyx_t_3);
59033     __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
59034     __pyx_t_3 = 0;
59035 
59036     /* "View.MemoryView":726
59037  *     if isinstance(memview, _memoryviewslice):
59038  *         memviewsliceobj = memview
59039  *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
59040  *     else:
59041  *         slice_copy(memview, &src)
59042  */
59043     __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
59044 
59045     /* "View.MemoryView":724
59046  *     assert memview.view.ndim > 0
59047  *
59048  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
59049  *         memviewsliceobj = memview
59050  *         p_src = &memviewsliceobj.from_slice
59051  */
59052     goto __pyx_L3;
59053   }
59054 
59055   /* "View.MemoryView":728
59056  *         p_src = &memviewsliceobj.from_slice
59057  *     else:
59058  *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
59059  *         p_src = &src
59060  *
59061  */
59062   /*else*/ {
59063     __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
59064 
59065     /* "View.MemoryView":729
59066  *     else:
59067  *         slice_copy(memview, &src)
59068  *         p_src = &src             # <<<<<<<<<<<<<<
59069  *
59070  *
59071  */
59072     __pyx_v_p_src = (&__pyx_v_src);
59073   }
59074   __pyx_L3:;
59075 
59076   /* "View.MemoryView":735
59077  *
59078  *
59079  *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
59080  *     dst.data = p_src.data
59081  *
59082  */
59083   __pyx_t_4 = __pyx_v_p_src->memview;
59084   __pyx_v_dst.memview = __pyx_t_4;
59085 
59086   /* "View.MemoryView":736
59087  *
59088  *     dst.memview = p_src.memview
59089  *     dst.data = p_src.data             # <<<<<<<<<<<<<<
59090  *
59091  *
59092  */
59093   __pyx_t_5 = __pyx_v_p_src->data;
59094   __pyx_v_dst.data = __pyx_t_5;
59095 
59096   /* "View.MemoryView":741
59097  *
59098  *
59099  *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
59100  *     cdef int *p_suboffset_dim = &suboffset_dim
59101  *     cdef Py_ssize_t start, stop, step
59102  */
59103   __pyx_v_p_dst = (&__pyx_v_dst);
59104 
59105   /* "View.MemoryView":742
59106  *
59107  *     cdef __Pyx_memviewslice *p_dst = &dst
59108  *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
59109  *     cdef Py_ssize_t start, stop, step
59110  *     cdef bint have_start, have_stop, have_step
59111  */
59112   __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
59113 
59114   /* "View.MemoryView":746
59115  *     cdef bint have_start, have_stop, have_step
59116  *
59117  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
59118  *         if PyIndex_Check(index):
59119  *             slice_memviewslice(
59120  */
59121   __pyx_t_6 = 0;
59122   if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
59123     __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
59124     __pyx_t_8 = NULL;
59125   } else {
59126     __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 746, __pyx_L1_error)
59127     __Pyx_GOTREF(__pyx_t_3);
59128     __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 746, __pyx_L1_error)
59129   }
59130   for (;;) {
59131     if (likely(!__pyx_t_8)) {
59132       if (likely(PyList_CheckExact(__pyx_t_3))) {
59133         if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
59134         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
59135         __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(3, 746, __pyx_L1_error)
59136         #else
59137         __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 746, __pyx_L1_error)
59138         __Pyx_GOTREF(__pyx_t_9);
59139         #endif
59140       } else {
59141         if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
59142         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
59143         __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(3, 746, __pyx_L1_error)
59144         #else
59145         __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 746, __pyx_L1_error)
59146         __Pyx_GOTREF(__pyx_t_9);
59147         #endif
59148       }
59149     } else {
59150       __pyx_t_9 = __pyx_t_8(__pyx_t_3);
59151       if (unlikely(!__pyx_t_9)) {
59152         PyObject* exc_type = PyErr_Occurred();
59153         if (exc_type) {
59154           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
59155           else __PYX_ERR(3, 746, __pyx_L1_error)
59156         }
59157         break;
59158       }
59159       __Pyx_GOTREF(__pyx_t_9);
59160     }
59161     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
59162     __pyx_t_9 = 0;
59163     __pyx_v_dim = __pyx_t_6;
59164     __pyx_t_6 = (__pyx_t_6 + 1);
59165 
59166     /* "View.MemoryView":747
59167  *
59168  *     for dim, index in enumerate(indices):
59169  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
59170  *             slice_memviewslice(
59171  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
59172  */
59173     __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
59174     if (__pyx_t_2) {
59175 
59176       /* "View.MemoryView":751
59177  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
59178  *                 dim, new_ndim, p_suboffset_dim,
59179  *                 index, 0, 0, # start, stop, step             # <<<<<<<<<<<<<<
59180  *                 0, 0, 0, # have_{start,stop,step}
59181  *                 False)
59182  */
59183       __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 751, __pyx_L1_error)
59184 
59185       /* "View.MemoryView":748
59186  *     for dim, index in enumerate(indices):
59187  *         if PyIndex_Check(index):
59188  *             slice_memviewslice(             # <<<<<<<<<<<<<<
59189  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
59190  *                 dim, new_ndim, p_suboffset_dim,
59191  */
59192       __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 748, __pyx_L1_error)
59193 
59194       /* "View.MemoryView":747
59195  *
59196  *     for dim, index in enumerate(indices):
59197  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
59198  *             slice_memviewslice(
59199  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
59200  */
59201       goto __pyx_L6;
59202     }
59203 
59204     /* "View.MemoryView":754
59205  *                 0, 0, 0, # have_{start,stop,step}
59206  *                 False)
59207  *         elif index is None:             # <<<<<<<<<<<<<<
59208  *             p_dst.shape[new_ndim] = 1
59209  *             p_dst.strides[new_ndim] = 0
59210  */
59211     __pyx_t_2 = (__pyx_v_index == Py_None);
59212     __pyx_t_1 = (__pyx_t_2 != 0);
59213     if (__pyx_t_1) {
59214 
59215       /* "View.MemoryView":755
59216  *                 False)
59217  *         elif index is None:
59218  *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
59219  *             p_dst.strides[new_ndim] = 0
59220  *             p_dst.suboffsets[new_ndim] = -1
59221  */
59222       (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
59223 
59224       /* "View.MemoryView":756
59225  *         elif index is None:
59226  *             p_dst.shape[new_ndim] = 1
59227  *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
59228  *             p_dst.suboffsets[new_ndim] = -1
59229  *             new_ndim += 1
59230  */
59231       (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
59232 
59233       /* "View.MemoryView":757
59234  *             p_dst.shape[new_ndim] = 1
59235  *             p_dst.strides[new_ndim] = 0
59236  *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
59237  *             new_ndim += 1
59238  *         else:
59239  */
59240       (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
59241 
59242       /* "View.MemoryView":758
59243  *             p_dst.strides[new_ndim] = 0
59244  *             p_dst.suboffsets[new_ndim] = -1
59245  *             new_ndim += 1             # <<<<<<<<<<<<<<
59246  *         else:
59247  *             start = index.start or 0
59248  */
59249       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
59250 
59251       /* "View.MemoryView":754
59252  *                 0, 0, 0, # have_{start,stop,step}
59253  *                 False)
59254  *         elif index is None:             # <<<<<<<<<<<<<<
59255  *             p_dst.shape[new_ndim] = 1
59256  *             p_dst.strides[new_ndim] = 0
59257  */
59258       goto __pyx_L6;
59259     }
59260 
59261     /* "View.MemoryView":760
59262  *             new_ndim += 1
59263  *         else:
59264  *             start = index.start or 0             # <<<<<<<<<<<<<<
59265  *             stop = index.stop or 0
59266  *             step = index.step or 0
59267  */
59268     /*else*/ {
59269       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 760, __pyx_L1_error)
59270       __Pyx_GOTREF(__pyx_t_9);
59271       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 760, __pyx_L1_error)
59272       if (!__pyx_t_1) {
59273         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59274       } else {
59275         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 760, __pyx_L1_error)
59276         __pyx_t_10 = __pyx_t_12;
59277         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59278         goto __pyx_L7_bool_binop_done;
59279       }
59280       __pyx_t_10 = 0;
59281       __pyx_L7_bool_binop_done:;
59282       __pyx_v_start = __pyx_t_10;
59283 
59284       /* "View.MemoryView":761
59285  *         else:
59286  *             start = index.start or 0
59287  *             stop = index.stop or 0             # <<<<<<<<<<<<<<
59288  *             step = index.step or 0
59289  *
59290  */
59291       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 761, __pyx_L1_error)
59292       __Pyx_GOTREF(__pyx_t_9);
59293       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 761, __pyx_L1_error)
59294       if (!__pyx_t_1) {
59295         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59296       } else {
59297         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 761, __pyx_L1_error)
59298         __pyx_t_10 = __pyx_t_12;
59299         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59300         goto __pyx_L9_bool_binop_done;
59301       }
59302       __pyx_t_10 = 0;
59303       __pyx_L9_bool_binop_done:;
59304       __pyx_v_stop = __pyx_t_10;
59305 
59306       /* "View.MemoryView":762
59307  *             start = index.start or 0
59308  *             stop = index.stop or 0
59309  *             step = index.step or 0             # <<<<<<<<<<<<<<
59310  *
59311  *             have_start = index.start is not None
59312  */
59313       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 762, __pyx_L1_error)
59314       __Pyx_GOTREF(__pyx_t_9);
59315       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 762, __pyx_L1_error)
59316       if (!__pyx_t_1) {
59317         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59318       } else {
59319         __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 762, __pyx_L1_error)
59320         __pyx_t_10 = __pyx_t_12;
59321         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59322         goto __pyx_L11_bool_binop_done;
59323       }
59324       __pyx_t_10 = 0;
59325       __pyx_L11_bool_binop_done:;
59326       __pyx_v_step = __pyx_t_10;
59327 
59328       /* "View.MemoryView":764
59329  *             step = index.step or 0
59330  *
59331  *             have_start = index.start is not None             # <<<<<<<<<<<<<<
59332  *             have_stop = index.stop is not None
59333  *             have_step = index.step is not None
59334  */
59335       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 764, __pyx_L1_error)
59336       __Pyx_GOTREF(__pyx_t_9);
59337       __pyx_t_1 = (__pyx_t_9 != Py_None);
59338       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59339       __pyx_v_have_start = __pyx_t_1;
59340 
59341       /* "View.MemoryView":765
59342  *
59343  *             have_start = index.start is not None
59344  *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
59345  *             have_step = index.step is not None
59346  *
59347  */
59348       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 765, __pyx_L1_error)
59349       __Pyx_GOTREF(__pyx_t_9);
59350       __pyx_t_1 = (__pyx_t_9 != Py_None);
59351       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59352       __pyx_v_have_stop = __pyx_t_1;
59353 
59354       /* "View.MemoryView":766
59355  *             have_start = index.start is not None
59356  *             have_stop = index.stop is not None
59357  *             have_step = index.step is not None             # <<<<<<<<<<<<<<
59358  *
59359  *             slice_memviewslice(
59360  */
59361       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 766, __pyx_L1_error)
59362       __Pyx_GOTREF(__pyx_t_9);
59363       __pyx_t_1 = (__pyx_t_9 != Py_None);
59364       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
59365       __pyx_v_have_step = __pyx_t_1;
59366 
59367       /* "View.MemoryView":768
59368  *             have_step = index.step is not None
59369  *
59370  *             slice_memviewslice(             # <<<<<<<<<<<<<<
59371  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
59372  *                 dim, new_ndim, p_suboffset_dim,
59373  */
59374       __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 768, __pyx_L1_error)
59375 
59376       /* "View.MemoryView":774
59377  *                 have_start, have_stop, have_step,
59378  *                 True)
59379  *             new_ndim += 1             # <<<<<<<<<<<<<<
59380  *
59381  *     if isinstance(memview, _memoryviewslice):
59382  */
59383       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
59384     }
59385     __pyx_L6:;
59386 
59387     /* "View.MemoryView":746
59388  *     cdef bint have_start, have_stop, have_step
59389  *
59390  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
59391  *         if PyIndex_Check(index):
59392  *             slice_memviewslice(
59393  */
59394   }
59395   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59396 
59397   /* "View.MemoryView":776
59398  *             new_ndim += 1
59399  *
59400  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
59401  *         return memoryview_fromslice(dst, new_ndim,
59402  *                                     memviewsliceobj.to_object_func,
59403  */
59404   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
59405   __pyx_t_2 = (__pyx_t_1 != 0);
59406   if (__pyx_t_2) {
59407 
59408     /* "View.MemoryView":777
59409  *
59410  *     if isinstance(memview, _memoryviewslice):
59411  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
59412  *                                     memviewsliceobj.to_object_func,
59413  *                                     memviewsliceobj.to_dtype_func,
59414  */
59415     __Pyx_XDECREF(((PyObject *)__pyx_r));
59416 
59417     /* "View.MemoryView":778
59418  *     if isinstance(memview, _memoryviewslice):
59419  *         return memoryview_fromslice(dst, new_ndim,
59420  *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
59421  *                                     memviewsliceobj.to_dtype_func,
59422  *                                     memview.dtype_is_object)
59423  */
59424     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(3, 778, __pyx_L1_error) }
59425 
59426     /* "View.MemoryView":779
59427  *         return memoryview_fromslice(dst, new_ndim,
59428  *                                     memviewsliceobj.to_object_func,
59429  *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
59430  *                                     memview.dtype_is_object)
59431  *     else:
59432  */
59433     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(3, 779, __pyx_L1_error) }
59434 
59435     /* "View.MemoryView":777
59436  *
59437  *     if isinstance(memview, _memoryviewslice):
59438  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
59439  *                                     memviewsliceobj.to_object_func,
59440  *                                     memviewsliceobj.to_dtype_func,
59441  */
59442     __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 777, __pyx_L1_error)
59443     __Pyx_GOTREF(__pyx_t_3);
59444     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(3, 777, __pyx_L1_error)
59445     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
59446     __pyx_t_3 = 0;
59447     goto __pyx_L0;
59448 
59449     /* "View.MemoryView":776
59450  *             new_ndim += 1
59451  *
59452  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
59453  *         return memoryview_fromslice(dst, new_ndim,
59454  *                                     memviewsliceobj.to_object_func,
59455  */
59456   }
59457 
59458   /* "View.MemoryView":782
59459  *                                     memview.dtype_is_object)
59460  *     else:
59461  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
59462  *                                     memview.dtype_is_object)
59463  *
59464  */
59465   /*else*/ {
59466     __Pyx_XDECREF(((PyObject *)__pyx_r));
59467 
59468     /* "View.MemoryView":783
59469  *     else:
59470  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
59471  *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
59472  *
59473  *
59474  */
59475     __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 782, __pyx_L1_error)
59476     __Pyx_GOTREF(__pyx_t_3);
59477 
59478     /* "View.MemoryView":782
59479  *                                     memview.dtype_is_object)
59480  *     else:
59481  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
59482  *                                     memview.dtype_is_object)
59483  *
59484  */
59485     if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(3, 782, __pyx_L1_error)
59486     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
59487     __pyx_t_3 = 0;
59488     goto __pyx_L0;
59489   }
59490 
59491   /* "View.MemoryView":710
59492  *
59493  * @cname('__pyx_memview_slice')
59494  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
59495  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
59496  *     cdef bint negative_step
59497  */
59498 
59499   /* function exit code */
59500   __pyx_L1_error:;
59501   __Pyx_XDECREF(__pyx_t_3);
59502   __Pyx_XDECREF(__pyx_t_9);
59503   __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
59504   __pyx_r = 0;
59505   __pyx_L0:;
59506   __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
59507   __Pyx_XDECREF(__pyx_v_index);
59508   __Pyx_XGIVEREF((PyObject *)__pyx_r);
59509   __Pyx_RefNannyFinishContext();
59510   return __pyx_r;
59511 }
59512 
59513 /* "View.MemoryView":807
59514  *
59515  * @cname('__pyx_memoryview_slice_memviewslice')
59516  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
59517  *         __Pyx_memviewslice *dst,
59518  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
59519  */
59520 
__pyx_memoryview_slice_memviewslice(__Pyx_memviewslice * __pyx_v_dst,Py_ssize_t __pyx_v_shape,Py_ssize_t __pyx_v_stride,Py_ssize_t __pyx_v_suboffset,int __pyx_v_dim,int __pyx_v_new_ndim,int * __pyx_v_suboffset_dim,Py_ssize_t __pyx_v_start,Py_ssize_t __pyx_v_stop,Py_ssize_t __pyx_v_step,int __pyx_v_have_start,int __pyx_v_have_stop,int __pyx_v_have_step,int __pyx_v_is_slice)59521 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
59522   Py_ssize_t __pyx_v_new_shape;
59523   int __pyx_v_negative_step;
59524   int __pyx_r;
59525   int __pyx_t_1;
59526   int __pyx_t_2;
59527   int __pyx_t_3;
59528   int __pyx_lineno = 0;
59529   const char *__pyx_filename = NULL;
59530   int __pyx_clineno = 0;
59531 
59532   /* "View.MemoryView":827
59533  *     cdef bint negative_step
59534  *
59535  *     if not is_slice:             # <<<<<<<<<<<<<<
59536  *
59537  *         if start < 0:
59538  */
59539   __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
59540   if (__pyx_t_1) {
59541 
59542     /* "View.MemoryView":829
59543  *     if not is_slice:
59544  *
59545  *         if start < 0:             # <<<<<<<<<<<<<<
59546  *             start += shape
59547  *         if not 0 <= start < shape:
59548  */
59549     __pyx_t_1 = ((__pyx_v_start < 0) != 0);
59550     if (__pyx_t_1) {
59551 
59552       /* "View.MemoryView":830
59553  *
59554  *         if start < 0:
59555  *             start += shape             # <<<<<<<<<<<<<<
59556  *         if not 0 <= start < shape:
59557  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
59558  */
59559       __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
59560 
59561       /* "View.MemoryView":829
59562  *     if not is_slice:
59563  *
59564  *         if start < 0:             # <<<<<<<<<<<<<<
59565  *             start += shape
59566  *         if not 0 <= start < shape:
59567  */
59568     }
59569 
59570     /* "View.MemoryView":831
59571  *         if start < 0:
59572  *             start += shape
59573  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
59574  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
59575  *     else:
59576  */
59577     __pyx_t_1 = (0 <= __pyx_v_start);
59578     if (__pyx_t_1) {
59579       __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
59580     }
59581     __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
59582     if (__pyx_t_2) {
59583 
59584       /* "View.MemoryView":832
59585  *             start += shape
59586  *         if not 0 <= start < shape:
59587  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
59588  *     else:
59589  *
59590  */
59591       __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 832, __pyx_L1_error)
59592 
59593       /* "View.MemoryView":831
59594  *         if start < 0:
59595  *             start += shape
59596  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
59597  *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
59598  *     else:
59599  */
59600     }
59601 
59602     /* "View.MemoryView":827
59603  *     cdef bint negative_step
59604  *
59605  *     if not is_slice:             # <<<<<<<<<<<<<<
59606  *
59607  *         if start < 0:
59608  */
59609     goto __pyx_L3;
59610   }
59611 
59612   /* "View.MemoryView":835
59613  *     else:
59614  *
59615  *         negative_step = have_step != 0 and step < 0             # <<<<<<<<<<<<<<
59616  *
59617  *         if have_step and step == 0:
59618  */
59619   /*else*/ {
59620     __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
59621     if (__pyx_t_1) {
59622     } else {
59623       __pyx_t_2 = __pyx_t_1;
59624       goto __pyx_L6_bool_binop_done;
59625     }
59626     __pyx_t_1 = ((__pyx_v_step < 0) != 0);
59627     __pyx_t_2 = __pyx_t_1;
59628     __pyx_L6_bool_binop_done:;
59629     __pyx_v_negative_step = __pyx_t_2;
59630 
59631     /* "View.MemoryView":837
59632  *         negative_step = have_step != 0 and step < 0
59633  *
59634  *         if have_step and step == 0:             # <<<<<<<<<<<<<<
59635  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
59636  *
59637  */
59638     __pyx_t_1 = (__pyx_v_have_step != 0);
59639     if (__pyx_t_1) {
59640     } else {
59641       __pyx_t_2 = __pyx_t_1;
59642       goto __pyx_L9_bool_binop_done;
59643     }
59644     __pyx_t_1 = ((__pyx_v_step == 0) != 0);
59645     __pyx_t_2 = __pyx_t_1;
59646     __pyx_L9_bool_binop_done:;
59647     if (__pyx_t_2) {
59648 
59649       /* "View.MemoryView":838
59650  *
59651  *         if have_step and step == 0:
59652  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
59653  *
59654  *
59655  */
59656       __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 838, __pyx_L1_error)
59657 
59658       /* "View.MemoryView":837
59659  *         negative_step = have_step != 0 and step < 0
59660  *
59661  *         if have_step and step == 0:             # <<<<<<<<<<<<<<
59662  *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
59663  *
59664  */
59665     }
59666 
59667     /* "View.MemoryView":841
59668  *
59669  *
59670  *         if have_start:             # <<<<<<<<<<<<<<
59671  *             if start < 0:
59672  *                 start += shape
59673  */
59674     __pyx_t_2 = (__pyx_v_have_start != 0);
59675     if (__pyx_t_2) {
59676 
59677       /* "View.MemoryView":842
59678  *
59679  *         if have_start:
59680  *             if start < 0:             # <<<<<<<<<<<<<<
59681  *                 start += shape
59682  *                 if start < 0:
59683  */
59684       __pyx_t_2 = ((__pyx_v_start < 0) != 0);
59685       if (__pyx_t_2) {
59686 
59687         /* "View.MemoryView":843
59688  *         if have_start:
59689  *             if start < 0:
59690  *                 start += shape             # <<<<<<<<<<<<<<
59691  *                 if start < 0:
59692  *                     start = 0
59693  */
59694         __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
59695 
59696         /* "View.MemoryView":844
59697  *             if start < 0:
59698  *                 start += shape
59699  *                 if start < 0:             # <<<<<<<<<<<<<<
59700  *                     start = 0
59701  *             elif start >= shape:
59702  */
59703         __pyx_t_2 = ((__pyx_v_start < 0) != 0);
59704         if (__pyx_t_2) {
59705 
59706           /* "View.MemoryView":845
59707  *                 start += shape
59708  *                 if start < 0:
59709  *                     start = 0             # <<<<<<<<<<<<<<
59710  *             elif start >= shape:
59711  *                 if negative_step:
59712  */
59713           __pyx_v_start = 0;
59714 
59715           /* "View.MemoryView":844
59716  *             if start < 0:
59717  *                 start += shape
59718  *                 if start < 0:             # <<<<<<<<<<<<<<
59719  *                     start = 0
59720  *             elif start >= shape:
59721  */
59722         }
59723 
59724         /* "View.MemoryView":842
59725  *
59726  *         if have_start:
59727  *             if start < 0:             # <<<<<<<<<<<<<<
59728  *                 start += shape
59729  *                 if start < 0:
59730  */
59731         goto __pyx_L12;
59732       }
59733 
59734       /* "View.MemoryView":846
59735  *                 if start < 0:
59736  *                     start = 0
59737  *             elif start >= shape:             # <<<<<<<<<<<<<<
59738  *                 if negative_step:
59739  *                     start = shape - 1
59740  */
59741       __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
59742       if (__pyx_t_2) {
59743 
59744         /* "View.MemoryView":847
59745  *                     start = 0
59746  *             elif start >= shape:
59747  *                 if negative_step:             # <<<<<<<<<<<<<<
59748  *                     start = shape - 1
59749  *                 else:
59750  */
59751         __pyx_t_2 = (__pyx_v_negative_step != 0);
59752         if (__pyx_t_2) {
59753 
59754           /* "View.MemoryView":848
59755  *             elif start >= shape:
59756  *                 if negative_step:
59757  *                     start = shape - 1             # <<<<<<<<<<<<<<
59758  *                 else:
59759  *                     start = shape
59760  */
59761           __pyx_v_start = (__pyx_v_shape - 1);
59762 
59763           /* "View.MemoryView":847
59764  *                     start = 0
59765  *             elif start >= shape:
59766  *                 if negative_step:             # <<<<<<<<<<<<<<
59767  *                     start = shape - 1
59768  *                 else:
59769  */
59770           goto __pyx_L14;
59771         }
59772 
59773         /* "View.MemoryView":850
59774  *                     start = shape - 1
59775  *                 else:
59776  *                     start = shape             # <<<<<<<<<<<<<<
59777  *         else:
59778  *             if negative_step:
59779  */
59780         /*else*/ {
59781           __pyx_v_start = __pyx_v_shape;
59782         }
59783         __pyx_L14:;
59784 
59785         /* "View.MemoryView":846
59786  *                 if start < 0:
59787  *                     start = 0
59788  *             elif start >= shape:             # <<<<<<<<<<<<<<
59789  *                 if negative_step:
59790  *                     start = shape - 1
59791  */
59792       }
59793       __pyx_L12:;
59794 
59795       /* "View.MemoryView":841
59796  *
59797  *
59798  *         if have_start:             # <<<<<<<<<<<<<<
59799  *             if start < 0:
59800  *                 start += shape
59801  */
59802       goto __pyx_L11;
59803     }
59804 
59805     /* "View.MemoryView":852
59806  *                     start = shape
59807  *         else:
59808  *             if negative_step:             # <<<<<<<<<<<<<<
59809  *                 start = shape - 1
59810  *             else:
59811  */
59812     /*else*/ {
59813       __pyx_t_2 = (__pyx_v_negative_step != 0);
59814       if (__pyx_t_2) {
59815 
59816         /* "View.MemoryView":853
59817  *         else:
59818  *             if negative_step:
59819  *                 start = shape - 1             # <<<<<<<<<<<<<<
59820  *             else:
59821  *                 start = 0
59822  */
59823         __pyx_v_start = (__pyx_v_shape - 1);
59824 
59825         /* "View.MemoryView":852
59826  *                     start = shape
59827  *         else:
59828  *             if negative_step:             # <<<<<<<<<<<<<<
59829  *                 start = shape - 1
59830  *             else:
59831  */
59832         goto __pyx_L15;
59833       }
59834 
59835       /* "View.MemoryView":855
59836  *                 start = shape - 1
59837  *             else:
59838  *                 start = 0             # <<<<<<<<<<<<<<
59839  *
59840  *         if have_stop:
59841  */
59842       /*else*/ {
59843         __pyx_v_start = 0;
59844       }
59845       __pyx_L15:;
59846     }
59847     __pyx_L11:;
59848 
59849     /* "View.MemoryView":857
59850  *                 start = 0
59851  *
59852  *         if have_stop:             # <<<<<<<<<<<<<<
59853  *             if stop < 0:
59854  *                 stop += shape
59855  */
59856     __pyx_t_2 = (__pyx_v_have_stop != 0);
59857     if (__pyx_t_2) {
59858 
59859       /* "View.MemoryView":858
59860  *
59861  *         if have_stop:
59862  *             if stop < 0:             # <<<<<<<<<<<<<<
59863  *                 stop += shape
59864  *                 if stop < 0:
59865  */
59866       __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
59867       if (__pyx_t_2) {
59868 
59869         /* "View.MemoryView":859
59870  *         if have_stop:
59871  *             if stop < 0:
59872  *                 stop += shape             # <<<<<<<<<<<<<<
59873  *                 if stop < 0:
59874  *                     stop = 0
59875  */
59876         __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
59877 
59878         /* "View.MemoryView":860
59879  *             if stop < 0:
59880  *                 stop += shape
59881  *                 if stop < 0:             # <<<<<<<<<<<<<<
59882  *                     stop = 0
59883  *             elif stop > shape:
59884  */
59885         __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
59886         if (__pyx_t_2) {
59887 
59888           /* "View.MemoryView":861
59889  *                 stop += shape
59890  *                 if stop < 0:
59891  *                     stop = 0             # <<<<<<<<<<<<<<
59892  *             elif stop > shape:
59893  *                 stop = shape
59894  */
59895           __pyx_v_stop = 0;
59896 
59897           /* "View.MemoryView":860
59898  *             if stop < 0:
59899  *                 stop += shape
59900  *                 if stop < 0:             # <<<<<<<<<<<<<<
59901  *                     stop = 0
59902  *             elif stop > shape:
59903  */
59904         }
59905 
59906         /* "View.MemoryView":858
59907  *
59908  *         if have_stop:
59909  *             if stop < 0:             # <<<<<<<<<<<<<<
59910  *                 stop += shape
59911  *                 if stop < 0:
59912  */
59913         goto __pyx_L17;
59914       }
59915 
59916       /* "View.MemoryView":862
59917  *                 if stop < 0:
59918  *                     stop = 0
59919  *             elif stop > shape:             # <<<<<<<<<<<<<<
59920  *                 stop = shape
59921  *         else:
59922  */
59923       __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
59924       if (__pyx_t_2) {
59925 
59926         /* "View.MemoryView":863
59927  *                     stop = 0
59928  *             elif stop > shape:
59929  *                 stop = shape             # <<<<<<<<<<<<<<
59930  *         else:
59931  *             if negative_step:
59932  */
59933         __pyx_v_stop = __pyx_v_shape;
59934 
59935         /* "View.MemoryView":862
59936  *                 if stop < 0:
59937  *                     stop = 0
59938  *             elif stop > shape:             # <<<<<<<<<<<<<<
59939  *                 stop = shape
59940  *         else:
59941  */
59942       }
59943       __pyx_L17:;
59944 
59945       /* "View.MemoryView":857
59946  *                 start = 0
59947  *
59948  *         if have_stop:             # <<<<<<<<<<<<<<
59949  *             if stop < 0:
59950  *                 stop += shape
59951  */
59952       goto __pyx_L16;
59953     }
59954 
59955     /* "View.MemoryView":865
59956  *                 stop = shape
59957  *         else:
59958  *             if negative_step:             # <<<<<<<<<<<<<<
59959  *                 stop = -1
59960  *             else:
59961  */
59962     /*else*/ {
59963       __pyx_t_2 = (__pyx_v_negative_step != 0);
59964       if (__pyx_t_2) {
59965 
59966         /* "View.MemoryView":866
59967  *         else:
59968  *             if negative_step:
59969  *                 stop = -1             # <<<<<<<<<<<<<<
59970  *             else:
59971  *                 stop = shape
59972  */
59973         __pyx_v_stop = -1L;
59974 
59975         /* "View.MemoryView":865
59976  *                 stop = shape
59977  *         else:
59978  *             if negative_step:             # <<<<<<<<<<<<<<
59979  *                 stop = -1
59980  *             else:
59981  */
59982         goto __pyx_L19;
59983       }
59984 
59985       /* "View.MemoryView":868
59986  *                 stop = -1
59987  *             else:
59988  *                 stop = shape             # <<<<<<<<<<<<<<
59989  *
59990  *         if not have_step:
59991  */
59992       /*else*/ {
59993         __pyx_v_stop = __pyx_v_shape;
59994       }
59995       __pyx_L19:;
59996     }
59997     __pyx_L16:;
59998 
59999     /* "View.MemoryView":870
60000  *                 stop = shape
60001  *
60002  *         if not have_step:             # <<<<<<<<<<<<<<
60003  *             step = 1
60004  *
60005  */
60006     __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
60007     if (__pyx_t_2) {
60008 
60009       /* "View.MemoryView":871
60010  *
60011  *         if not have_step:
60012  *             step = 1             # <<<<<<<<<<<<<<
60013  *
60014  *
60015  */
60016       __pyx_v_step = 1;
60017 
60018       /* "View.MemoryView":870
60019  *                 stop = shape
60020  *
60021  *         if not have_step:             # <<<<<<<<<<<<<<
60022  *             step = 1
60023  *
60024  */
60025     }
60026 
60027     /* "View.MemoryView":875
60028  *
60029  *         with cython.cdivision(True):
60030  *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
60031  *
60032  *             if (stop - start) - step * new_shape:
60033  */
60034     __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
60035 
60036     /* "View.MemoryView":877
60037  *             new_shape = (stop - start) // step
60038  *
60039  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
60040  *                 new_shape += 1
60041  *
60042  */
60043     __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
60044     if (__pyx_t_2) {
60045 
60046       /* "View.MemoryView":878
60047  *
60048  *             if (stop - start) - step * new_shape:
60049  *                 new_shape += 1             # <<<<<<<<<<<<<<
60050  *
60051  *         if new_shape < 0:
60052  */
60053       __pyx_v_new_shape = (__pyx_v_new_shape + 1);
60054 
60055       /* "View.MemoryView":877
60056  *             new_shape = (stop - start) // step
60057  *
60058  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
60059  *                 new_shape += 1
60060  *
60061  */
60062     }
60063 
60064     /* "View.MemoryView":880
60065  *                 new_shape += 1
60066  *
60067  *         if new_shape < 0:             # <<<<<<<<<<<<<<
60068  *             new_shape = 0
60069  *
60070  */
60071     __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
60072     if (__pyx_t_2) {
60073 
60074       /* "View.MemoryView":881
60075  *
60076  *         if new_shape < 0:
60077  *             new_shape = 0             # <<<<<<<<<<<<<<
60078  *
60079  *
60080  */
60081       __pyx_v_new_shape = 0;
60082 
60083       /* "View.MemoryView":880
60084  *                 new_shape += 1
60085  *
60086  *         if new_shape < 0:             # <<<<<<<<<<<<<<
60087  *             new_shape = 0
60088  *
60089  */
60090     }
60091 
60092     /* "View.MemoryView":884
60093  *
60094  *
60095  *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
60096  *         dst.shape[new_ndim] = new_shape
60097  *         dst.suboffsets[new_ndim] = suboffset
60098  */
60099     (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
60100 
60101     /* "View.MemoryView":885
60102  *
60103  *         dst.strides[new_ndim] = stride * step
60104  *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
60105  *         dst.suboffsets[new_ndim] = suboffset
60106  *
60107  */
60108     (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
60109 
60110     /* "View.MemoryView":886
60111  *         dst.strides[new_ndim] = stride * step
60112  *         dst.shape[new_ndim] = new_shape
60113  *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
60114  *
60115  *
60116  */
60117     (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
60118   }
60119   __pyx_L3:;
60120 
60121   /* "View.MemoryView":889
60122  *
60123  *
60124  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
60125  *         dst.data += start * stride
60126  *     else:
60127  */
60128   __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
60129   if (__pyx_t_2) {
60130 
60131     /* "View.MemoryView":890
60132  *
60133  *     if suboffset_dim[0] < 0:
60134  *         dst.data += start * stride             # <<<<<<<<<<<<<<
60135  *     else:
60136  *         dst.suboffsets[suboffset_dim[0]] += start * stride
60137  */
60138     __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
60139 
60140     /* "View.MemoryView":889
60141  *
60142  *
60143  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
60144  *         dst.data += start * stride
60145  *     else:
60146  */
60147     goto __pyx_L23;
60148   }
60149 
60150   /* "View.MemoryView":892
60151  *         dst.data += start * stride
60152  *     else:
60153  *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
60154  *
60155  *     if suboffset >= 0:
60156  */
60157   /*else*/ {
60158     __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
60159     (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
60160   }
60161   __pyx_L23:;
60162 
60163   /* "View.MemoryView":894
60164  *         dst.suboffsets[suboffset_dim[0]] += start * stride
60165  *
60166  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
60167  *         if not is_slice:
60168  *             if new_ndim == 0:
60169  */
60170   __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
60171   if (__pyx_t_2) {
60172 
60173     /* "View.MemoryView":895
60174  *
60175  *     if suboffset >= 0:
60176  *         if not is_slice:             # <<<<<<<<<<<<<<
60177  *             if new_ndim == 0:
60178  *                 dst.data = (<char **> dst.data)[0] + suboffset
60179  */
60180     __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
60181     if (__pyx_t_2) {
60182 
60183       /* "View.MemoryView":896
60184  *     if suboffset >= 0:
60185  *         if not is_slice:
60186  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
60187  *                 dst.data = (<char **> dst.data)[0] + suboffset
60188  *             else:
60189  */
60190       __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
60191       if (__pyx_t_2) {
60192 
60193         /* "View.MemoryView":897
60194  *         if not is_slice:
60195  *             if new_ndim == 0:
60196  *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
60197  *             else:
60198  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
60199  */
60200         __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
60201 
60202         /* "View.MemoryView":896
60203  *     if suboffset >= 0:
60204  *         if not is_slice:
60205  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
60206  *                 dst.data = (<char **> dst.data)[0] + suboffset
60207  *             else:
60208  */
60209         goto __pyx_L26;
60210       }
60211 
60212       /* "View.MemoryView":899
60213  *                 dst.data = (<char **> dst.data)[0] + suboffset
60214  *             else:
60215  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
60216  *                                      "must be indexed and not sliced", dim)
60217  *         else:
60218  */
60219       /*else*/ {
60220 
60221         /* "View.MemoryView":900
60222  *             else:
60223  *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
60224  *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
60225  *         else:
60226  *             suboffset_dim[0] = new_ndim
60227  */
60228         __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 899, __pyx_L1_error)
60229       }
60230       __pyx_L26:;
60231 
60232       /* "View.MemoryView":895
60233  *
60234  *     if suboffset >= 0:
60235  *         if not is_slice:             # <<<<<<<<<<<<<<
60236  *             if new_ndim == 0:
60237  *                 dst.data = (<char **> dst.data)[0] + suboffset
60238  */
60239       goto __pyx_L25;
60240     }
60241 
60242     /* "View.MemoryView":902
60243  *                                      "must be indexed and not sliced", dim)
60244  *         else:
60245  *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
60246  *
60247  *     return 0
60248  */
60249     /*else*/ {
60250       (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
60251     }
60252     __pyx_L25:;
60253 
60254     /* "View.MemoryView":894
60255  *         dst.suboffsets[suboffset_dim[0]] += start * stride
60256  *
60257  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
60258  *         if not is_slice:
60259  *             if new_ndim == 0:
60260  */
60261   }
60262 
60263   /* "View.MemoryView":904
60264  *             suboffset_dim[0] = new_ndim
60265  *
60266  *     return 0             # <<<<<<<<<<<<<<
60267  *
60268  *
60269  */
60270   __pyx_r = 0;
60271   goto __pyx_L0;
60272 
60273   /* "View.MemoryView":807
60274  *
60275  * @cname('__pyx_memoryview_slice_memviewslice')
60276  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
60277  *         __Pyx_memviewslice *dst,
60278  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
60279  */
60280 
60281   /* function exit code */
60282   __pyx_L1_error:;
60283   {
60284     #ifdef WITH_THREAD
60285     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
60286     #endif
60287     __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
60288     #ifdef WITH_THREAD
60289     __Pyx_PyGILState_Release(__pyx_gilstate_save);
60290     #endif
60291   }
60292   __pyx_r = -1;
60293   __pyx_L0:;
60294   return __pyx_r;
60295 }
60296 
60297 /* "View.MemoryView":910
60298  *
60299  * @cname('__pyx_pybuffer_index')
60300  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
60301  *                           Py_ssize_t dim) except NULL:
60302  *     cdef Py_ssize_t shape, stride, suboffset = -1
60303  */
60304 
__pyx_pybuffer_index(Py_buffer * __pyx_v_view,char * __pyx_v_bufp,Py_ssize_t __pyx_v_index,Py_ssize_t __pyx_v_dim)60305 static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
60306   Py_ssize_t __pyx_v_shape;
60307   Py_ssize_t __pyx_v_stride;
60308   Py_ssize_t __pyx_v_suboffset;
60309   Py_ssize_t __pyx_v_itemsize;
60310   char *__pyx_v_resultp;
60311   char *__pyx_r;
60312   __Pyx_RefNannyDeclarations
60313   Py_ssize_t __pyx_t_1;
60314   int __pyx_t_2;
60315   PyObject *__pyx_t_3 = NULL;
60316   PyObject *__pyx_t_4 = NULL;
60317   int __pyx_lineno = 0;
60318   const char *__pyx_filename = NULL;
60319   int __pyx_clineno = 0;
60320   __Pyx_RefNannySetupContext("pybuffer_index", 0);
60321 
60322   /* "View.MemoryView":912
60323  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
60324  *                           Py_ssize_t dim) except NULL:
60325  *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
60326  *     cdef Py_ssize_t itemsize = view.itemsize
60327  *     cdef char *resultp
60328  */
60329   __pyx_v_suboffset = -1L;
60330 
60331   /* "View.MemoryView":913
60332  *                           Py_ssize_t dim) except NULL:
60333  *     cdef Py_ssize_t shape, stride, suboffset = -1
60334  *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
60335  *     cdef char *resultp
60336  *
60337  */
60338   __pyx_t_1 = __pyx_v_view->itemsize;
60339   __pyx_v_itemsize = __pyx_t_1;
60340 
60341   /* "View.MemoryView":916
60342  *     cdef char *resultp
60343  *
60344  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
60345  *         shape = view.len / itemsize
60346  *         stride = itemsize
60347  */
60348   __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
60349   if (__pyx_t_2) {
60350 
60351     /* "View.MemoryView":917
60352  *
60353  *     if view.ndim == 0:
60354  *         shape = view.len / itemsize             # <<<<<<<<<<<<<<
60355  *         stride = itemsize
60356  *     else:
60357  */
60358     if (unlikely(__pyx_v_itemsize == 0)) {
60359       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
60360       __PYX_ERR(3, 917, __pyx_L1_error)
60361     }
60362     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
60363       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
60364       __PYX_ERR(3, 917, __pyx_L1_error)
60365     }
60366     __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
60367 
60368     /* "View.MemoryView":918
60369  *     if view.ndim == 0:
60370  *         shape = view.len / itemsize
60371  *         stride = itemsize             # <<<<<<<<<<<<<<
60372  *     else:
60373  *         shape = view.shape[dim]
60374  */
60375     __pyx_v_stride = __pyx_v_itemsize;
60376 
60377     /* "View.MemoryView":916
60378  *     cdef char *resultp
60379  *
60380  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
60381  *         shape = view.len / itemsize
60382  *         stride = itemsize
60383  */
60384     goto __pyx_L3;
60385   }
60386 
60387   /* "View.MemoryView":920
60388  *         stride = itemsize
60389  *     else:
60390  *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
60391  *         stride = view.strides[dim]
60392  *         if view.suboffsets != NULL:
60393  */
60394   /*else*/ {
60395     __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
60396 
60397     /* "View.MemoryView":921
60398  *     else:
60399  *         shape = view.shape[dim]
60400  *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
60401  *         if view.suboffsets != NULL:
60402  *             suboffset = view.suboffsets[dim]
60403  */
60404     __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
60405 
60406     /* "View.MemoryView":922
60407  *         shape = view.shape[dim]
60408  *         stride = view.strides[dim]
60409  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
60410  *             suboffset = view.suboffsets[dim]
60411  *
60412  */
60413     __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
60414     if (__pyx_t_2) {
60415 
60416       /* "View.MemoryView":923
60417  *         stride = view.strides[dim]
60418  *         if view.suboffsets != NULL:
60419  *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
60420  *
60421  *     if index < 0:
60422  */
60423       __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
60424 
60425       /* "View.MemoryView":922
60426  *         shape = view.shape[dim]
60427  *         stride = view.strides[dim]
60428  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
60429  *             suboffset = view.suboffsets[dim]
60430  *
60431  */
60432     }
60433   }
60434   __pyx_L3:;
60435 
60436   /* "View.MemoryView":925
60437  *             suboffset = view.suboffsets[dim]
60438  *
60439  *     if index < 0:             # <<<<<<<<<<<<<<
60440  *         index += view.shape[dim]
60441  *         if index < 0:
60442  */
60443   __pyx_t_2 = ((__pyx_v_index < 0) != 0);
60444   if (__pyx_t_2) {
60445 
60446     /* "View.MemoryView":926
60447  *
60448  *     if index < 0:
60449  *         index += view.shape[dim]             # <<<<<<<<<<<<<<
60450  *         if index < 0:
60451  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
60452  */
60453     __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
60454 
60455     /* "View.MemoryView":927
60456  *     if index < 0:
60457  *         index += view.shape[dim]
60458  *         if index < 0:             # <<<<<<<<<<<<<<
60459  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
60460  *
60461  */
60462     __pyx_t_2 = ((__pyx_v_index < 0) != 0);
60463     if (unlikely(__pyx_t_2)) {
60464 
60465       /* "View.MemoryView":928
60466  *         index += view.shape[dim]
60467  *         if index < 0:
60468  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
60469  *
60470  *     if index >= shape:
60471  */
60472       __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 928, __pyx_L1_error)
60473       __Pyx_GOTREF(__pyx_t_3);
60474       __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 928, __pyx_L1_error)
60475       __Pyx_GOTREF(__pyx_t_4);
60476       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60477       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 928, __pyx_L1_error)
60478       __Pyx_GOTREF(__pyx_t_3);
60479       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60480       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
60481       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60482       __PYX_ERR(3, 928, __pyx_L1_error)
60483 
60484       /* "View.MemoryView":927
60485  *     if index < 0:
60486  *         index += view.shape[dim]
60487  *         if index < 0:             # <<<<<<<<<<<<<<
60488  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
60489  *
60490  */
60491     }
60492 
60493     /* "View.MemoryView":925
60494  *             suboffset = view.suboffsets[dim]
60495  *
60496  *     if index < 0:             # <<<<<<<<<<<<<<
60497  *         index += view.shape[dim]
60498  *         if index < 0:
60499  */
60500   }
60501 
60502   /* "View.MemoryView":930
60503  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
60504  *
60505  *     if index >= shape:             # <<<<<<<<<<<<<<
60506  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
60507  *
60508  */
60509   __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
60510   if (unlikely(__pyx_t_2)) {
60511 
60512     /* "View.MemoryView":931
60513  *
60514  *     if index >= shape:
60515  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
60516  *
60517  *     resultp = bufp + index * stride
60518  */
60519     __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 931, __pyx_L1_error)
60520     __Pyx_GOTREF(__pyx_t_3);
60521     __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 931, __pyx_L1_error)
60522     __Pyx_GOTREF(__pyx_t_4);
60523     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60524     __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 931, __pyx_L1_error)
60525     __Pyx_GOTREF(__pyx_t_3);
60526     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60527     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
60528     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60529     __PYX_ERR(3, 931, __pyx_L1_error)
60530 
60531     /* "View.MemoryView":930
60532  *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
60533  *
60534  *     if index >= shape:             # <<<<<<<<<<<<<<
60535  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
60536  *
60537  */
60538   }
60539 
60540   /* "View.MemoryView":933
60541  *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
60542  *
60543  *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
60544  *     if suboffset >= 0:
60545  *         resultp = (<char **> resultp)[0] + suboffset
60546  */
60547   __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
60548 
60549   /* "View.MemoryView":934
60550  *
60551  *     resultp = bufp + index * stride
60552  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
60553  *         resultp = (<char **> resultp)[0] + suboffset
60554  *
60555  */
60556   __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
60557   if (__pyx_t_2) {
60558 
60559     /* "View.MemoryView":935
60560  *     resultp = bufp + index * stride
60561  *     if suboffset >= 0:
60562  *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
60563  *
60564  *     return resultp
60565  */
60566     __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
60567 
60568     /* "View.MemoryView":934
60569  *
60570  *     resultp = bufp + index * stride
60571  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
60572  *         resultp = (<char **> resultp)[0] + suboffset
60573  *
60574  */
60575   }
60576 
60577   /* "View.MemoryView":937
60578  *         resultp = (<char **> resultp)[0] + suboffset
60579  *
60580  *     return resultp             # <<<<<<<<<<<<<<
60581  *
60582  *
60583  */
60584   __pyx_r = __pyx_v_resultp;
60585   goto __pyx_L0;
60586 
60587   /* "View.MemoryView":910
60588  *
60589  * @cname('__pyx_pybuffer_index')
60590  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
60591  *                           Py_ssize_t dim) except NULL:
60592  *     cdef Py_ssize_t shape, stride, suboffset = -1
60593  */
60594 
60595   /* function exit code */
60596   __pyx_L1_error:;
60597   __Pyx_XDECREF(__pyx_t_3);
60598   __Pyx_XDECREF(__pyx_t_4);
60599   __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
60600   __pyx_r = NULL;
60601   __pyx_L0:;
60602   __Pyx_RefNannyFinishContext();
60603   return __pyx_r;
60604 }
60605 
60606 /* "View.MemoryView":943
60607  *
60608  * @cname('__pyx_memslice_transpose')
60609  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
60610  *     cdef int ndim = memslice.memview.view.ndim
60611  *
60612  */
60613 
__pyx_memslice_transpose(__Pyx_memviewslice * __pyx_v_memslice)60614 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
60615   int __pyx_v_ndim;
60616   Py_ssize_t *__pyx_v_shape;
60617   Py_ssize_t *__pyx_v_strides;
60618   int __pyx_v_i;
60619   int __pyx_v_j;
60620   int __pyx_r;
60621   int __pyx_t_1;
60622   Py_ssize_t *__pyx_t_2;
60623   long __pyx_t_3;
60624   long __pyx_t_4;
60625   Py_ssize_t __pyx_t_5;
60626   Py_ssize_t __pyx_t_6;
60627   int __pyx_t_7;
60628   int __pyx_t_8;
60629   int __pyx_t_9;
60630   int __pyx_lineno = 0;
60631   const char *__pyx_filename = NULL;
60632   int __pyx_clineno = 0;
60633 
60634   /* "View.MemoryView":944
60635  * @cname('__pyx_memslice_transpose')
60636  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
60637  *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
60638  *
60639  *     cdef Py_ssize_t *shape = memslice.shape
60640  */
60641   __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
60642   __pyx_v_ndim = __pyx_t_1;
60643 
60644   /* "View.MemoryView":946
60645  *     cdef int ndim = memslice.memview.view.ndim
60646  *
60647  *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
60648  *     cdef Py_ssize_t *strides = memslice.strides
60649  *
60650  */
60651   __pyx_t_2 = __pyx_v_memslice->shape;
60652   __pyx_v_shape = __pyx_t_2;
60653 
60654   /* "View.MemoryView":947
60655  *
60656  *     cdef Py_ssize_t *shape = memslice.shape
60657  *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
60658  *
60659  *
60660  */
60661   __pyx_t_2 = __pyx_v_memslice->strides;
60662   __pyx_v_strides = __pyx_t_2;
60663 
60664   /* "View.MemoryView":951
60665  *
60666  *     cdef int i, j
60667  *     for i in range(ndim / 2):             # <<<<<<<<<<<<<<
60668  *         j = ndim - 1 - i
60669  *         strides[i], strides[j] = strides[j], strides[i]
60670  */
60671   __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
60672   __pyx_t_4 = __pyx_t_3;
60673   for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
60674     __pyx_v_i = __pyx_t_1;
60675 
60676     /* "View.MemoryView":952
60677  *     cdef int i, j
60678  *     for i in range(ndim / 2):
60679  *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
60680  *         strides[i], strides[j] = strides[j], strides[i]
60681  *         shape[i], shape[j] = shape[j], shape[i]
60682  */
60683     __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
60684 
60685     /* "View.MemoryView":953
60686  *     for i in range(ndim / 2):
60687  *         j = ndim - 1 - i
60688  *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
60689  *         shape[i], shape[j] = shape[j], shape[i]
60690  *
60691  */
60692     __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
60693     __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
60694     (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
60695     (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
60696 
60697     /* "View.MemoryView":954
60698  *         j = ndim - 1 - i
60699  *         strides[i], strides[j] = strides[j], strides[i]
60700  *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
60701  *
60702  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
60703  */
60704     __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
60705     __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
60706     (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
60707     (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
60708 
60709     /* "View.MemoryView":956
60710  *         shape[i], shape[j] = shape[j], shape[i]
60711  *
60712  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
60713  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
60714  *
60715  */
60716     __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
60717     if (!__pyx_t_8) {
60718     } else {
60719       __pyx_t_7 = __pyx_t_8;
60720       goto __pyx_L6_bool_binop_done;
60721     }
60722     __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
60723     __pyx_t_7 = __pyx_t_8;
60724     __pyx_L6_bool_binop_done:;
60725     if (__pyx_t_7) {
60726 
60727       /* "View.MemoryView":957
60728  *
60729  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
60730  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
60731  *
60732  *     return 1
60733  */
60734       __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(3, 957, __pyx_L1_error)
60735 
60736       /* "View.MemoryView":956
60737  *         shape[i], shape[j] = shape[j], shape[i]
60738  *
60739  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
60740  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
60741  *
60742  */
60743     }
60744   }
60745 
60746   /* "View.MemoryView":959
60747  *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
60748  *
60749  *     return 1             # <<<<<<<<<<<<<<
60750  *
60751  *
60752  */
60753   __pyx_r = 1;
60754   goto __pyx_L0;
60755 
60756   /* "View.MemoryView":943
60757  *
60758  * @cname('__pyx_memslice_transpose')
60759  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
60760  *     cdef int ndim = memslice.memview.view.ndim
60761  *
60762  */
60763 
60764   /* function exit code */
60765   __pyx_L1_error:;
60766   {
60767     #ifdef WITH_THREAD
60768     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
60769     #endif
60770     __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
60771     #ifdef WITH_THREAD
60772     __Pyx_PyGILState_Release(__pyx_gilstate_save);
60773     #endif
60774   }
60775   __pyx_r = 0;
60776   __pyx_L0:;
60777   return __pyx_r;
60778 }
60779 
60780 /* "View.MemoryView":976
60781  *     cdef int (*to_dtype_func)(char *, object) except 0
60782  *
60783  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
60784  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
60785  *
60786  */
60787 
60788 /* Python wrapper */
60789 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_memoryviewslice___dealloc__(PyObject * __pyx_v_self)60790 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
60791   __Pyx_RefNannyDeclarations
60792   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
60793   __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
60794 
60795   /* function exit code */
60796   __Pyx_RefNannyFinishContext();
60797 }
60798 
__pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj * __pyx_v_self)60799 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
60800   __Pyx_RefNannyDeclarations
60801   __Pyx_RefNannySetupContext("__dealloc__", 0);
60802 
60803   /* "View.MemoryView":977
60804  *
60805  *     def __dealloc__(self):
60806  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
60807  *
60808  *     cdef convert_item_to_object(self, char *itemp):
60809  */
60810   __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
60811 
60812   /* "View.MemoryView":976
60813  *     cdef int (*to_dtype_func)(char *, object) except 0
60814  *
60815  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
60816  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
60817  *
60818  */
60819 
60820   /* function exit code */
60821   __Pyx_RefNannyFinishContext();
60822 }
60823 
60824 /* "View.MemoryView":979
60825  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
60826  *
60827  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
60828  *         if self.to_object_func != NULL:
60829  *             return self.to_object_func(itemp)
60830  */
60831 
__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj * __pyx_v_self,char * __pyx_v_itemp)60832 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
60833   PyObject *__pyx_r = NULL;
60834   __Pyx_RefNannyDeclarations
60835   int __pyx_t_1;
60836   PyObject *__pyx_t_2 = NULL;
60837   int __pyx_lineno = 0;
60838   const char *__pyx_filename = NULL;
60839   int __pyx_clineno = 0;
60840   __Pyx_RefNannySetupContext("convert_item_to_object", 0);
60841 
60842   /* "View.MemoryView":980
60843  *
60844  *     cdef convert_item_to_object(self, char *itemp):
60845  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
60846  *             return self.to_object_func(itemp)
60847  *         else:
60848  */
60849   __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
60850   if (__pyx_t_1) {
60851 
60852     /* "View.MemoryView":981
60853  *     cdef convert_item_to_object(self, char *itemp):
60854  *         if self.to_object_func != NULL:
60855  *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
60856  *         else:
60857  *             return memoryview.convert_item_to_object(self, itemp)
60858  */
60859     __Pyx_XDECREF(__pyx_r);
60860     __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 981, __pyx_L1_error)
60861     __Pyx_GOTREF(__pyx_t_2);
60862     __pyx_r = __pyx_t_2;
60863     __pyx_t_2 = 0;
60864     goto __pyx_L0;
60865 
60866     /* "View.MemoryView":980
60867  *
60868  *     cdef convert_item_to_object(self, char *itemp):
60869  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
60870  *             return self.to_object_func(itemp)
60871  *         else:
60872  */
60873   }
60874 
60875   /* "View.MemoryView":983
60876  *             return self.to_object_func(itemp)
60877  *         else:
60878  *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
60879  *
60880  *     cdef assign_item_from_object(self, char *itemp, object value):
60881  */
60882   /*else*/ {
60883     __Pyx_XDECREF(__pyx_r);
60884     __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 983, __pyx_L1_error)
60885     __Pyx_GOTREF(__pyx_t_2);
60886     __pyx_r = __pyx_t_2;
60887     __pyx_t_2 = 0;
60888     goto __pyx_L0;
60889   }
60890 
60891   /* "View.MemoryView":979
60892  *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
60893  *
60894  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
60895  *         if self.to_object_func != NULL:
60896  *             return self.to_object_func(itemp)
60897  */
60898 
60899   /* function exit code */
60900   __pyx_L1_error:;
60901   __Pyx_XDECREF(__pyx_t_2);
60902   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
60903   __pyx_r = 0;
60904   __pyx_L0:;
60905   __Pyx_XGIVEREF(__pyx_r);
60906   __Pyx_RefNannyFinishContext();
60907   return __pyx_r;
60908 }
60909 
60910 /* "View.MemoryView":985
60911  *             return memoryview.convert_item_to_object(self, itemp)
60912  *
60913  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
60914  *         if self.to_dtype_func != NULL:
60915  *             self.to_dtype_func(itemp, value)
60916  */
60917 
__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj * __pyx_v_self,char * __pyx_v_itemp,PyObject * __pyx_v_value)60918 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
60919   PyObject *__pyx_r = NULL;
60920   __Pyx_RefNannyDeclarations
60921   int __pyx_t_1;
60922   int __pyx_t_2;
60923   PyObject *__pyx_t_3 = NULL;
60924   int __pyx_lineno = 0;
60925   const char *__pyx_filename = NULL;
60926   int __pyx_clineno = 0;
60927   __Pyx_RefNannySetupContext("assign_item_from_object", 0);
60928 
60929   /* "View.MemoryView":986
60930  *
60931  *     cdef assign_item_from_object(self, char *itemp, object value):
60932  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
60933  *             self.to_dtype_func(itemp, value)
60934  *         else:
60935  */
60936   __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
60937   if (__pyx_t_1) {
60938 
60939     /* "View.MemoryView":987
60940  *     cdef assign_item_from_object(self, char *itemp, object value):
60941  *         if self.to_dtype_func != NULL:
60942  *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
60943  *         else:
60944  *             memoryview.assign_item_from_object(self, itemp, value)
60945  */
60946     __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(3, 987, __pyx_L1_error)
60947 
60948     /* "View.MemoryView":986
60949  *
60950  *     cdef assign_item_from_object(self, char *itemp, object value):
60951  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
60952  *             self.to_dtype_func(itemp, value)
60953  *         else:
60954  */
60955     goto __pyx_L3;
60956   }
60957 
60958   /* "View.MemoryView":989
60959  *             self.to_dtype_func(itemp, value)
60960  *         else:
60961  *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
60962  *
60963  *     @property
60964  */
60965   /*else*/ {
60966     __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 989, __pyx_L1_error)
60967     __Pyx_GOTREF(__pyx_t_3);
60968     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60969   }
60970   __pyx_L3:;
60971 
60972   /* "View.MemoryView":985
60973  *             return memoryview.convert_item_to_object(self, itemp)
60974  *
60975  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
60976  *         if self.to_dtype_func != NULL:
60977  *             self.to_dtype_func(itemp, value)
60978  */
60979 
60980   /* function exit code */
60981   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
60982   goto __pyx_L0;
60983   __pyx_L1_error:;
60984   __Pyx_XDECREF(__pyx_t_3);
60985   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
60986   __pyx_r = 0;
60987   __pyx_L0:;
60988   __Pyx_XGIVEREF(__pyx_r);
60989   __Pyx_RefNannyFinishContext();
60990   return __pyx_r;
60991 }
60992 
60993 /* "View.MemoryView":992
60994  *
60995  *     @property
60996  *     def base(self):             # <<<<<<<<<<<<<<
60997  *         return self.from_object
60998  *
60999  */
61000 
61001 /* Python wrapper */
61002 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject * __pyx_v_self)61003 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
61004   PyObject *__pyx_r = 0;
61005   __Pyx_RefNannyDeclarations
61006   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
61007   __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
61008 
61009   /* function exit code */
61010   __Pyx_RefNannyFinishContext();
61011   return __pyx_r;
61012 }
61013 
__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj * __pyx_v_self)61014 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
61015   PyObject *__pyx_r = NULL;
61016   __Pyx_RefNannyDeclarations
61017   __Pyx_RefNannySetupContext("__get__", 0);
61018 
61019   /* "View.MemoryView":993
61020  *     @property
61021  *     def base(self):
61022  *         return self.from_object             # <<<<<<<<<<<<<<
61023  *
61024  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
61025  */
61026   __Pyx_XDECREF(__pyx_r);
61027   __Pyx_INCREF(__pyx_v_self->from_object);
61028   __pyx_r = __pyx_v_self->from_object;
61029   goto __pyx_L0;
61030 
61031   /* "View.MemoryView":992
61032  *
61033  *     @property
61034  *     def base(self):             # <<<<<<<<<<<<<<
61035  *         return self.from_object
61036  *
61037  */
61038 
61039   /* function exit code */
61040   __pyx_L0:;
61041   __Pyx_XGIVEREF(__pyx_r);
61042   __Pyx_RefNannyFinishContext();
61043   return __pyx_r;
61044 }
61045 
61046 /* "(tree fragment)":1
61047  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
61048  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
61049  * def __setstate_cython__(self, __pyx_state):
61050  */
61051 
61052 /* Python wrapper */
61053 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)61054 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
61055   PyObject *__pyx_r = 0;
61056   __Pyx_RefNannyDeclarations
61057   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
61058   __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
61059 
61060   /* function exit code */
61061   __Pyx_RefNannyFinishContext();
61062   return __pyx_r;
61063 }
61064 
__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj * __pyx_v_self)61065 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
61066   PyObject *__pyx_r = NULL;
61067   __Pyx_RefNannyDeclarations
61068   PyObject *__pyx_t_1 = NULL;
61069   int __pyx_lineno = 0;
61070   const char *__pyx_filename = NULL;
61071   int __pyx_clineno = 0;
61072   __Pyx_RefNannySetupContext("__reduce_cython__", 0);
61073 
61074   /* "(tree fragment)":2
61075  * def __reduce_cython__(self):
61076  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
61077  * def __setstate_cython__(self, __pyx_state):
61078  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
61079  */
61080   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2, __pyx_L1_error)
61081   __Pyx_GOTREF(__pyx_t_1);
61082   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
61083   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61084   __PYX_ERR(3, 2, __pyx_L1_error)
61085 
61086   /* "(tree fragment)":1
61087  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
61088  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
61089  * def __setstate_cython__(self, __pyx_state):
61090  */
61091 
61092   /* function exit code */
61093   __pyx_L1_error:;
61094   __Pyx_XDECREF(__pyx_t_1);
61095   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
61096   __pyx_r = NULL;
61097   __Pyx_XGIVEREF(__pyx_r);
61098   __Pyx_RefNannyFinishContext();
61099   return __pyx_r;
61100 }
61101 
61102 /* "(tree fragment)":3
61103  * def __reduce_cython__(self):
61104  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
61105  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
61106  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
61107  */
61108 
61109 /* Python wrapper */
61110 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)61111 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
61112   PyObject *__pyx_r = 0;
61113   __Pyx_RefNannyDeclarations
61114   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
61115   __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
61116 
61117   /* function exit code */
61118   __Pyx_RefNannyFinishContext();
61119   return __pyx_r;
61120 }
61121 
__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)61122 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
61123   PyObject *__pyx_r = NULL;
61124   __Pyx_RefNannyDeclarations
61125   PyObject *__pyx_t_1 = NULL;
61126   int __pyx_lineno = 0;
61127   const char *__pyx_filename = NULL;
61128   int __pyx_clineno = 0;
61129   __Pyx_RefNannySetupContext("__setstate_cython__", 0);
61130 
61131   /* "(tree fragment)":4
61132  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
61133  * def __setstate_cython__(self, __pyx_state):
61134  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
61135  */
61136   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 4, __pyx_L1_error)
61137   __Pyx_GOTREF(__pyx_t_1);
61138   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
61139   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61140   __PYX_ERR(3, 4, __pyx_L1_error)
61141 
61142   /* "(tree fragment)":3
61143  * def __reduce_cython__(self):
61144  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
61145  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
61146  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
61147  */
61148 
61149   /* function exit code */
61150   __pyx_L1_error:;
61151   __Pyx_XDECREF(__pyx_t_1);
61152   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
61153   __pyx_r = NULL;
61154   __Pyx_XGIVEREF(__pyx_r);
61155   __Pyx_RefNannyFinishContext();
61156   return __pyx_r;
61157 }
61158 
61159 /* "View.MemoryView":999
61160  *
61161  * @cname('__pyx_memoryview_fromslice')
61162  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
61163  *                           int ndim,
61164  *                           object (*to_object_func)(char *),
61165  */
61166 
__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice,int __pyx_v_ndim,PyObject * (* __pyx_v_to_object_func)(char *),int (* __pyx_v_to_dtype_func)(char *,PyObject *),int __pyx_v_dtype_is_object)61167 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
61168   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
61169   Py_ssize_t __pyx_v_suboffset;
61170   PyObject *__pyx_v_length = NULL;
61171   PyObject *__pyx_r = NULL;
61172   __Pyx_RefNannyDeclarations
61173   int __pyx_t_1;
61174   PyObject *__pyx_t_2 = NULL;
61175   PyObject *__pyx_t_3 = NULL;
61176   __Pyx_TypeInfo *__pyx_t_4;
61177   Py_buffer __pyx_t_5;
61178   Py_ssize_t *__pyx_t_6;
61179   Py_ssize_t *__pyx_t_7;
61180   Py_ssize_t *__pyx_t_8;
61181   Py_ssize_t __pyx_t_9;
61182   int __pyx_lineno = 0;
61183   const char *__pyx_filename = NULL;
61184   int __pyx_clineno = 0;
61185   __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
61186 
61187   /* "View.MemoryView":1007
61188  *     cdef _memoryviewslice result
61189  *
61190  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
61191  *         return None
61192  *
61193  */
61194   __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
61195   if (__pyx_t_1) {
61196 
61197     /* "View.MemoryView":1008
61198  *
61199  *     if <PyObject *> memviewslice.memview == Py_None:
61200  *         return None             # <<<<<<<<<<<<<<
61201  *
61202  *
61203  */
61204     __Pyx_XDECREF(__pyx_r);
61205     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
61206     goto __pyx_L0;
61207 
61208     /* "View.MemoryView":1007
61209  *     cdef _memoryviewslice result
61210  *
61211  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
61212  *         return None
61213  *
61214  */
61215   }
61216 
61217   /* "View.MemoryView":1013
61218  *
61219  *
61220  *     result = _memoryviewslice(None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
61221  *
61222  *     result.from_slice = memviewslice
61223  */
61224   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1013, __pyx_L1_error)
61225   __Pyx_GOTREF(__pyx_t_2);
61226   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1013, __pyx_L1_error)
61227   __Pyx_GOTREF(__pyx_t_3);
61228   __Pyx_INCREF(Py_None);
61229   __Pyx_GIVEREF(Py_None);
61230   PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
61231   __Pyx_INCREF(__pyx_int_0);
61232   __Pyx_GIVEREF(__pyx_int_0);
61233   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
61234   __Pyx_GIVEREF(__pyx_t_2);
61235   PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
61236   __pyx_t_2 = 0;
61237   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1013, __pyx_L1_error)
61238   __Pyx_GOTREF(__pyx_t_2);
61239   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
61240   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
61241   __pyx_t_2 = 0;
61242 
61243   /* "View.MemoryView":1015
61244  *     result = _memoryviewslice(None, 0, dtype_is_object)
61245  *
61246  *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
61247  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
61248  *
61249  */
61250   __pyx_v_result->from_slice = __pyx_v_memviewslice;
61251 
61252   /* "View.MemoryView":1016
61253  *
61254  *     result.from_slice = memviewslice
61255  *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
61256  *
61257  *     result.from_object = (<memoryview> memviewslice.memview).base
61258  */
61259   __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
61260 
61261   /* "View.MemoryView":1018
61262  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
61263  *
61264  *     result.from_object = (<memoryview> memviewslice.memview).base             # <<<<<<<<<<<<<<
61265  *     result.typeinfo = memviewslice.memview.typeinfo
61266  *
61267  */
61268   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1018, __pyx_L1_error)
61269   __Pyx_GOTREF(__pyx_t_2);
61270   __Pyx_GIVEREF(__pyx_t_2);
61271   __Pyx_GOTREF(__pyx_v_result->from_object);
61272   __Pyx_DECREF(__pyx_v_result->from_object);
61273   __pyx_v_result->from_object = __pyx_t_2;
61274   __pyx_t_2 = 0;
61275 
61276   /* "View.MemoryView":1019
61277  *
61278  *     result.from_object = (<memoryview> memviewslice.memview).base
61279  *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
61280  *
61281  *     result.view = memviewslice.memview.view
61282  */
61283   __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
61284   __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
61285 
61286   /* "View.MemoryView":1021
61287  *     result.typeinfo = memviewslice.memview.typeinfo
61288  *
61289  *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
61290  *     result.view.buf = <void *> memviewslice.data
61291  *     result.view.ndim = ndim
61292  */
61293   __pyx_t_5 = __pyx_v_memviewslice.memview->view;
61294   __pyx_v_result->__pyx_base.view = __pyx_t_5;
61295 
61296   /* "View.MemoryView":1022
61297  *
61298  *     result.view = memviewslice.memview.view
61299  *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
61300  *     result.view.ndim = ndim
61301  *     (<__pyx_buffer *> &result.view).obj = Py_None
61302  */
61303   __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
61304 
61305   /* "View.MemoryView":1023
61306  *     result.view = memviewslice.memview.view
61307  *     result.view.buf = <void *> memviewslice.data
61308  *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
61309  *     (<__pyx_buffer *> &result.view).obj = Py_None
61310  *     Py_INCREF(Py_None)
61311  */
61312   __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
61313 
61314   /* "View.MemoryView":1024
61315  *     result.view.buf = <void *> memviewslice.data
61316  *     result.view.ndim = ndim
61317  *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
61318  *     Py_INCREF(Py_None)
61319  *
61320  */
61321   ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
61322 
61323   /* "View.MemoryView":1025
61324  *     result.view.ndim = ndim
61325  *     (<__pyx_buffer *> &result.view).obj = Py_None
61326  *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
61327  *
61328  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
61329  */
61330   Py_INCREF(Py_None);
61331 
61332   /* "View.MemoryView":1027
61333  *     Py_INCREF(Py_None)
61334  *
61335  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
61336  *         result.flags = PyBUF_RECORDS
61337  *     else:
61338  */
61339   __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
61340   if (__pyx_t_1) {
61341 
61342     /* "View.MemoryView":1028
61343  *
61344  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
61345  *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
61346  *     else:
61347  *         result.flags = PyBUF_RECORDS_RO
61348  */
61349     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
61350 
61351     /* "View.MemoryView":1027
61352  *     Py_INCREF(Py_None)
61353  *
61354  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
61355  *         result.flags = PyBUF_RECORDS
61356  *     else:
61357  */
61358     goto __pyx_L4;
61359   }
61360 
61361   /* "View.MemoryView":1030
61362  *         result.flags = PyBUF_RECORDS
61363  *     else:
61364  *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
61365  *
61366  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
61367  */
61368   /*else*/ {
61369     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
61370   }
61371   __pyx_L4:;
61372 
61373   /* "View.MemoryView":1032
61374  *         result.flags = PyBUF_RECORDS_RO
61375  *
61376  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
61377  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
61378  *
61379  */
61380   __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
61381 
61382   /* "View.MemoryView":1033
61383  *
61384  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
61385  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
61386  *
61387  *
61388  */
61389   __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
61390 
61391   /* "View.MemoryView":1036
61392  *
61393  *
61394  *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
61395  *     for suboffset in result.from_slice.suboffsets[:ndim]:
61396  *         if suboffset >= 0:
61397  */
61398   __pyx_v_result->__pyx_base.view.suboffsets = NULL;
61399 
61400   /* "View.MemoryView":1037
61401  *
61402  *     result.view.suboffsets = NULL
61403  *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
61404  *         if suboffset >= 0:
61405  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
61406  */
61407   __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
61408   for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
61409     __pyx_t_6 = __pyx_t_8;
61410     __pyx_v_suboffset = (__pyx_t_6[0]);
61411 
61412     /* "View.MemoryView":1038
61413  *     result.view.suboffsets = NULL
61414  *     for suboffset in result.from_slice.suboffsets[:ndim]:
61415  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
61416  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
61417  *             break
61418  */
61419     __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
61420     if (__pyx_t_1) {
61421 
61422       /* "View.MemoryView":1039
61423  *     for suboffset in result.from_slice.suboffsets[:ndim]:
61424  *         if suboffset >= 0:
61425  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
61426  *             break
61427  *
61428  */
61429       __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
61430 
61431       /* "View.MemoryView":1040
61432  *         if suboffset >= 0:
61433  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
61434  *             break             # <<<<<<<<<<<<<<
61435  *
61436  *     result.view.len = result.view.itemsize
61437  */
61438       goto __pyx_L6_break;
61439 
61440       /* "View.MemoryView":1038
61441  *     result.view.suboffsets = NULL
61442  *     for suboffset in result.from_slice.suboffsets[:ndim]:
61443  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
61444  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
61445  *             break
61446  */
61447     }
61448   }
61449   __pyx_L6_break:;
61450 
61451   /* "View.MemoryView":1042
61452  *             break
61453  *
61454  *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
61455  *     for length in result.view.shape[:ndim]:
61456  *         result.view.len *= length
61457  */
61458   __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
61459   __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
61460 
61461   /* "View.MemoryView":1043
61462  *
61463  *     result.view.len = result.view.itemsize
61464  *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
61465  *         result.view.len *= length
61466  *
61467  */
61468   __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
61469   for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
61470     __pyx_t_6 = __pyx_t_8;
61471     __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1043, __pyx_L1_error)
61472     __Pyx_GOTREF(__pyx_t_2);
61473     __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
61474     __pyx_t_2 = 0;
61475 
61476     /* "View.MemoryView":1044
61477  *     result.view.len = result.view.itemsize
61478  *     for length in result.view.shape[:ndim]:
61479  *         result.view.len *= length             # <<<<<<<<<<<<<<
61480  *
61481  *     result.to_object_func = to_object_func
61482  */
61483     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1044, __pyx_L1_error)
61484     __Pyx_GOTREF(__pyx_t_2);
61485     __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1044, __pyx_L1_error)
61486     __Pyx_GOTREF(__pyx_t_3);
61487     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61488     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1044, __pyx_L1_error)
61489     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
61490     __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
61491   }
61492 
61493   /* "View.MemoryView":1046
61494  *         result.view.len *= length
61495  *
61496  *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
61497  *     result.to_dtype_func = to_dtype_func
61498  *
61499  */
61500   __pyx_v_result->to_object_func = __pyx_v_to_object_func;
61501 
61502   /* "View.MemoryView":1047
61503  *
61504  *     result.to_object_func = to_object_func
61505  *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
61506  *
61507  *     return result
61508  */
61509   __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
61510 
61511   /* "View.MemoryView":1049
61512  *     result.to_dtype_func = to_dtype_func
61513  *
61514  *     return result             # <<<<<<<<<<<<<<
61515  *
61516  * @cname('__pyx_memoryview_get_slice_from_memoryview')
61517  */
61518   __Pyx_XDECREF(__pyx_r);
61519   __Pyx_INCREF(((PyObject *)__pyx_v_result));
61520   __pyx_r = ((PyObject *)__pyx_v_result);
61521   goto __pyx_L0;
61522 
61523   /* "View.MemoryView":999
61524  *
61525  * @cname('__pyx_memoryview_fromslice')
61526  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
61527  *                           int ndim,
61528  *                           object (*to_object_func)(char *),
61529  */
61530 
61531   /* function exit code */
61532   __pyx_L1_error:;
61533   __Pyx_XDECREF(__pyx_t_2);
61534   __Pyx_XDECREF(__pyx_t_3);
61535   __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
61536   __pyx_r = 0;
61537   __pyx_L0:;
61538   __Pyx_XDECREF((PyObject *)__pyx_v_result);
61539   __Pyx_XDECREF(__pyx_v_length);
61540   __Pyx_XGIVEREF(__pyx_r);
61541   __Pyx_RefNannyFinishContext();
61542   return __pyx_r;
61543 }
61544 
61545 /* "View.MemoryView":1052
61546  *
61547  * @cname('__pyx_memoryview_get_slice_from_memoryview')
61548  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
61549  *                                                    __Pyx_memviewslice *mslice) except NULL:
61550  *     cdef _memoryviewslice obj
61551  */
61552 
__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_mslice)61553 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
61554   struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
61555   __Pyx_memviewslice *__pyx_r;
61556   __Pyx_RefNannyDeclarations
61557   int __pyx_t_1;
61558   int __pyx_t_2;
61559   PyObject *__pyx_t_3 = NULL;
61560   int __pyx_lineno = 0;
61561   const char *__pyx_filename = NULL;
61562   int __pyx_clineno = 0;
61563   __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
61564 
61565   /* "View.MemoryView":1055
61566  *                                                    __Pyx_memviewslice *mslice) except NULL:
61567  *     cdef _memoryviewslice obj
61568  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
61569  *         obj = memview
61570  *         return &obj.from_slice
61571  */
61572   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
61573   __pyx_t_2 = (__pyx_t_1 != 0);
61574   if (__pyx_t_2) {
61575 
61576     /* "View.MemoryView":1056
61577  *     cdef _memoryviewslice obj
61578  *     if isinstance(memview, _memoryviewslice):
61579  *         obj = memview             # <<<<<<<<<<<<<<
61580  *         return &obj.from_slice
61581  *     else:
61582  */
61583     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(3, 1056, __pyx_L1_error)
61584     __pyx_t_3 = ((PyObject *)__pyx_v_memview);
61585     __Pyx_INCREF(__pyx_t_3);
61586     __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
61587     __pyx_t_3 = 0;
61588 
61589     /* "View.MemoryView":1057
61590  *     if isinstance(memview, _memoryviewslice):
61591  *         obj = memview
61592  *         return &obj.from_slice             # <<<<<<<<<<<<<<
61593  *     else:
61594  *         slice_copy(memview, mslice)
61595  */
61596     __pyx_r = (&__pyx_v_obj->from_slice);
61597     goto __pyx_L0;
61598 
61599     /* "View.MemoryView":1055
61600  *                                                    __Pyx_memviewslice *mslice) except NULL:
61601  *     cdef _memoryviewslice obj
61602  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
61603  *         obj = memview
61604  *         return &obj.from_slice
61605  */
61606   }
61607 
61608   /* "View.MemoryView":1059
61609  *         return &obj.from_slice
61610  *     else:
61611  *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
61612  *         return mslice
61613  *
61614  */
61615   /*else*/ {
61616     __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
61617 
61618     /* "View.MemoryView":1060
61619  *     else:
61620  *         slice_copy(memview, mslice)
61621  *         return mslice             # <<<<<<<<<<<<<<
61622  *
61623  * @cname('__pyx_memoryview_slice_copy')
61624  */
61625     __pyx_r = __pyx_v_mslice;
61626     goto __pyx_L0;
61627   }
61628 
61629   /* "View.MemoryView":1052
61630  *
61631  * @cname('__pyx_memoryview_get_slice_from_memoryview')
61632  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
61633  *                                                    __Pyx_memviewslice *mslice) except NULL:
61634  *     cdef _memoryviewslice obj
61635  */
61636 
61637   /* function exit code */
61638   __pyx_L1_error:;
61639   __Pyx_XDECREF(__pyx_t_3);
61640   __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
61641   __pyx_r = NULL;
61642   __pyx_L0:;
61643   __Pyx_XDECREF((PyObject *)__pyx_v_obj);
61644   __Pyx_RefNannyFinishContext();
61645   return __pyx_r;
61646 }
61647 
61648 /* "View.MemoryView":1063
61649  *
61650  * @cname('__pyx_memoryview_slice_copy')
61651  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
61652  *     cdef int dim
61653  *     cdef (Py_ssize_t*) shape, strides, suboffsets
61654  */
61655 
__pyx_memoryview_slice_copy(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_dst)61656 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
61657   int __pyx_v_dim;
61658   Py_ssize_t *__pyx_v_shape;
61659   Py_ssize_t *__pyx_v_strides;
61660   Py_ssize_t *__pyx_v_suboffsets;
61661   __Pyx_RefNannyDeclarations
61662   Py_ssize_t *__pyx_t_1;
61663   int __pyx_t_2;
61664   int __pyx_t_3;
61665   int __pyx_t_4;
61666   Py_ssize_t __pyx_t_5;
61667   __Pyx_RefNannySetupContext("slice_copy", 0);
61668 
61669   /* "View.MemoryView":1067
61670  *     cdef (Py_ssize_t*) shape, strides, suboffsets
61671  *
61672  *     shape = memview.view.shape             # <<<<<<<<<<<<<<
61673  *     strides = memview.view.strides
61674  *     suboffsets = memview.view.suboffsets
61675  */
61676   __pyx_t_1 = __pyx_v_memview->view.shape;
61677   __pyx_v_shape = __pyx_t_1;
61678 
61679   /* "View.MemoryView":1068
61680  *
61681  *     shape = memview.view.shape
61682  *     strides = memview.view.strides             # <<<<<<<<<<<<<<
61683  *     suboffsets = memview.view.suboffsets
61684  *
61685  */
61686   __pyx_t_1 = __pyx_v_memview->view.strides;
61687   __pyx_v_strides = __pyx_t_1;
61688 
61689   /* "View.MemoryView":1069
61690  *     shape = memview.view.shape
61691  *     strides = memview.view.strides
61692  *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
61693  *
61694  *     dst.memview = <__pyx_memoryview *> memview
61695  */
61696   __pyx_t_1 = __pyx_v_memview->view.suboffsets;
61697   __pyx_v_suboffsets = __pyx_t_1;
61698 
61699   /* "View.MemoryView":1071
61700  *     suboffsets = memview.view.suboffsets
61701  *
61702  *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
61703  *     dst.data = <char *> memview.view.buf
61704  *
61705  */
61706   __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
61707 
61708   /* "View.MemoryView":1072
61709  *
61710  *     dst.memview = <__pyx_memoryview *> memview
61711  *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
61712  *
61713  *     for dim in range(memview.view.ndim):
61714  */
61715   __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
61716 
61717   /* "View.MemoryView":1074
61718  *     dst.data = <char *> memview.view.buf
61719  *
61720  *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
61721  *         dst.shape[dim] = shape[dim]
61722  *         dst.strides[dim] = strides[dim]
61723  */
61724   __pyx_t_2 = __pyx_v_memview->view.ndim;
61725   __pyx_t_3 = __pyx_t_2;
61726   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
61727     __pyx_v_dim = __pyx_t_4;
61728 
61729     /* "View.MemoryView":1075
61730  *
61731  *     for dim in range(memview.view.ndim):
61732  *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
61733  *         dst.strides[dim] = strides[dim]
61734  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
61735  */
61736     (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
61737 
61738     /* "View.MemoryView":1076
61739  *     for dim in range(memview.view.ndim):
61740  *         dst.shape[dim] = shape[dim]
61741  *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
61742  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
61743  *
61744  */
61745     (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
61746 
61747     /* "View.MemoryView":1077
61748  *         dst.shape[dim] = shape[dim]
61749  *         dst.strides[dim] = strides[dim]
61750  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
61751  *
61752  * @cname('__pyx_memoryview_copy_object')
61753  */
61754     if ((__pyx_v_suboffsets != 0)) {
61755       __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
61756     } else {
61757       __pyx_t_5 = -1L;
61758     }
61759     (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
61760   }
61761 
61762   /* "View.MemoryView":1063
61763  *
61764  * @cname('__pyx_memoryview_slice_copy')
61765  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
61766  *     cdef int dim
61767  *     cdef (Py_ssize_t*) shape, strides, suboffsets
61768  */
61769 
61770   /* function exit code */
61771   __Pyx_RefNannyFinishContext();
61772 }
61773 
61774 /* "View.MemoryView":1080
61775  *
61776  * @cname('__pyx_memoryview_copy_object')
61777  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
61778  *     "Create a new memoryview object"
61779  *     cdef __Pyx_memviewslice memviewslice
61780  */
61781 
__pyx_memoryview_copy_object(struct __pyx_memoryview_obj * __pyx_v_memview)61782 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
61783   __Pyx_memviewslice __pyx_v_memviewslice;
61784   PyObject *__pyx_r = NULL;
61785   __Pyx_RefNannyDeclarations
61786   PyObject *__pyx_t_1 = NULL;
61787   int __pyx_lineno = 0;
61788   const char *__pyx_filename = NULL;
61789   int __pyx_clineno = 0;
61790   __Pyx_RefNannySetupContext("memoryview_copy", 0);
61791 
61792   /* "View.MemoryView":1083
61793  *     "Create a new memoryview object"
61794  *     cdef __Pyx_memviewslice memviewslice
61795  *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
61796  *     return memoryview_copy_from_slice(memview, &memviewslice)
61797  *
61798  */
61799   __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
61800 
61801   /* "View.MemoryView":1084
61802  *     cdef __Pyx_memviewslice memviewslice
61803  *     slice_copy(memview, &memviewslice)
61804  *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
61805  *
61806  * @cname('__pyx_memoryview_copy_object_from_slice')
61807  */
61808   __Pyx_XDECREF(__pyx_r);
61809   __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1084, __pyx_L1_error)
61810   __Pyx_GOTREF(__pyx_t_1);
61811   __pyx_r = __pyx_t_1;
61812   __pyx_t_1 = 0;
61813   goto __pyx_L0;
61814 
61815   /* "View.MemoryView":1080
61816  *
61817  * @cname('__pyx_memoryview_copy_object')
61818  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
61819  *     "Create a new memoryview object"
61820  *     cdef __Pyx_memviewslice memviewslice
61821  */
61822 
61823   /* function exit code */
61824   __pyx_L1_error:;
61825   __Pyx_XDECREF(__pyx_t_1);
61826   __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
61827   __pyx_r = 0;
61828   __pyx_L0:;
61829   __Pyx_XGIVEREF(__pyx_r);
61830   __Pyx_RefNannyFinishContext();
61831   return __pyx_r;
61832 }
61833 
61834 /* "View.MemoryView":1087
61835  *
61836  * @cname('__pyx_memoryview_copy_object_from_slice')
61837  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
61838  *     """
61839  *     Create a new memoryview object from a given memoryview object and slice.
61840  */
61841 
__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj * __pyx_v_memview,__Pyx_memviewslice * __pyx_v_memviewslice)61842 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
61843   PyObject *(*__pyx_v_to_object_func)(char *);
61844   int (*__pyx_v_to_dtype_func)(char *, PyObject *);
61845   PyObject *__pyx_r = NULL;
61846   __Pyx_RefNannyDeclarations
61847   int __pyx_t_1;
61848   int __pyx_t_2;
61849   PyObject *(*__pyx_t_3)(char *);
61850   int (*__pyx_t_4)(char *, PyObject *);
61851   PyObject *__pyx_t_5 = NULL;
61852   int __pyx_lineno = 0;
61853   const char *__pyx_filename = NULL;
61854   int __pyx_clineno = 0;
61855   __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
61856 
61857   /* "View.MemoryView":1094
61858  *     cdef int (*to_dtype_func)(char *, object) except 0
61859  *
61860  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
61861  *         to_object_func = (<_memoryviewslice> memview).to_object_func
61862  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
61863  */
61864   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
61865   __pyx_t_2 = (__pyx_t_1 != 0);
61866   if (__pyx_t_2) {
61867 
61868     /* "View.MemoryView":1095
61869  *
61870  *     if isinstance(memview, _memoryviewslice):
61871  *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
61872  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
61873  *     else:
61874  */
61875     __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
61876     __pyx_v_to_object_func = __pyx_t_3;
61877 
61878     /* "View.MemoryView":1096
61879  *     if isinstance(memview, _memoryviewslice):
61880  *         to_object_func = (<_memoryviewslice> memview).to_object_func
61881  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
61882  *     else:
61883  *         to_object_func = NULL
61884  */
61885     __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
61886     __pyx_v_to_dtype_func = __pyx_t_4;
61887 
61888     /* "View.MemoryView":1094
61889  *     cdef int (*to_dtype_func)(char *, object) except 0
61890  *
61891  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
61892  *         to_object_func = (<_memoryviewslice> memview).to_object_func
61893  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
61894  */
61895     goto __pyx_L3;
61896   }
61897 
61898   /* "View.MemoryView":1098
61899  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
61900  *     else:
61901  *         to_object_func = NULL             # <<<<<<<<<<<<<<
61902  *         to_dtype_func = NULL
61903  *
61904  */
61905   /*else*/ {
61906     __pyx_v_to_object_func = NULL;
61907 
61908     /* "View.MemoryView":1099
61909  *     else:
61910  *         to_object_func = NULL
61911  *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
61912  *
61913  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
61914  */
61915     __pyx_v_to_dtype_func = NULL;
61916   }
61917   __pyx_L3:;
61918 
61919   /* "View.MemoryView":1101
61920  *         to_dtype_func = NULL
61921  *
61922  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
61923  *                                 to_object_func, to_dtype_func,
61924  *                                 memview.dtype_is_object)
61925  */
61926   __Pyx_XDECREF(__pyx_r);
61927 
61928   /* "View.MemoryView":1103
61929  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
61930  *                                 to_object_func, to_dtype_func,
61931  *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
61932  *
61933  *
61934  */
61935   __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1101, __pyx_L1_error)
61936   __Pyx_GOTREF(__pyx_t_5);
61937   __pyx_r = __pyx_t_5;
61938   __pyx_t_5 = 0;
61939   goto __pyx_L0;
61940 
61941   /* "View.MemoryView":1087
61942  *
61943  * @cname('__pyx_memoryview_copy_object_from_slice')
61944  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
61945  *     """
61946  *     Create a new memoryview object from a given memoryview object and slice.
61947  */
61948 
61949   /* function exit code */
61950   __pyx_L1_error:;
61951   __Pyx_XDECREF(__pyx_t_5);
61952   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
61953   __pyx_r = 0;
61954   __pyx_L0:;
61955   __Pyx_XGIVEREF(__pyx_r);
61956   __Pyx_RefNannyFinishContext();
61957   return __pyx_r;
61958 }
61959 
61960 /* "View.MemoryView":1109
61961  *
61962  *
61963  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
61964  *     if arg < 0:
61965  *         return -arg
61966  */
61967 
abs_py_ssize_t(Py_ssize_t __pyx_v_arg)61968 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
61969   Py_ssize_t __pyx_r;
61970   int __pyx_t_1;
61971 
61972   /* "View.MemoryView":1110
61973  *
61974  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
61975  *     if arg < 0:             # <<<<<<<<<<<<<<
61976  *         return -arg
61977  *     else:
61978  */
61979   __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
61980   if (__pyx_t_1) {
61981 
61982     /* "View.MemoryView":1111
61983  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
61984  *     if arg < 0:
61985  *         return -arg             # <<<<<<<<<<<<<<
61986  *     else:
61987  *         return arg
61988  */
61989     __pyx_r = (-__pyx_v_arg);
61990     goto __pyx_L0;
61991 
61992     /* "View.MemoryView":1110
61993  *
61994  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
61995  *     if arg < 0:             # <<<<<<<<<<<<<<
61996  *         return -arg
61997  *     else:
61998  */
61999   }
62000 
62001   /* "View.MemoryView":1113
62002  *         return -arg
62003  *     else:
62004  *         return arg             # <<<<<<<<<<<<<<
62005  *
62006  * @cname('__pyx_get_best_slice_order')
62007  */
62008   /*else*/ {
62009     __pyx_r = __pyx_v_arg;
62010     goto __pyx_L0;
62011   }
62012 
62013   /* "View.MemoryView":1109
62014  *
62015  *
62016  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
62017  *     if arg < 0:
62018  *         return -arg
62019  */
62020 
62021   /* function exit code */
62022   __pyx_L0:;
62023   return __pyx_r;
62024 }
62025 
62026 /* "View.MemoryView":1116
62027  *
62028  * @cname('__pyx_get_best_slice_order')
62029  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
62030  *     """
62031  *     Figure out the best memory access order for a given slice.
62032  */
62033 
__pyx_get_best_slice_order(__Pyx_memviewslice * __pyx_v_mslice,int __pyx_v_ndim)62034 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
62035   int __pyx_v_i;
62036   Py_ssize_t __pyx_v_c_stride;
62037   Py_ssize_t __pyx_v_f_stride;
62038   char __pyx_r;
62039   int __pyx_t_1;
62040   int __pyx_t_2;
62041   int __pyx_t_3;
62042   int __pyx_t_4;
62043 
62044   /* "View.MemoryView":1121
62045  *     """
62046  *     cdef int i
62047  *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
62048  *     cdef Py_ssize_t f_stride = 0
62049  *
62050  */
62051   __pyx_v_c_stride = 0;
62052 
62053   /* "View.MemoryView":1122
62054  *     cdef int i
62055  *     cdef Py_ssize_t c_stride = 0
62056  *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
62057  *
62058  *     for i in range(ndim - 1, -1, -1):
62059  */
62060   __pyx_v_f_stride = 0;
62061 
62062   /* "View.MemoryView":1124
62063  *     cdef Py_ssize_t f_stride = 0
62064  *
62065  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
62066  *         if mslice.shape[i] > 1:
62067  *             c_stride = mslice.strides[i]
62068  */
62069   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
62070     __pyx_v_i = __pyx_t_1;
62071 
62072     /* "View.MemoryView":1125
62073  *
62074  *     for i in range(ndim - 1, -1, -1):
62075  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
62076  *             c_stride = mslice.strides[i]
62077  *             break
62078  */
62079     __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
62080     if (__pyx_t_2) {
62081 
62082       /* "View.MemoryView":1126
62083  *     for i in range(ndim - 1, -1, -1):
62084  *         if mslice.shape[i] > 1:
62085  *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
62086  *             break
62087  *
62088  */
62089       __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
62090 
62091       /* "View.MemoryView":1127
62092  *         if mslice.shape[i] > 1:
62093  *             c_stride = mslice.strides[i]
62094  *             break             # <<<<<<<<<<<<<<
62095  *
62096  *     for i in range(ndim):
62097  */
62098       goto __pyx_L4_break;
62099 
62100       /* "View.MemoryView":1125
62101  *
62102  *     for i in range(ndim - 1, -1, -1):
62103  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
62104  *             c_stride = mslice.strides[i]
62105  *             break
62106  */
62107     }
62108   }
62109   __pyx_L4_break:;
62110 
62111   /* "View.MemoryView":1129
62112  *             break
62113  *
62114  *     for i in range(ndim):             # <<<<<<<<<<<<<<
62115  *         if mslice.shape[i] > 1:
62116  *             f_stride = mslice.strides[i]
62117  */
62118   __pyx_t_1 = __pyx_v_ndim;
62119   __pyx_t_3 = __pyx_t_1;
62120   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
62121     __pyx_v_i = __pyx_t_4;
62122 
62123     /* "View.MemoryView":1130
62124  *
62125  *     for i in range(ndim):
62126  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
62127  *             f_stride = mslice.strides[i]
62128  *             break
62129  */
62130     __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
62131     if (__pyx_t_2) {
62132 
62133       /* "View.MemoryView":1131
62134  *     for i in range(ndim):
62135  *         if mslice.shape[i] > 1:
62136  *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
62137  *             break
62138  *
62139  */
62140       __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
62141 
62142       /* "View.MemoryView":1132
62143  *         if mslice.shape[i] > 1:
62144  *             f_stride = mslice.strides[i]
62145  *             break             # <<<<<<<<<<<<<<
62146  *
62147  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
62148  */
62149       goto __pyx_L7_break;
62150 
62151       /* "View.MemoryView":1130
62152  *
62153  *     for i in range(ndim):
62154  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
62155  *             f_stride = mslice.strides[i]
62156  *             break
62157  */
62158     }
62159   }
62160   __pyx_L7_break:;
62161 
62162   /* "View.MemoryView":1134
62163  *             break
62164  *
62165  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
62166  *         return 'C'
62167  *     else:
62168  */
62169   __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
62170   if (__pyx_t_2) {
62171 
62172     /* "View.MemoryView":1135
62173  *
62174  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
62175  *         return 'C'             # <<<<<<<<<<<<<<
62176  *     else:
62177  *         return 'F'
62178  */
62179     __pyx_r = 'C';
62180     goto __pyx_L0;
62181 
62182     /* "View.MemoryView":1134
62183  *             break
62184  *
62185  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
62186  *         return 'C'
62187  *     else:
62188  */
62189   }
62190 
62191   /* "View.MemoryView":1137
62192  *         return 'C'
62193  *     else:
62194  *         return 'F'             # <<<<<<<<<<<<<<
62195  *
62196  * @cython.cdivision(True)
62197  */
62198   /*else*/ {
62199     __pyx_r = 'F';
62200     goto __pyx_L0;
62201   }
62202 
62203   /* "View.MemoryView":1116
62204  *
62205  * @cname('__pyx_get_best_slice_order')
62206  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
62207  *     """
62208  *     Figure out the best memory access order for a given slice.
62209  */
62210 
62211   /* function exit code */
62212   __pyx_L0:;
62213   return __pyx_r;
62214 }
62215 
62216 /* "View.MemoryView":1140
62217  *
62218  * @cython.cdivision(True)
62219  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
62220  *                                    char *dst_data, Py_ssize_t *dst_strides,
62221  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
62222  */
62223 
_copy_strided_to_strided(char * __pyx_v_src_data,Py_ssize_t * __pyx_v_src_strides,char * __pyx_v_dst_data,Py_ssize_t * __pyx_v_dst_strides,Py_ssize_t * __pyx_v_src_shape,Py_ssize_t * __pyx_v_dst_shape,int __pyx_v_ndim,size_t __pyx_v_itemsize)62224 static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
62225   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
62226   CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
62227   Py_ssize_t __pyx_v_dst_extent;
62228   Py_ssize_t __pyx_v_src_stride;
62229   Py_ssize_t __pyx_v_dst_stride;
62230   int __pyx_t_1;
62231   int __pyx_t_2;
62232   int __pyx_t_3;
62233   Py_ssize_t __pyx_t_4;
62234   Py_ssize_t __pyx_t_5;
62235   Py_ssize_t __pyx_t_6;
62236 
62237   /* "View.MemoryView":1147
62238  *
62239  *     cdef Py_ssize_t i
62240  *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
62241  *     cdef Py_ssize_t dst_extent = dst_shape[0]
62242  *     cdef Py_ssize_t src_stride = src_strides[0]
62243  */
62244   __pyx_v_src_extent = (__pyx_v_src_shape[0]);
62245 
62246   /* "View.MemoryView":1148
62247  *     cdef Py_ssize_t i
62248  *     cdef Py_ssize_t src_extent = src_shape[0]
62249  *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
62250  *     cdef Py_ssize_t src_stride = src_strides[0]
62251  *     cdef Py_ssize_t dst_stride = dst_strides[0]
62252  */
62253   __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
62254 
62255   /* "View.MemoryView":1149
62256  *     cdef Py_ssize_t src_extent = src_shape[0]
62257  *     cdef Py_ssize_t dst_extent = dst_shape[0]
62258  *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
62259  *     cdef Py_ssize_t dst_stride = dst_strides[0]
62260  *
62261  */
62262   __pyx_v_src_stride = (__pyx_v_src_strides[0]);
62263 
62264   /* "View.MemoryView":1150
62265  *     cdef Py_ssize_t dst_extent = dst_shape[0]
62266  *     cdef Py_ssize_t src_stride = src_strides[0]
62267  *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
62268  *
62269  *     if ndim == 1:
62270  */
62271   __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
62272 
62273   /* "View.MemoryView":1152
62274  *     cdef Py_ssize_t dst_stride = dst_strides[0]
62275  *
62276  *     if ndim == 1:             # <<<<<<<<<<<<<<
62277  *        if (src_stride > 0 and dst_stride > 0 and
62278  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
62279  */
62280   __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
62281   if (__pyx_t_1) {
62282 
62283     /* "View.MemoryView":1153
62284  *
62285  *     if ndim == 1:
62286  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
62287  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
62288  *            memcpy(dst_data, src_data, itemsize * dst_extent)
62289  */
62290     __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
62291     if (__pyx_t_2) {
62292     } else {
62293       __pyx_t_1 = __pyx_t_2;
62294       goto __pyx_L5_bool_binop_done;
62295     }
62296     __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
62297     if (__pyx_t_2) {
62298     } else {
62299       __pyx_t_1 = __pyx_t_2;
62300       goto __pyx_L5_bool_binop_done;
62301     }
62302 
62303     /* "View.MemoryView":1154
62304  *     if ndim == 1:
62305  *        if (src_stride > 0 and dst_stride > 0 and
62306  *            <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
62307  *            memcpy(dst_data, src_data, itemsize * dst_extent)
62308  *        else:
62309  */
62310     __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
62311     if (__pyx_t_2) {
62312       __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
62313     }
62314     __pyx_t_3 = (__pyx_t_2 != 0);
62315     __pyx_t_1 = __pyx_t_3;
62316     __pyx_L5_bool_binop_done:;
62317 
62318     /* "View.MemoryView":1153
62319  *
62320  *     if ndim == 1:
62321  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
62322  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
62323  *            memcpy(dst_data, src_data, itemsize * dst_extent)
62324  */
62325     if (__pyx_t_1) {
62326 
62327       /* "View.MemoryView":1155
62328  *        if (src_stride > 0 and dst_stride > 0 and
62329  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
62330  *            memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
62331  *        else:
62332  *            for i in range(dst_extent):
62333  */
62334       (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
62335 
62336       /* "View.MemoryView":1153
62337  *
62338  *     if ndim == 1:
62339  *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
62340  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
62341  *            memcpy(dst_data, src_data, itemsize * dst_extent)
62342  */
62343       goto __pyx_L4;
62344     }
62345 
62346     /* "View.MemoryView":1157
62347  *            memcpy(dst_data, src_data, itemsize * dst_extent)
62348  *        else:
62349  *            for i in range(dst_extent):             # <<<<<<<<<<<<<<
62350  *                memcpy(dst_data, src_data, itemsize)
62351  *                src_data += src_stride
62352  */
62353     /*else*/ {
62354       __pyx_t_4 = __pyx_v_dst_extent;
62355       __pyx_t_5 = __pyx_t_4;
62356       for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
62357         __pyx_v_i = __pyx_t_6;
62358 
62359         /* "View.MemoryView":1158
62360  *        else:
62361  *            for i in range(dst_extent):
62362  *                memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
62363  *                src_data += src_stride
62364  *                dst_data += dst_stride
62365  */
62366         (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
62367 
62368         /* "View.MemoryView":1159
62369  *            for i in range(dst_extent):
62370  *                memcpy(dst_data, src_data, itemsize)
62371  *                src_data += src_stride             # <<<<<<<<<<<<<<
62372  *                dst_data += dst_stride
62373  *     else:
62374  */
62375         __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
62376 
62377         /* "View.MemoryView":1160
62378  *                memcpy(dst_data, src_data, itemsize)
62379  *                src_data += src_stride
62380  *                dst_data += dst_stride             # <<<<<<<<<<<<<<
62381  *     else:
62382  *         for i in range(dst_extent):
62383  */
62384         __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
62385       }
62386     }
62387     __pyx_L4:;
62388 
62389     /* "View.MemoryView":1152
62390  *     cdef Py_ssize_t dst_stride = dst_strides[0]
62391  *
62392  *     if ndim == 1:             # <<<<<<<<<<<<<<
62393  *        if (src_stride > 0 and dst_stride > 0 and
62394  *            <size_t> src_stride == itemsize == <size_t> dst_stride):
62395  */
62396     goto __pyx_L3;
62397   }
62398 
62399   /* "View.MemoryView":1162
62400  *                dst_data += dst_stride
62401  *     else:
62402  *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
62403  *             _copy_strided_to_strided(src_data, src_strides + 1,
62404  *                                      dst_data, dst_strides + 1,
62405  */
62406   /*else*/ {
62407     __pyx_t_4 = __pyx_v_dst_extent;
62408     __pyx_t_5 = __pyx_t_4;
62409     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
62410       __pyx_v_i = __pyx_t_6;
62411 
62412       /* "View.MemoryView":1163
62413  *     else:
62414  *         for i in range(dst_extent):
62415  *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
62416  *                                      dst_data, dst_strides + 1,
62417  *                                      src_shape + 1, dst_shape + 1,
62418  */
62419       _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
62420 
62421       /* "View.MemoryView":1167
62422  *                                      src_shape + 1, dst_shape + 1,
62423  *                                      ndim - 1, itemsize)
62424  *             src_data += src_stride             # <<<<<<<<<<<<<<
62425  *             dst_data += dst_stride
62426  *
62427  */
62428       __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
62429 
62430       /* "View.MemoryView":1168
62431  *                                      ndim - 1, itemsize)
62432  *             src_data += src_stride
62433  *             dst_data += dst_stride             # <<<<<<<<<<<<<<
62434  *
62435  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
62436  */
62437       __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
62438     }
62439   }
62440   __pyx_L3:;
62441 
62442   /* "View.MemoryView":1140
62443  *
62444  * @cython.cdivision(True)
62445  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
62446  *                                    char *dst_data, Py_ssize_t *dst_strides,
62447  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
62448  */
62449 
62450   /* function exit code */
62451 }
62452 
62453 /* "View.MemoryView":1170
62454  *             dst_data += dst_stride
62455  *
62456  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
62457  *                                   __Pyx_memviewslice *dst,
62458  *                                   int ndim, size_t itemsize) nogil:
62459  */
62460 
copy_strided_to_strided(__Pyx_memviewslice * __pyx_v_src,__Pyx_memviewslice * __pyx_v_dst,int __pyx_v_ndim,size_t __pyx_v_itemsize)62461 static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
62462 
62463   /* "View.MemoryView":1173
62464  *                                   __Pyx_memviewslice *dst,
62465  *                                   int ndim, size_t itemsize) nogil:
62466  *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
62467  *                              src.shape, dst.shape, ndim, itemsize)
62468  *
62469  */
62470   _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
62471 
62472   /* "View.MemoryView":1170
62473  *             dst_data += dst_stride
62474  *
62475  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
62476  *                                   __Pyx_memviewslice *dst,
62477  *                                   int ndim, size_t itemsize) nogil:
62478  */
62479 
62480   /* function exit code */
62481 }
62482 
62483 /* "View.MemoryView":1177
62484  *
62485  * @cname('__pyx_memoryview_slice_get_size')
62486  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
62487  *     "Return the size of the memory occupied by the slice in number of bytes"
62488  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
62489  */
62490 
__pyx_memoryview_slice_get_size(__Pyx_memviewslice * __pyx_v_src,int __pyx_v_ndim)62491 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
62492   Py_ssize_t __pyx_v_shape;
62493   Py_ssize_t __pyx_v_size;
62494   Py_ssize_t __pyx_r;
62495   Py_ssize_t __pyx_t_1;
62496   Py_ssize_t *__pyx_t_2;
62497   Py_ssize_t *__pyx_t_3;
62498   Py_ssize_t *__pyx_t_4;
62499 
62500   /* "View.MemoryView":1179
62501  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
62502  *     "Return the size of the memory occupied by the slice in number of bytes"
62503  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
62504  *
62505  *     for shape in src.shape[:ndim]:
62506  */
62507   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
62508   __pyx_v_size = __pyx_t_1;
62509 
62510   /* "View.MemoryView":1181
62511  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
62512  *
62513  *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
62514  *         size *= shape
62515  *
62516  */
62517   __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
62518   for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
62519     __pyx_t_2 = __pyx_t_4;
62520     __pyx_v_shape = (__pyx_t_2[0]);
62521 
62522     /* "View.MemoryView":1182
62523  *
62524  *     for shape in src.shape[:ndim]:
62525  *         size *= shape             # <<<<<<<<<<<<<<
62526  *
62527  *     return size
62528  */
62529     __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
62530   }
62531 
62532   /* "View.MemoryView":1184
62533  *         size *= shape
62534  *
62535  *     return size             # <<<<<<<<<<<<<<
62536  *
62537  * @cname('__pyx_fill_contig_strides_array')
62538  */
62539   __pyx_r = __pyx_v_size;
62540   goto __pyx_L0;
62541 
62542   /* "View.MemoryView":1177
62543  *
62544  * @cname('__pyx_memoryview_slice_get_size')
62545  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
62546  *     "Return the size of the memory occupied by the slice in number of bytes"
62547  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
62548  */
62549 
62550   /* function exit code */
62551   __pyx_L0:;
62552   return __pyx_r;
62553 }
62554 
62555 /* "View.MemoryView":1187
62556  *
62557  * @cname('__pyx_fill_contig_strides_array')
62558  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
62559  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
62560  *                 int ndim, char order) nogil:
62561  */
62562 
__pyx_fill_contig_strides_array(Py_ssize_t * __pyx_v_shape,Py_ssize_t * __pyx_v_strides,Py_ssize_t __pyx_v_stride,int __pyx_v_ndim,char __pyx_v_order)62563 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
62564   int __pyx_v_idx;
62565   Py_ssize_t __pyx_r;
62566   int __pyx_t_1;
62567   int __pyx_t_2;
62568   int __pyx_t_3;
62569   int __pyx_t_4;
62570 
62571   /* "View.MemoryView":1196
62572  *     cdef int idx
62573  *
62574  *     if order == 'F':             # <<<<<<<<<<<<<<
62575  *         for idx in range(ndim):
62576  *             strides[idx] = stride
62577  */
62578   __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
62579   if (__pyx_t_1) {
62580 
62581     /* "View.MemoryView":1197
62582  *
62583  *     if order == 'F':
62584  *         for idx in range(ndim):             # <<<<<<<<<<<<<<
62585  *             strides[idx] = stride
62586  *             stride *= shape[idx]
62587  */
62588     __pyx_t_2 = __pyx_v_ndim;
62589     __pyx_t_3 = __pyx_t_2;
62590     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
62591       __pyx_v_idx = __pyx_t_4;
62592 
62593       /* "View.MemoryView":1198
62594  *     if order == 'F':
62595  *         for idx in range(ndim):
62596  *             strides[idx] = stride             # <<<<<<<<<<<<<<
62597  *             stride *= shape[idx]
62598  *     else:
62599  */
62600       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
62601 
62602       /* "View.MemoryView":1199
62603  *         for idx in range(ndim):
62604  *             strides[idx] = stride
62605  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
62606  *     else:
62607  *         for idx in range(ndim - 1, -1, -1):
62608  */
62609       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
62610     }
62611 
62612     /* "View.MemoryView":1196
62613  *     cdef int idx
62614  *
62615  *     if order == 'F':             # <<<<<<<<<<<<<<
62616  *         for idx in range(ndim):
62617  *             strides[idx] = stride
62618  */
62619     goto __pyx_L3;
62620   }
62621 
62622   /* "View.MemoryView":1201
62623  *             stride *= shape[idx]
62624  *     else:
62625  *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
62626  *             strides[idx] = stride
62627  *             stride *= shape[idx]
62628  */
62629   /*else*/ {
62630     for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
62631       __pyx_v_idx = __pyx_t_2;
62632 
62633       /* "View.MemoryView":1202
62634  *     else:
62635  *         for idx in range(ndim - 1, -1, -1):
62636  *             strides[idx] = stride             # <<<<<<<<<<<<<<
62637  *             stride *= shape[idx]
62638  *
62639  */
62640       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
62641 
62642       /* "View.MemoryView":1203
62643  *         for idx in range(ndim - 1, -1, -1):
62644  *             strides[idx] = stride
62645  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
62646  *
62647  *     return stride
62648  */
62649       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
62650     }
62651   }
62652   __pyx_L3:;
62653 
62654   /* "View.MemoryView":1205
62655  *             stride *= shape[idx]
62656  *
62657  *     return stride             # <<<<<<<<<<<<<<
62658  *
62659  * @cname('__pyx_memoryview_copy_data_to_temp')
62660  */
62661   __pyx_r = __pyx_v_stride;
62662   goto __pyx_L0;
62663 
62664   /* "View.MemoryView":1187
62665  *
62666  * @cname('__pyx_fill_contig_strides_array')
62667  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
62668  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
62669  *                 int ndim, char order) nogil:
62670  */
62671 
62672   /* function exit code */
62673   __pyx_L0:;
62674   return __pyx_r;
62675 }
62676 
62677 /* "View.MemoryView":1208
62678  *
62679  * @cname('__pyx_memoryview_copy_data_to_temp')
62680  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
62681  *                              __Pyx_memviewslice *tmpslice,
62682  *                              char order,
62683  */
62684 
__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice * __pyx_v_src,__Pyx_memviewslice * __pyx_v_tmpslice,char __pyx_v_order,int __pyx_v_ndim)62685 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
62686   int __pyx_v_i;
62687   void *__pyx_v_result;
62688   size_t __pyx_v_itemsize;
62689   size_t __pyx_v_size;
62690   void *__pyx_r;
62691   Py_ssize_t __pyx_t_1;
62692   int __pyx_t_2;
62693   int __pyx_t_3;
62694   struct __pyx_memoryview_obj *__pyx_t_4;
62695   int __pyx_t_5;
62696   int __pyx_t_6;
62697   int __pyx_lineno = 0;
62698   const char *__pyx_filename = NULL;
62699   int __pyx_clineno = 0;
62700 
62701   /* "View.MemoryView":1219
62702  *     cdef void *result
62703  *
62704  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
62705  *     cdef size_t size = slice_get_size(src, ndim)
62706  *
62707  */
62708   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
62709   __pyx_v_itemsize = __pyx_t_1;
62710 
62711   /* "View.MemoryView":1220
62712  *
62713  *     cdef size_t itemsize = src.memview.view.itemsize
62714  *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
62715  *
62716  *     result = malloc(size)
62717  */
62718   __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
62719 
62720   /* "View.MemoryView":1222
62721  *     cdef size_t size = slice_get_size(src, ndim)
62722  *
62723  *     result = malloc(size)             # <<<<<<<<<<<<<<
62724  *     if not result:
62725  *         _err(MemoryError, NULL)
62726  */
62727   __pyx_v_result = malloc(__pyx_v_size);
62728 
62729   /* "View.MemoryView":1223
62730  *
62731  *     result = malloc(size)
62732  *     if not result:             # <<<<<<<<<<<<<<
62733  *         _err(MemoryError, NULL)
62734  *
62735  */
62736   __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
62737   if (__pyx_t_2) {
62738 
62739     /* "View.MemoryView":1224
62740  *     result = malloc(size)
62741  *     if not result:
62742  *         _err(MemoryError, NULL)             # <<<<<<<<<<<<<<
62743  *
62744  *
62745  */
62746     __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1224, __pyx_L1_error)
62747 
62748     /* "View.MemoryView":1223
62749  *
62750  *     result = malloc(size)
62751  *     if not result:             # <<<<<<<<<<<<<<
62752  *         _err(MemoryError, NULL)
62753  *
62754  */
62755   }
62756 
62757   /* "View.MemoryView":1227
62758  *
62759  *
62760  *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
62761  *     tmpslice.memview = src.memview
62762  *     for i in range(ndim):
62763  */
62764   __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
62765 
62766   /* "View.MemoryView":1228
62767  *
62768  *     tmpslice.data = <char *> result
62769  *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
62770  *     for i in range(ndim):
62771  *         tmpslice.shape[i] = src.shape[i]
62772  */
62773   __pyx_t_4 = __pyx_v_src->memview;
62774   __pyx_v_tmpslice->memview = __pyx_t_4;
62775 
62776   /* "View.MemoryView":1229
62777  *     tmpslice.data = <char *> result
62778  *     tmpslice.memview = src.memview
62779  *     for i in range(ndim):             # <<<<<<<<<<<<<<
62780  *         tmpslice.shape[i] = src.shape[i]
62781  *         tmpslice.suboffsets[i] = -1
62782  */
62783   __pyx_t_3 = __pyx_v_ndim;
62784   __pyx_t_5 = __pyx_t_3;
62785   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
62786     __pyx_v_i = __pyx_t_6;
62787 
62788     /* "View.MemoryView":1230
62789  *     tmpslice.memview = src.memview
62790  *     for i in range(ndim):
62791  *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
62792  *         tmpslice.suboffsets[i] = -1
62793  *
62794  */
62795     (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
62796 
62797     /* "View.MemoryView":1231
62798  *     for i in range(ndim):
62799  *         tmpslice.shape[i] = src.shape[i]
62800  *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
62801  *
62802  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
62803  */
62804     (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
62805   }
62806 
62807   /* "View.MemoryView":1233
62808  *         tmpslice.suboffsets[i] = -1
62809  *
62810  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,             # <<<<<<<<<<<<<<
62811  *                               ndim, order)
62812  *
62813  */
62814   (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
62815 
62816   /* "View.MemoryView":1237
62817  *
62818  *
62819  *     for i in range(ndim):             # <<<<<<<<<<<<<<
62820  *         if tmpslice.shape[i] == 1:
62821  *             tmpslice.strides[i] = 0
62822  */
62823   __pyx_t_3 = __pyx_v_ndim;
62824   __pyx_t_5 = __pyx_t_3;
62825   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
62826     __pyx_v_i = __pyx_t_6;
62827 
62828     /* "View.MemoryView":1238
62829  *
62830  *     for i in range(ndim):
62831  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
62832  *             tmpslice.strides[i] = 0
62833  *
62834  */
62835     __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
62836     if (__pyx_t_2) {
62837 
62838       /* "View.MemoryView":1239
62839  *     for i in range(ndim):
62840  *         if tmpslice.shape[i] == 1:
62841  *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
62842  *
62843  *     if slice_is_contig(src[0], order, ndim):
62844  */
62845       (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
62846 
62847       /* "View.MemoryView":1238
62848  *
62849  *     for i in range(ndim):
62850  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
62851  *             tmpslice.strides[i] = 0
62852  *
62853  */
62854     }
62855   }
62856 
62857   /* "View.MemoryView":1241
62858  *             tmpslice.strides[i] = 0
62859  *
62860  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
62861  *         memcpy(result, src.data, size)
62862  *     else:
62863  */
62864   __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
62865   if (__pyx_t_2) {
62866 
62867     /* "View.MemoryView":1242
62868  *
62869  *     if slice_is_contig(src[0], order, ndim):
62870  *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
62871  *     else:
62872  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
62873  */
62874     (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
62875 
62876     /* "View.MemoryView":1241
62877  *             tmpslice.strides[i] = 0
62878  *
62879  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
62880  *         memcpy(result, src.data, size)
62881  *     else:
62882  */
62883     goto __pyx_L9;
62884   }
62885 
62886   /* "View.MemoryView":1244
62887  *         memcpy(result, src.data, size)
62888  *     else:
62889  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
62890  *
62891  *     return result
62892  */
62893   /*else*/ {
62894     copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
62895   }
62896   __pyx_L9:;
62897 
62898   /* "View.MemoryView":1246
62899  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
62900  *
62901  *     return result             # <<<<<<<<<<<<<<
62902  *
62903  *
62904  */
62905   __pyx_r = __pyx_v_result;
62906   goto __pyx_L0;
62907 
62908   /* "View.MemoryView":1208
62909  *
62910  * @cname('__pyx_memoryview_copy_data_to_temp')
62911  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
62912  *                              __Pyx_memviewslice *tmpslice,
62913  *                              char order,
62914  */
62915 
62916   /* function exit code */
62917   __pyx_L1_error:;
62918   {
62919     #ifdef WITH_THREAD
62920     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
62921     #endif
62922     __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
62923     #ifdef WITH_THREAD
62924     __Pyx_PyGILState_Release(__pyx_gilstate_save);
62925     #endif
62926   }
62927   __pyx_r = NULL;
62928   __pyx_L0:;
62929   return __pyx_r;
62930 }
62931 
62932 /* "View.MemoryView":1251
62933  *
62934  * @cname('__pyx_memoryview_err_extents')
62935  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
62936  *                              Py_ssize_t extent2) except -1 with gil:
62937  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
62938  */
62939 
__pyx_memoryview_err_extents(int __pyx_v_i,Py_ssize_t __pyx_v_extent1,Py_ssize_t __pyx_v_extent2)62940 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
62941   int __pyx_r;
62942   __Pyx_RefNannyDeclarations
62943   PyObject *__pyx_t_1 = NULL;
62944   PyObject *__pyx_t_2 = NULL;
62945   PyObject *__pyx_t_3 = NULL;
62946   PyObject *__pyx_t_4 = NULL;
62947   int __pyx_lineno = 0;
62948   const char *__pyx_filename = NULL;
62949   int __pyx_clineno = 0;
62950   #ifdef WITH_THREAD
62951   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
62952   #endif
62953   __Pyx_RefNannySetupContext("_err_extents", 0);
62954 
62955   /* "View.MemoryView":1254
62956  *                              Py_ssize_t extent2) except -1 with gil:
62957  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
62958  *                                                         (i, extent1, extent2))             # <<<<<<<<<<<<<<
62959  *
62960  * @cname('__pyx_memoryview_err_dim')
62961  */
62962   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1254, __pyx_L1_error)
62963   __Pyx_GOTREF(__pyx_t_1);
62964   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1254, __pyx_L1_error)
62965   __Pyx_GOTREF(__pyx_t_2);
62966   __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1254, __pyx_L1_error)
62967   __Pyx_GOTREF(__pyx_t_3);
62968   __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1254, __pyx_L1_error)
62969   __Pyx_GOTREF(__pyx_t_4);
62970   __Pyx_GIVEREF(__pyx_t_1);
62971   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
62972   __Pyx_GIVEREF(__pyx_t_2);
62973   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
62974   __Pyx_GIVEREF(__pyx_t_3);
62975   PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
62976   __pyx_t_1 = 0;
62977   __pyx_t_2 = 0;
62978   __pyx_t_3 = 0;
62979 
62980   /* "View.MemoryView":1253
62981  * cdef int _err_extents(int i, Py_ssize_t extent1,
62982  *                              Py_ssize_t extent2) except -1 with gil:
62983  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %             # <<<<<<<<<<<<<<
62984  *                                                         (i, extent1, extent2))
62985  *
62986  */
62987   __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1253, __pyx_L1_error)
62988   __Pyx_GOTREF(__pyx_t_3);
62989   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62990   __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1253, __pyx_L1_error)
62991   __Pyx_GOTREF(__pyx_t_4);
62992   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62993   __Pyx_Raise(__pyx_t_4, 0, 0, 0);
62994   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62995   __PYX_ERR(3, 1253, __pyx_L1_error)
62996 
62997   /* "View.MemoryView":1251
62998  *
62999  * @cname('__pyx_memoryview_err_extents')
63000  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
63001  *                              Py_ssize_t extent2) except -1 with gil:
63002  *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
63003  */
63004 
63005   /* function exit code */
63006   __pyx_L1_error:;
63007   __Pyx_XDECREF(__pyx_t_1);
63008   __Pyx_XDECREF(__pyx_t_2);
63009   __Pyx_XDECREF(__pyx_t_3);
63010   __Pyx_XDECREF(__pyx_t_4);
63011   __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
63012   __pyx_r = -1;
63013   __Pyx_RefNannyFinishContext();
63014   #ifdef WITH_THREAD
63015   __Pyx_PyGILState_Release(__pyx_gilstate_save);
63016   #endif
63017   return __pyx_r;
63018 }
63019 
63020 /* "View.MemoryView":1257
63021  *
63022  * @cname('__pyx_memoryview_err_dim')
63023  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
63024  *     raise error(msg.decode('ascii') % dim)
63025  *
63026  */
63027 
__pyx_memoryview_err_dim(PyObject * __pyx_v_error,char * __pyx_v_msg,int __pyx_v_dim)63028 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
63029   int __pyx_r;
63030   __Pyx_RefNannyDeclarations
63031   PyObject *__pyx_t_1 = NULL;
63032   PyObject *__pyx_t_2 = NULL;
63033   PyObject *__pyx_t_3 = NULL;
63034   PyObject *__pyx_t_4 = NULL;
63035   int __pyx_lineno = 0;
63036   const char *__pyx_filename = NULL;
63037   int __pyx_clineno = 0;
63038   #ifdef WITH_THREAD
63039   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
63040   #endif
63041   __Pyx_RefNannySetupContext("_err_dim", 0);
63042   __Pyx_INCREF(__pyx_v_error);
63043 
63044   /* "View.MemoryView":1258
63045  * @cname('__pyx_memoryview_err_dim')
63046  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
63047  *     raise error(msg.decode('ascii') % dim)             # <<<<<<<<<<<<<<
63048  *
63049  * @cname('__pyx_memoryview_err')
63050  */
63051   __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1258, __pyx_L1_error)
63052   __Pyx_GOTREF(__pyx_t_2);
63053   __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1258, __pyx_L1_error)
63054   __Pyx_GOTREF(__pyx_t_3);
63055   __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1258, __pyx_L1_error)
63056   __Pyx_GOTREF(__pyx_t_4);
63057   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63058   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63059   __Pyx_INCREF(__pyx_v_error);
63060   __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
63061   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
63062     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
63063     if (likely(__pyx_t_2)) {
63064       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
63065       __Pyx_INCREF(__pyx_t_2);
63066       __Pyx_INCREF(function);
63067       __Pyx_DECREF_SET(__pyx_t_3, function);
63068     }
63069   }
63070   __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
63071   __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
63072   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63073   if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1258, __pyx_L1_error)
63074   __Pyx_GOTREF(__pyx_t_1);
63075   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63076   __Pyx_Raise(__pyx_t_1, 0, 0, 0);
63077   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63078   __PYX_ERR(3, 1258, __pyx_L1_error)
63079 
63080   /* "View.MemoryView":1257
63081  *
63082  * @cname('__pyx_memoryview_err_dim')
63083  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
63084  *     raise error(msg.decode('ascii') % dim)
63085  *
63086  */
63087 
63088   /* function exit code */
63089   __pyx_L1_error:;
63090   __Pyx_XDECREF(__pyx_t_1);
63091   __Pyx_XDECREF(__pyx_t_2);
63092   __Pyx_XDECREF(__pyx_t_3);
63093   __Pyx_XDECREF(__pyx_t_4);
63094   __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
63095   __pyx_r = -1;
63096   __Pyx_XDECREF(__pyx_v_error);
63097   __Pyx_RefNannyFinishContext();
63098   #ifdef WITH_THREAD
63099   __Pyx_PyGILState_Release(__pyx_gilstate_save);
63100   #endif
63101   return __pyx_r;
63102 }
63103 
63104 /* "View.MemoryView":1261
63105  *
63106  * @cname('__pyx_memoryview_err')
63107  * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
63108  *     if msg != NULL:
63109  *         raise error(msg.decode('ascii'))
63110  */
63111 
__pyx_memoryview_err(PyObject * __pyx_v_error,char * __pyx_v_msg)63112 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
63113   int __pyx_r;
63114   __Pyx_RefNannyDeclarations
63115   int __pyx_t_1;
63116   PyObject *__pyx_t_2 = NULL;
63117   PyObject *__pyx_t_3 = NULL;
63118   PyObject *__pyx_t_4 = NULL;
63119   PyObject *__pyx_t_5 = NULL;
63120   int __pyx_lineno = 0;
63121   const char *__pyx_filename = NULL;
63122   int __pyx_clineno = 0;
63123   #ifdef WITH_THREAD
63124   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
63125   #endif
63126   __Pyx_RefNannySetupContext("_err", 0);
63127   __Pyx_INCREF(__pyx_v_error);
63128 
63129   /* "View.MemoryView":1262
63130  * @cname('__pyx_memoryview_err')
63131  * cdef int _err(object error, char *msg) except -1 with gil:
63132  *     if msg != NULL:             # <<<<<<<<<<<<<<
63133  *         raise error(msg.decode('ascii'))
63134  *     else:
63135  */
63136   __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
63137   if (unlikely(__pyx_t_1)) {
63138 
63139     /* "View.MemoryView":1263
63140  * cdef int _err(object error, char *msg) except -1 with gil:
63141  *     if msg != NULL:
63142  *         raise error(msg.decode('ascii'))             # <<<<<<<<<<<<<<
63143  *     else:
63144  *         raise error
63145  */
63146     __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1263, __pyx_L1_error)
63147     __Pyx_GOTREF(__pyx_t_3);
63148     __Pyx_INCREF(__pyx_v_error);
63149     __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
63150     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
63151       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
63152       if (likely(__pyx_t_5)) {
63153         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
63154         __Pyx_INCREF(__pyx_t_5);
63155         __Pyx_INCREF(function);
63156         __Pyx_DECREF_SET(__pyx_t_4, function);
63157       }
63158     }
63159     __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
63160     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
63161     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63162     if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1263, __pyx_L1_error)
63163     __Pyx_GOTREF(__pyx_t_2);
63164     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63165     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
63166     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63167     __PYX_ERR(3, 1263, __pyx_L1_error)
63168 
63169     /* "View.MemoryView":1262
63170  * @cname('__pyx_memoryview_err')
63171  * cdef int _err(object error, char *msg) except -1 with gil:
63172  *     if msg != NULL:             # <<<<<<<<<<<<<<
63173  *         raise error(msg.decode('ascii'))
63174  *     else:
63175  */
63176   }
63177 
63178   /* "View.MemoryView":1265
63179  *         raise error(msg.decode('ascii'))
63180  *     else:
63181  *         raise error             # <<<<<<<<<<<<<<
63182  *
63183  * @cname('__pyx_memoryview_copy_contents')
63184  */
63185   /*else*/ {
63186     __Pyx_Raise(__pyx_v_error, 0, 0, 0);
63187     __PYX_ERR(3, 1265, __pyx_L1_error)
63188   }
63189 
63190   /* "View.MemoryView":1261
63191  *
63192  * @cname('__pyx_memoryview_err')
63193  * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
63194  *     if msg != NULL:
63195  *         raise error(msg.decode('ascii'))
63196  */
63197 
63198   /* function exit code */
63199   __pyx_L1_error:;
63200   __Pyx_XDECREF(__pyx_t_2);
63201   __Pyx_XDECREF(__pyx_t_3);
63202   __Pyx_XDECREF(__pyx_t_4);
63203   __Pyx_XDECREF(__pyx_t_5);
63204   __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
63205   __pyx_r = -1;
63206   __Pyx_XDECREF(__pyx_v_error);
63207   __Pyx_RefNannyFinishContext();
63208   #ifdef WITH_THREAD
63209   __Pyx_PyGILState_Release(__pyx_gilstate_save);
63210   #endif
63211   return __pyx_r;
63212 }
63213 
63214 /* "View.MemoryView":1268
63215  *
63216  * @cname('__pyx_memoryview_copy_contents')
63217  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
63218  *                                   __Pyx_memviewslice dst,
63219  *                                   int src_ndim, int dst_ndim,
63220  */
63221 
__pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src,__Pyx_memviewslice __pyx_v_dst,int __pyx_v_src_ndim,int __pyx_v_dst_ndim,int __pyx_v_dtype_is_object)63222 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
63223   void *__pyx_v_tmpdata;
63224   size_t __pyx_v_itemsize;
63225   int __pyx_v_i;
63226   char __pyx_v_order;
63227   int __pyx_v_broadcasting;
63228   int __pyx_v_direct_copy;
63229   __Pyx_memviewslice __pyx_v_tmp;
63230   int __pyx_v_ndim;
63231   int __pyx_r;
63232   Py_ssize_t __pyx_t_1;
63233   int __pyx_t_2;
63234   int __pyx_t_3;
63235   int __pyx_t_4;
63236   int __pyx_t_5;
63237   int __pyx_t_6;
63238   void *__pyx_t_7;
63239   int __pyx_t_8;
63240   int __pyx_lineno = 0;
63241   const char *__pyx_filename = NULL;
63242   int __pyx_clineno = 0;
63243 
63244   /* "View.MemoryView":1276
63245  *     Check for overlapping memory and verify the shapes.
63246  *     """
63247  *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
63248  *     cdef size_t itemsize = src.memview.view.itemsize
63249  *     cdef int i
63250  */
63251   __pyx_v_tmpdata = NULL;
63252 
63253   /* "View.MemoryView":1277
63254  *     """
63255  *     cdef void *tmpdata = NULL
63256  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
63257  *     cdef int i
63258  *     cdef char order = get_best_order(&src, src_ndim)
63259  */
63260   __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
63261   __pyx_v_itemsize = __pyx_t_1;
63262 
63263   /* "View.MemoryView":1279
63264  *     cdef size_t itemsize = src.memview.view.itemsize
63265  *     cdef int i
63266  *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
63267  *     cdef bint broadcasting = False
63268  *     cdef bint direct_copy = False
63269  */
63270   __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
63271 
63272   /* "View.MemoryView":1280
63273  *     cdef int i
63274  *     cdef char order = get_best_order(&src, src_ndim)
63275  *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
63276  *     cdef bint direct_copy = False
63277  *     cdef __Pyx_memviewslice tmp
63278  */
63279   __pyx_v_broadcasting = 0;
63280 
63281   /* "View.MemoryView":1281
63282  *     cdef char order = get_best_order(&src, src_ndim)
63283  *     cdef bint broadcasting = False
63284  *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
63285  *     cdef __Pyx_memviewslice tmp
63286  *
63287  */
63288   __pyx_v_direct_copy = 0;
63289 
63290   /* "View.MemoryView":1284
63291  *     cdef __Pyx_memviewslice tmp
63292  *
63293  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
63294  *         broadcast_leading(&src, src_ndim, dst_ndim)
63295  *     elif dst_ndim < src_ndim:
63296  */
63297   __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
63298   if (__pyx_t_2) {
63299 
63300     /* "View.MemoryView":1285
63301  *
63302  *     if src_ndim < dst_ndim:
63303  *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
63304  *     elif dst_ndim < src_ndim:
63305  *         broadcast_leading(&dst, dst_ndim, src_ndim)
63306  */
63307     __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
63308 
63309     /* "View.MemoryView":1284
63310  *     cdef __Pyx_memviewslice tmp
63311  *
63312  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
63313  *         broadcast_leading(&src, src_ndim, dst_ndim)
63314  *     elif dst_ndim < src_ndim:
63315  */
63316     goto __pyx_L3;
63317   }
63318 
63319   /* "View.MemoryView":1286
63320  *     if src_ndim < dst_ndim:
63321  *         broadcast_leading(&src, src_ndim, dst_ndim)
63322  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
63323  *         broadcast_leading(&dst, dst_ndim, src_ndim)
63324  *
63325  */
63326   __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
63327   if (__pyx_t_2) {
63328 
63329     /* "View.MemoryView":1287
63330  *         broadcast_leading(&src, src_ndim, dst_ndim)
63331  *     elif dst_ndim < src_ndim:
63332  *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
63333  *
63334  *     cdef int ndim = max(src_ndim, dst_ndim)
63335  */
63336     __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
63337 
63338     /* "View.MemoryView":1286
63339  *     if src_ndim < dst_ndim:
63340  *         broadcast_leading(&src, src_ndim, dst_ndim)
63341  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
63342  *         broadcast_leading(&dst, dst_ndim, src_ndim)
63343  *
63344  */
63345   }
63346   __pyx_L3:;
63347 
63348   /* "View.MemoryView":1289
63349  *         broadcast_leading(&dst, dst_ndim, src_ndim)
63350  *
63351  *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
63352  *
63353  *     for i in range(ndim):
63354  */
63355   __pyx_t_3 = __pyx_v_dst_ndim;
63356   __pyx_t_4 = __pyx_v_src_ndim;
63357   if (((__pyx_t_3 > __pyx_t_4) != 0)) {
63358     __pyx_t_5 = __pyx_t_3;
63359   } else {
63360     __pyx_t_5 = __pyx_t_4;
63361   }
63362   __pyx_v_ndim = __pyx_t_5;
63363 
63364   /* "View.MemoryView":1291
63365  *     cdef int ndim = max(src_ndim, dst_ndim)
63366  *
63367  *     for i in range(ndim):             # <<<<<<<<<<<<<<
63368  *         if src.shape[i] != dst.shape[i]:
63369  *             if src.shape[i] == 1:
63370  */
63371   __pyx_t_5 = __pyx_v_ndim;
63372   __pyx_t_3 = __pyx_t_5;
63373   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
63374     __pyx_v_i = __pyx_t_4;
63375 
63376     /* "View.MemoryView":1292
63377  *
63378  *     for i in range(ndim):
63379  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
63380  *             if src.shape[i] == 1:
63381  *                 broadcasting = True
63382  */
63383     __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
63384     if (__pyx_t_2) {
63385 
63386       /* "View.MemoryView":1293
63387  *     for i in range(ndim):
63388  *         if src.shape[i] != dst.shape[i]:
63389  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
63390  *                 broadcasting = True
63391  *                 src.strides[i] = 0
63392  */
63393       __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
63394       if (__pyx_t_2) {
63395 
63396         /* "View.MemoryView":1294
63397  *         if src.shape[i] != dst.shape[i]:
63398  *             if src.shape[i] == 1:
63399  *                 broadcasting = True             # <<<<<<<<<<<<<<
63400  *                 src.strides[i] = 0
63401  *             else:
63402  */
63403         __pyx_v_broadcasting = 1;
63404 
63405         /* "View.MemoryView":1295
63406  *             if src.shape[i] == 1:
63407  *                 broadcasting = True
63408  *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
63409  *             else:
63410  *                 _err_extents(i, dst.shape[i], src.shape[i])
63411  */
63412         (__pyx_v_src.strides[__pyx_v_i]) = 0;
63413 
63414         /* "View.MemoryView":1293
63415  *     for i in range(ndim):
63416  *         if src.shape[i] != dst.shape[i]:
63417  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
63418  *                 broadcasting = True
63419  *                 src.strides[i] = 0
63420  */
63421         goto __pyx_L7;
63422       }
63423 
63424       /* "View.MemoryView":1297
63425  *                 src.strides[i] = 0
63426  *             else:
63427  *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
63428  *
63429  *         if src.suboffsets[i] >= 0:
63430  */
63431       /*else*/ {
63432         __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 1297, __pyx_L1_error)
63433       }
63434       __pyx_L7:;
63435 
63436       /* "View.MemoryView":1292
63437  *
63438  *     for i in range(ndim):
63439  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
63440  *             if src.shape[i] == 1:
63441  *                 broadcasting = True
63442  */
63443     }
63444 
63445     /* "View.MemoryView":1299
63446  *                 _err_extents(i, dst.shape[i], src.shape[i])
63447  *
63448  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
63449  *             _err_dim(ValueError, "Dimension %d is not direct", i)
63450  *
63451  */
63452     __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
63453     if (__pyx_t_2) {
63454 
63455       /* "View.MemoryView":1300
63456  *
63457  *         if src.suboffsets[i] >= 0:
63458  *             _err_dim(ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
63459  *
63460  *     if slices_overlap(&src, &dst, ndim, itemsize):
63461  */
63462       __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(3, 1300, __pyx_L1_error)
63463 
63464       /* "View.MemoryView":1299
63465  *                 _err_extents(i, dst.shape[i], src.shape[i])
63466  *
63467  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
63468  *             _err_dim(ValueError, "Dimension %d is not direct", i)
63469  *
63470  */
63471     }
63472   }
63473 
63474   /* "View.MemoryView":1302
63475  *             _err_dim(ValueError, "Dimension %d is not direct", i)
63476  *
63477  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
63478  *
63479  *         if not slice_is_contig(src, order, ndim):
63480  */
63481   __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
63482   if (__pyx_t_2) {
63483 
63484     /* "View.MemoryView":1304
63485  *     if slices_overlap(&src, &dst, ndim, itemsize):
63486  *
63487  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
63488  *             order = get_best_order(&dst, ndim)
63489  *
63490  */
63491     __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
63492     if (__pyx_t_2) {
63493 
63494       /* "View.MemoryView":1305
63495  *
63496  *         if not slice_is_contig(src, order, ndim):
63497  *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
63498  *
63499  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
63500  */
63501       __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
63502 
63503       /* "View.MemoryView":1304
63504  *     if slices_overlap(&src, &dst, ndim, itemsize):
63505  *
63506  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
63507  *             order = get_best_order(&dst, ndim)
63508  *
63509  */
63510     }
63511 
63512     /* "View.MemoryView":1307
63513  *             order = get_best_order(&dst, ndim)
63514  *
63515  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
63516  *         src = tmp
63517  *
63518  */
63519     __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(3, 1307, __pyx_L1_error)
63520     __pyx_v_tmpdata = __pyx_t_7;
63521 
63522     /* "View.MemoryView":1308
63523  *
63524  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
63525  *         src = tmp             # <<<<<<<<<<<<<<
63526  *
63527  *     if not broadcasting:
63528  */
63529     __pyx_v_src = __pyx_v_tmp;
63530 
63531     /* "View.MemoryView":1302
63532  *             _err_dim(ValueError, "Dimension %d is not direct", i)
63533  *
63534  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
63535  *
63536  *         if not slice_is_contig(src, order, ndim):
63537  */
63538   }
63539 
63540   /* "View.MemoryView":1310
63541  *         src = tmp
63542  *
63543  *     if not broadcasting:             # <<<<<<<<<<<<<<
63544  *
63545  *
63546  */
63547   __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
63548   if (__pyx_t_2) {
63549 
63550     /* "View.MemoryView":1313
63551  *
63552  *
63553  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
63554  *             direct_copy = slice_is_contig(dst, 'C', ndim)
63555  *         elif slice_is_contig(src, 'F', ndim):
63556  */
63557     __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
63558     if (__pyx_t_2) {
63559 
63560       /* "View.MemoryView":1314
63561  *
63562  *         if slice_is_contig(src, 'C', ndim):
63563  *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
63564  *         elif slice_is_contig(src, 'F', ndim):
63565  *             direct_copy = slice_is_contig(dst, 'F', ndim)
63566  */
63567       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
63568 
63569       /* "View.MemoryView":1313
63570  *
63571  *
63572  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
63573  *             direct_copy = slice_is_contig(dst, 'C', ndim)
63574  *         elif slice_is_contig(src, 'F', ndim):
63575  */
63576       goto __pyx_L12;
63577     }
63578 
63579     /* "View.MemoryView":1315
63580  *         if slice_is_contig(src, 'C', ndim):
63581  *             direct_copy = slice_is_contig(dst, 'C', ndim)
63582  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
63583  *             direct_copy = slice_is_contig(dst, 'F', ndim)
63584  *
63585  */
63586     __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
63587     if (__pyx_t_2) {
63588 
63589       /* "View.MemoryView":1316
63590  *             direct_copy = slice_is_contig(dst, 'C', ndim)
63591  *         elif slice_is_contig(src, 'F', ndim):
63592  *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
63593  *
63594  *         if direct_copy:
63595  */
63596       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
63597 
63598       /* "View.MemoryView":1315
63599  *         if slice_is_contig(src, 'C', ndim):
63600  *             direct_copy = slice_is_contig(dst, 'C', ndim)
63601  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
63602  *             direct_copy = slice_is_contig(dst, 'F', ndim)
63603  *
63604  */
63605     }
63606     __pyx_L12:;
63607 
63608     /* "View.MemoryView":1318
63609  *             direct_copy = slice_is_contig(dst, 'F', ndim)
63610  *
63611  *         if direct_copy:             # <<<<<<<<<<<<<<
63612  *
63613  *             refcount_copying(&dst, dtype_is_object, ndim, False)
63614  */
63615     __pyx_t_2 = (__pyx_v_direct_copy != 0);
63616     if (__pyx_t_2) {
63617 
63618       /* "View.MemoryView":1320
63619  *         if direct_copy:
63620  *
63621  *             refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
63622  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
63623  *             refcount_copying(&dst, dtype_is_object, ndim, True)
63624  */
63625       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
63626 
63627       /* "View.MemoryView":1321
63628  *
63629  *             refcount_copying(&dst, dtype_is_object, ndim, False)
63630  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
63631  *             refcount_copying(&dst, dtype_is_object, ndim, True)
63632  *             free(tmpdata)
63633  */
63634       (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
63635 
63636       /* "View.MemoryView":1322
63637  *             refcount_copying(&dst, dtype_is_object, ndim, False)
63638  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
63639  *             refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
63640  *             free(tmpdata)
63641  *             return 0
63642  */
63643       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
63644 
63645       /* "View.MemoryView":1323
63646  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
63647  *             refcount_copying(&dst, dtype_is_object, ndim, True)
63648  *             free(tmpdata)             # <<<<<<<<<<<<<<
63649  *             return 0
63650  *
63651  */
63652       free(__pyx_v_tmpdata);
63653 
63654       /* "View.MemoryView":1324
63655  *             refcount_copying(&dst, dtype_is_object, ndim, True)
63656  *             free(tmpdata)
63657  *             return 0             # <<<<<<<<<<<<<<
63658  *
63659  *     if order == 'F' == get_best_order(&dst, ndim):
63660  */
63661       __pyx_r = 0;
63662       goto __pyx_L0;
63663 
63664       /* "View.MemoryView":1318
63665  *             direct_copy = slice_is_contig(dst, 'F', ndim)
63666  *
63667  *         if direct_copy:             # <<<<<<<<<<<<<<
63668  *
63669  *             refcount_copying(&dst, dtype_is_object, ndim, False)
63670  */
63671     }
63672 
63673     /* "View.MemoryView":1310
63674  *         src = tmp
63675  *
63676  *     if not broadcasting:             # <<<<<<<<<<<<<<
63677  *
63678  *
63679  */
63680   }
63681 
63682   /* "View.MemoryView":1326
63683  *             return 0
63684  *
63685  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
63686  *
63687  *
63688  */
63689   __pyx_t_2 = (__pyx_v_order == 'F');
63690   if (__pyx_t_2) {
63691     __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
63692   }
63693   __pyx_t_8 = (__pyx_t_2 != 0);
63694   if (__pyx_t_8) {
63695 
63696     /* "View.MemoryView":1329
63697  *
63698  *
63699  *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
63700  *         transpose_memslice(&dst)
63701  *
63702  */
63703     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(3, 1329, __pyx_L1_error)
63704 
63705     /* "View.MemoryView":1330
63706  *
63707  *         transpose_memslice(&src)
63708  *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
63709  *
63710  *     refcount_copying(&dst, dtype_is_object, ndim, False)
63711  */
63712     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(3, 1330, __pyx_L1_error)
63713 
63714     /* "View.MemoryView":1326
63715  *             return 0
63716  *
63717  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
63718  *
63719  *
63720  */
63721   }
63722 
63723   /* "View.MemoryView":1332
63724  *         transpose_memslice(&dst)
63725  *
63726  *     refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
63727  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
63728  *     refcount_copying(&dst, dtype_is_object, ndim, True)
63729  */
63730   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
63731 
63732   /* "View.MemoryView":1333
63733  *
63734  *     refcount_copying(&dst, dtype_is_object, ndim, False)
63735  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
63736  *     refcount_copying(&dst, dtype_is_object, ndim, True)
63737  *
63738  */
63739   copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
63740 
63741   /* "View.MemoryView":1334
63742  *     refcount_copying(&dst, dtype_is_object, ndim, False)
63743  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
63744  *     refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
63745  *
63746  *     free(tmpdata)
63747  */
63748   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
63749 
63750   /* "View.MemoryView":1336
63751  *     refcount_copying(&dst, dtype_is_object, ndim, True)
63752  *
63753  *     free(tmpdata)             # <<<<<<<<<<<<<<
63754  *     return 0
63755  *
63756  */
63757   free(__pyx_v_tmpdata);
63758 
63759   /* "View.MemoryView":1337
63760  *
63761  *     free(tmpdata)
63762  *     return 0             # <<<<<<<<<<<<<<
63763  *
63764  * @cname('__pyx_memoryview_broadcast_leading')
63765  */
63766   __pyx_r = 0;
63767   goto __pyx_L0;
63768 
63769   /* "View.MemoryView":1268
63770  *
63771  * @cname('__pyx_memoryview_copy_contents')
63772  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
63773  *                                   __Pyx_memviewslice dst,
63774  *                                   int src_ndim, int dst_ndim,
63775  */
63776 
63777   /* function exit code */
63778   __pyx_L1_error:;
63779   {
63780     #ifdef WITH_THREAD
63781     PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
63782     #endif
63783     __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
63784     #ifdef WITH_THREAD
63785     __Pyx_PyGILState_Release(__pyx_gilstate_save);
63786     #endif
63787   }
63788   __pyx_r = -1;
63789   __pyx_L0:;
63790   return __pyx_r;
63791 }
63792 
63793 /* "View.MemoryView":1340
63794  *
63795  * @cname('__pyx_memoryview_broadcast_leading')
63796  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
63797  *                             int ndim,
63798  *                             int ndim_other) nogil:
63799  */
63800 
__pyx_memoryview_broadcast_leading(__Pyx_memviewslice * __pyx_v_mslice,int __pyx_v_ndim,int __pyx_v_ndim_other)63801 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
63802   int __pyx_v_i;
63803   int __pyx_v_offset;
63804   int __pyx_t_1;
63805   int __pyx_t_2;
63806   int __pyx_t_3;
63807 
63808   /* "View.MemoryView":1344
63809  *                             int ndim_other) nogil:
63810  *     cdef int i
63811  *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
63812  *
63813  *     for i in range(ndim - 1, -1, -1):
63814  */
63815   __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
63816 
63817   /* "View.MemoryView":1346
63818  *     cdef int offset = ndim_other - ndim
63819  *
63820  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
63821  *         mslice.shape[i + offset] = mslice.shape[i]
63822  *         mslice.strides[i + offset] = mslice.strides[i]
63823  */
63824   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
63825     __pyx_v_i = __pyx_t_1;
63826 
63827     /* "View.MemoryView":1347
63828  *
63829  *     for i in range(ndim - 1, -1, -1):
63830  *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
63831  *         mslice.strides[i + offset] = mslice.strides[i]
63832  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
63833  */
63834     (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
63835 
63836     /* "View.MemoryView":1348
63837  *     for i in range(ndim - 1, -1, -1):
63838  *         mslice.shape[i + offset] = mslice.shape[i]
63839  *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
63840  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
63841  *
63842  */
63843     (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
63844 
63845     /* "View.MemoryView":1349
63846  *         mslice.shape[i + offset] = mslice.shape[i]
63847  *         mslice.strides[i + offset] = mslice.strides[i]
63848  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
63849  *
63850  *     for i in range(offset):
63851  */
63852     (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
63853   }
63854 
63855   /* "View.MemoryView":1351
63856  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
63857  *
63858  *     for i in range(offset):             # <<<<<<<<<<<<<<
63859  *         mslice.shape[i] = 1
63860  *         mslice.strides[i] = mslice.strides[0]
63861  */
63862   __pyx_t_1 = __pyx_v_offset;
63863   __pyx_t_2 = __pyx_t_1;
63864   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
63865     __pyx_v_i = __pyx_t_3;
63866 
63867     /* "View.MemoryView":1352
63868  *
63869  *     for i in range(offset):
63870  *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
63871  *         mslice.strides[i] = mslice.strides[0]
63872  *         mslice.suboffsets[i] = -1
63873  */
63874     (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
63875 
63876     /* "View.MemoryView":1353
63877  *     for i in range(offset):
63878  *         mslice.shape[i] = 1
63879  *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
63880  *         mslice.suboffsets[i] = -1
63881  *
63882  */
63883     (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
63884 
63885     /* "View.MemoryView":1354
63886  *         mslice.shape[i] = 1
63887  *         mslice.strides[i] = mslice.strides[0]
63888  *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
63889  *
63890  *
63891  */
63892     (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
63893   }
63894 
63895   /* "View.MemoryView":1340
63896  *
63897  * @cname('__pyx_memoryview_broadcast_leading')
63898  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
63899  *                             int ndim,
63900  *                             int ndim_other) nogil:
63901  */
63902 
63903   /* function exit code */
63904 }
63905 
63906 /* "View.MemoryView":1362
63907  *
63908  * @cname('__pyx_memoryview_refcount_copying')
63909  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
63910  *                            int ndim, bint inc) nogil:
63911  *
63912  */
63913 
__pyx_memoryview_refcount_copying(__Pyx_memviewslice * __pyx_v_dst,int __pyx_v_dtype_is_object,int __pyx_v_ndim,int __pyx_v_inc)63914 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
63915   int __pyx_t_1;
63916 
63917   /* "View.MemoryView":1366
63918  *
63919  *
63920  *     if dtype_is_object:             # <<<<<<<<<<<<<<
63921  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
63922  *                                            dst.strides, ndim, inc)
63923  */
63924   __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
63925   if (__pyx_t_1) {
63926 
63927     /* "View.MemoryView":1367
63928  *
63929  *     if dtype_is_object:
63930  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,             # <<<<<<<<<<<<<<
63931  *                                            dst.strides, ndim, inc)
63932  *
63933  */
63934     __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
63935 
63936     /* "View.MemoryView":1366
63937  *
63938  *
63939  *     if dtype_is_object:             # <<<<<<<<<<<<<<
63940  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
63941  *                                            dst.strides, ndim, inc)
63942  */
63943   }
63944 
63945   /* "View.MemoryView":1362
63946  *
63947  * @cname('__pyx_memoryview_refcount_copying')
63948  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
63949  *                            int ndim, bint inc) nogil:
63950  *
63951  */
63952 
63953   /* function exit code */
63954 }
63955 
63956 /* "View.MemoryView":1371
63957  *
63958  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
63959  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
63960  *                                              Py_ssize_t *strides, int ndim,
63961  *                                              bint inc) with gil:
63962  */
63963 
__pyx_memoryview_refcount_objects_in_slice_with_gil(char * __pyx_v_data,Py_ssize_t * __pyx_v_shape,Py_ssize_t * __pyx_v_strides,int __pyx_v_ndim,int __pyx_v_inc)63964 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
63965   __Pyx_RefNannyDeclarations
63966   #ifdef WITH_THREAD
63967   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
63968   #endif
63969   __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
63970 
63971   /* "View.MemoryView":1374
63972  *                                              Py_ssize_t *strides, int ndim,
63973  *                                              bint inc) with gil:
63974  *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
63975  *
63976  * @cname('__pyx_memoryview_refcount_objects_in_slice')
63977  */
63978   __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
63979 
63980   /* "View.MemoryView":1371
63981  *
63982  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
63983  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
63984  *                                              Py_ssize_t *strides, int ndim,
63985  *                                              bint inc) with gil:
63986  */
63987 
63988   /* function exit code */
63989   __Pyx_RefNannyFinishContext();
63990   #ifdef WITH_THREAD
63991   __Pyx_PyGILState_Release(__pyx_gilstate_save);
63992   #endif
63993 }
63994 
63995 /* "View.MemoryView":1377
63996  *
63997  * @cname('__pyx_memoryview_refcount_objects_in_slice')
63998  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
63999  *                                     Py_ssize_t *strides, int ndim, bint inc):
64000  *     cdef Py_ssize_t i
64001  */
64002 
__pyx_memoryview_refcount_objects_in_slice(char * __pyx_v_data,Py_ssize_t * __pyx_v_shape,Py_ssize_t * __pyx_v_strides,int __pyx_v_ndim,int __pyx_v_inc)64003 static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
64004   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
64005   __Pyx_RefNannyDeclarations
64006   Py_ssize_t __pyx_t_1;
64007   Py_ssize_t __pyx_t_2;
64008   Py_ssize_t __pyx_t_3;
64009   int __pyx_t_4;
64010   __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
64011 
64012   /* "View.MemoryView":1381
64013  *     cdef Py_ssize_t i
64014  *
64015  *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
64016  *         if ndim == 1:
64017  *             if inc:
64018  */
64019   __pyx_t_1 = (__pyx_v_shape[0]);
64020   __pyx_t_2 = __pyx_t_1;
64021   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
64022     __pyx_v_i = __pyx_t_3;
64023 
64024     /* "View.MemoryView":1382
64025  *
64026  *     for i in range(shape[0]):
64027  *         if ndim == 1:             # <<<<<<<<<<<<<<
64028  *             if inc:
64029  *                 Py_INCREF((<PyObject **> data)[0])
64030  */
64031     __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
64032     if (__pyx_t_4) {
64033 
64034       /* "View.MemoryView":1383
64035  *     for i in range(shape[0]):
64036  *         if ndim == 1:
64037  *             if inc:             # <<<<<<<<<<<<<<
64038  *                 Py_INCREF((<PyObject **> data)[0])
64039  *             else:
64040  */
64041       __pyx_t_4 = (__pyx_v_inc != 0);
64042       if (__pyx_t_4) {
64043 
64044         /* "View.MemoryView":1384
64045  *         if ndim == 1:
64046  *             if inc:
64047  *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
64048  *             else:
64049  *                 Py_DECREF((<PyObject **> data)[0])
64050  */
64051         Py_INCREF((((PyObject **)__pyx_v_data)[0]));
64052 
64053         /* "View.MemoryView":1383
64054  *     for i in range(shape[0]):
64055  *         if ndim == 1:
64056  *             if inc:             # <<<<<<<<<<<<<<
64057  *                 Py_INCREF((<PyObject **> data)[0])
64058  *             else:
64059  */
64060         goto __pyx_L6;
64061       }
64062 
64063       /* "View.MemoryView":1386
64064  *                 Py_INCREF((<PyObject **> data)[0])
64065  *             else:
64066  *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
64067  *         else:
64068  *             refcount_objects_in_slice(data, shape + 1, strides + 1,
64069  */
64070       /*else*/ {
64071         Py_DECREF((((PyObject **)__pyx_v_data)[0]));
64072       }
64073       __pyx_L6:;
64074 
64075       /* "View.MemoryView":1382
64076  *
64077  *     for i in range(shape[0]):
64078  *         if ndim == 1:             # <<<<<<<<<<<<<<
64079  *             if inc:
64080  *                 Py_INCREF((<PyObject **> data)[0])
64081  */
64082       goto __pyx_L5;
64083     }
64084 
64085     /* "View.MemoryView":1388
64086  *                 Py_DECREF((<PyObject **> data)[0])
64087  *         else:
64088  *             refcount_objects_in_slice(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
64089  *                                       ndim - 1, inc)
64090  *
64091  */
64092     /*else*/ {
64093 
64094       /* "View.MemoryView":1389
64095  *         else:
64096  *             refcount_objects_in_slice(data, shape + 1, strides + 1,
64097  *                                       ndim - 1, inc)             # <<<<<<<<<<<<<<
64098  *
64099  *         data += strides[0]
64100  */
64101       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
64102     }
64103     __pyx_L5:;
64104 
64105     /* "View.MemoryView":1391
64106  *                                       ndim - 1, inc)
64107  *
64108  *         data += strides[0]             # <<<<<<<<<<<<<<
64109  *
64110  *
64111  */
64112     __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
64113   }
64114 
64115   /* "View.MemoryView":1377
64116  *
64117  * @cname('__pyx_memoryview_refcount_objects_in_slice')
64118  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
64119  *                                     Py_ssize_t *strides, int ndim, bint inc):
64120  *     cdef Py_ssize_t i
64121  */
64122 
64123   /* function exit code */
64124   __Pyx_RefNannyFinishContext();
64125 }
64126 
64127 /* "View.MemoryView":1397
64128  *
64129  * @cname('__pyx_memoryview_slice_assign_scalar')
64130  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
64131  *                               size_t itemsize, void *item,
64132  *                               bint dtype_is_object) nogil:
64133  */
64134 
__pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice * __pyx_v_dst,int __pyx_v_ndim,size_t __pyx_v_itemsize,void * __pyx_v_item,int __pyx_v_dtype_is_object)64135 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
64136 
64137   /* "View.MemoryView":1400
64138  *                               size_t itemsize, void *item,
64139  *                               bint dtype_is_object) nogil:
64140  *     refcount_copying(dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
64141  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
64142  *                          itemsize, item)
64143  */
64144   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
64145 
64146   /* "View.MemoryView":1401
64147  *                               bint dtype_is_object) nogil:
64148  *     refcount_copying(dst, dtype_is_object, ndim, False)
64149  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,             # <<<<<<<<<<<<<<
64150  *                          itemsize, item)
64151  *     refcount_copying(dst, dtype_is_object, ndim, True)
64152  */
64153   __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
64154 
64155   /* "View.MemoryView":1403
64156  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
64157  *                          itemsize, item)
64158  *     refcount_copying(dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
64159  *
64160  *
64161  */
64162   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
64163 
64164   /* "View.MemoryView":1397
64165  *
64166  * @cname('__pyx_memoryview_slice_assign_scalar')
64167  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
64168  *                               size_t itemsize, void *item,
64169  *                               bint dtype_is_object) nogil:
64170  */
64171 
64172   /* function exit code */
64173 }
64174 
64175 /* "View.MemoryView":1407
64176  *
64177  * @cname('__pyx_memoryview__slice_assign_scalar')
64178  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
64179  *                               Py_ssize_t *strides, int ndim,
64180  *                               size_t itemsize, void *item) nogil:
64181  */
64182 
__pyx_memoryview__slice_assign_scalar(char * __pyx_v_data,Py_ssize_t * __pyx_v_shape,Py_ssize_t * __pyx_v_strides,int __pyx_v_ndim,size_t __pyx_v_itemsize,void * __pyx_v_item)64183 static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
64184   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
64185   Py_ssize_t __pyx_v_stride;
64186   Py_ssize_t __pyx_v_extent;
64187   int __pyx_t_1;
64188   Py_ssize_t __pyx_t_2;
64189   Py_ssize_t __pyx_t_3;
64190   Py_ssize_t __pyx_t_4;
64191 
64192   /* "View.MemoryView":1411
64193  *                               size_t itemsize, void *item) nogil:
64194  *     cdef Py_ssize_t i
64195  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
64196  *     cdef Py_ssize_t extent = shape[0]
64197  *
64198  */
64199   __pyx_v_stride = (__pyx_v_strides[0]);
64200 
64201   /* "View.MemoryView":1412
64202  *     cdef Py_ssize_t i
64203  *     cdef Py_ssize_t stride = strides[0]
64204  *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
64205  *
64206  *     if ndim == 1:
64207  */
64208   __pyx_v_extent = (__pyx_v_shape[0]);
64209 
64210   /* "View.MemoryView":1414
64211  *     cdef Py_ssize_t extent = shape[0]
64212  *
64213  *     if ndim == 1:             # <<<<<<<<<<<<<<
64214  *         for i in range(extent):
64215  *             memcpy(data, item, itemsize)
64216  */
64217   __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
64218   if (__pyx_t_1) {
64219 
64220     /* "View.MemoryView":1415
64221  *
64222  *     if ndim == 1:
64223  *         for i in range(extent):             # <<<<<<<<<<<<<<
64224  *             memcpy(data, item, itemsize)
64225  *             data += stride
64226  */
64227     __pyx_t_2 = __pyx_v_extent;
64228     __pyx_t_3 = __pyx_t_2;
64229     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
64230       __pyx_v_i = __pyx_t_4;
64231 
64232       /* "View.MemoryView":1416
64233  *     if ndim == 1:
64234  *         for i in range(extent):
64235  *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
64236  *             data += stride
64237  *     else:
64238  */
64239       (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
64240 
64241       /* "View.MemoryView":1417
64242  *         for i in range(extent):
64243  *             memcpy(data, item, itemsize)
64244  *             data += stride             # <<<<<<<<<<<<<<
64245  *     else:
64246  *         for i in range(extent):
64247  */
64248       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
64249     }
64250 
64251     /* "View.MemoryView":1414
64252  *     cdef Py_ssize_t extent = shape[0]
64253  *
64254  *     if ndim == 1:             # <<<<<<<<<<<<<<
64255  *         for i in range(extent):
64256  *             memcpy(data, item, itemsize)
64257  */
64258     goto __pyx_L3;
64259   }
64260 
64261   /* "View.MemoryView":1419
64262  *             data += stride
64263  *     else:
64264  *         for i in range(extent):             # <<<<<<<<<<<<<<
64265  *             _slice_assign_scalar(data, shape + 1, strides + 1,
64266  *                                 ndim - 1, itemsize, item)
64267  */
64268   /*else*/ {
64269     __pyx_t_2 = __pyx_v_extent;
64270     __pyx_t_3 = __pyx_t_2;
64271     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
64272       __pyx_v_i = __pyx_t_4;
64273 
64274       /* "View.MemoryView":1420
64275  *     else:
64276  *         for i in range(extent):
64277  *             _slice_assign_scalar(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
64278  *                                 ndim - 1, itemsize, item)
64279  *             data += stride
64280  */
64281       __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
64282 
64283       /* "View.MemoryView":1422
64284  *             _slice_assign_scalar(data, shape + 1, strides + 1,
64285  *                                 ndim - 1, itemsize, item)
64286  *             data += stride             # <<<<<<<<<<<<<<
64287  *
64288  *
64289  */
64290       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
64291     }
64292   }
64293   __pyx_L3:;
64294 
64295   /* "View.MemoryView":1407
64296  *
64297  * @cname('__pyx_memoryview__slice_assign_scalar')
64298  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
64299  *                               Py_ssize_t *strides, int ndim,
64300  *                               size_t itemsize, void *item) nogil:
64301  */
64302 
64303   /* function exit code */
64304 }
64305 
64306 /* "(tree fragment)":1
64307  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
64308  *     cdef object __pyx_PickleError
64309  *     cdef object __pyx_result
64310  */
64311 
64312 /* Python wrapper */
64313 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
64314 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject * __pyx_self,PyObject * __pyx_args,PyObject * __pyx_kwds)64315 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
64316   PyObject *__pyx_v___pyx_type = 0;
64317   long __pyx_v___pyx_checksum;
64318   PyObject *__pyx_v___pyx_state = 0;
64319   int __pyx_lineno = 0;
64320   const char *__pyx_filename = NULL;
64321   int __pyx_clineno = 0;
64322   PyObject *__pyx_r = 0;
64323   __Pyx_RefNannyDeclarations
64324   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
64325   {
64326     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
64327     PyObject* values[3] = {0,0,0};
64328     if (unlikely(__pyx_kwds)) {
64329       Py_ssize_t kw_args;
64330       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
64331       switch (pos_args) {
64332         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
64333         CYTHON_FALLTHROUGH;
64334         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
64335         CYTHON_FALLTHROUGH;
64336         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
64337         CYTHON_FALLTHROUGH;
64338         case  0: break;
64339         default: goto __pyx_L5_argtuple_error;
64340       }
64341       kw_args = PyDict_Size(__pyx_kwds);
64342       switch (pos_args) {
64343         case  0:
64344         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
64345         else goto __pyx_L5_argtuple_error;
64346         CYTHON_FALLTHROUGH;
64347         case  1:
64348         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
64349         else {
64350           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(3, 1, __pyx_L3_error)
64351         }
64352         CYTHON_FALLTHROUGH;
64353         case  2:
64354         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
64355         else {
64356           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(3, 1, __pyx_L3_error)
64357         }
64358       }
64359       if (unlikely(kw_args > 0)) {
64360         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(3, 1, __pyx_L3_error)
64361       }
64362     } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
64363       goto __pyx_L5_argtuple_error;
64364     } else {
64365       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
64366       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
64367       values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
64368     }
64369     __pyx_v___pyx_type = values[0];
64370     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 1, __pyx_L3_error)
64371     __pyx_v___pyx_state = values[2];
64372   }
64373   goto __pyx_L4_argument_unpacking_done;
64374   __pyx_L5_argtuple_error:;
64375   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 1, __pyx_L3_error)
64376   __pyx_L3_error:;
64377   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
64378   __Pyx_RefNannyFinishContext();
64379   return NULL;
64380   __pyx_L4_argument_unpacking_done:;
64381   __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
64382 
64383   /* function exit code */
64384   __Pyx_RefNannyFinishContext();
64385   return __pyx_r;
64386 }
64387 
__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject * __pyx_self,PyObject * __pyx_v___pyx_type,long __pyx_v___pyx_checksum,PyObject * __pyx_v___pyx_state)64388 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
64389   PyObject *__pyx_v___pyx_PickleError = 0;
64390   PyObject *__pyx_v___pyx_result = 0;
64391   PyObject *__pyx_r = NULL;
64392   __Pyx_RefNannyDeclarations
64393   int __pyx_t_1;
64394   PyObject *__pyx_t_2 = NULL;
64395   PyObject *__pyx_t_3 = NULL;
64396   PyObject *__pyx_t_4 = NULL;
64397   PyObject *__pyx_t_5 = NULL;
64398   int __pyx_t_6;
64399   int __pyx_lineno = 0;
64400   const char *__pyx_filename = NULL;
64401   int __pyx_clineno = 0;
64402   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
64403 
64404   /* "(tree fragment)":4
64405  *     cdef object __pyx_PickleError
64406  *     cdef object __pyx_result
64407  *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
64408  *         from pickle import PickleError as __pyx_PickleError
64409  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
64410  */
64411   __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0);
64412   if (__pyx_t_1) {
64413 
64414     /* "(tree fragment)":5
64415  *     cdef object __pyx_result
64416  *     if __pyx_checksum != 0xb068931:
64417  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
64418  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
64419  *     __pyx_result = Enum.__new__(__pyx_type)
64420  */
64421     __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
64422     __Pyx_GOTREF(__pyx_t_2);
64423     __Pyx_INCREF(__pyx_n_s_PickleError);
64424     __Pyx_GIVEREF(__pyx_n_s_PickleError);
64425     PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
64426     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 5, __pyx_L1_error)
64427     __Pyx_GOTREF(__pyx_t_3);
64428     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
64429     __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 5, __pyx_L1_error)
64430     __Pyx_GOTREF(__pyx_t_2);
64431     __Pyx_INCREF(__pyx_t_2);
64432     __pyx_v___pyx_PickleError = __pyx_t_2;
64433     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
64434     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64435 
64436     /* "(tree fragment)":6
64437  *     if __pyx_checksum != 0xb068931:
64438  *         from pickle import PickleError as __pyx_PickleError
64439  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
64440  *     __pyx_result = Enum.__new__(__pyx_type)
64441  *     if __pyx_state is not None:
64442  */
64443     __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 6, __pyx_L1_error)
64444     __Pyx_GOTREF(__pyx_t_2);
64445     __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 6, __pyx_L1_error)
64446     __Pyx_GOTREF(__pyx_t_4);
64447     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
64448     __Pyx_INCREF(__pyx_v___pyx_PickleError);
64449     __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
64450     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
64451       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
64452       if (likely(__pyx_t_5)) {
64453         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
64454         __Pyx_INCREF(__pyx_t_5);
64455         __Pyx_INCREF(function);
64456         __Pyx_DECREF_SET(__pyx_t_2, function);
64457       }
64458     }
64459     __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
64460     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
64461     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64462     if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 6, __pyx_L1_error)
64463     __Pyx_GOTREF(__pyx_t_3);
64464     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
64465     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
64466     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64467     __PYX_ERR(3, 6, __pyx_L1_error)
64468 
64469     /* "(tree fragment)":4
64470  *     cdef object __pyx_PickleError
64471  *     cdef object __pyx_result
64472  *     if __pyx_checksum != 0xb068931:             # <<<<<<<<<<<<<<
64473  *         from pickle import PickleError as __pyx_PickleError
64474  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
64475  */
64476   }
64477 
64478   /* "(tree fragment)":7
64479  *         from pickle import PickleError as __pyx_PickleError
64480  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
64481  *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
64482  *     if __pyx_state is not None:
64483  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
64484  */
64485   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 7, __pyx_L1_error)
64486   __Pyx_GOTREF(__pyx_t_2);
64487   __pyx_t_4 = NULL;
64488   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
64489     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
64490     if (likely(__pyx_t_4)) {
64491       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
64492       __Pyx_INCREF(__pyx_t_4);
64493       __Pyx_INCREF(function);
64494       __Pyx_DECREF_SET(__pyx_t_2, function);
64495     }
64496   }
64497   __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
64498   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
64499   if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 7, __pyx_L1_error)
64500   __Pyx_GOTREF(__pyx_t_3);
64501   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
64502   __pyx_v___pyx_result = __pyx_t_3;
64503   __pyx_t_3 = 0;
64504 
64505   /* "(tree fragment)":8
64506  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
64507  *     __pyx_result = Enum.__new__(__pyx_type)
64508  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
64509  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
64510  *     return __pyx_result
64511  */
64512   __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
64513   __pyx_t_6 = (__pyx_t_1 != 0);
64514   if (__pyx_t_6) {
64515 
64516     /* "(tree fragment)":9
64517  *     __pyx_result = Enum.__new__(__pyx_type)
64518  *     if __pyx_state is not None:
64519  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
64520  *     return __pyx_result
64521  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
64522  */
64523     if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(3, 9, __pyx_L1_error)
64524     __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 9, __pyx_L1_error)
64525     __Pyx_GOTREF(__pyx_t_3);
64526     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64527 
64528     /* "(tree fragment)":8
64529  *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
64530  *     __pyx_result = Enum.__new__(__pyx_type)
64531  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
64532  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
64533  *     return __pyx_result
64534  */
64535   }
64536 
64537   /* "(tree fragment)":10
64538  *     if __pyx_state is not None:
64539  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
64540  *     return __pyx_result             # <<<<<<<<<<<<<<
64541  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
64542  *     __pyx_result.name = __pyx_state[0]
64543  */
64544   __Pyx_XDECREF(__pyx_r);
64545   __Pyx_INCREF(__pyx_v___pyx_result);
64546   __pyx_r = __pyx_v___pyx_result;
64547   goto __pyx_L0;
64548 
64549   /* "(tree fragment)":1
64550  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
64551  *     cdef object __pyx_PickleError
64552  *     cdef object __pyx_result
64553  */
64554 
64555   /* function exit code */
64556   __pyx_L1_error:;
64557   __Pyx_XDECREF(__pyx_t_2);
64558   __Pyx_XDECREF(__pyx_t_3);
64559   __Pyx_XDECREF(__pyx_t_4);
64560   __Pyx_XDECREF(__pyx_t_5);
64561   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
64562   __pyx_r = NULL;
64563   __pyx_L0:;
64564   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
64565   __Pyx_XDECREF(__pyx_v___pyx_result);
64566   __Pyx_XGIVEREF(__pyx_r);
64567   __Pyx_RefNannyFinishContext();
64568   return __pyx_r;
64569 }
64570 
64571 /* "(tree fragment)":11
64572  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
64573  *     return __pyx_result
64574  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
64575  *     __pyx_result.name = __pyx_state[0]
64576  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
64577  */
64578 
__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj * __pyx_v___pyx_result,PyObject * __pyx_v___pyx_state)64579 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
64580   PyObject *__pyx_r = NULL;
64581   __Pyx_RefNannyDeclarations
64582   PyObject *__pyx_t_1 = NULL;
64583   int __pyx_t_2;
64584   Py_ssize_t __pyx_t_3;
64585   int __pyx_t_4;
64586   int __pyx_t_5;
64587   PyObject *__pyx_t_6 = NULL;
64588   PyObject *__pyx_t_7 = NULL;
64589   PyObject *__pyx_t_8 = NULL;
64590   int __pyx_lineno = 0;
64591   const char *__pyx_filename = NULL;
64592   int __pyx_clineno = 0;
64593   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
64594 
64595   /* "(tree fragment)":12
64596  *     return __pyx_result
64597  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
64598  *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
64599  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
64600  *         __pyx_result.__dict__.update(__pyx_state[1])
64601  */
64602   if (unlikely(__pyx_v___pyx_state == Py_None)) {
64603     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
64604     __PYX_ERR(3, 12, __pyx_L1_error)
64605   }
64606   __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 12, __pyx_L1_error)
64607   __Pyx_GOTREF(__pyx_t_1);
64608   __Pyx_GIVEREF(__pyx_t_1);
64609   __Pyx_GOTREF(__pyx_v___pyx_result->name);
64610   __Pyx_DECREF(__pyx_v___pyx_result->name);
64611   __pyx_v___pyx_result->name = __pyx_t_1;
64612   __pyx_t_1 = 0;
64613 
64614   /* "(tree fragment)":13
64615  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
64616  *     __pyx_result.name = __pyx_state[0]
64617  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
64618  *         __pyx_result.__dict__.update(__pyx_state[1])
64619  */
64620   if (unlikely(__pyx_v___pyx_state == Py_None)) {
64621     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
64622     __PYX_ERR(3, 13, __pyx_L1_error)
64623   }
64624   __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
64625   __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
64626   if (__pyx_t_4) {
64627   } else {
64628     __pyx_t_2 = __pyx_t_4;
64629     goto __pyx_L4_bool_binop_done;
64630   }
64631   __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 13, __pyx_L1_error)
64632   __pyx_t_5 = (__pyx_t_4 != 0);
64633   __pyx_t_2 = __pyx_t_5;
64634   __pyx_L4_bool_binop_done:;
64635   if (__pyx_t_2) {
64636 
64637     /* "(tree fragment)":14
64638  *     __pyx_result.name = __pyx_state[0]
64639  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
64640  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
64641  */
64642     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
64643     __Pyx_GOTREF(__pyx_t_6);
64644     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 14, __pyx_L1_error)
64645     __Pyx_GOTREF(__pyx_t_7);
64646     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
64647     if (unlikely(__pyx_v___pyx_state == Py_None)) {
64648       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
64649       __PYX_ERR(3, 14, __pyx_L1_error)
64650     }
64651     __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 14, __pyx_L1_error)
64652     __Pyx_GOTREF(__pyx_t_6);
64653     __pyx_t_8 = NULL;
64654     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
64655       __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
64656       if (likely(__pyx_t_8)) {
64657         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
64658         __Pyx_INCREF(__pyx_t_8);
64659         __Pyx_INCREF(function);
64660         __Pyx_DECREF_SET(__pyx_t_7, function);
64661       }
64662     }
64663     __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
64664     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
64665     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
64666     if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 14, __pyx_L1_error)
64667     __Pyx_GOTREF(__pyx_t_1);
64668     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
64669     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64670 
64671     /* "(tree fragment)":13
64672  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
64673  *     __pyx_result.name = __pyx_state[0]
64674  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
64675  *         __pyx_result.__dict__.update(__pyx_state[1])
64676  */
64677   }
64678 
64679   /* "(tree fragment)":11
64680  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
64681  *     return __pyx_result
64682  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
64683  *     __pyx_result.name = __pyx_state[0]
64684  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
64685  */
64686 
64687   /* function exit code */
64688   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
64689   goto __pyx_L0;
64690   __pyx_L1_error:;
64691   __Pyx_XDECREF(__pyx_t_1);
64692   __Pyx_XDECREF(__pyx_t_6);
64693   __Pyx_XDECREF(__pyx_t_7);
64694   __Pyx_XDECREF(__pyx_t_8);
64695   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
64696   __pyx_r = 0;
64697   __pyx_L0:;
64698   __Pyx_XGIVEREF(__pyx_r);
64699   __Pyx_RefNannyFinishContext();
64700   return __pyx_r;
64701 }
64702 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_sStatespace __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace;
64703 
__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_sStatespace(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)64704 static PyObject *__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_sStatespace(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
64705   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *p;
64706   PyObject *o;
64707   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
64708     o = (*t->tp_alloc)(t, 0);
64709   } else {
64710     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
64711   }
64712   if (unlikely(!o)) return 0;
64713   p = ((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)o);
64714   p->__pyx_vtab = __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_sStatespace;
64715   p->obs.data = NULL;
64716   p->obs.memview = NULL;
64717   p->obs_intercept.data = NULL;
64718   p->obs_intercept.memview = NULL;
64719   p->state_intercept.data = NULL;
64720   p->state_intercept.memview = NULL;
64721   p->initial_state.data = NULL;
64722   p->initial_state.memview = NULL;
64723   p->initial_state_cov.data = NULL;
64724   p->initial_state_cov.memview = NULL;
64725   p->initial_diffuse_state_cov.data = NULL;
64726   p->initial_diffuse_state_cov.memview = NULL;
64727   p->design.data = NULL;
64728   p->design.memview = NULL;
64729   p->obs_cov.data = NULL;
64730   p->obs_cov.memview = NULL;
64731   p->transition.data = NULL;
64732   p->transition.memview = NULL;
64733   p->selection.data = NULL;
64734   p->selection.memview = NULL;
64735   p->state_cov.data = NULL;
64736   p->state_cov.memview = NULL;
64737   p->selected_state_cov.data = NULL;
64738   p->selected_state_cov.memview = NULL;
64739   p->missing.data = NULL;
64740   p->missing.memview = NULL;
64741   p->nmissing.data = NULL;
64742   p->nmissing.memview = NULL;
64743   p->tmp.data = NULL;
64744   p->tmp.memview = NULL;
64745   p->selected_obs.data = NULL;
64746   p->selected_obs.memview = NULL;
64747   p->selected_obs_intercept.data = NULL;
64748   p->selected_obs_intercept.memview = NULL;
64749   p->selected_design.data = NULL;
64750   p->selected_design.memview = NULL;
64751   p->selected_obs_cov.data = NULL;
64752   p->selected_obs_cov.memview = NULL;
64753   p->transform_cholesky.data = NULL;
64754   p->transform_cholesky.memview = NULL;
64755   p->transform_obs_cov.data = NULL;
64756   p->transform_obs_cov.memview = NULL;
64757   p->transform_design.data = NULL;
64758   p->transform_design.memview = NULL;
64759   p->transform_obs_intercept.data = NULL;
64760   p->transform_obs_intercept.memview = NULL;
64761   p->collapse_obs.data = NULL;
64762   p->collapse_obs.memview = NULL;
64763   p->collapse_obs_tmp.data = NULL;
64764   p->collapse_obs_tmp.memview = NULL;
64765   p->collapse_design.data = NULL;
64766   p->collapse_design.memview = NULL;
64767   p->collapse_obs_cov.data = NULL;
64768   p->collapse_obs_cov.memview = NULL;
64769   p->collapse_cholesky.data = NULL;
64770   p->collapse_cholesky.memview = NULL;
64771   return o;
64772 }
64773 
__pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_sStatespace(PyObject * o)64774 static void __pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_sStatespace(PyObject *o) {
64775   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *p = (struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *)o;
64776   #if CYTHON_USE_TP_FINALIZE
64777   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
64778     if (PyObject_CallFinalizerFromDealloc(o)) return;
64779   }
64780   #endif
64781   __PYX_XDEC_MEMVIEW(&p->obs, 1);
64782   __PYX_XDEC_MEMVIEW(&p->obs_intercept, 1);
64783   __PYX_XDEC_MEMVIEW(&p->state_intercept, 1);
64784   __PYX_XDEC_MEMVIEW(&p->initial_state, 1);
64785   __PYX_XDEC_MEMVIEW(&p->initial_state_cov, 1);
64786   __PYX_XDEC_MEMVIEW(&p->initial_diffuse_state_cov, 1);
64787   __PYX_XDEC_MEMVIEW(&p->design, 1);
64788   __PYX_XDEC_MEMVIEW(&p->obs_cov, 1);
64789   __PYX_XDEC_MEMVIEW(&p->transition, 1);
64790   __PYX_XDEC_MEMVIEW(&p->selection, 1);
64791   __PYX_XDEC_MEMVIEW(&p->state_cov, 1);
64792   __PYX_XDEC_MEMVIEW(&p->selected_state_cov, 1);
64793   __PYX_XDEC_MEMVIEW(&p->missing, 1);
64794   __PYX_XDEC_MEMVIEW(&p->nmissing, 1);
64795   __PYX_XDEC_MEMVIEW(&p->tmp, 1);
64796   __PYX_XDEC_MEMVIEW(&p->selected_obs, 1);
64797   __PYX_XDEC_MEMVIEW(&p->selected_obs_intercept, 1);
64798   __PYX_XDEC_MEMVIEW(&p->selected_design, 1);
64799   __PYX_XDEC_MEMVIEW(&p->selected_obs_cov, 1);
64800   __PYX_XDEC_MEMVIEW(&p->transform_cholesky, 1);
64801   __PYX_XDEC_MEMVIEW(&p->transform_obs_cov, 1);
64802   __PYX_XDEC_MEMVIEW(&p->transform_design, 1);
64803   __PYX_XDEC_MEMVIEW(&p->transform_obs_intercept, 1);
64804   __PYX_XDEC_MEMVIEW(&p->collapse_obs, 1);
64805   __PYX_XDEC_MEMVIEW(&p->collapse_obs_tmp, 1);
64806   __PYX_XDEC_MEMVIEW(&p->collapse_design, 1);
64807   __PYX_XDEC_MEMVIEW(&p->collapse_obs_cov, 1);
64808   __PYX_XDEC_MEMVIEW(&p->collapse_cholesky, 1);
64809   (*Py_TYPE(o)->tp_free)(o);
64810 }
64811 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_nobs(PyObject * o,CYTHON_UNUSED void * x)64812 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_nobs(PyObject *o, CYTHON_UNUSED void *x) {
64813   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_4nobs_1__get__(o);
64814 }
64815 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_endog(PyObject * o,CYTHON_UNUSED void * x)64816 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_endog(PyObject *o, CYTHON_UNUSED void *x) {
64817   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7k_endog_1__get__(o);
64818 }
64819 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_states(PyObject * o,CYTHON_UNUSED void * x)64820 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_states(PyObject *o, CYTHON_UNUSED void *x) {
64821   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_states_1__get__(o);
64822 }
64823 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_posdef(PyObject * o,CYTHON_UNUSED void * x)64824 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_posdef(PyObject *o, CYTHON_UNUSED void *x) {
64825   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8k_posdef_1__get__(o);
64826 }
64827 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs(PyObject * o,CYTHON_UNUSED void * x)64828 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs(PyObject *o, CYTHON_UNUSED void *x) {
64829   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3obs_1__get__(o);
64830 }
64831 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)64832 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
64833   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13obs_intercept_1__get__(o);
64834 }
64835 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_state_intercept(PyObject * o,CYTHON_UNUSED void * x)64836 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_state_intercept(PyObject *o, CYTHON_UNUSED void *x) {
64837   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15state_intercept_1__get__(o);
64838 }
64839 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_state(PyObject * o,CYTHON_UNUSED void * x)64840 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_state(PyObject *o, CYTHON_UNUSED void *x) {
64841   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initial_state_1__get__(o);
64842 }
64843 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_state_cov(PyObject * o,CYTHON_UNUSED void * x)64844 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
64845   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17initial_state_cov_1__get__(o);
64846 }
64847 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_diffuse_state_cov(PyObject * o,CYTHON_UNUSED void * x)64848 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_diffuse_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
64849   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_25initial_diffuse_state_cov_1__get__(o);
64850 }
64851 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_design(PyObject * o,CYTHON_UNUSED void * x)64852 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_design(PyObject *o, CYTHON_UNUSED void *x) {
64853   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_6design_1__get__(o);
64854 }
64855 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs_cov(PyObject * o,CYTHON_UNUSED void * x)64856 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
64857   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7obs_cov_1__get__(o);
64858 }
64859 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transition(PyObject * o,CYTHON_UNUSED void * x)64860 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transition(PyObject *o, CYTHON_UNUSED void *x) {
64861   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10transition_1__get__(o);
64862 }
64863 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selection(PyObject * o,CYTHON_UNUSED void * x)64864 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selection(PyObject *o, CYTHON_UNUSED void *x) {
64865   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9selection_1__get__(o);
64866 }
64867 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_state_cov(PyObject * o,CYTHON_UNUSED void * x)64868 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
64869   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9state_cov_1__get__(o);
64870 }
64871 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_state_cov(PyObject * o,CYTHON_UNUSED void * x)64872 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
64873   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18selected_state_cov_1__get__(o);
64874 }
64875 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_missing(PyObject * o,CYTHON_UNUSED void * x)64876 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_missing(PyObject *o, CYTHON_UNUSED void *x) {
64877   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7missing_1__get__(o);
64878 }
64879 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_nmissing(PyObject * o,CYTHON_UNUSED void * x)64880 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_nmissing(PyObject *o, CYTHON_UNUSED void *x) {
64881   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8nmissing_1__get__(o);
64882 }
64883 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_has_missing(PyObject * o,CYTHON_UNUSED void * x)64884 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_has_missing(PyObject *o, CYTHON_UNUSED void *x) {
64885   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11has_missing_1__get__(o);
64886 }
64887 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_time_invariant(PyObject * o,CYTHON_UNUSED void * x)64888 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_time_invariant(PyObject *o, CYTHON_UNUSED void *x) {
64889   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14time_invariant_1__get__(o);
64890 }
64891 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized(PyObject * o,CYTHON_UNUSED void * x)64892 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized(PyObject *o, CYTHON_UNUSED void *x) {
64893   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialized_1__get__(o);
64894 }
64895 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized_diffuse(PyObject * o,CYTHON_UNUSED void * x)64896 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized_diffuse(PyObject *o, CYTHON_UNUSED void *x) {
64897   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19initialized_diffuse_1__get__(o);
64898 }
64899 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized_stationary(PyObject * o,CYTHON_UNUSED void * x)64900 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized_stationary(PyObject *o, CYTHON_UNUSED void *x) {
64901   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22initialized_stationary_1__get__(o);
64902 }
64903 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_diagonal_obs_cov(PyObject * o,CYTHON_UNUSED void * x)64904 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_diagonal_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
64905   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_1__get__(o);
64906 }
64907 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_diagonal_obs_cov(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)64908 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_diagonal_obs_cov(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
64909   if (v) {
64910     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16diagonal_obs_cov_3__set__(o, v);
64911   }
64912   else {
64913     PyErr_SetString(PyExc_NotImplementedError, "__del__");
64914     return -1;
64915   }
64916 }
64917 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__diagonal_obs_cov(PyObject * o,CYTHON_UNUSED void * x)64918 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__diagonal_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
64919   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17_diagonal_obs_cov_1__get__(o);
64920 }
64921 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_subset_design(PyObject * o,CYTHON_UNUSED void * x)64922 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_subset_design(PyObject *o, CYTHON_UNUSED void *x) {
64923   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_1__get__(o);
64924 }
64925 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_subset_design(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)64926 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_subset_design(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
64927   if (v) {
64928     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13subset_design_3__set__(o, v);
64929   }
64930   else {
64931     PyErr_SetString(PyExc_NotImplementedError, "__del__");
64932     return -1;
64933   }
64934 }
64935 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_companion_transition(PyObject * o,CYTHON_UNUSED void * x)64936 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_companion_transition(PyObject *o, CYTHON_UNUSED void *x) {
64937   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_1__get__(o);
64938 }
64939 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_companion_transition(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)64940 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_companion_transition(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
64941   if (v) {
64942     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_20companion_transition_3__set__(o, v);
64943   }
64944   else {
64945     PyErr_SetString(PyExc_NotImplementedError, "__del__");
64946     return -1;
64947   }
64948 }
64949 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs(PyObject * o,CYTHON_UNUSED void * x)64950 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs(PyObject *o, CYTHON_UNUSED void *x) {
64951   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12selected_obs_1__get__(o);
64952 }
64953 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)64954 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
64955   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22selected_obs_intercept_1__get__(o);
64956 }
64957 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_design(PyObject * o,CYTHON_UNUSED void * x)64958 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_design(PyObject *o, CYTHON_UNUSED void *x) {
64959   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15selected_design_1__get__(o);
64960 }
64961 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs_cov(PyObject * o,CYTHON_UNUSED void * x)64962 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
64963   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16selected_obs_cov_1__get__(o);
64964 }
64965 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_cholesky(PyObject * o,CYTHON_UNUSED void * x)64966 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_cholesky(PyObject *o, CYTHON_UNUSED void *x) {
64967   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_18transform_cholesky_1__get__(o);
64968 }
64969 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_obs_cov(PyObject * o,CYTHON_UNUSED void * x)64970 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
64971   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17transform_obs_cov_1__get__(o);
64972 }
64973 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_design(PyObject * o,CYTHON_UNUSED void * x)64974 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_design(PyObject *o, CYTHON_UNUSED void *x) {
64975   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16transform_design_1__get__(o);
64976 }
64977 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)64978 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
64979   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_23transform_obs_intercept_1__get__(o);
64980 }
64981 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_determinant(PyObject * o,CYTHON_UNUSED void * x)64982 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_determinant(PyObject *o, CYTHON_UNUSED void *x) {
64983   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_21transform_determinant_1__get__(o);
64984 }
64985 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs(PyObject * o,CYTHON_UNUSED void * x)64986 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs(PyObject *o, CYTHON_UNUSED void *x) {
64987   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12collapse_obs_1__get__(o);
64988 }
64989 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs_tmp(PyObject * o,CYTHON_UNUSED void * x)64990 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs_tmp(PyObject *o, CYTHON_UNUSED void *x) {
64991   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_tmp_1__get__(o);
64992 }
64993 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_design(PyObject * o,CYTHON_UNUSED void * x)64994 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_design(PyObject *o, CYTHON_UNUSED void *x) {
64995   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15collapse_design_1__get__(o);
64996 }
64997 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs_cov(PyObject * o,CYTHON_UNUSED void * x)64998 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
64999   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16collapse_obs_cov_1__get__(o);
65000 }
65001 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_cholesky(PyObject * o,CYTHON_UNUSED void * x)65002 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_cholesky(PyObject *o, CYTHON_UNUSED void *x) {
65003   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17collapse_cholesky_1__get__(o);
65004 }
65005 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_loglikelihood(PyObject * o,CYTHON_UNUSED void * x)65006 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_loglikelihood(PyObject *o, CYTHON_UNUSED void *x) {
65007   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_22collapse_loglikelihood_1__get__(o);
65008 }
65009 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_t(PyObject * o,CYTHON_UNUSED void * x)65010 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_t(PyObject *o, CYTHON_UNUSED void *x) {
65011   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1t_1__get__(o);
65012 }
65013 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__previous_t(PyObject * o,CYTHON_UNUSED void * x)65014 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__previous_t(PyObject *o, CYTHON_UNUSED void *x) {
65015   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11_previous_t_1__get__(o);
65016 }
65017 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endog(PyObject * o,CYTHON_UNUSED void * x)65018 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endog(PyObject *o, CYTHON_UNUSED void *x) {
65019   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8_k_endog_1__get__(o);
65020 }
65021 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_states(PyObject * o,CYTHON_UNUSED void * x)65022 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_states(PyObject *o, CYTHON_UNUSED void *x) {
65023   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_states_1__get__(o);
65024 }
65025 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_posdef(PyObject * o,CYTHON_UNUSED void * x)65026 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_posdef(PyObject *o, CYTHON_UNUSED void *x) {
65027   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_posdef_1__get__(o);
65028 }
65029 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endog2(PyObject * o,CYTHON_UNUSED void * x)65030 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endog2(PyObject *o, CYTHON_UNUSED void *x) {
65031   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_k_endog2_1__get__(o);
65032 }
65033 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_states2(PyObject * o,CYTHON_UNUSED void * x)65034 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_states2(PyObject *o, CYTHON_UNUSED void *x) {
65035   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_states2_1__get__(o);
65036 }
65037 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_posdef2(PyObject * o,CYTHON_UNUSED void * x)65038 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_posdef2(PyObject *o, CYTHON_UNUSED void *x) {
65039   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10_k_posdef2_1__get__(o);
65040 }
65041 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endogstates(PyObject * o,CYTHON_UNUSED void * x)65042 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endogstates(PyObject *o, CYTHON_UNUSED void *x) {
65043   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_14_k_endogstates_1__get__(o);
65044 }
65045 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_statesposdef(PyObject * o,CYTHON_UNUSED void * x)65046 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_statesposdef(PyObject *o, CYTHON_UNUSED void *x) {
65047   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15_k_statesposdef_1__get__(o);
65048 }
65049 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__nmissing(PyObject * o,CYTHON_UNUSED void * x)65050 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__nmissing(PyObject *o, CYTHON_UNUSED void *x) {
65051   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9_nmissing_1__get__(o);
65052 }
65053 
__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17__next__(PyObject * self,CYTHON_UNUSED PyObject * arg)65054 static PyObject *__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17__next__(self);}
65055 
65056 static PyMethodDef __pyx_methods_11statsmodels_3tsa_10statespace_15_representation_sStatespace[] = {
65057   {"__reduce__", (PyCFunction)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_3__reduce__, METH_NOARGS, 0},
65058   {"__setstate__", (PyCFunction)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_5__setstate__, METH_O, 0},
65059   {"initialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_7initialize, METH_VARARGS|METH_KEYWORDS, 0},
65060   {"initialize_known", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_9initialize_known, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_8initialize_known},
65061   {"initialize_approximate_diffuse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_11initialize_approximate_diffuse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_10initialize_approximate_diffuse},
65062   {"initialize_stationary", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_13initialize_stationary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_12initialize_stationary},
65063   {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__},
65064   {"seek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_19seek, METH_VARARGS|METH_KEYWORDS, 0},
65065   {0, 0, 0, 0}
65066 };
65067 
65068 static struct PyGetSetDef __pyx_getsets_11statsmodels_3tsa_10statespace_15_representation_sStatespace[] = {
65069   {(char *)"nobs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_nobs, 0, (char *)0, 0},
65070   {(char *)"k_endog", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_endog, 0, (char *)0, 0},
65071   {(char *)"k_states", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_states, 0, (char *)0, 0},
65072   {(char *)"k_posdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_k_posdef, 0, (char *)0, 0},
65073   {(char *)"obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs, 0, (char *)0, 0},
65074   {(char *)"obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs_intercept, 0, (char *)0, 0},
65075   {(char *)"state_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_state_intercept, 0, (char *)0, 0},
65076   {(char *)"initial_state", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_state, 0, (char *)0, 0},
65077   {(char *)"initial_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_state_cov, 0, (char *)0, 0},
65078   {(char *)"initial_diffuse_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initial_diffuse_state_cov, 0, (char *)0, 0},
65079   {(char *)"design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_design, 0, (char *)0, 0},
65080   {(char *)"obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_obs_cov, 0, (char *)0, 0},
65081   {(char *)"transition", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transition, 0, (char *)0, 0},
65082   {(char *)"selection", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selection, 0, (char *)0, 0},
65083   {(char *)"state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_state_cov, 0, (char *)0, 0},
65084   {(char *)"selected_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_state_cov, 0, (char *)0, 0},
65085   {(char *)"missing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_missing, 0, (char *)0, 0},
65086   {(char *)"nmissing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_nmissing, 0, (char *)0, 0},
65087   {(char *)"has_missing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_has_missing, 0, (char *)0, 0},
65088   {(char *)"time_invariant", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_time_invariant, 0, (char *)0, 0},
65089   {(char *)"initialized", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized, 0, (char *)0, 0},
65090   {(char *)"initialized_diffuse", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized_diffuse, 0, (char *)0, 0},
65091   {(char *)"initialized_stationary", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_initialized_stationary, 0, (char *)0, 0},
65092   {(char *)"diagonal_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_diagonal_obs_cov, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_diagonal_obs_cov, (char *)0, 0},
65093   {(char *)"_diagonal_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__diagonal_obs_cov, 0, (char *)0, 0},
65094   {(char *)"subset_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_subset_design, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_subset_design, (char *)0, 0},
65095   {(char *)"companion_transition", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_companion_transition, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_companion_transition, (char *)0, 0},
65096   {(char *)"selected_obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs, 0, (char *)0, 0},
65097   {(char *)"selected_obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs_intercept, 0, (char *)0, 0},
65098   {(char *)"selected_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_design, 0, (char *)0, 0},
65099   {(char *)"selected_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_selected_obs_cov, 0, (char *)0, 0},
65100   {(char *)"transform_cholesky", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_cholesky, 0, (char *)0, 0},
65101   {(char *)"transform_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_obs_cov, 0, (char *)0, 0},
65102   {(char *)"transform_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_design, 0, (char *)0, 0},
65103   {(char *)"transform_obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_obs_intercept, 0, (char *)0, 0},
65104   {(char *)"transform_determinant", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_determinant, 0, (char *)0, 0},
65105   {(char *)"collapse_obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs, 0, (char *)0, 0},
65106   {(char *)"collapse_obs_tmp", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs_tmp, 0, (char *)0, 0},
65107   {(char *)"collapse_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_design, 0, (char *)0, 0},
65108   {(char *)"collapse_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_obs_cov, 0, (char *)0, 0},
65109   {(char *)"collapse_cholesky", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_cholesky, 0, (char *)0, 0},
65110   {(char *)"collapse_loglikelihood", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_collapse_loglikelihood, 0, (char *)0, 0},
65111   {(char *)"t", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_t, 0, (char *)0, 0},
65112   {(char *)"_previous_t", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__previous_t, 0, (char *)0, 0},
65113   {(char *)"_k_endog", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endog, 0, (char *)0, 0},
65114   {(char *)"_k_states", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_states, 0, (char *)0, 0},
65115   {(char *)"_k_posdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_posdef, 0, (char *)0, 0},
65116   {(char *)"_k_endog2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endog2, 0, (char *)0, 0},
65117   {(char *)"_k_states2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_states2, 0, (char *)0, 0},
65118   {(char *)"_k_posdef2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_posdef2, 0, (char *)0, 0},
65119   {(char *)"_k_endogstates", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_endogstates, 0, (char *)0, 0},
65120   {(char *)"_k_statesposdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__k_statesposdef, 0, (char *)0, 0},
65121   {(char *)"_nmissing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__nmissing, 0, (char *)0, 0},
65122   {0, 0, 0, 0, 0}
65123 };
65124 
65125 static PyTypeObject __pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace = {
65126   PyVarObject_HEAD_INIT(0, 0)
65127   "statsmodels.tsa.statespace._representation.sStatespace", /*tp_name*/
65128   sizeof(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace), /*tp_basicsize*/
65129   0, /*tp_itemsize*/
65130   __pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_sStatespace, /*tp_dealloc*/
65131   #if PY_VERSION_HEX < 0x030800b4
65132   0, /*tp_print*/
65133   #endif
65134   #if PY_VERSION_HEX >= 0x030800b4
65135   0, /*tp_vectorcall_offset*/
65136   #endif
65137   0, /*tp_getattr*/
65138   0, /*tp_setattr*/
65139   #if PY_MAJOR_VERSION < 3
65140   0, /*tp_compare*/
65141   #endif
65142   #if PY_MAJOR_VERSION >= 3
65143   0, /*tp_as_async*/
65144   #endif
65145   0, /*tp_repr*/
65146   0, /*tp_as_number*/
65147   0, /*tp_as_sequence*/
65148   0, /*tp_as_mapping*/
65149   0, /*tp_hash*/
65150   0, /*tp_call*/
65151   0, /*tp_str*/
65152   0, /*tp_getattro*/
65153   0, /*tp_setattro*/
65154   0, /*tp_as_buffer*/
65155   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
65156   "\n    sStatespace(obs, design, obs_intercept, obs_cov, transition, state_intercept, selection, state_cov)\n\n    *See Durbin and Koopman (2012), Chapter 4 for all notation*\n    ", /*tp_doc*/
65157   0, /*tp_traverse*/
65158   0, /*tp_clear*/
65159   0, /*tp_richcompare*/
65160   0, /*tp_weaklistoffset*/
65161   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_15__iter__, /*tp_iter*/
65162   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_17__next__, /*tp_iternext*/
65163   __pyx_methods_11statsmodels_3tsa_10statespace_15_representation_sStatespace, /*tp_methods*/
65164   0, /*tp_members*/
65165   __pyx_getsets_11statsmodels_3tsa_10statespace_15_representation_sStatespace, /*tp_getset*/
65166   0, /*tp_base*/
65167   0, /*tp_dict*/
65168   0, /*tp_descr_get*/
65169   0, /*tp_descr_set*/
65170   0, /*tp_dictoffset*/
65171   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_1__init__, /*tp_init*/
65172   0, /*tp_alloc*/
65173   __pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_sStatespace, /*tp_new*/
65174   0, /*tp_free*/
65175   0, /*tp_is_gc*/
65176   0, /*tp_bases*/
65177   0, /*tp_mro*/
65178   0, /*tp_cache*/
65179   0, /*tp_subclasses*/
65180   0, /*tp_weaklist*/
65181   0, /*tp_del*/
65182   0, /*tp_version_tag*/
65183   #if PY_VERSION_HEX >= 0x030400a1
65184   0, /*tp_finalize*/
65185   #endif
65186   #if PY_VERSION_HEX >= 0x030800b1
65187   0, /*tp_vectorcall*/
65188   #endif
65189   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
65190   0, /*tp_print*/
65191   #endif
65192 };
65193 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_dStatespace __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace;
65194 
__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_dStatespace(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)65195 static PyObject *__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_dStatespace(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
65196   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *p;
65197   PyObject *o;
65198   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
65199     o = (*t->tp_alloc)(t, 0);
65200   } else {
65201     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
65202   }
65203   if (unlikely(!o)) return 0;
65204   p = ((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)o);
65205   p->__pyx_vtab = __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_dStatespace;
65206   p->obs.data = NULL;
65207   p->obs.memview = NULL;
65208   p->obs_intercept.data = NULL;
65209   p->obs_intercept.memview = NULL;
65210   p->state_intercept.data = NULL;
65211   p->state_intercept.memview = NULL;
65212   p->initial_state.data = NULL;
65213   p->initial_state.memview = NULL;
65214   p->initial_state_cov.data = NULL;
65215   p->initial_state_cov.memview = NULL;
65216   p->initial_diffuse_state_cov.data = NULL;
65217   p->initial_diffuse_state_cov.memview = NULL;
65218   p->design.data = NULL;
65219   p->design.memview = NULL;
65220   p->obs_cov.data = NULL;
65221   p->obs_cov.memview = NULL;
65222   p->transition.data = NULL;
65223   p->transition.memview = NULL;
65224   p->selection.data = NULL;
65225   p->selection.memview = NULL;
65226   p->state_cov.data = NULL;
65227   p->state_cov.memview = NULL;
65228   p->selected_state_cov.data = NULL;
65229   p->selected_state_cov.memview = NULL;
65230   p->missing.data = NULL;
65231   p->missing.memview = NULL;
65232   p->nmissing.data = NULL;
65233   p->nmissing.memview = NULL;
65234   p->tmp.data = NULL;
65235   p->tmp.memview = NULL;
65236   p->selected_obs.data = NULL;
65237   p->selected_obs.memview = NULL;
65238   p->selected_obs_intercept.data = NULL;
65239   p->selected_obs_intercept.memview = NULL;
65240   p->selected_design.data = NULL;
65241   p->selected_design.memview = NULL;
65242   p->selected_obs_cov.data = NULL;
65243   p->selected_obs_cov.memview = NULL;
65244   p->transform_cholesky.data = NULL;
65245   p->transform_cholesky.memview = NULL;
65246   p->transform_obs_cov.data = NULL;
65247   p->transform_obs_cov.memview = NULL;
65248   p->transform_design.data = NULL;
65249   p->transform_design.memview = NULL;
65250   p->transform_obs_intercept.data = NULL;
65251   p->transform_obs_intercept.memview = NULL;
65252   p->collapse_obs.data = NULL;
65253   p->collapse_obs.memview = NULL;
65254   p->collapse_obs_tmp.data = NULL;
65255   p->collapse_obs_tmp.memview = NULL;
65256   p->collapse_design.data = NULL;
65257   p->collapse_design.memview = NULL;
65258   p->collapse_obs_cov.data = NULL;
65259   p->collapse_obs_cov.memview = NULL;
65260   p->collapse_cholesky.data = NULL;
65261   p->collapse_cholesky.memview = NULL;
65262   return o;
65263 }
65264 
__pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_dStatespace(PyObject * o)65265 static void __pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_dStatespace(PyObject *o) {
65266   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *p = (struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *)o;
65267   #if CYTHON_USE_TP_FINALIZE
65268   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
65269     if (PyObject_CallFinalizerFromDealloc(o)) return;
65270   }
65271   #endif
65272   __PYX_XDEC_MEMVIEW(&p->obs, 1);
65273   __PYX_XDEC_MEMVIEW(&p->obs_intercept, 1);
65274   __PYX_XDEC_MEMVIEW(&p->state_intercept, 1);
65275   __PYX_XDEC_MEMVIEW(&p->initial_state, 1);
65276   __PYX_XDEC_MEMVIEW(&p->initial_state_cov, 1);
65277   __PYX_XDEC_MEMVIEW(&p->initial_diffuse_state_cov, 1);
65278   __PYX_XDEC_MEMVIEW(&p->design, 1);
65279   __PYX_XDEC_MEMVIEW(&p->obs_cov, 1);
65280   __PYX_XDEC_MEMVIEW(&p->transition, 1);
65281   __PYX_XDEC_MEMVIEW(&p->selection, 1);
65282   __PYX_XDEC_MEMVIEW(&p->state_cov, 1);
65283   __PYX_XDEC_MEMVIEW(&p->selected_state_cov, 1);
65284   __PYX_XDEC_MEMVIEW(&p->missing, 1);
65285   __PYX_XDEC_MEMVIEW(&p->nmissing, 1);
65286   __PYX_XDEC_MEMVIEW(&p->tmp, 1);
65287   __PYX_XDEC_MEMVIEW(&p->selected_obs, 1);
65288   __PYX_XDEC_MEMVIEW(&p->selected_obs_intercept, 1);
65289   __PYX_XDEC_MEMVIEW(&p->selected_design, 1);
65290   __PYX_XDEC_MEMVIEW(&p->selected_obs_cov, 1);
65291   __PYX_XDEC_MEMVIEW(&p->transform_cholesky, 1);
65292   __PYX_XDEC_MEMVIEW(&p->transform_obs_cov, 1);
65293   __PYX_XDEC_MEMVIEW(&p->transform_design, 1);
65294   __PYX_XDEC_MEMVIEW(&p->transform_obs_intercept, 1);
65295   __PYX_XDEC_MEMVIEW(&p->collapse_obs, 1);
65296   __PYX_XDEC_MEMVIEW(&p->collapse_obs_tmp, 1);
65297   __PYX_XDEC_MEMVIEW(&p->collapse_design, 1);
65298   __PYX_XDEC_MEMVIEW(&p->collapse_obs_cov, 1);
65299   __PYX_XDEC_MEMVIEW(&p->collapse_cholesky, 1);
65300   (*Py_TYPE(o)->tp_free)(o);
65301 }
65302 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_nobs(PyObject * o,CYTHON_UNUSED void * x)65303 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_nobs(PyObject *o, CYTHON_UNUSED void *x) {
65304   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_4nobs_1__get__(o);
65305 }
65306 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_endog(PyObject * o,CYTHON_UNUSED void * x)65307 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_endog(PyObject *o, CYTHON_UNUSED void *x) {
65308   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7k_endog_1__get__(o);
65309 }
65310 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_states(PyObject * o,CYTHON_UNUSED void * x)65311 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_states(PyObject *o, CYTHON_UNUSED void *x) {
65312   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_states_1__get__(o);
65313 }
65314 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_posdef(PyObject * o,CYTHON_UNUSED void * x)65315 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_posdef(PyObject *o, CYTHON_UNUSED void *x) {
65316   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8k_posdef_1__get__(o);
65317 }
65318 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs(PyObject * o,CYTHON_UNUSED void * x)65319 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs(PyObject *o, CYTHON_UNUSED void *x) {
65320   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3obs_1__get__(o);
65321 }
65322 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)65323 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
65324   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13obs_intercept_1__get__(o);
65325 }
65326 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_state_intercept(PyObject * o,CYTHON_UNUSED void * x)65327 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_state_intercept(PyObject *o, CYTHON_UNUSED void *x) {
65328   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15state_intercept_1__get__(o);
65329 }
65330 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_state(PyObject * o,CYTHON_UNUSED void * x)65331 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_state(PyObject *o, CYTHON_UNUSED void *x) {
65332   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initial_state_1__get__(o);
65333 }
65334 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_state_cov(PyObject * o,CYTHON_UNUSED void * x)65335 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
65336   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17initial_state_cov_1__get__(o);
65337 }
65338 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_diffuse_state_cov(PyObject * o,CYTHON_UNUSED void * x)65339 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_diffuse_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
65340   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_25initial_diffuse_state_cov_1__get__(o);
65341 }
65342 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_design(PyObject * o,CYTHON_UNUSED void * x)65343 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_design(PyObject *o, CYTHON_UNUSED void *x) {
65344   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_6design_1__get__(o);
65345 }
65346 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65347 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65348   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7obs_cov_1__get__(o);
65349 }
65350 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transition(PyObject * o,CYTHON_UNUSED void * x)65351 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transition(PyObject *o, CYTHON_UNUSED void *x) {
65352   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10transition_1__get__(o);
65353 }
65354 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selection(PyObject * o,CYTHON_UNUSED void * x)65355 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selection(PyObject *o, CYTHON_UNUSED void *x) {
65356   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9selection_1__get__(o);
65357 }
65358 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_state_cov(PyObject * o,CYTHON_UNUSED void * x)65359 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
65360   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9state_cov_1__get__(o);
65361 }
65362 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_state_cov(PyObject * o,CYTHON_UNUSED void * x)65363 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
65364   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18selected_state_cov_1__get__(o);
65365 }
65366 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_missing(PyObject * o,CYTHON_UNUSED void * x)65367 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_missing(PyObject *o, CYTHON_UNUSED void *x) {
65368   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7missing_1__get__(o);
65369 }
65370 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_nmissing(PyObject * o,CYTHON_UNUSED void * x)65371 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_nmissing(PyObject *o, CYTHON_UNUSED void *x) {
65372   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8nmissing_1__get__(o);
65373 }
65374 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_has_missing(PyObject * o,CYTHON_UNUSED void * x)65375 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_has_missing(PyObject *o, CYTHON_UNUSED void *x) {
65376   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11has_missing_1__get__(o);
65377 }
65378 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_time_invariant(PyObject * o,CYTHON_UNUSED void * x)65379 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_time_invariant(PyObject *o, CYTHON_UNUSED void *x) {
65380   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14time_invariant_1__get__(o);
65381 }
65382 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized(PyObject * o,CYTHON_UNUSED void * x)65383 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized(PyObject *o, CYTHON_UNUSED void *x) {
65384   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialized_1__get__(o);
65385 }
65386 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized_diffuse(PyObject * o,CYTHON_UNUSED void * x)65387 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized_diffuse(PyObject *o, CYTHON_UNUSED void *x) {
65388   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19initialized_diffuse_1__get__(o);
65389 }
65390 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized_stationary(PyObject * o,CYTHON_UNUSED void * x)65391 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized_stationary(PyObject *o, CYTHON_UNUSED void *x) {
65392   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22initialized_stationary_1__get__(o);
65393 }
65394 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_diagonal_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65395 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_diagonal_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65396   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_1__get__(o);
65397 }
65398 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_diagonal_obs_cov(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)65399 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_diagonal_obs_cov(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
65400   if (v) {
65401     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16diagonal_obs_cov_3__set__(o, v);
65402   }
65403   else {
65404     PyErr_SetString(PyExc_NotImplementedError, "__del__");
65405     return -1;
65406   }
65407 }
65408 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__diagonal_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65409 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__diagonal_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65410   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17_diagonal_obs_cov_1__get__(o);
65411 }
65412 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_subset_design(PyObject * o,CYTHON_UNUSED void * x)65413 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_subset_design(PyObject *o, CYTHON_UNUSED void *x) {
65414   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_1__get__(o);
65415 }
65416 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_subset_design(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)65417 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_subset_design(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
65418   if (v) {
65419     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13subset_design_3__set__(o, v);
65420   }
65421   else {
65422     PyErr_SetString(PyExc_NotImplementedError, "__del__");
65423     return -1;
65424   }
65425 }
65426 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_companion_transition(PyObject * o,CYTHON_UNUSED void * x)65427 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_companion_transition(PyObject *o, CYTHON_UNUSED void *x) {
65428   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_1__get__(o);
65429 }
65430 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_companion_transition(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)65431 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_companion_transition(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
65432   if (v) {
65433     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_20companion_transition_3__set__(o, v);
65434   }
65435   else {
65436     PyErr_SetString(PyExc_NotImplementedError, "__del__");
65437     return -1;
65438   }
65439 }
65440 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs(PyObject * o,CYTHON_UNUSED void * x)65441 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs(PyObject *o, CYTHON_UNUSED void *x) {
65442   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12selected_obs_1__get__(o);
65443 }
65444 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)65445 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
65446   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22selected_obs_intercept_1__get__(o);
65447 }
65448 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_design(PyObject * o,CYTHON_UNUSED void * x)65449 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_design(PyObject *o, CYTHON_UNUSED void *x) {
65450   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15selected_design_1__get__(o);
65451 }
65452 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65453 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65454   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16selected_obs_cov_1__get__(o);
65455 }
65456 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_cholesky(PyObject * o,CYTHON_UNUSED void * x)65457 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_cholesky(PyObject *o, CYTHON_UNUSED void *x) {
65458   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_18transform_cholesky_1__get__(o);
65459 }
65460 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65461 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65462   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17transform_obs_cov_1__get__(o);
65463 }
65464 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_design(PyObject * o,CYTHON_UNUSED void * x)65465 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_design(PyObject *o, CYTHON_UNUSED void *x) {
65466   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16transform_design_1__get__(o);
65467 }
65468 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)65469 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
65470   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_23transform_obs_intercept_1__get__(o);
65471 }
65472 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_determinant(PyObject * o,CYTHON_UNUSED void * x)65473 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_determinant(PyObject *o, CYTHON_UNUSED void *x) {
65474   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_21transform_determinant_1__get__(o);
65475 }
65476 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs(PyObject * o,CYTHON_UNUSED void * x)65477 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs(PyObject *o, CYTHON_UNUSED void *x) {
65478   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12collapse_obs_1__get__(o);
65479 }
65480 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs_tmp(PyObject * o,CYTHON_UNUSED void * x)65481 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs_tmp(PyObject *o, CYTHON_UNUSED void *x) {
65482   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_tmp_1__get__(o);
65483 }
65484 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_design(PyObject * o,CYTHON_UNUSED void * x)65485 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_design(PyObject *o, CYTHON_UNUSED void *x) {
65486   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15collapse_design_1__get__(o);
65487 }
65488 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65489 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65490   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16collapse_obs_cov_1__get__(o);
65491 }
65492 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_cholesky(PyObject * o,CYTHON_UNUSED void * x)65493 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_cholesky(PyObject *o, CYTHON_UNUSED void *x) {
65494   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17collapse_cholesky_1__get__(o);
65495 }
65496 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_loglikelihood(PyObject * o,CYTHON_UNUSED void * x)65497 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_loglikelihood(PyObject *o, CYTHON_UNUSED void *x) {
65498   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_22collapse_loglikelihood_1__get__(o);
65499 }
65500 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_t(PyObject * o,CYTHON_UNUSED void * x)65501 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_t(PyObject *o, CYTHON_UNUSED void *x) {
65502   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1t_1__get__(o);
65503 }
65504 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__previous_t(PyObject * o,CYTHON_UNUSED void * x)65505 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__previous_t(PyObject *o, CYTHON_UNUSED void *x) {
65506   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11_previous_t_1__get__(o);
65507 }
65508 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endog(PyObject * o,CYTHON_UNUSED void * x)65509 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endog(PyObject *o, CYTHON_UNUSED void *x) {
65510   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8_k_endog_1__get__(o);
65511 }
65512 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_states(PyObject * o,CYTHON_UNUSED void * x)65513 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_states(PyObject *o, CYTHON_UNUSED void *x) {
65514   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_states_1__get__(o);
65515 }
65516 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_posdef(PyObject * o,CYTHON_UNUSED void * x)65517 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_posdef(PyObject *o, CYTHON_UNUSED void *x) {
65518   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_posdef_1__get__(o);
65519 }
65520 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endog2(PyObject * o,CYTHON_UNUSED void * x)65521 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endog2(PyObject *o, CYTHON_UNUSED void *x) {
65522   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_k_endog2_1__get__(o);
65523 }
65524 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_states2(PyObject * o,CYTHON_UNUSED void * x)65525 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_states2(PyObject *o, CYTHON_UNUSED void *x) {
65526   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_states2_1__get__(o);
65527 }
65528 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_posdef2(PyObject * o,CYTHON_UNUSED void * x)65529 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_posdef2(PyObject *o, CYTHON_UNUSED void *x) {
65530   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10_k_posdef2_1__get__(o);
65531 }
65532 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endogstates(PyObject * o,CYTHON_UNUSED void * x)65533 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endogstates(PyObject *o, CYTHON_UNUSED void *x) {
65534   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_14_k_endogstates_1__get__(o);
65535 }
65536 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_statesposdef(PyObject * o,CYTHON_UNUSED void * x)65537 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_statesposdef(PyObject *o, CYTHON_UNUSED void *x) {
65538   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15_k_statesposdef_1__get__(o);
65539 }
65540 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__nmissing(PyObject * o,CYTHON_UNUSED void * x)65541 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__nmissing(PyObject *o, CYTHON_UNUSED void *x) {
65542   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9_nmissing_1__get__(o);
65543 }
65544 
__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17__next__(PyObject * self,CYTHON_UNUSED PyObject * arg)65545 static PyObject *__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17__next__(self);}
65546 
65547 static PyMethodDef __pyx_methods_11statsmodels_3tsa_10statespace_15_representation_dStatespace[] = {
65548   {"__reduce__", (PyCFunction)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_3__reduce__, METH_NOARGS, 0},
65549   {"__setstate__", (PyCFunction)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_5__setstate__, METH_O, 0},
65550   {"initialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_7initialize, METH_VARARGS|METH_KEYWORDS, 0},
65551   {"initialize_known", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_9initialize_known, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_8initialize_known},
65552   {"initialize_approximate_diffuse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_11initialize_approximate_diffuse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_10initialize_approximate_diffuse},
65553   {"initialize_stationary", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_13initialize_stationary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_12initialize_stationary},
65554   {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__},
65555   {"seek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_19seek, METH_VARARGS|METH_KEYWORDS, 0},
65556   {0, 0, 0, 0}
65557 };
65558 
65559 static struct PyGetSetDef __pyx_getsets_11statsmodels_3tsa_10statespace_15_representation_dStatespace[] = {
65560   {(char *)"nobs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_nobs, 0, (char *)0, 0},
65561   {(char *)"k_endog", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_endog, 0, (char *)0, 0},
65562   {(char *)"k_states", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_states, 0, (char *)0, 0},
65563   {(char *)"k_posdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_k_posdef, 0, (char *)0, 0},
65564   {(char *)"obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs, 0, (char *)0, 0},
65565   {(char *)"obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs_intercept, 0, (char *)0, 0},
65566   {(char *)"state_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_state_intercept, 0, (char *)0, 0},
65567   {(char *)"initial_state", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_state, 0, (char *)0, 0},
65568   {(char *)"initial_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_state_cov, 0, (char *)0, 0},
65569   {(char *)"initial_diffuse_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initial_diffuse_state_cov, 0, (char *)0, 0},
65570   {(char *)"design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_design, 0, (char *)0, 0},
65571   {(char *)"obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_obs_cov, 0, (char *)0, 0},
65572   {(char *)"transition", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transition, 0, (char *)0, 0},
65573   {(char *)"selection", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selection, 0, (char *)0, 0},
65574   {(char *)"state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_state_cov, 0, (char *)0, 0},
65575   {(char *)"selected_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_state_cov, 0, (char *)0, 0},
65576   {(char *)"missing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_missing, 0, (char *)0, 0},
65577   {(char *)"nmissing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_nmissing, 0, (char *)0, 0},
65578   {(char *)"has_missing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_has_missing, 0, (char *)0, 0},
65579   {(char *)"time_invariant", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_time_invariant, 0, (char *)0, 0},
65580   {(char *)"initialized", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized, 0, (char *)0, 0},
65581   {(char *)"initialized_diffuse", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized_diffuse, 0, (char *)0, 0},
65582   {(char *)"initialized_stationary", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_initialized_stationary, 0, (char *)0, 0},
65583   {(char *)"diagonal_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_diagonal_obs_cov, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_diagonal_obs_cov, (char *)0, 0},
65584   {(char *)"_diagonal_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__diagonal_obs_cov, 0, (char *)0, 0},
65585   {(char *)"subset_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_subset_design, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_subset_design, (char *)0, 0},
65586   {(char *)"companion_transition", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_companion_transition, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_companion_transition, (char *)0, 0},
65587   {(char *)"selected_obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs, 0, (char *)0, 0},
65588   {(char *)"selected_obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs_intercept, 0, (char *)0, 0},
65589   {(char *)"selected_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_design, 0, (char *)0, 0},
65590   {(char *)"selected_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_selected_obs_cov, 0, (char *)0, 0},
65591   {(char *)"transform_cholesky", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_cholesky, 0, (char *)0, 0},
65592   {(char *)"transform_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_obs_cov, 0, (char *)0, 0},
65593   {(char *)"transform_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_design, 0, (char *)0, 0},
65594   {(char *)"transform_obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_obs_intercept, 0, (char *)0, 0},
65595   {(char *)"transform_determinant", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_determinant, 0, (char *)0, 0},
65596   {(char *)"collapse_obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs, 0, (char *)0, 0},
65597   {(char *)"collapse_obs_tmp", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs_tmp, 0, (char *)0, 0},
65598   {(char *)"collapse_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_design, 0, (char *)0, 0},
65599   {(char *)"collapse_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_obs_cov, 0, (char *)0, 0},
65600   {(char *)"collapse_cholesky", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_cholesky, 0, (char *)0, 0},
65601   {(char *)"collapse_loglikelihood", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_collapse_loglikelihood, 0, (char *)0, 0},
65602   {(char *)"t", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_t, 0, (char *)0, 0},
65603   {(char *)"_previous_t", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__previous_t, 0, (char *)0, 0},
65604   {(char *)"_k_endog", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endog, 0, (char *)0, 0},
65605   {(char *)"_k_states", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_states, 0, (char *)0, 0},
65606   {(char *)"_k_posdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_posdef, 0, (char *)0, 0},
65607   {(char *)"_k_endog2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endog2, 0, (char *)0, 0},
65608   {(char *)"_k_states2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_states2, 0, (char *)0, 0},
65609   {(char *)"_k_posdef2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_posdef2, 0, (char *)0, 0},
65610   {(char *)"_k_endogstates", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_endogstates, 0, (char *)0, 0},
65611   {(char *)"_k_statesposdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__k_statesposdef, 0, (char *)0, 0},
65612   {(char *)"_nmissing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__nmissing, 0, (char *)0, 0},
65613   {0, 0, 0, 0, 0}
65614 };
65615 
65616 static PyTypeObject __pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace = {
65617   PyVarObject_HEAD_INIT(0, 0)
65618   "statsmodels.tsa.statespace._representation.dStatespace", /*tp_name*/
65619   sizeof(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace), /*tp_basicsize*/
65620   0, /*tp_itemsize*/
65621   __pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_dStatespace, /*tp_dealloc*/
65622   #if PY_VERSION_HEX < 0x030800b4
65623   0, /*tp_print*/
65624   #endif
65625   #if PY_VERSION_HEX >= 0x030800b4
65626   0, /*tp_vectorcall_offset*/
65627   #endif
65628   0, /*tp_getattr*/
65629   0, /*tp_setattr*/
65630   #if PY_MAJOR_VERSION < 3
65631   0, /*tp_compare*/
65632   #endif
65633   #if PY_MAJOR_VERSION >= 3
65634   0, /*tp_as_async*/
65635   #endif
65636   0, /*tp_repr*/
65637   0, /*tp_as_number*/
65638   0, /*tp_as_sequence*/
65639   0, /*tp_as_mapping*/
65640   0, /*tp_hash*/
65641   0, /*tp_call*/
65642   0, /*tp_str*/
65643   0, /*tp_getattro*/
65644   0, /*tp_setattro*/
65645   0, /*tp_as_buffer*/
65646   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
65647   "\n    dStatespace(obs, design, obs_intercept, obs_cov, transition, state_intercept, selection, state_cov)\n\n    *See Durbin and Koopman (2012), Chapter 4 for all notation*\n    ", /*tp_doc*/
65648   0, /*tp_traverse*/
65649   0, /*tp_clear*/
65650   0, /*tp_richcompare*/
65651   0, /*tp_weaklistoffset*/
65652   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_15__iter__, /*tp_iter*/
65653   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_17__next__, /*tp_iternext*/
65654   __pyx_methods_11statsmodels_3tsa_10statespace_15_representation_dStatespace, /*tp_methods*/
65655   0, /*tp_members*/
65656   __pyx_getsets_11statsmodels_3tsa_10statespace_15_representation_dStatespace, /*tp_getset*/
65657   0, /*tp_base*/
65658   0, /*tp_dict*/
65659   0, /*tp_descr_get*/
65660   0, /*tp_descr_set*/
65661   0, /*tp_dictoffset*/
65662   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_1__init__, /*tp_init*/
65663   0, /*tp_alloc*/
65664   __pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_dStatespace, /*tp_new*/
65665   0, /*tp_free*/
65666   0, /*tp_is_gc*/
65667   0, /*tp_bases*/
65668   0, /*tp_mro*/
65669   0, /*tp_cache*/
65670   0, /*tp_subclasses*/
65671   0, /*tp_weaklist*/
65672   0, /*tp_del*/
65673   0, /*tp_version_tag*/
65674   #if PY_VERSION_HEX >= 0x030400a1
65675   0, /*tp_finalize*/
65676   #endif
65677   #if PY_VERSION_HEX >= 0x030800b1
65678   0, /*tp_vectorcall*/
65679   #endif
65680   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
65681   0, /*tp_print*/
65682   #endif
65683 };
65684 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_cStatespace __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace;
65685 
__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_cStatespace(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)65686 static PyObject *__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_cStatespace(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
65687   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *p;
65688   PyObject *o;
65689   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
65690     o = (*t->tp_alloc)(t, 0);
65691   } else {
65692     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
65693   }
65694   if (unlikely(!o)) return 0;
65695   p = ((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)o);
65696   p->__pyx_vtab = __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_cStatespace;
65697   p->obs.data = NULL;
65698   p->obs.memview = NULL;
65699   p->obs_intercept.data = NULL;
65700   p->obs_intercept.memview = NULL;
65701   p->state_intercept.data = NULL;
65702   p->state_intercept.memview = NULL;
65703   p->initial_state.data = NULL;
65704   p->initial_state.memview = NULL;
65705   p->initial_state_cov.data = NULL;
65706   p->initial_state_cov.memview = NULL;
65707   p->initial_diffuse_state_cov.data = NULL;
65708   p->initial_diffuse_state_cov.memview = NULL;
65709   p->design.data = NULL;
65710   p->design.memview = NULL;
65711   p->obs_cov.data = NULL;
65712   p->obs_cov.memview = NULL;
65713   p->transition.data = NULL;
65714   p->transition.memview = NULL;
65715   p->selection.data = NULL;
65716   p->selection.memview = NULL;
65717   p->state_cov.data = NULL;
65718   p->state_cov.memview = NULL;
65719   p->selected_state_cov.data = NULL;
65720   p->selected_state_cov.memview = NULL;
65721   p->missing.data = NULL;
65722   p->missing.memview = NULL;
65723   p->nmissing.data = NULL;
65724   p->nmissing.memview = NULL;
65725   p->tmp.data = NULL;
65726   p->tmp.memview = NULL;
65727   p->selected_obs.data = NULL;
65728   p->selected_obs.memview = NULL;
65729   p->selected_obs_intercept.data = NULL;
65730   p->selected_obs_intercept.memview = NULL;
65731   p->selected_design.data = NULL;
65732   p->selected_design.memview = NULL;
65733   p->selected_obs_cov.data = NULL;
65734   p->selected_obs_cov.memview = NULL;
65735   p->transform_cholesky.data = NULL;
65736   p->transform_cholesky.memview = NULL;
65737   p->transform_obs_cov.data = NULL;
65738   p->transform_obs_cov.memview = NULL;
65739   p->transform_design.data = NULL;
65740   p->transform_design.memview = NULL;
65741   p->transform_obs_intercept.data = NULL;
65742   p->transform_obs_intercept.memview = NULL;
65743   p->collapse_obs.data = NULL;
65744   p->collapse_obs.memview = NULL;
65745   p->collapse_obs_tmp.data = NULL;
65746   p->collapse_obs_tmp.memview = NULL;
65747   p->collapse_design.data = NULL;
65748   p->collapse_design.memview = NULL;
65749   p->collapse_obs_cov.data = NULL;
65750   p->collapse_obs_cov.memview = NULL;
65751   p->collapse_cholesky.data = NULL;
65752   p->collapse_cholesky.memview = NULL;
65753   return o;
65754 }
65755 
__pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_cStatespace(PyObject * o)65756 static void __pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_cStatespace(PyObject *o) {
65757   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *p = (struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *)o;
65758   #if CYTHON_USE_TP_FINALIZE
65759   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
65760     if (PyObject_CallFinalizerFromDealloc(o)) return;
65761   }
65762   #endif
65763   __PYX_XDEC_MEMVIEW(&p->obs, 1);
65764   __PYX_XDEC_MEMVIEW(&p->obs_intercept, 1);
65765   __PYX_XDEC_MEMVIEW(&p->state_intercept, 1);
65766   __PYX_XDEC_MEMVIEW(&p->initial_state, 1);
65767   __PYX_XDEC_MEMVIEW(&p->initial_state_cov, 1);
65768   __PYX_XDEC_MEMVIEW(&p->initial_diffuse_state_cov, 1);
65769   __PYX_XDEC_MEMVIEW(&p->design, 1);
65770   __PYX_XDEC_MEMVIEW(&p->obs_cov, 1);
65771   __PYX_XDEC_MEMVIEW(&p->transition, 1);
65772   __PYX_XDEC_MEMVIEW(&p->selection, 1);
65773   __PYX_XDEC_MEMVIEW(&p->state_cov, 1);
65774   __PYX_XDEC_MEMVIEW(&p->selected_state_cov, 1);
65775   __PYX_XDEC_MEMVIEW(&p->missing, 1);
65776   __PYX_XDEC_MEMVIEW(&p->nmissing, 1);
65777   __PYX_XDEC_MEMVIEW(&p->tmp, 1);
65778   __PYX_XDEC_MEMVIEW(&p->selected_obs, 1);
65779   __PYX_XDEC_MEMVIEW(&p->selected_obs_intercept, 1);
65780   __PYX_XDEC_MEMVIEW(&p->selected_design, 1);
65781   __PYX_XDEC_MEMVIEW(&p->selected_obs_cov, 1);
65782   __PYX_XDEC_MEMVIEW(&p->transform_cholesky, 1);
65783   __PYX_XDEC_MEMVIEW(&p->transform_obs_cov, 1);
65784   __PYX_XDEC_MEMVIEW(&p->transform_design, 1);
65785   __PYX_XDEC_MEMVIEW(&p->transform_obs_intercept, 1);
65786   __PYX_XDEC_MEMVIEW(&p->collapse_obs, 1);
65787   __PYX_XDEC_MEMVIEW(&p->collapse_obs_tmp, 1);
65788   __PYX_XDEC_MEMVIEW(&p->collapse_design, 1);
65789   __PYX_XDEC_MEMVIEW(&p->collapse_obs_cov, 1);
65790   __PYX_XDEC_MEMVIEW(&p->collapse_cholesky, 1);
65791   (*Py_TYPE(o)->tp_free)(o);
65792 }
65793 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_nobs(PyObject * o,CYTHON_UNUSED void * x)65794 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_nobs(PyObject *o, CYTHON_UNUSED void *x) {
65795   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_4nobs_1__get__(o);
65796 }
65797 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_endog(PyObject * o,CYTHON_UNUSED void * x)65798 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_endog(PyObject *o, CYTHON_UNUSED void *x) {
65799   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7k_endog_1__get__(o);
65800 }
65801 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_states(PyObject * o,CYTHON_UNUSED void * x)65802 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_states(PyObject *o, CYTHON_UNUSED void *x) {
65803   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_states_1__get__(o);
65804 }
65805 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_posdef(PyObject * o,CYTHON_UNUSED void * x)65806 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_posdef(PyObject *o, CYTHON_UNUSED void *x) {
65807   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8k_posdef_1__get__(o);
65808 }
65809 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs(PyObject * o,CYTHON_UNUSED void * x)65810 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs(PyObject *o, CYTHON_UNUSED void *x) {
65811   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3obs_1__get__(o);
65812 }
65813 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)65814 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
65815   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13obs_intercept_1__get__(o);
65816 }
65817 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_state_intercept(PyObject * o,CYTHON_UNUSED void * x)65818 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_state_intercept(PyObject *o, CYTHON_UNUSED void *x) {
65819   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15state_intercept_1__get__(o);
65820 }
65821 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_state(PyObject * o,CYTHON_UNUSED void * x)65822 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_state(PyObject *o, CYTHON_UNUSED void *x) {
65823   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initial_state_1__get__(o);
65824 }
65825 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_state_cov(PyObject * o,CYTHON_UNUSED void * x)65826 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
65827   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17initial_state_cov_1__get__(o);
65828 }
65829 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_diffuse_state_cov(PyObject * o,CYTHON_UNUSED void * x)65830 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_diffuse_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
65831   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_25initial_diffuse_state_cov_1__get__(o);
65832 }
65833 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_design(PyObject * o,CYTHON_UNUSED void * x)65834 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_design(PyObject *o, CYTHON_UNUSED void *x) {
65835   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_6design_1__get__(o);
65836 }
65837 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65838 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65839   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7obs_cov_1__get__(o);
65840 }
65841 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transition(PyObject * o,CYTHON_UNUSED void * x)65842 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transition(PyObject *o, CYTHON_UNUSED void *x) {
65843   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10transition_1__get__(o);
65844 }
65845 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selection(PyObject * o,CYTHON_UNUSED void * x)65846 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selection(PyObject *o, CYTHON_UNUSED void *x) {
65847   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9selection_1__get__(o);
65848 }
65849 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_state_cov(PyObject * o,CYTHON_UNUSED void * x)65850 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
65851   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9state_cov_1__get__(o);
65852 }
65853 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_state_cov(PyObject * o,CYTHON_UNUSED void * x)65854 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
65855   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18selected_state_cov_1__get__(o);
65856 }
65857 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_missing(PyObject * o,CYTHON_UNUSED void * x)65858 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_missing(PyObject *o, CYTHON_UNUSED void *x) {
65859   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7missing_1__get__(o);
65860 }
65861 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_nmissing(PyObject * o,CYTHON_UNUSED void * x)65862 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_nmissing(PyObject *o, CYTHON_UNUSED void *x) {
65863   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8nmissing_1__get__(o);
65864 }
65865 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_has_missing(PyObject * o,CYTHON_UNUSED void * x)65866 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_has_missing(PyObject *o, CYTHON_UNUSED void *x) {
65867   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11has_missing_1__get__(o);
65868 }
65869 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_time_invariant(PyObject * o,CYTHON_UNUSED void * x)65870 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_time_invariant(PyObject *o, CYTHON_UNUSED void *x) {
65871   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14time_invariant_1__get__(o);
65872 }
65873 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized(PyObject * o,CYTHON_UNUSED void * x)65874 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized(PyObject *o, CYTHON_UNUSED void *x) {
65875   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialized_1__get__(o);
65876 }
65877 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized_diffuse(PyObject * o,CYTHON_UNUSED void * x)65878 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized_diffuse(PyObject *o, CYTHON_UNUSED void *x) {
65879   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19initialized_diffuse_1__get__(o);
65880 }
65881 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized_stationary(PyObject * o,CYTHON_UNUSED void * x)65882 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized_stationary(PyObject *o, CYTHON_UNUSED void *x) {
65883   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22initialized_stationary_1__get__(o);
65884 }
65885 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_diagonal_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65886 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_diagonal_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65887   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_1__get__(o);
65888 }
65889 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_diagonal_obs_cov(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)65890 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_diagonal_obs_cov(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
65891   if (v) {
65892     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16diagonal_obs_cov_3__set__(o, v);
65893   }
65894   else {
65895     PyErr_SetString(PyExc_NotImplementedError, "__del__");
65896     return -1;
65897   }
65898 }
65899 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__diagonal_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65900 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__diagonal_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65901   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17_diagonal_obs_cov_1__get__(o);
65902 }
65903 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_subset_design(PyObject * o,CYTHON_UNUSED void * x)65904 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_subset_design(PyObject *o, CYTHON_UNUSED void *x) {
65905   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_1__get__(o);
65906 }
65907 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_subset_design(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)65908 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_subset_design(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
65909   if (v) {
65910     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13subset_design_3__set__(o, v);
65911   }
65912   else {
65913     PyErr_SetString(PyExc_NotImplementedError, "__del__");
65914     return -1;
65915   }
65916 }
65917 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_companion_transition(PyObject * o,CYTHON_UNUSED void * x)65918 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_companion_transition(PyObject *o, CYTHON_UNUSED void *x) {
65919   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_1__get__(o);
65920 }
65921 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_companion_transition(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)65922 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_companion_transition(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
65923   if (v) {
65924     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_20companion_transition_3__set__(o, v);
65925   }
65926   else {
65927     PyErr_SetString(PyExc_NotImplementedError, "__del__");
65928     return -1;
65929   }
65930 }
65931 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs(PyObject * o,CYTHON_UNUSED void * x)65932 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs(PyObject *o, CYTHON_UNUSED void *x) {
65933   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12selected_obs_1__get__(o);
65934 }
65935 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)65936 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
65937   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22selected_obs_intercept_1__get__(o);
65938 }
65939 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_design(PyObject * o,CYTHON_UNUSED void * x)65940 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_design(PyObject *o, CYTHON_UNUSED void *x) {
65941   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15selected_design_1__get__(o);
65942 }
65943 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65944 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65945   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16selected_obs_cov_1__get__(o);
65946 }
65947 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_cholesky(PyObject * o,CYTHON_UNUSED void * x)65948 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_cholesky(PyObject *o, CYTHON_UNUSED void *x) {
65949   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_18transform_cholesky_1__get__(o);
65950 }
65951 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65952 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65953   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17transform_obs_cov_1__get__(o);
65954 }
65955 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_design(PyObject * o,CYTHON_UNUSED void * x)65956 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_design(PyObject *o, CYTHON_UNUSED void *x) {
65957   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16transform_design_1__get__(o);
65958 }
65959 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)65960 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
65961   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_23transform_obs_intercept_1__get__(o);
65962 }
65963 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_determinant(PyObject * o,CYTHON_UNUSED void * x)65964 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_determinant(PyObject *o, CYTHON_UNUSED void *x) {
65965   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_21transform_determinant_1__get__(o);
65966 }
65967 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs(PyObject * o,CYTHON_UNUSED void * x)65968 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs(PyObject *o, CYTHON_UNUSED void *x) {
65969   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12collapse_obs_1__get__(o);
65970 }
65971 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs_tmp(PyObject * o,CYTHON_UNUSED void * x)65972 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs_tmp(PyObject *o, CYTHON_UNUSED void *x) {
65973   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_tmp_1__get__(o);
65974 }
65975 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_design(PyObject * o,CYTHON_UNUSED void * x)65976 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_design(PyObject *o, CYTHON_UNUSED void *x) {
65977   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15collapse_design_1__get__(o);
65978 }
65979 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs_cov(PyObject * o,CYTHON_UNUSED void * x)65980 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
65981   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16collapse_obs_cov_1__get__(o);
65982 }
65983 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_cholesky(PyObject * o,CYTHON_UNUSED void * x)65984 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_cholesky(PyObject *o, CYTHON_UNUSED void *x) {
65985   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17collapse_cholesky_1__get__(o);
65986 }
65987 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_loglikelihood(PyObject * o,CYTHON_UNUSED void * x)65988 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_loglikelihood(PyObject *o, CYTHON_UNUSED void *x) {
65989   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_22collapse_loglikelihood_1__get__(o);
65990 }
65991 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_t(PyObject * o,CYTHON_UNUSED void * x)65992 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_t(PyObject *o, CYTHON_UNUSED void *x) {
65993   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1t_1__get__(o);
65994 }
65995 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__previous_t(PyObject * o,CYTHON_UNUSED void * x)65996 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__previous_t(PyObject *o, CYTHON_UNUSED void *x) {
65997   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11_previous_t_1__get__(o);
65998 }
65999 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endog(PyObject * o,CYTHON_UNUSED void * x)66000 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endog(PyObject *o, CYTHON_UNUSED void *x) {
66001   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8_k_endog_1__get__(o);
66002 }
66003 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_states(PyObject * o,CYTHON_UNUSED void * x)66004 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_states(PyObject *o, CYTHON_UNUSED void *x) {
66005   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_states_1__get__(o);
66006 }
66007 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_posdef(PyObject * o,CYTHON_UNUSED void * x)66008 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_posdef(PyObject *o, CYTHON_UNUSED void *x) {
66009   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_posdef_1__get__(o);
66010 }
66011 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endog2(PyObject * o,CYTHON_UNUSED void * x)66012 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endog2(PyObject *o, CYTHON_UNUSED void *x) {
66013   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_k_endog2_1__get__(o);
66014 }
66015 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_states2(PyObject * o,CYTHON_UNUSED void * x)66016 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_states2(PyObject *o, CYTHON_UNUSED void *x) {
66017   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_states2_1__get__(o);
66018 }
66019 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_posdef2(PyObject * o,CYTHON_UNUSED void * x)66020 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_posdef2(PyObject *o, CYTHON_UNUSED void *x) {
66021   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10_k_posdef2_1__get__(o);
66022 }
66023 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endogstates(PyObject * o,CYTHON_UNUSED void * x)66024 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endogstates(PyObject *o, CYTHON_UNUSED void *x) {
66025   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_14_k_endogstates_1__get__(o);
66026 }
66027 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_statesposdef(PyObject * o,CYTHON_UNUSED void * x)66028 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_statesposdef(PyObject *o, CYTHON_UNUSED void *x) {
66029   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15_k_statesposdef_1__get__(o);
66030 }
66031 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__nmissing(PyObject * o,CYTHON_UNUSED void * x)66032 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__nmissing(PyObject *o, CYTHON_UNUSED void *x) {
66033   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9_nmissing_1__get__(o);
66034 }
66035 
__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17__next__(PyObject * self,CYTHON_UNUSED PyObject * arg)66036 static PyObject *__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17__next__(self);}
66037 
66038 static PyMethodDef __pyx_methods_11statsmodels_3tsa_10statespace_15_representation_cStatespace[] = {
66039   {"__reduce__", (PyCFunction)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_3__reduce__, METH_NOARGS, 0},
66040   {"__setstate__", (PyCFunction)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_5__setstate__, METH_O, 0},
66041   {"initialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_7initialize, METH_VARARGS|METH_KEYWORDS, 0},
66042   {"initialize_known", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_9initialize_known, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_8initialize_known},
66043   {"initialize_approximate_diffuse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_11initialize_approximate_diffuse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_10initialize_approximate_diffuse},
66044   {"initialize_stationary", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_13initialize_stationary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_12initialize_stationary},
66045   {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__},
66046   {"seek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_19seek, METH_VARARGS|METH_KEYWORDS, 0},
66047   {0, 0, 0, 0}
66048 };
66049 
66050 static struct PyGetSetDef __pyx_getsets_11statsmodels_3tsa_10statespace_15_representation_cStatespace[] = {
66051   {(char *)"nobs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_nobs, 0, (char *)0, 0},
66052   {(char *)"k_endog", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_endog, 0, (char *)0, 0},
66053   {(char *)"k_states", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_states, 0, (char *)0, 0},
66054   {(char *)"k_posdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_k_posdef, 0, (char *)0, 0},
66055   {(char *)"obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs, 0, (char *)0, 0},
66056   {(char *)"obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs_intercept, 0, (char *)0, 0},
66057   {(char *)"state_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_state_intercept, 0, (char *)0, 0},
66058   {(char *)"initial_state", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_state, 0, (char *)0, 0},
66059   {(char *)"initial_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_state_cov, 0, (char *)0, 0},
66060   {(char *)"initial_diffuse_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initial_diffuse_state_cov, 0, (char *)0, 0},
66061   {(char *)"design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_design, 0, (char *)0, 0},
66062   {(char *)"obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_obs_cov, 0, (char *)0, 0},
66063   {(char *)"transition", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transition, 0, (char *)0, 0},
66064   {(char *)"selection", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selection, 0, (char *)0, 0},
66065   {(char *)"state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_state_cov, 0, (char *)0, 0},
66066   {(char *)"selected_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_state_cov, 0, (char *)0, 0},
66067   {(char *)"missing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_missing, 0, (char *)0, 0},
66068   {(char *)"nmissing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_nmissing, 0, (char *)0, 0},
66069   {(char *)"has_missing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_has_missing, 0, (char *)0, 0},
66070   {(char *)"time_invariant", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_time_invariant, 0, (char *)0, 0},
66071   {(char *)"initialized", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized, 0, (char *)0, 0},
66072   {(char *)"initialized_diffuse", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized_diffuse, 0, (char *)0, 0},
66073   {(char *)"initialized_stationary", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_initialized_stationary, 0, (char *)0, 0},
66074   {(char *)"diagonal_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_diagonal_obs_cov, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_diagonal_obs_cov, (char *)0, 0},
66075   {(char *)"_diagonal_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__diagonal_obs_cov, 0, (char *)0, 0},
66076   {(char *)"subset_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_subset_design, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_subset_design, (char *)0, 0},
66077   {(char *)"companion_transition", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_companion_transition, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_companion_transition, (char *)0, 0},
66078   {(char *)"selected_obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs, 0, (char *)0, 0},
66079   {(char *)"selected_obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs_intercept, 0, (char *)0, 0},
66080   {(char *)"selected_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_design, 0, (char *)0, 0},
66081   {(char *)"selected_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_selected_obs_cov, 0, (char *)0, 0},
66082   {(char *)"transform_cholesky", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_cholesky, 0, (char *)0, 0},
66083   {(char *)"transform_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_obs_cov, 0, (char *)0, 0},
66084   {(char *)"transform_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_design, 0, (char *)0, 0},
66085   {(char *)"transform_obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_obs_intercept, 0, (char *)0, 0},
66086   {(char *)"transform_determinant", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_determinant, 0, (char *)0, 0},
66087   {(char *)"collapse_obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs, 0, (char *)0, 0},
66088   {(char *)"collapse_obs_tmp", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs_tmp, 0, (char *)0, 0},
66089   {(char *)"collapse_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_design, 0, (char *)0, 0},
66090   {(char *)"collapse_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_obs_cov, 0, (char *)0, 0},
66091   {(char *)"collapse_cholesky", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_cholesky, 0, (char *)0, 0},
66092   {(char *)"collapse_loglikelihood", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_collapse_loglikelihood, 0, (char *)0, 0},
66093   {(char *)"t", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_t, 0, (char *)0, 0},
66094   {(char *)"_previous_t", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__previous_t, 0, (char *)0, 0},
66095   {(char *)"_k_endog", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endog, 0, (char *)0, 0},
66096   {(char *)"_k_states", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_states, 0, (char *)0, 0},
66097   {(char *)"_k_posdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_posdef, 0, (char *)0, 0},
66098   {(char *)"_k_endog2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endog2, 0, (char *)0, 0},
66099   {(char *)"_k_states2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_states2, 0, (char *)0, 0},
66100   {(char *)"_k_posdef2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_posdef2, 0, (char *)0, 0},
66101   {(char *)"_k_endogstates", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_endogstates, 0, (char *)0, 0},
66102   {(char *)"_k_statesposdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__k_statesposdef, 0, (char *)0, 0},
66103   {(char *)"_nmissing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__nmissing, 0, (char *)0, 0},
66104   {0, 0, 0, 0, 0}
66105 };
66106 
66107 static PyTypeObject __pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace = {
66108   PyVarObject_HEAD_INIT(0, 0)
66109   "statsmodels.tsa.statespace._representation.cStatespace", /*tp_name*/
66110   sizeof(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace), /*tp_basicsize*/
66111   0, /*tp_itemsize*/
66112   __pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_cStatespace, /*tp_dealloc*/
66113   #if PY_VERSION_HEX < 0x030800b4
66114   0, /*tp_print*/
66115   #endif
66116   #if PY_VERSION_HEX >= 0x030800b4
66117   0, /*tp_vectorcall_offset*/
66118   #endif
66119   0, /*tp_getattr*/
66120   0, /*tp_setattr*/
66121   #if PY_MAJOR_VERSION < 3
66122   0, /*tp_compare*/
66123   #endif
66124   #if PY_MAJOR_VERSION >= 3
66125   0, /*tp_as_async*/
66126   #endif
66127   0, /*tp_repr*/
66128   0, /*tp_as_number*/
66129   0, /*tp_as_sequence*/
66130   0, /*tp_as_mapping*/
66131   0, /*tp_hash*/
66132   0, /*tp_call*/
66133   0, /*tp_str*/
66134   0, /*tp_getattro*/
66135   0, /*tp_setattro*/
66136   0, /*tp_as_buffer*/
66137   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
66138   "\n    cStatespace(obs, design, obs_intercept, obs_cov, transition, state_intercept, selection, state_cov)\n\n    *See Durbin and Koopman (2012), Chapter 4 for all notation*\n    ", /*tp_doc*/
66139   0, /*tp_traverse*/
66140   0, /*tp_clear*/
66141   0, /*tp_richcompare*/
66142   0, /*tp_weaklistoffset*/
66143   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_15__iter__, /*tp_iter*/
66144   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_17__next__, /*tp_iternext*/
66145   __pyx_methods_11statsmodels_3tsa_10statespace_15_representation_cStatespace, /*tp_methods*/
66146   0, /*tp_members*/
66147   __pyx_getsets_11statsmodels_3tsa_10statespace_15_representation_cStatespace, /*tp_getset*/
66148   0, /*tp_base*/
66149   0, /*tp_dict*/
66150   0, /*tp_descr_get*/
66151   0, /*tp_descr_set*/
66152   0, /*tp_dictoffset*/
66153   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_1__init__, /*tp_init*/
66154   0, /*tp_alloc*/
66155   __pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_cStatespace, /*tp_new*/
66156   0, /*tp_free*/
66157   0, /*tp_is_gc*/
66158   0, /*tp_bases*/
66159   0, /*tp_mro*/
66160   0, /*tp_cache*/
66161   0, /*tp_subclasses*/
66162   0, /*tp_weaklist*/
66163   0, /*tp_del*/
66164   0, /*tp_version_tag*/
66165   #if PY_VERSION_HEX >= 0x030400a1
66166   0, /*tp_finalize*/
66167   #endif
66168   #if PY_VERSION_HEX >= 0x030800b1
66169   0, /*tp_vectorcall*/
66170   #endif
66171   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
66172   0, /*tp_print*/
66173   #endif
66174 };
66175 static struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_representation_zStatespace __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace;
66176 
__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_zStatespace(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)66177 static PyObject *__pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_zStatespace(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
66178   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *p;
66179   PyObject *o;
66180   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
66181     o = (*t->tp_alloc)(t, 0);
66182   } else {
66183     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
66184   }
66185   if (unlikely(!o)) return 0;
66186   p = ((struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)o);
66187   p->__pyx_vtab = __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_zStatespace;
66188   p->obs.data = NULL;
66189   p->obs.memview = NULL;
66190   p->obs_intercept.data = NULL;
66191   p->obs_intercept.memview = NULL;
66192   p->state_intercept.data = NULL;
66193   p->state_intercept.memview = NULL;
66194   p->initial_state.data = NULL;
66195   p->initial_state.memview = NULL;
66196   p->initial_state_cov.data = NULL;
66197   p->initial_state_cov.memview = NULL;
66198   p->initial_diffuse_state_cov.data = NULL;
66199   p->initial_diffuse_state_cov.memview = NULL;
66200   p->design.data = NULL;
66201   p->design.memview = NULL;
66202   p->obs_cov.data = NULL;
66203   p->obs_cov.memview = NULL;
66204   p->transition.data = NULL;
66205   p->transition.memview = NULL;
66206   p->selection.data = NULL;
66207   p->selection.memview = NULL;
66208   p->state_cov.data = NULL;
66209   p->state_cov.memview = NULL;
66210   p->selected_state_cov.data = NULL;
66211   p->selected_state_cov.memview = NULL;
66212   p->missing.data = NULL;
66213   p->missing.memview = NULL;
66214   p->nmissing.data = NULL;
66215   p->nmissing.memview = NULL;
66216   p->tmp.data = NULL;
66217   p->tmp.memview = NULL;
66218   p->selected_obs.data = NULL;
66219   p->selected_obs.memview = NULL;
66220   p->selected_obs_intercept.data = NULL;
66221   p->selected_obs_intercept.memview = NULL;
66222   p->selected_design.data = NULL;
66223   p->selected_design.memview = NULL;
66224   p->selected_obs_cov.data = NULL;
66225   p->selected_obs_cov.memview = NULL;
66226   p->transform_cholesky.data = NULL;
66227   p->transform_cholesky.memview = NULL;
66228   p->transform_obs_cov.data = NULL;
66229   p->transform_obs_cov.memview = NULL;
66230   p->transform_design.data = NULL;
66231   p->transform_design.memview = NULL;
66232   p->transform_obs_intercept.data = NULL;
66233   p->transform_obs_intercept.memview = NULL;
66234   p->collapse_obs.data = NULL;
66235   p->collapse_obs.memview = NULL;
66236   p->collapse_obs_tmp.data = NULL;
66237   p->collapse_obs_tmp.memview = NULL;
66238   p->collapse_design.data = NULL;
66239   p->collapse_design.memview = NULL;
66240   p->collapse_obs_cov.data = NULL;
66241   p->collapse_obs_cov.memview = NULL;
66242   p->collapse_cholesky.data = NULL;
66243   p->collapse_cholesky.memview = NULL;
66244   return o;
66245 }
66246 
__pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_zStatespace(PyObject * o)66247 static void __pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_zStatespace(PyObject *o) {
66248   struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *p = (struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *)o;
66249   #if CYTHON_USE_TP_FINALIZE
66250   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
66251     if (PyObject_CallFinalizerFromDealloc(o)) return;
66252   }
66253   #endif
66254   __PYX_XDEC_MEMVIEW(&p->obs, 1);
66255   __PYX_XDEC_MEMVIEW(&p->obs_intercept, 1);
66256   __PYX_XDEC_MEMVIEW(&p->state_intercept, 1);
66257   __PYX_XDEC_MEMVIEW(&p->initial_state, 1);
66258   __PYX_XDEC_MEMVIEW(&p->initial_state_cov, 1);
66259   __PYX_XDEC_MEMVIEW(&p->initial_diffuse_state_cov, 1);
66260   __PYX_XDEC_MEMVIEW(&p->design, 1);
66261   __PYX_XDEC_MEMVIEW(&p->obs_cov, 1);
66262   __PYX_XDEC_MEMVIEW(&p->transition, 1);
66263   __PYX_XDEC_MEMVIEW(&p->selection, 1);
66264   __PYX_XDEC_MEMVIEW(&p->state_cov, 1);
66265   __PYX_XDEC_MEMVIEW(&p->selected_state_cov, 1);
66266   __PYX_XDEC_MEMVIEW(&p->missing, 1);
66267   __PYX_XDEC_MEMVIEW(&p->nmissing, 1);
66268   __PYX_XDEC_MEMVIEW(&p->tmp, 1);
66269   __PYX_XDEC_MEMVIEW(&p->selected_obs, 1);
66270   __PYX_XDEC_MEMVIEW(&p->selected_obs_intercept, 1);
66271   __PYX_XDEC_MEMVIEW(&p->selected_design, 1);
66272   __PYX_XDEC_MEMVIEW(&p->selected_obs_cov, 1);
66273   __PYX_XDEC_MEMVIEW(&p->transform_cholesky, 1);
66274   __PYX_XDEC_MEMVIEW(&p->transform_obs_cov, 1);
66275   __PYX_XDEC_MEMVIEW(&p->transform_design, 1);
66276   __PYX_XDEC_MEMVIEW(&p->transform_obs_intercept, 1);
66277   __PYX_XDEC_MEMVIEW(&p->collapse_obs, 1);
66278   __PYX_XDEC_MEMVIEW(&p->collapse_obs_tmp, 1);
66279   __PYX_XDEC_MEMVIEW(&p->collapse_design, 1);
66280   __PYX_XDEC_MEMVIEW(&p->collapse_obs_cov, 1);
66281   __PYX_XDEC_MEMVIEW(&p->collapse_cholesky, 1);
66282   (*Py_TYPE(o)->tp_free)(o);
66283 }
66284 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_nobs(PyObject * o,CYTHON_UNUSED void * x)66285 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_nobs(PyObject *o, CYTHON_UNUSED void *x) {
66286   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_4nobs_1__get__(o);
66287 }
66288 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_endog(PyObject * o,CYTHON_UNUSED void * x)66289 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_endog(PyObject *o, CYTHON_UNUSED void *x) {
66290   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7k_endog_1__get__(o);
66291 }
66292 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_states(PyObject * o,CYTHON_UNUSED void * x)66293 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_states(PyObject *o, CYTHON_UNUSED void *x) {
66294   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_states_1__get__(o);
66295 }
66296 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_posdef(PyObject * o,CYTHON_UNUSED void * x)66297 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_posdef(PyObject *o, CYTHON_UNUSED void *x) {
66298   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8k_posdef_1__get__(o);
66299 }
66300 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs(PyObject * o,CYTHON_UNUSED void * x)66301 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs(PyObject *o, CYTHON_UNUSED void *x) {
66302   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3obs_1__get__(o);
66303 }
66304 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)66305 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
66306   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13obs_intercept_1__get__(o);
66307 }
66308 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_state_intercept(PyObject * o,CYTHON_UNUSED void * x)66309 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_state_intercept(PyObject *o, CYTHON_UNUSED void *x) {
66310   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15state_intercept_1__get__(o);
66311 }
66312 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_state(PyObject * o,CYTHON_UNUSED void * x)66313 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_state(PyObject *o, CYTHON_UNUSED void *x) {
66314   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initial_state_1__get__(o);
66315 }
66316 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_state_cov(PyObject * o,CYTHON_UNUSED void * x)66317 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
66318   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17initial_state_cov_1__get__(o);
66319 }
66320 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_diffuse_state_cov(PyObject * o,CYTHON_UNUSED void * x)66321 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_diffuse_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
66322   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_25initial_diffuse_state_cov_1__get__(o);
66323 }
66324 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_design(PyObject * o,CYTHON_UNUSED void * x)66325 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_design(PyObject *o, CYTHON_UNUSED void *x) {
66326   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_6design_1__get__(o);
66327 }
66328 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs_cov(PyObject * o,CYTHON_UNUSED void * x)66329 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
66330   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7obs_cov_1__get__(o);
66331 }
66332 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transition(PyObject * o,CYTHON_UNUSED void * x)66333 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transition(PyObject *o, CYTHON_UNUSED void *x) {
66334   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10transition_1__get__(o);
66335 }
66336 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selection(PyObject * o,CYTHON_UNUSED void * x)66337 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selection(PyObject *o, CYTHON_UNUSED void *x) {
66338   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9selection_1__get__(o);
66339 }
66340 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_state_cov(PyObject * o,CYTHON_UNUSED void * x)66341 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
66342   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9state_cov_1__get__(o);
66343 }
66344 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_state_cov(PyObject * o,CYTHON_UNUSED void * x)66345 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_state_cov(PyObject *o, CYTHON_UNUSED void *x) {
66346   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18selected_state_cov_1__get__(o);
66347 }
66348 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_missing(PyObject * o,CYTHON_UNUSED void * x)66349 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_missing(PyObject *o, CYTHON_UNUSED void *x) {
66350   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7missing_1__get__(o);
66351 }
66352 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_nmissing(PyObject * o,CYTHON_UNUSED void * x)66353 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_nmissing(PyObject *o, CYTHON_UNUSED void *x) {
66354   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8nmissing_1__get__(o);
66355 }
66356 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_has_missing(PyObject * o,CYTHON_UNUSED void * x)66357 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_has_missing(PyObject *o, CYTHON_UNUSED void *x) {
66358   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11has_missing_1__get__(o);
66359 }
66360 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_time_invariant(PyObject * o,CYTHON_UNUSED void * x)66361 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_time_invariant(PyObject *o, CYTHON_UNUSED void *x) {
66362   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14time_invariant_1__get__(o);
66363 }
66364 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized(PyObject * o,CYTHON_UNUSED void * x)66365 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized(PyObject *o, CYTHON_UNUSED void *x) {
66366   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialized_1__get__(o);
66367 }
66368 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized_diffuse(PyObject * o,CYTHON_UNUSED void * x)66369 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized_diffuse(PyObject *o, CYTHON_UNUSED void *x) {
66370   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19initialized_diffuse_1__get__(o);
66371 }
66372 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized_stationary(PyObject * o,CYTHON_UNUSED void * x)66373 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized_stationary(PyObject *o, CYTHON_UNUSED void *x) {
66374   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22initialized_stationary_1__get__(o);
66375 }
66376 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_diagonal_obs_cov(PyObject * o,CYTHON_UNUSED void * x)66377 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_diagonal_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
66378   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_1__get__(o);
66379 }
66380 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_diagonal_obs_cov(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)66381 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_diagonal_obs_cov(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
66382   if (v) {
66383     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16diagonal_obs_cov_3__set__(o, v);
66384   }
66385   else {
66386     PyErr_SetString(PyExc_NotImplementedError, "__del__");
66387     return -1;
66388   }
66389 }
66390 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__diagonal_obs_cov(PyObject * o,CYTHON_UNUSED void * x)66391 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__diagonal_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
66392   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17_diagonal_obs_cov_1__get__(o);
66393 }
66394 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_subset_design(PyObject * o,CYTHON_UNUSED void * x)66395 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_subset_design(PyObject *o, CYTHON_UNUSED void *x) {
66396   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_1__get__(o);
66397 }
66398 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_subset_design(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)66399 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_subset_design(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
66400   if (v) {
66401     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13subset_design_3__set__(o, v);
66402   }
66403   else {
66404     PyErr_SetString(PyExc_NotImplementedError, "__del__");
66405     return -1;
66406   }
66407 }
66408 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_companion_transition(PyObject * o,CYTHON_UNUSED void * x)66409 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_companion_transition(PyObject *o, CYTHON_UNUSED void *x) {
66410   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_1__get__(o);
66411 }
66412 
__pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_companion_transition(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)66413 static int __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_companion_transition(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
66414   if (v) {
66415     return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_20companion_transition_3__set__(o, v);
66416   }
66417   else {
66418     PyErr_SetString(PyExc_NotImplementedError, "__del__");
66419     return -1;
66420   }
66421 }
66422 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs(PyObject * o,CYTHON_UNUSED void * x)66423 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs(PyObject *o, CYTHON_UNUSED void *x) {
66424   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12selected_obs_1__get__(o);
66425 }
66426 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)66427 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
66428   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22selected_obs_intercept_1__get__(o);
66429 }
66430 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_design(PyObject * o,CYTHON_UNUSED void * x)66431 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_design(PyObject *o, CYTHON_UNUSED void *x) {
66432   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15selected_design_1__get__(o);
66433 }
66434 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs_cov(PyObject * o,CYTHON_UNUSED void * x)66435 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
66436   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16selected_obs_cov_1__get__(o);
66437 }
66438 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_cholesky(PyObject * o,CYTHON_UNUSED void * x)66439 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_cholesky(PyObject *o, CYTHON_UNUSED void *x) {
66440   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_18transform_cholesky_1__get__(o);
66441 }
66442 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_obs_cov(PyObject * o,CYTHON_UNUSED void * x)66443 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
66444   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17transform_obs_cov_1__get__(o);
66445 }
66446 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_design(PyObject * o,CYTHON_UNUSED void * x)66447 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_design(PyObject *o, CYTHON_UNUSED void *x) {
66448   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16transform_design_1__get__(o);
66449 }
66450 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_obs_intercept(PyObject * o,CYTHON_UNUSED void * x)66451 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_obs_intercept(PyObject *o, CYTHON_UNUSED void *x) {
66452   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_23transform_obs_intercept_1__get__(o);
66453 }
66454 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_determinant(PyObject * o,CYTHON_UNUSED void * x)66455 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_determinant(PyObject *o, CYTHON_UNUSED void *x) {
66456   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_21transform_determinant_1__get__(o);
66457 }
66458 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs(PyObject * o,CYTHON_UNUSED void * x)66459 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs(PyObject *o, CYTHON_UNUSED void *x) {
66460   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12collapse_obs_1__get__(o);
66461 }
66462 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs_tmp(PyObject * o,CYTHON_UNUSED void * x)66463 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs_tmp(PyObject *o, CYTHON_UNUSED void *x) {
66464   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_tmp_1__get__(o);
66465 }
66466 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_design(PyObject * o,CYTHON_UNUSED void * x)66467 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_design(PyObject *o, CYTHON_UNUSED void *x) {
66468   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15collapse_design_1__get__(o);
66469 }
66470 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs_cov(PyObject * o,CYTHON_UNUSED void * x)66471 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs_cov(PyObject *o, CYTHON_UNUSED void *x) {
66472   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16collapse_obs_cov_1__get__(o);
66473 }
66474 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_cholesky(PyObject * o,CYTHON_UNUSED void * x)66475 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_cholesky(PyObject *o, CYTHON_UNUSED void *x) {
66476   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17collapse_cholesky_1__get__(o);
66477 }
66478 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_loglikelihood(PyObject * o,CYTHON_UNUSED void * x)66479 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_loglikelihood(PyObject *o, CYTHON_UNUSED void *x) {
66480   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_22collapse_loglikelihood_1__get__(o);
66481 }
66482 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_t(PyObject * o,CYTHON_UNUSED void * x)66483 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_t(PyObject *o, CYTHON_UNUSED void *x) {
66484   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1t_1__get__(o);
66485 }
66486 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__previous_t(PyObject * o,CYTHON_UNUSED void * x)66487 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__previous_t(PyObject *o, CYTHON_UNUSED void *x) {
66488   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11_previous_t_1__get__(o);
66489 }
66490 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endog(PyObject * o,CYTHON_UNUSED void * x)66491 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endog(PyObject *o, CYTHON_UNUSED void *x) {
66492   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8_k_endog_1__get__(o);
66493 }
66494 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_states(PyObject * o,CYTHON_UNUSED void * x)66495 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_states(PyObject *o, CYTHON_UNUSED void *x) {
66496   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_states_1__get__(o);
66497 }
66498 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_posdef(PyObject * o,CYTHON_UNUSED void * x)66499 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_posdef(PyObject *o, CYTHON_UNUSED void *x) {
66500   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_posdef_1__get__(o);
66501 }
66502 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endog2(PyObject * o,CYTHON_UNUSED void * x)66503 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endog2(PyObject *o, CYTHON_UNUSED void *x) {
66504   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_k_endog2_1__get__(o);
66505 }
66506 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_states2(PyObject * o,CYTHON_UNUSED void * x)66507 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_states2(PyObject *o, CYTHON_UNUSED void *x) {
66508   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_states2_1__get__(o);
66509 }
66510 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_posdef2(PyObject * o,CYTHON_UNUSED void * x)66511 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_posdef2(PyObject *o, CYTHON_UNUSED void *x) {
66512   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10_k_posdef2_1__get__(o);
66513 }
66514 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endogstates(PyObject * o,CYTHON_UNUSED void * x)66515 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endogstates(PyObject *o, CYTHON_UNUSED void *x) {
66516   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_14_k_endogstates_1__get__(o);
66517 }
66518 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_statesposdef(PyObject * o,CYTHON_UNUSED void * x)66519 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_statesposdef(PyObject *o, CYTHON_UNUSED void *x) {
66520   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15_k_statesposdef_1__get__(o);
66521 }
66522 
__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__nmissing(PyObject * o,CYTHON_UNUSED void * x)66523 static PyObject *__pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__nmissing(PyObject *o, CYTHON_UNUSED void *x) {
66524   return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9_nmissing_1__get__(o);
66525 }
66526 
__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17__next__(PyObject * self,CYTHON_UNUSED PyObject * arg)66527 static PyObject *__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17__next__(self);}
66528 
66529 static PyMethodDef __pyx_methods_11statsmodels_3tsa_10statespace_15_representation_zStatespace[] = {
66530   {"__reduce__", (PyCFunction)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_3__reduce__, METH_NOARGS, 0},
66531   {"__setstate__", (PyCFunction)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_5__setstate__, METH_O, 0},
66532   {"initialize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_7initialize, METH_VARARGS|METH_KEYWORDS, 0},
66533   {"initialize_known", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_9initialize_known, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_8initialize_known},
66534   {"initialize_approximate_diffuse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_11initialize_approximate_diffuse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_10initialize_approximate_diffuse},
66535   {"initialize_stationary", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_13initialize_stationary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_12initialize_stationary},
66536   {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__},
66537   {"seek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_19seek, METH_VARARGS|METH_KEYWORDS, 0},
66538   {0, 0, 0, 0}
66539 };
66540 
66541 static struct PyGetSetDef __pyx_getsets_11statsmodels_3tsa_10statespace_15_representation_zStatespace[] = {
66542   {(char *)"nobs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_nobs, 0, (char *)0, 0},
66543   {(char *)"k_endog", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_endog, 0, (char *)0, 0},
66544   {(char *)"k_states", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_states, 0, (char *)0, 0},
66545   {(char *)"k_posdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_k_posdef, 0, (char *)0, 0},
66546   {(char *)"obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs, 0, (char *)0, 0},
66547   {(char *)"obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs_intercept, 0, (char *)0, 0},
66548   {(char *)"state_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_state_intercept, 0, (char *)0, 0},
66549   {(char *)"initial_state", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_state, 0, (char *)0, 0},
66550   {(char *)"initial_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_state_cov, 0, (char *)0, 0},
66551   {(char *)"initial_diffuse_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initial_diffuse_state_cov, 0, (char *)0, 0},
66552   {(char *)"design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_design, 0, (char *)0, 0},
66553   {(char *)"obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_obs_cov, 0, (char *)0, 0},
66554   {(char *)"transition", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transition, 0, (char *)0, 0},
66555   {(char *)"selection", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selection, 0, (char *)0, 0},
66556   {(char *)"state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_state_cov, 0, (char *)0, 0},
66557   {(char *)"selected_state_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_state_cov, 0, (char *)0, 0},
66558   {(char *)"missing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_missing, 0, (char *)0, 0},
66559   {(char *)"nmissing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_nmissing, 0, (char *)0, 0},
66560   {(char *)"has_missing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_has_missing, 0, (char *)0, 0},
66561   {(char *)"time_invariant", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_time_invariant, 0, (char *)0, 0},
66562   {(char *)"initialized", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized, 0, (char *)0, 0},
66563   {(char *)"initialized_diffuse", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized_diffuse, 0, (char *)0, 0},
66564   {(char *)"initialized_stationary", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_initialized_stationary, 0, (char *)0, 0},
66565   {(char *)"diagonal_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_diagonal_obs_cov, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_diagonal_obs_cov, (char *)0, 0},
66566   {(char *)"_diagonal_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__diagonal_obs_cov, 0, (char *)0, 0},
66567   {(char *)"subset_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_subset_design, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_subset_design, (char *)0, 0},
66568   {(char *)"companion_transition", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_companion_transition, __pyx_setprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_companion_transition, (char *)0, 0},
66569   {(char *)"selected_obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs, 0, (char *)0, 0},
66570   {(char *)"selected_obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs_intercept, 0, (char *)0, 0},
66571   {(char *)"selected_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_design, 0, (char *)0, 0},
66572   {(char *)"selected_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_selected_obs_cov, 0, (char *)0, 0},
66573   {(char *)"transform_cholesky", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_cholesky, 0, (char *)0, 0},
66574   {(char *)"transform_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_obs_cov, 0, (char *)0, 0},
66575   {(char *)"transform_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_design, 0, (char *)0, 0},
66576   {(char *)"transform_obs_intercept", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_obs_intercept, 0, (char *)0, 0},
66577   {(char *)"transform_determinant", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_determinant, 0, (char *)0, 0},
66578   {(char *)"collapse_obs", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs, 0, (char *)0, 0},
66579   {(char *)"collapse_obs_tmp", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs_tmp, 0, (char *)0, 0},
66580   {(char *)"collapse_design", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_design, 0, (char *)0, 0},
66581   {(char *)"collapse_obs_cov", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_obs_cov, 0, (char *)0, 0},
66582   {(char *)"collapse_cholesky", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_cholesky, 0, (char *)0, 0},
66583   {(char *)"collapse_loglikelihood", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_collapse_loglikelihood, 0, (char *)0, 0},
66584   {(char *)"t", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_t, 0, (char *)0, 0},
66585   {(char *)"_previous_t", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__previous_t, 0, (char *)0, 0},
66586   {(char *)"_k_endog", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endog, 0, (char *)0, 0},
66587   {(char *)"_k_states", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_states, 0, (char *)0, 0},
66588   {(char *)"_k_posdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_posdef, 0, (char *)0, 0},
66589   {(char *)"_k_endog2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endog2, 0, (char *)0, 0},
66590   {(char *)"_k_states2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_states2, 0, (char *)0, 0},
66591   {(char *)"_k_posdef2", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_posdef2, 0, (char *)0, 0},
66592   {(char *)"_k_endogstates", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_endogstates, 0, (char *)0, 0},
66593   {(char *)"_k_statesposdef", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__k_statesposdef, 0, (char *)0, 0},
66594   {(char *)"_nmissing", __pyx_getprop_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__nmissing, 0, (char *)0, 0},
66595   {0, 0, 0, 0, 0}
66596 };
66597 
66598 static PyTypeObject __pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace = {
66599   PyVarObject_HEAD_INIT(0, 0)
66600   "statsmodels.tsa.statespace._representation.zStatespace", /*tp_name*/
66601   sizeof(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace), /*tp_basicsize*/
66602   0, /*tp_itemsize*/
66603   __pyx_tp_dealloc_11statsmodels_3tsa_10statespace_15_representation_zStatespace, /*tp_dealloc*/
66604   #if PY_VERSION_HEX < 0x030800b4
66605   0, /*tp_print*/
66606   #endif
66607   #if PY_VERSION_HEX >= 0x030800b4
66608   0, /*tp_vectorcall_offset*/
66609   #endif
66610   0, /*tp_getattr*/
66611   0, /*tp_setattr*/
66612   #if PY_MAJOR_VERSION < 3
66613   0, /*tp_compare*/
66614   #endif
66615   #if PY_MAJOR_VERSION >= 3
66616   0, /*tp_as_async*/
66617   #endif
66618   0, /*tp_repr*/
66619   0, /*tp_as_number*/
66620   0, /*tp_as_sequence*/
66621   0, /*tp_as_mapping*/
66622   0, /*tp_hash*/
66623   0, /*tp_call*/
66624   0, /*tp_str*/
66625   0, /*tp_getattro*/
66626   0, /*tp_setattro*/
66627   0, /*tp_as_buffer*/
66628   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
66629   "\n    zStatespace(obs, design, obs_intercept, obs_cov, transition, state_intercept, selection, state_cov)\n\n    *See Durbin and Koopman (2012), Chapter 4 for all notation*\n    ", /*tp_doc*/
66630   0, /*tp_traverse*/
66631   0, /*tp_clear*/
66632   0, /*tp_richcompare*/
66633   0, /*tp_weaklistoffset*/
66634   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_15__iter__, /*tp_iter*/
66635   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_17__next__, /*tp_iternext*/
66636   __pyx_methods_11statsmodels_3tsa_10statespace_15_representation_zStatespace, /*tp_methods*/
66637   0, /*tp_members*/
66638   __pyx_getsets_11statsmodels_3tsa_10statespace_15_representation_zStatespace, /*tp_getset*/
66639   0, /*tp_base*/
66640   0, /*tp_dict*/
66641   0, /*tp_descr_get*/
66642   0, /*tp_descr_set*/
66643   0, /*tp_dictoffset*/
66644   __pyx_pw_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_1__init__, /*tp_init*/
66645   0, /*tp_alloc*/
66646   __pyx_tp_new_11statsmodels_3tsa_10statespace_15_representation_zStatespace, /*tp_new*/
66647   0, /*tp_free*/
66648   0, /*tp_is_gc*/
66649   0, /*tp_bases*/
66650   0, /*tp_mro*/
66651   0, /*tp_cache*/
66652   0, /*tp_subclasses*/
66653   0, /*tp_weaklist*/
66654   0, /*tp_del*/
66655   0, /*tp_version_tag*/
66656   #if PY_VERSION_HEX >= 0x030400a1
66657   0, /*tp_finalize*/
66658   #endif
66659   #if PY_VERSION_HEX >= 0x030800b1
66660   0, /*tp_vectorcall*/
66661   #endif
66662   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
66663   0, /*tp_print*/
66664   #endif
66665 };
66666 static struct __pyx_vtabstruct_array __pyx_vtable_array;
66667 
__pyx_tp_new_array(PyTypeObject * t,PyObject * a,PyObject * k)66668 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
66669   struct __pyx_array_obj *p;
66670   PyObject *o;
66671   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
66672     o = (*t->tp_alloc)(t, 0);
66673   } else {
66674     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
66675   }
66676   if (unlikely(!o)) return 0;
66677   p = ((struct __pyx_array_obj *)o);
66678   p->__pyx_vtab = __pyx_vtabptr_array;
66679   p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
66680   p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
66681   if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
66682   return o;
66683   bad:
66684   Py_DECREF(o); o = 0;
66685   return NULL;
66686 }
66687 
__pyx_tp_dealloc_array(PyObject * o)66688 static void __pyx_tp_dealloc_array(PyObject *o) {
66689   struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
66690   #if CYTHON_USE_TP_FINALIZE
66691   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
66692     if (PyObject_CallFinalizerFromDealloc(o)) return;
66693   }
66694   #endif
66695   {
66696     PyObject *etype, *eval, *etb;
66697     PyErr_Fetch(&etype, &eval, &etb);
66698     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
66699     __pyx_array___dealloc__(o);
66700     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
66701     PyErr_Restore(etype, eval, etb);
66702   }
66703   Py_CLEAR(p->mode);
66704   Py_CLEAR(p->_format);
66705   (*Py_TYPE(o)->tp_free)(o);
66706 }
__pyx_sq_item_array(PyObject * o,Py_ssize_t i)66707 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
66708   PyObject *r;
66709   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
66710   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
66711   Py_DECREF(x);
66712   return r;
66713 }
66714 
__pyx_mp_ass_subscript_array(PyObject * o,PyObject * i,PyObject * v)66715 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
66716   if (v) {
66717     return __pyx_array___setitem__(o, i, v);
66718   }
66719   else {
66720     PyErr_Format(PyExc_NotImplementedError,
66721       "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
66722     return -1;
66723   }
66724 }
66725 
__pyx_tp_getattro_array(PyObject * o,PyObject * n)66726 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
66727   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
66728   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
66729     PyErr_Clear();
66730     v = __pyx_array___getattr__(o, n);
66731   }
66732   return v;
66733 }
66734 
__pyx_getprop___pyx_array_memview(PyObject * o,CYTHON_UNUSED void * x)66735 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
66736   return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
66737 }
66738 
66739 static PyMethodDef __pyx_methods_array[] = {
66740   {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
66741   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
66742   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
66743   {0, 0, 0, 0}
66744 };
66745 
66746 static struct PyGetSetDef __pyx_getsets_array[] = {
66747   {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
66748   {0, 0, 0, 0, 0}
66749 };
66750 
66751 static PySequenceMethods __pyx_tp_as_sequence_array = {
66752   __pyx_array___len__, /*sq_length*/
66753   0, /*sq_concat*/
66754   0, /*sq_repeat*/
66755   __pyx_sq_item_array, /*sq_item*/
66756   0, /*sq_slice*/
66757   0, /*sq_ass_item*/
66758   0, /*sq_ass_slice*/
66759   0, /*sq_contains*/
66760   0, /*sq_inplace_concat*/
66761   0, /*sq_inplace_repeat*/
66762 };
66763 
66764 static PyMappingMethods __pyx_tp_as_mapping_array = {
66765   __pyx_array___len__, /*mp_length*/
66766   __pyx_array___getitem__, /*mp_subscript*/
66767   __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
66768 };
66769 
66770 static PyBufferProcs __pyx_tp_as_buffer_array = {
66771   #if PY_MAJOR_VERSION < 3
66772   0, /*bf_getreadbuffer*/
66773   #endif
66774   #if PY_MAJOR_VERSION < 3
66775   0, /*bf_getwritebuffer*/
66776   #endif
66777   #if PY_MAJOR_VERSION < 3
66778   0, /*bf_getsegcount*/
66779   #endif
66780   #if PY_MAJOR_VERSION < 3
66781   0, /*bf_getcharbuffer*/
66782   #endif
66783   __pyx_array_getbuffer, /*bf_getbuffer*/
66784   0, /*bf_releasebuffer*/
66785 };
66786 
66787 static PyTypeObject __pyx_type___pyx_array = {
66788   PyVarObject_HEAD_INIT(0, 0)
66789   "statsmodels.tsa.statespace._representation.array", /*tp_name*/
66790   sizeof(struct __pyx_array_obj), /*tp_basicsize*/
66791   0, /*tp_itemsize*/
66792   __pyx_tp_dealloc_array, /*tp_dealloc*/
66793   #if PY_VERSION_HEX < 0x030800b4
66794   0, /*tp_print*/
66795   #endif
66796   #if PY_VERSION_HEX >= 0x030800b4
66797   0, /*tp_vectorcall_offset*/
66798   #endif
66799   0, /*tp_getattr*/
66800   0, /*tp_setattr*/
66801   #if PY_MAJOR_VERSION < 3
66802   0, /*tp_compare*/
66803   #endif
66804   #if PY_MAJOR_VERSION >= 3
66805   0, /*tp_as_async*/
66806   #endif
66807   0, /*tp_repr*/
66808   0, /*tp_as_number*/
66809   &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
66810   &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
66811   0, /*tp_hash*/
66812   0, /*tp_call*/
66813   0, /*tp_str*/
66814   __pyx_tp_getattro_array, /*tp_getattro*/
66815   0, /*tp_setattro*/
66816   &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
66817   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
66818   0, /*tp_doc*/
66819   0, /*tp_traverse*/
66820   0, /*tp_clear*/
66821   0, /*tp_richcompare*/
66822   0, /*tp_weaklistoffset*/
66823   0, /*tp_iter*/
66824   0, /*tp_iternext*/
66825   __pyx_methods_array, /*tp_methods*/
66826   0, /*tp_members*/
66827   __pyx_getsets_array, /*tp_getset*/
66828   0, /*tp_base*/
66829   0, /*tp_dict*/
66830   0, /*tp_descr_get*/
66831   0, /*tp_descr_set*/
66832   0, /*tp_dictoffset*/
66833   0, /*tp_init*/
66834   0, /*tp_alloc*/
66835   __pyx_tp_new_array, /*tp_new*/
66836   0, /*tp_free*/
66837   0, /*tp_is_gc*/
66838   0, /*tp_bases*/
66839   0, /*tp_mro*/
66840   0, /*tp_cache*/
66841   0, /*tp_subclasses*/
66842   0, /*tp_weaklist*/
66843   0, /*tp_del*/
66844   0, /*tp_version_tag*/
66845   #if PY_VERSION_HEX >= 0x030400a1
66846   0, /*tp_finalize*/
66847   #endif
66848   #if PY_VERSION_HEX >= 0x030800b1
66849   0, /*tp_vectorcall*/
66850   #endif
66851   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
66852   0, /*tp_print*/
66853   #endif
66854 };
66855 
__pyx_tp_new_Enum(PyTypeObject * t,CYTHON_UNUSED PyObject * a,CYTHON_UNUSED PyObject * k)66856 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
66857   struct __pyx_MemviewEnum_obj *p;
66858   PyObject *o;
66859   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
66860     o = (*t->tp_alloc)(t, 0);
66861   } else {
66862     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
66863   }
66864   if (unlikely(!o)) return 0;
66865   p = ((struct __pyx_MemviewEnum_obj *)o);
66866   p->name = Py_None; Py_INCREF(Py_None);
66867   return o;
66868 }
66869 
__pyx_tp_dealloc_Enum(PyObject * o)66870 static void __pyx_tp_dealloc_Enum(PyObject *o) {
66871   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
66872   #if CYTHON_USE_TP_FINALIZE
66873   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
66874     if (PyObject_CallFinalizerFromDealloc(o)) return;
66875   }
66876   #endif
66877   PyObject_GC_UnTrack(o);
66878   Py_CLEAR(p->name);
66879   (*Py_TYPE(o)->tp_free)(o);
66880 }
66881 
__pyx_tp_traverse_Enum(PyObject * o,visitproc v,void * a)66882 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
66883   int e;
66884   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
66885   if (p->name) {
66886     e = (*v)(p->name, a); if (e) return e;
66887   }
66888   return 0;
66889 }
66890 
__pyx_tp_clear_Enum(PyObject * o)66891 static int __pyx_tp_clear_Enum(PyObject *o) {
66892   PyObject* tmp;
66893   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
66894   tmp = ((PyObject*)p->name);
66895   p->name = Py_None; Py_INCREF(Py_None);
66896   Py_XDECREF(tmp);
66897   return 0;
66898 }
66899 
66900 static PyMethodDef __pyx_methods_Enum[] = {
66901   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
66902   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
66903   {0, 0, 0, 0}
66904 };
66905 
66906 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
66907   PyVarObject_HEAD_INIT(0, 0)
66908   "statsmodels.tsa.statespace._representation.Enum", /*tp_name*/
66909   sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
66910   0, /*tp_itemsize*/
66911   __pyx_tp_dealloc_Enum, /*tp_dealloc*/
66912   #if PY_VERSION_HEX < 0x030800b4
66913   0, /*tp_print*/
66914   #endif
66915   #if PY_VERSION_HEX >= 0x030800b4
66916   0, /*tp_vectorcall_offset*/
66917   #endif
66918   0, /*tp_getattr*/
66919   0, /*tp_setattr*/
66920   #if PY_MAJOR_VERSION < 3
66921   0, /*tp_compare*/
66922   #endif
66923   #if PY_MAJOR_VERSION >= 3
66924   0, /*tp_as_async*/
66925   #endif
66926   __pyx_MemviewEnum___repr__, /*tp_repr*/
66927   0, /*tp_as_number*/
66928   0, /*tp_as_sequence*/
66929   0, /*tp_as_mapping*/
66930   0, /*tp_hash*/
66931   0, /*tp_call*/
66932   0, /*tp_str*/
66933   0, /*tp_getattro*/
66934   0, /*tp_setattro*/
66935   0, /*tp_as_buffer*/
66936   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
66937   0, /*tp_doc*/
66938   __pyx_tp_traverse_Enum, /*tp_traverse*/
66939   __pyx_tp_clear_Enum, /*tp_clear*/
66940   0, /*tp_richcompare*/
66941   0, /*tp_weaklistoffset*/
66942   0, /*tp_iter*/
66943   0, /*tp_iternext*/
66944   __pyx_methods_Enum, /*tp_methods*/
66945   0, /*tp_members*/
66946   0, /*tp_getset*/
66947   0, /*tp_base*/
66948   0, /*tp_dict*/
66949   0, /*tp_descr_get*/
66950   0, /*tp_descr_set*/
66951   0, /*tp_dictoffset*/
66952   __pyx_MemviewEnum___init__, /*tp_init*/
66953   0, /*tp_alloc*/
66954   __pyx_tp_new_Enum, /*tp_new*/
66955   0, /*tp_free*/
66956   0, /*tp_is_gc*/
66957   0, /*tp_bases*/
66958   0, /*tp_mro*/
66959   0, /*tp_cache*/
66960   0, /*tp_subclasses*/
66961   0, /*tp_weaklist*/
66962   0, /*tp_del*/
66963   0, /*tp_version_tag*/
66964   #if PY_VERSION_HEX >= 0x030400a1
66965   0, /*tp_finalize*/
66966   #endif
66967   #if PY_VERSION_HEX >= 0x030800b1
66968   0, /*tp_vectorcall*/
66969   #endif
66970   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
66971   0, /*tp_print*/
66972   #endif
66973 };
66974 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
66975 
__pyx_tp_new_memoryview(PyTypeObject * t,PyObject * a,PyObject * k)66976 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
66977   struct __pyx_memoryview_obj *p;
66978   PyObject *o;
66979   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
66980     o = (*t->tp_alloc)(t, 0);
66981   } else {
66982     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
66983   }
66984   if (unlikely(!o)) return 0;
66985   p = ((struct __pyx_memoryview_obj *)o);
66986   p->__pyx_vtab = __pyx_vtabptr_memoryview;
66987   p->obj = Py_None; Py_INCREF(Py_None);
66988   p->_size = Py_None; Py_INCREF(Py_None);
66989   p->_array_interface = Py_None; Py_INCREF(Py_None);
66990   p->view.obj = NULL;
66991   if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
66992   return o;
66993   bad:
66994   Py_DECREF(o); o = 0;
66995   return NULL;
66996 }
66997 
__pyx_tp_dealloc_memoryview(PyObject * o)66998 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
66999   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
67000   #if CYTHON_USE_TP_FINALIZE
67001   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
67002     if (PyObject_CallFinalizerFromDealloc(o)) return;
67003   }
67004   #endif
67005   PyObject_GC_UnTrack(o);
67006   {
67007     PyObject *etype, *eval, *etb;
67008     PyErr_Fetch(&etype, &eval, &etb);
67009     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
67010     __pyx_memoryview___dealloc__(o);
67011     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
67012     PyErr_Restore(etype, eval, etb);
67013   }
67014   Py_CLEAR(p->obj);
67015   Py_CLEAR(p->_size);
67016   Py_CLEAR(p->_array_interface);
67017   (*Py_TYPE(o)->tp_free)(o);
67018 }
67019 
__pyx_tp_traverse_memoryview(PyObject * o,visitproc v,void * a)67020 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
67021   int e;
67022   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
67023   if (p->obj) {
67024     e = (*v)(p->obj, a); if (e) return e;
67025   }
67026   if (p->_size) {
67027     e = (*v)(p->_size, a); if (e) return e;
67028   }
67029   if (p->_array_interface) {
67030     e = (*v)(p->_array_interface, a); if (e) return e;
67031   }
67032   if (p->view.obj) {
67033     e = (*v)(p->view.obj, a); if (e) return e;
67034   }
67035   return 0;
67036 }
67037 
__pyx_tp_clear_memoryview(PyObject * o)67038 static int __pyx_tp_clear_memoryview(PyObject *o) {
67039   PyObject* tmp;
67040   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
67041   tmp = ((PyObject*)p->obj);
67042   p->obj = Py_None; Py_INCREF(Py_None);
67043   Py_XDECREF(tmp);
67044   tmp = ((PyObject*)p->_size);
67045   p->_size = Py_None; Py_INCREF(Py_None);
67046   Py_XDECREF(tmp);
67047   tmp = ((PyObject*)p->_array_interface);
67048   p->_array_interface = Py_None; Py_INCREF(Py_None);
67049   Py_XDECREF(tmp);
67050   Py_CLEAR(p->view.obj);
67051   return 0;
67052 }
__pyx_sq_item_memoryview(PyObject * o,Py_ssize_t i)67053 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
67054   PyObject *r;
67055   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
67056   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
67057   Py_DECREF(x);
67058   return r;
67059 }
67060 
__pyx_mp_ass_subscript_memoryview(PyObject * o,PyObject * i,PyObject * v)67061 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
67062   if (v) {
67063     return __pyx_memoryview___setitem__(o, i, v);
67064   }
67065   else {
67066     PyErr_Format(PyExc_NotImplementedError,
67067       "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
67068     return -1;
67069   }
67070 }
67071 
__pyx_getprop___pyx_memoryview_T(PyObject * o,CYTHON_UNUSED void * x)67072 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
67073   return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
67074 }
67075 
__pyx_getprop___pyx_memoryview_base(PyObject * o,CYTHON_UNUSED void * x)67076 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
67077   return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
67078 }
67079 
__pyx_getprop___pyx_memoryview_shape(PyObject * o,CYTHON_UNUSED void * x)67080 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
67081   return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
67082 }
67083 
__pyx_getprop___pyx_memoryview_strides(PyObject * o,CYTHON_UNUSED void * x)67084 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
67085   return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
67086 }
67087 
__pyx_getprop___pyx_memoryview_suboffsets(PyObject * o,CYTHON_UNUSED void * x)67088 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
67089   return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
67090 }
67091 
__pyx_getprop___pyx_memoryview_ndim(PyObject * o,CYTHON_UNUSED void * x)67092 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
67093   return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
67094 }
67095 
__pyx_getprop___pyx_memoryview_itemsize(PyObject * o,CYTHON_UNUSED void * x)67096 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
67097   return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
67098 }
67099 
__pyx_getprop___pyx_memoryview_nbytes(PyObject * o,CYTHON_UNUSED void * x)67100 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
67101   return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
67102 }
67103 
__pyx_getprop___pyx_memoryview_size(PyObject * o,CYTHON_UNUSED void * x)67104 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
67105   return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
67106 }
67107 
67108 static PyMethodDef __pyx_methods_memoryview[] = {
67109   {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
67110   {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
67111   {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
67112   {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
67113   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
67114   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
67115   {0, 0, 0, 0}
67116 };
67117 
67118 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
67119   {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
67120   {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
67121   {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
67122   {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
67123   {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
67124   {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
67125   {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
67126   {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
67127   {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
67128   {0, 0, 0, 0, 0}
67129 };
67130 
67131 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
67132   __pyx_memoryview___len__, /*sq_length*/
67133   0, /*sq_concat*/
67134   0, /*sq_repeat*/
67135   __pyx_sq_item_memoryview, /*sq_item*/
67136   0, /*sq_slice*/
67137   0, /*sq_ass_item*/
67138   0, /*sq_ass_slice*/
67139   0, /*sq_contains*/
67140   0, /*sq_inplace_concat*/
67141   0, /*sq_inplace_repeat*/
67142 };
67143 
67144 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
67145   __pyx_memoryview___len__, /*mp_length*/
67146   __pyx_memoryview___getitem__, /*mp_subscript*/
67147   __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
67148 };
67149 
67150 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
67151   #if PY_MAJOR_VERSION < 3
67152   0, /*bf_getreadbuffer*/
67153   #endif
67154   #if PY_MAJOR_VERSION < 3
67155   0, /*bf_getwritebuffer*/
67156   #endif
67157   #if PY_MAJOR_VERSION < 3
67158   0, /*bf_getsegcount*/
67159   #endif
67160   #if PY_MAJOR_VERSION < 3
67161   0, /*bf_getcharbuffer*/
67162   #endif
67163   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
67164   0, /*bf_releasebuffer*/
67165 };
67166 
67167 static PyTypeObject __pyx_type___pyx_memoryview = {
67168   PyVarObject_HEAD_INIT(0, 0)
67169   "statsmodels.tsa.statespace._representation.memoryview", /*tp_name*/
67170   sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
67171   0, /*tp_itemsize*/
67172   __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
67173   #if PY_VERSION_HEX < 0x030800b4
67174   0, /*tp_print*/
67175   #endif
67176   #if PY_VERSION_HEX >= 0x030800b4
67177   0, /*tp_vectorcall_offset*/
67178   #endif
67179   0, /*tp_getattr*/
67180   0, /*tp_setattr*/
67181   #if PY_MAJOR_VERSION < 3
67182   0, /*tp_compare*/
67183   #endif
67184   #if PY_MAJOR_VERSION >= 3
67185   0, /*tp_as_async*/
67186   #endif
67187   __pyx_memoryview___repr__, /*tp_repr*/
67188   0, /*tp_as_number*/
67189   &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
67190   &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
67191   0, /*tp_hash*/
67192   0, /*tp_call*/
67193   __pyx_memoryview___str__, /*tp_str*/
67194   0, /*tp_getattro*/
67195   0, /*tp_setattro*/
67196   &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
67197   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
67198   0, /*tp_doc*/
67199   __pyx_tp_traverse_memoryview, /*tp_traverse*/
67200   __pyx_tp_clear_memoryview, /*tp_clear*/
67201   0, /*tp_richcompare*/
67202   0, /*tp_weaklistoffset*/
67203   0, /*tp_iter*/
67204   0, /*tp_iternext*/
67205   __pyx_methods_memoryview, /*tp_methods*/
67206   0, /*tp_members*/
67207   __pyx_getsets_memoryview, /*tp_getset*/
67208   0, /*tp_base*/
67209   0, /*tp_dict*/
67210   0, /*tp_descr_get*/
67211   0, /*tp_descr_set*/
67212   0, /*tp_dictoffset*/
67213   0, /*tp_init*/
67214   0, /*tp_alloc*/
67215   __pyx_tp_new_memoryview, /*tp_new*/
67216   0, /*tp_free*/
67217   0, /*tp_is_gc*/
67218   0, /*tp_bases*/
67219   0, /*tp_mro*/
67220   0, /*tp_cache*/
67221   0, /*tp_subclasses*/
67222   0, /*tp_weaklist*/
67223   0, /*tp_del*/
67224   0, /*tp_version_tag*/
67225   #if PY_VERSION_HEX >= 0x030400a1
67226   0, /*tp_finalize*/
67227   #endif
67228   #if PY_VERSION_HEX >= 0x030800b1
67229   0, /*tp_vectorcall*/
67230   #endif
67231   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
67232   0, /*tp_print*/
67233   #endif
67234 };
67235 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
67236 
__pyx_tp_new__memoryviewslice(PyTypeObject * t,PyObject * a,PyObject * k)67237 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
67238   struct __pyx_memoryviewslice_obj *p;
67239   PyObject *o = __pyx_tp_new_memoryview(t, a, k);
67240   if (unlikely(!o)) return 0;
67241   p = ((struct __pyx_memoryviewslice_obj *)o);
67242   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
67243   p->from_object = Py_None; Py_INCREF(Py_None);
67244   p->from_slice.memview = NULL;
67245   return o;
67246 }
67247 
__pyx_tp_dealloc__memoryviewslice(PyObject * o)67248 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
67249   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
67250   #if CYTHON_USE_TP_FINALIZE
67251   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
67252     if (PyObject_CallFinalizerFromDealloc(o)) return;
67253   }
67254   #endif
67255   PyObject_GC_UnTrack(o);
67256   {
67257     PyObject *etype, *eval, *etb;
67258     PyErr_Fetch(&etype, &eval, &etb);
67259     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
67260     __pyx_memoryviewslice___dealloc__(o);
67261     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
67262     PyErr_Restore(etype, eval, etb);
67263   }
67264   Py_CLEAR(p->from_object);
67265   PyObject_GC_Track(o);
67266   __pyx_tp_dealloc_memoryview(o);
67267 }
67268 
__pyx_tp_traverse__memoryviewslice(PyObject * o,visitproc v,void * a)67269 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
67270   int e;
67271   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
67272   e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
67273   if (p->from_object) {
67274     e = (*v)(p->from_object, a); if (e) return e;
67275   }
67276   return 0;
67277 }
67278 
__pyx_tp_clear__memoryviewslice(PyObject * o)67279 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
67280   PyObject* tmp;
67281   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
67282   __pyx_tp_clear_memoryview(o);
67283   tmp = ((PyObject*)p->from_object);
67284   p->from_object = Py_None; Py_INCREF(Py_None);
67285   Py_XDECREF(tmp);
67286   __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
67287   return 0;
67288 }
67289 
__pyx_getprop___pyx_memoryviewslice_base(PyObject * o,CYTHON_UNUSED void * x)67290 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
67291   return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
67292 }
67293 
67294 static PyMethodDef __pyx_methods__memoryviewslice[] = {
67295   {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
67296   {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
67297   {0, 0, 0, 0}
67298 };
67299 
67300 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
67301   {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
67302   {0, 0, 0, 0, 0}
67303 };
67304 
67305 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
67306   PyVarObject_HEAD_INIT(0, 0)
67307   "statsmodels.tsa.statespace._representation._memoryviewslice", /*tp_name*/
67308   sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
67309   0, /*tp_itemsize*/
67310   __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
67311   #if PY_VERSION_HEX < 0x030800b4
67312   0, /*tp_print*/
67313   #endif
67314   #if PY_VERSION_HEX >= 0x030800b4
67315   0, /*tp_vectorcall_offset*/
67316   #endif
67317   0, /*tp_getattr*/
67318   0, /*tp_setattr*/
67319   #if PY_MAJOR_VERSION < 3
67320   0, /*tp_compare*/
67321   #endif
67322   #if PY_MAJOR_VERSION >= 3
67323   0, /*tp_as_async*/
67324   #endif
67325   #if CYTHON_COMPILING_IN_PYPY
67326   __pyx_memoryview___repr__, /*tp_repr*/
67327   #else
67328   0, /*tp_repr*/
67329   #endif
67330   0, /*tp_as_number*/
67331   0, /*tp_as_sequence*/
67332   0, /*tp_as_mapping*/
67333   0, /*tp_hash*/
67334   0, /*tp_call*/
67335   #if CYTHON_COMPILING_IN_PYPY
67336   __pyx_memoryview___str__, /*tp_str*/
67337   #else
67338   0, /*tp_str*/
67339   #endif
67340   0, /*tp_getattro*/
67341   0, /*tp_setattro*/
67342   0, /*tp_as_buffer*/
67343   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
67344   "Internal class for passing memoryview slices to Python", /*tp_doc*/
67345   __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
67346   __pyx_tp_clear__memoryviewslice, /*tp_clear*/
67347   0, /*tp_richcompare*/
67348   0, /*tp_weaklistoffset*/
67349   0, /*tp_iter*/
67350   0, /*tp_iternext*/
67351   __pyx_methods__memoryviewslice, /*tp_methods*/
67352   0, /*tp_members*/
67353   __pyx_getsets__memoryviewslice, /*tp_getset*/
67354   0, /*tp_base*/
67355   0, /*tp_dict*/
67356   0, /*tp_descr_get*/
67357   0, /*tp_descr_set*/
67358   0, /*tp_dictoffset*/
67359   0, /*tp_init*/
67360   0, /*tp_alloc*/
67361   __pyx_tp_new__memoryviewslice, /*tp_new*/
67362   0, /*tp_free*/
67363   0, /*tp_is_gc*/
67364   0, /*tp_bases*/
67365   0, /*tp_mro*/
67366   0, /*tp_cache*/
67367   0, /*tp_subclasses*/
67368   0, /*tp_weaklist*/
67369   0, /*tp_del*/
67370   0, /*tp_version_tag*/
67371   #if PY_VERSION_HEX >= 0x030400a1
67372   0, /*tp_finalize*/
67373   #endif
67374   #if PY_VERSION_HEX >= 0x030800b1
67375   0, /*tp_vectorcall*/
67376   #endif
67377   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
67378   0, /*tp_print*/
67379   #endif
67380 };
67381 
67382 static PyMethodDef __pyx_methods[] = {
67383   {0, 0, 0, 0}
67384 };
67385 
67386 #if PY_MAJOR_VERSION >= 3
67387 #if CYTHON_PEP489_MULTI_PHASE_INIT
67388 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
67389 static int __pyx_pymod_exec__representation(PyObject* module); /*proto*/
67390 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
67391   {Py_mod_create, (void*)__pyx_pymod_create},
67392   {Py_mod_exec, (void*)__pyx_pymod_exec__representation},
67393   {0, NULL}
67394 };
67395 #endif
67396 
67397 static struct PyModuleDef __pyx_moduledef = {
67398     PyModuleDef_HEAD_INIT,
67399     "_representation",
67400     __pyx_k_State_Space_Models_Author_Chad, /* m_doc */
67401   #if CYTHON_PEP489_MULTI_PHASE_INIT
67402     0, /* m_size */
67403   #else
67404     -1, /* m_size */
67405   #endif
67406     __pyx_methods /* m_methods */,
67407   #if CYTHON_PEP489_MULTI_PHASE_INIT
67408     __pyx_moduledef_slots, /* m_slots */
67409   #else
67410     NULL, /* m_reload */
67411   #endif
67412     NULL, /* m_traverse */
67413     NULL, /* m_clear */
67414     NULL /* m_free */
67415 };
67416 #endif
67417 #ifndef CYTHON_SMALL_CODE
67418 #if defined(__clang__)
67419     #define CYTHON_SMALL_CODE
67420 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
67421     #define CYTHON_SMALL_CODE __attribute__((cold))
67422 #else
67423     #define CYTHON_SMALL_CODE
67424 #endif
67425 #endif
67426 
67427 static __Pyx_StringTabEntry __pyx_string_tab[] = {
67428   {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
67429   {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
67430   {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
67431   {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
67432   {&__pyx_kp_u_Cannot_collapse_observation_vect, __pyx_k_Cannot_collapse_observation_vect, sizeof(__pyx_k_Cannot_collapse_observation_vect), 0, 1, 0, 0},
67433   {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
67434   {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
67435   {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
67436   {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
67437   {&__pyx_n_u_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 1, 0, 1},
67438   {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
67439   {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0},
67440   {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
67441   {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
67442   {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
67443   {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
67444   {&__pyx_kp_u_Invalid_value_in_C_matrix_encoun, __pyx_k_Invalid_value_in_C_matrix_encoun, sizeof(__pyx_k_Invalid_value_in_C_matrix_encoun), 0, 1, 0, 0},
67445   {&__pyx_kp_u_Invalid_value_in_LDL_factorizati, __pyx_k_Invalid_value_in_LDL_factorizati, sizeof(__pyx_k_Invalid_value_in_LDL_factorizati), 0, 1, 0, 0},
67446   {&__pyx_kp_u_Invalid_value_in_ZHZ_matrix_enco, __pyx_k_Invalid_value_in_ZHZ_matrix_enco, sizeof(__pyx_k_Invalid_value_in_ZHZ_matrix_enco), 0, 1, 0, 0},
67447   {&__pyx_kp_u_Invalid_value_in_calculation_of, __pyx_k_Invalid_value_in_calculation_of, sizeof(__pyx_k_Invalid_value_in_calculation_of), 0, 1, 0, 0},
67448   {&__pyx_kp_u_Invalid_value_in_factorization_o, __pyx_k_Invalid_value_in_factorization_o, sizeof(__pyx_k_Invalid_value_in_factorization_o), 0, 1, 0, 0},
67449   {&__pyx_kp_u_Invalid_value_in_observation_cov, __pyx_k_Invalid_value_in_observation_cov, sizeof(__pyx_k_Invalid_value_in_observation_cov), 0, 1, 0, 0},
67450   {&__pyx_n_s_LinAlgError, __pyx_k_LinAlgError, sizeof(__pyx_k_LinAlgError), 0, 0, 1, 1},
67451   {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
67452   {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
67453   {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
67454   {&__pyx_kp_u_Non_positive_definite_C_matrix_e, __pyx_k_Non_positive_definite_C_matrix_e, sizeof(__pyx_k_Non_positive_definite_C_matrix_e), 0, 1, 0, 0},
67455   {&__pyx_kp_u_Non_positive_definite_ZHZ_matrix, __pyx_k_Non_positive_definite_ZHZ_matrix, sizeof(__pyx_k_Non_positive_definite_ZHZ_matrix), 0, 1, 0, 0},
67456   {&__pyx_kp_u_Non_positive_definite_observatio, __pyx_k_Non_positive_definite_observatio, sizeof(__pyx_k_Non_positive_definite_observatio), 0, 1, 0, 0},
67457   {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
67458   {&__pyx_kp_u_Observation_index_out_of_range, __pyx_k_Observation_index_out_of_range, sizeof(__pyx_k_Observation_index_out_of_range), 0, 1, 0, 0},
67459   {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
67460   {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
67461   {&__pyx_kp_u_Positive_semi_definite_observati, __pyx_k_Positive_semi_definite_observati, sizeof(__pyx_k_Positive_semi_definite_observati), 0, 1, 0, 0},
67462   {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
67463   {&__pyx_kp_u_Singular_factorization_of_observ, __pyx_k_Singular_factorization_of_observ, sizeof(__pyx_k_Singular_factorization_of_observ), 0, 1, 0, 0},
67464   {&__pyx_kp_u_Statespace_model_not_initialized, __pyx_k_Statespace_model_not_initialized, sizeof(__pyx_k_Statespace_model_not_initialized), 0, 1, 0, 0},
67465   {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
67466   {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1},
67467   {&__pyx_kp_u_The_observation_collapse_transfo, __pyx_k_The_observation_collapse_transfo, sizeof(__pyx_k_The_observation_collapse_transfo), 0, 1, 0, 0},
67468   {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
67469   {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
67470   {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
67471   {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
67472   {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
67473   {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
67474   {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
67475   {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
67476   {&__pyx_n_s_blocks, __pyx_k_blocks, sizeof(__pyx_k_blocks), 0, 0, 1, 1},
67477   {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
67478   {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
67479   {&__pyx_n_s_cStatespace, __pyx_k_cStatespace, sizeof(__pyx_k_cStatespace), 0, 0, 1, 1},
67480   {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
67481   {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
67482   {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
67483   {&__pyx_n_u_collapse_cholesky, __pyx_k_collapse_cholesky, sizeof(__pyx_k_collapse_cholesky), 0, 1, 0, 1},
67484   {&__pyx_n_u_collapse_design, __pyx_k_collapse_design, sizeof(__pyx_k_collapse_design), 0, 1, 0, 1},
67485   {&__pyx_n_u_collapse_loglikelihood, __pyx_k_collapse_loglikelihood, sizeof(__pyx_k_collapse_loglikelihood), 0, 1, 0, 1},
67486   {&__pyx_n_u_collapse_obs, __pyx_k_collapse_obs, sizeof(__pyx_k_collapse_obs), 0, 1, 0, 1},
67487   {&__pyx_n_u_collapse_obs_cov, __pyx_k_collapse_obs_cov, sizeof(__pyx_k_collapse_obs_cov), 0, 1, 0, 1},
67488   {&__pyx_n_u_collapse_obs_tmp, __pyx_k_collapse_obs_tmp, sizeof(__pyx_k_collapse_obs_tmp), 0, 1, 0, 1},
67489   {&__pyx_n_u_companion_transition, __pyx_k_companion_transition, sizeof(__pyx_k_companion_transition), 0, 1, 0, 1},
67490   {&__pyx_n_s_complex64, __pyx_k_complex64, sizeof(__pyx_k_complex64), 0, 0, 1, 1},
67491   {&__pyx_n_s_complex_step, __pyx_k_complex_step, sizeof(__pyx_k_complex_step), 0, 0, 1, 1},
67492   {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
67493   {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
67494   {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
67495   {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1},
67496   {&__pyx_n_s_dStatespace, __pyx_k_dStatespace, sizeof(__pyx_k_dStatespace), 0, 0, 1, 1},
67497   {&__pyx_n_s_design, __pyx_k_design, sizeof(__pyx_k_design), 0, 0, 1, 1},
67498   {&__pyx_n_u_design, __pyx_k_design, sizeof(__pyx_k_design), 0, 1, 0, 1},
67499   {&__pyx_n_s_diagonal_obs_cov, __pyx_k_diagonal_obs_cov, sizeof(__pyx_k_diagonal_obs_cov), 0, 0, 1, 1},
67500   {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
67501   {&__pyx_n_u_diffuse, __pyx_k_diffuse, sizeof(__pyx_k_diffuse), 0, 1, 0, 1},
67502   {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
67503   {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
67504   {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
67505   {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
67506   {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
67507   {&__pyx_n_s_eye, __pyx_k_eye, sizeof(__pyx_k_eye), 0, 0, 1, 1},
67508   {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
67509   {&__pyx_n_s_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 1, 1},
67510   {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
67511   {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
67512   {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
67513   {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
67514   {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
67515   {&__pyx_n_u_has_missing, __pyx_k_has_missing, sizeof(__pyx_k_has_missing), 0, 1, 0, 1},
67516   {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
67517   {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
67518   {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
67519   {&__pyx_n_u_initial_diffuse_state_cov, __pyx_k_initial_diffuse_state_cov, sizeof(__pyx_k_initial_diffuse_state_cov), 0, 1, 0, 1},
67520   {&__pyx_n_s_initial_state, __pyx_k_initial_state, sizeof(__pyx_k_initial_state), 0, 0, 1, 1},
67521   {&__pyx_n_u_initial_state, __pyx_k_initial_state, sizeof(__pyx_k_initial_state), 0, 1, 0, 1},
67522   {&__pyx_kp_u_initial_state_2, __pyx_k_initial_state_2, sizeof(__pyx_k_initial_state_2), 0, 1, 0, 0},
67523   {&__pyx_n_s_initial_state_cov, __pyx_k_initial_state_cov, sizeof(__pyx_k_initial_state_cov), 0, 0, 1, 1},
67524   {&__pyx_n_u_initial_state_cov, __pyx_k_initial_state_cov, sizeof(__pyx_k_initial_state_cov), 0, 1, 0, 1},
67525   {&__pyx_kp_u_initial_state_covariance, __pyx_k_initial_state_covariance, sizeof(__pyx_k_initial_state_covariance), 0, 1, 0, 0},
67526   {&__pyx_n_s_initialization_type, __pyx_k_initialization_type, sizeof(__pyx_k_initialization_type), 0, 0, 1, 1},
67527   {&__pyx_n_s_initializations, __pyx_k_initializations, sizeof(__pyx_k_initializations), 0, 0, 1, 1},
67528   {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
67529   {&__pyx_n_s_initialize_initialization, __pyx_k_initialize_initialization, sizeof(__pyx_k_initialize_initialization), 0, 0, 1, 1},
67530   {&__pyx_n_u_initialized, __pyx_k_initialized, sizeof(__pyx_k_initialized), 0, 1, 0, 1},
67531   {&__pyx_n_u_initialized_diffuse, __pyx_k_initialized_diffuse, sizeof(__pyx_k_initialized_diffuse), 0, 1, 0, 1},
67532   {&__pyx_n_u_initialized_stationary, __pyx_k_initialized_stationary, sizeof(__pyx_k_initialized_stationary), 0, 1, 0, 1},
67533   {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
67534   {&__pyx_n_s_isnan, __pyx_k_isnan, sizeof(__pyx_k_isnan), 0, 0, 1, 1},
67535   {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
67536   {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
67537   {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
67538   {&__pyx_n_s_linalg, __pyx_k_linalg, sizeof(__pyx_k_linalg), 0, 0, 1, 1},
67539   {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
67540   {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
67541   {&__pyx_n_u_missing, __pyx_k_missing, sizeof(__pyx_k_missing), 0, 1, 0, 1},
67542   {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
67543   {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
67544   {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
67545   {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
67546   {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
67547   {&__pyx_n_u_nmissing, __pyx_k_nmissing, sizeof(__pyx_k_nmissing), 0, 1, 0, 1},
67548   {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
67549   {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
67550   {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
67551   {&__pyx_kp_u_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 1, 0, 0},
67552   {&__pyx_kp_u_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 1, 0, 0},
67553   {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
67554   {&__pyx_n_s_obs, __pyx_k_obs, sizeof(__pyx_k_obs), 0, 0, 1, 1},
67555   {&__pyx_n_s_obs_cov, __pyx_k_obs_cov, sizeof(__pyx_k_obs_cov), 0, 0, 1, 1},
67556   {&__pyx_n_s_obs_intercept, __pyx_k_obs_intercept, sizeof(__pyx_k_obs_intercept), 0, 0, 1, 1},
67557   {&__pyx_kp_u_observation_covariance_matrix, __pyx_k_observation_covariance_matrix, sizeof(__pyx_k_observation_covariance_matrix), 0, 1, 0, 0},
67558   {&__pyx_kp_u_observation_intercept, __pyx_k_observation_intercept, sizeof(__pyx_k_observation_intercept), 0, 1, 0, 0},
67559   {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
67560   {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},
67561   {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
67562   {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
67563   {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
67564   {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
67565   {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
67566   {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
67567   {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
67568   {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
67569   {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
67570   {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
67571   {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
67572   {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
67573   {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
67574   {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
67575   {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
67576   {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
67577   {&__pyx_n_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 1},
67578   {&__pyx_n_s_sStatespace, __pyx_k_sStatespace, sizeof(__pyx_k_sStatespace), 0, 0, 1, 1},
67579   {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
67580   {&__pyx_n_u_selected_design, __pyx_k_selected_design, sizeof(__pyx_k_selected_design), 0, 1, 0, 1},
67581   {&__pyx_n_u_selected_obs, __pyx_k_selected_obs, sizeof(__pyx_k_selected_obs), 0, 1, 0, 1},
67582   {&__pyx_n_u_selected_obs_cov, __pyx_k_selected_obs_cov, sizeof(__pyx_k_selected_obs_cov), 0, 1, 0, 1},
67583   {&__pyx_n_u_selected_obs_intercept, __pyx_k_selected_obs_intercept, sizeof(__pyx_k_selected_obs_intercept), 0, 1, 0, 1},
67584   {&__pyx_n_u_selected_state_cov, __pyx_k_selected_state_cov, sizeof(__pyx_k_selected_state_cov), 0, 1, 0, 1},
67585   {&__pyx_n_s_selection, __pyx_k_selection, sizeof(__pyx_k_selection), 0, 0, 1, 1},
67586   {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
67587   {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
67588   {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
67589   {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
67590   {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
67591   {&__pyx_n_s_state_cov, __pyx_k_state_cov, sizeof(__pyx_k_state_cov), 0, 0, 1, 1},
67592   {&__pyx_kp_u_state_covariance_matrix, __pyx_k_state_covariance_matrix, sizeof(__pyx_k_state_covariance_matrix), 0, 1, 0, 0},
67593   {&__pyx_n_s_state_intercept, __pyx_k_state_intercept, sizeof(__pyx_k_state_intercept), 0, 0, 1, 1},
67594   {&__pyx_kp_u_state_intercept_2, __pyx_k_state_intercept_2, sizeof(__pyx_k_state_intercept_2), 0, 1, 0, 0},
67595   {&__pyx_n_u_stationary, __pyx_k_stationary, sizeof(__pyx_k_stationary), 0, 1, 0, 1},
67596   {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
67597   {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
67598   {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
67599   {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
67600   {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
67601   {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
67602   {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
67603   {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
67604   {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
67605   {&__pyx_n_u_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 1, 0, 1},
67606   {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
67607   {&__pyx_n_u_tmp, __pyx_k_tmp, sizeof(__pyx_k_tmp), 0, 1, 0, 1},
67608   {&__pyx_n_u_transform_cholesky, __pyx_k_transform_cholesky, sizeof(__pyx_k_transform_cholesky), 0, 1, 0, 1},
67609   {&__pyx_n_u_transform_design, __pyx_k_transform_design, sizeof(__pyx_k_transform_design), 0, 1, 0, 1},
67610   {&__pyx_n_u_transform_determinant, __pyx_k_transform_determinant, sizeof(__pyx_k_transform_determinant), 0, 1, 0, 1},
67611   {&__pyx_n_s_transform_diagonalize, __pyx_k_transform_diagonalize, sizeof(__pyx_k_transform_diagonalize), 0, 0, 1, 1},
67612   {&__pyx_n_s_transform_generalized_collapse, __pyx_k_transform_generalized_collapse, sizeof(__pyx_k_transform_generalized_collapse), 0, 0, 1, 1},
67613   {&__pyx_n_u_transform_obs_cov, __pyx_k_transform_obs_cov, sizeof(__pyx_k_transform_obs_cov), 0, 1, 0, 1},
67614   {&__pyx_n_s_transition, __pyx_k_transition, sizeof(__pyx_k_transition), 0, 0, 1, 1},
67615   {&__pyx_n_u_transition, __pyx_k_transition, sizeof(__pyx_k_transition), 0, 1, 0, 1},
67616   {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
67617   {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
67618   {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
67619   {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
67620   {&__pyx_n_s_variance, __pyx_k_variance, sizeof(__pyx_k_variance), 0, 0, 1, 1},
67621   {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
67622   {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
67623   {&__pyx_n_u_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 1, 0, 1},
67624   {&__pyx_n_s_zStatespace, __pyx_k_zStatespace, sizeof(__pyx_k_zStatespace), 0, 0, 1, 1},
67625   {0, 0, 0, 0, 0, 0, 0}
67626 };
__Pyx_InitCachedBuiltins(void)67627 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
67628   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 455, __pyx_L1_error)
67629   __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 496, __pyx_L1_error)
67630   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 505, __pyx_L1_error)
67631   __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 541, __pyx_L1_error)
67632   __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error)
67633   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(3, 133, __pyx_L1_error)
67634   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 148, __pyx_L1_error)
67635   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(3, 151, __pyx_L1_error)
67636   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(3, 2, __pyx_L1_error)
67637   __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(3, 404, __pyx_L1_error)
67638   __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(3, 613, __pyx_L1_error)
67639   return 0;
67640   __pyx_L1_error:;
67641   return -1;
67642 }
67643 
__Pyx_InitCachedConstants(void)67644 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
67645   __Pyx_RefNannyDeclarations
67646   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
67647 
67648   /* "statsmodels/tsa/statespace/_representation.pyx":505
67649  *         # Set the global time indicator, if valid
67650  *         if t >= self.nobs:
67651  *             raise IndexError("Observation index out of range")             # <<<<<<<<<<<<<<
67652  *         self.t = t
67653  *
67654  */
67655   __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_Observation_index_out_of_range); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 505, __pyx_L1_error)
67656   __Pyx_GOTREF(__pyx_tuple_);
67657   __Pyx_GIVEREF(__pyx_tuple_);
67658 
67659   /* "statsmodels/tsa/statespace/_representation.pyx":541
67660  *         # Initialize object-level pointers to initialization
67661  *         if not self.initialized:
67662  *             raise RuntimeError("Statespace model not initialized.")             # <<<<<<<<<<<<<<
67663  *         self._initial_state = &self.initial_state[0]
67664  *         self._initial_state_cov = &self.initial_state_cov[0,0]
67665  */
67666   __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Statespace_model_not_initialized); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 541, __pyx_L1_error)
67667   __Pyx_GOTREF(__pyx_tuple__2);
67668   __Pyx_GIVEREF(__pyx_tuple__2);
67669 
67670   /* "statsmodels/tsa/statespace/_representation.pyx":815
67671  *         # Make sure we have enough observations to perform collapse
67672  *         if self.k_endog < self.k_states:
67673  *             raise RuntimeError('Cannot collapse observation vector it the'             # <<<<<<<<<<<<<<
67674  *                                ' state dimension is larger than the dimension'
67675  *                                ' of the observation vector.')
67676  */
67677   __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Cannot_collapse_observation_vect); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 815, __pyx_L1_error)
67678   __Pyx_GOTREF(__pyx_tuple__3);
67679   __Pyx_GIVEREF(__pyx_tuple__3);
67680 
67681   /* "statsmodels/tsa/statespace/_representation.pyx":841
67682  *             # Make sure we do not have an observation intercept
67683  *             if not np.sum(self.obs_intercept) == 0 or self.obs_intercept.shape[2] > 1:
67684  *                 raise RuntimeError('The observation collapse transformation'             # <<<<<<<<<<<<<<
67685  *                                    ' does not currently support an observation'
67686  *                                    ' intercept.')
67687  */
67688   __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_The_observation_collapse_transfo); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 841, __pyx_L1_error)
67689   __Pyx_GOTREF(__pyx_tuple__4);
67690   __Pyx_GIVEREF(__pyx_tuple__4);
67691 
67692   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":945
67693  *         __pyx_import_array()
67694  *     except Exception:
67695  *         raise ImportError("numpy.core.multiarray failed to import")             # <<<<<<<<<<<<<<
67696  *
67697  * cdef inline int import_umath() except -1:
67698  */
67699   __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 945, __pyx_L1_error)
67700   __Pyx_GOTREF(__pyx_tuple__7);
67701   __Pyx_GIVEREF(__pyx_tuple__7);
67702 
67703   /* "../../Anaconda/lib/site-packages/numpy/__init__.pxd":951
67704  *         _import_umath()
67705  *     except Exception:
67706  *         raise ImportError("numpy.core.umath failed to import")             # <<<<<<<<<<<<<<
67707  *
67708  * cdef inline int import_ufunc() except -1:
67709  */
67710   __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 951, __pyx_L1_error)
67711   __Pyx_GOTREF(__pyx_tuple__8);
67712   __Pyx_GIVEREF(__pyx_tuple__8);
67713 
67714   /* "View.MemoryView":133
67715  *
67716  *         if not self.ndim:
67717  *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
67718  *
67719  *         if itemsize <= 0:
67720  */
67721   __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(3, 133, __pyx_L1_error)
67722   __Pyx_GOTREF(__pyx_tuple__9);
67723   __Pyx_GIVEREF(__pyx_tuple__9);
67724 
67725   /* "View.MemoryView":136
67726  *
67727  *         if itemsize <= 0:
67728  *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
67729  *
67730  *         if not isinstance(format, bytes):
67731  */
67732   __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(3, 136, __pyx_L1_error)
67733   __Pyx_GOTREF(__pyx_tuple__10);
67734   __Pyx_GIVEREF(__pyx_tuple__10);
67735 
67736   /* "View.MemoryView":148
67737  *
67738  *         if not self._shape:
67739  *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
67740  *
67741  *
67742  */
67743   __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(3, 148, __pyx_L1_error)
67744   __Pyx_GOTREF(__pyx_tuple__11);
67745   __Pyx_GIVEREF(__pyx_tuple__11);
67746 
67747   /* "View.MemoryView":176
67748  *             self.data = <char *>malloc(self.len)
67749  *             if not self.data:
67750  *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
67751  *
67752  *             if self.dtype_is_object:
67753  */
67754   __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(3, 176, __pyx_L1_error)
67755   __Pyx_GOTREF(__pyx_tuple__12);
67756   __Pyx_GIVEREF(__pyx_tuple__12);
67757 
67758   /* "View.MemoryView":192
67759  *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
67760  *         if not (flags & bufmode):
67761  *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
67762  *         info.buf = self.data
67763  *         info.len = self.len
67764  */
67765   __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(3, 192, __pyx_L1_error)
67766   __Pyx_GOTREF(__pyx_tuple__13);
67767   __Pyx_GIVEREF(__pyx_tuple__13);
67768 
67769   /* "(tree fragment)":2
67770  * def __reduce_cython__(self):
67771  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
67772  * def __setstate_cython__(self, __pyx_state):
67773  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
67774  */
67775   __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(3, 2, __pyx_L1_error)
67776   __Pyx_GOTREF(__pyx_tuple__14);
67777   __Pyx_GIVEREF(__pyx_tuple__14);
67778 
67779   /* "(tree fragment)":4
67780  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
67781  * def __setstate_cython__(self, __pyx_state):
67782  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
67783  */
67784   __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(3, 4, __pyx_L1_error)
67785   __Pyx_GOTREF(__pyx_tuple__15);
67786   __Pyx_GIVEREF(__pyx_tuple__15);
67787 
67788   /* "View.MemoryView":418
67789  *     def __setitem__(memoryview self, object index, object value):
67790  *         if self.view.readonly:
67791  *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
67792  *
67793  *         have_slices, index = _unellipsify(index, self.view.ndim)
67794  */
67795   __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(3, 418, __pyx_L1_error)
67796   __Pyx_GOTREF(__pyx_tuple__16);
67797   __Pyx_GIVEREF(__pyx_tuple__16);
67798 
67799   /* "View.MemoryView":495
67800  *             result = struct.unpack(self.view.format, bytesitem)
67801  *         except struct.error:
67802  *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
67803  *         else:
67804  *             if len(self.view.format) == 1:
67805  */
67806   __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(3, 495, __pyx_L1_error)
67807   __Pyx_GOTREF(__pyx_tuple__17);
67808   __Pyx_GIVEREF(__pyx_tuple__17);
67809 
67810   /* "View.MemoryView":520
67811  *     def __getbuffer__(self, Py_buffer *info, int flags):
67812  *         if flags & PyBUF_WRITABLE and self.view.readonly:
67813  *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
67814  *
67815  *         if flags & PyBUF_ND:
67816  */
67817   __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(3, 520, __pyx_L1_error)
67818   __Pyx_GOTREF(__pyx_tuple__18);
67819   __Pyx_GIVEREF(__pyx_tuple__18);
67820 
67821   /* "View.MemoryView":570
67822  *         if self.view.strides == NULL:
67823  *
67824  *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
67825  *
67826  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
67827  */
67828   __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(3, 570, __pyx_L1_error)
67829   __Pyx_GOTREF(__pyx_tuple__19);
67830   __Pyx_GIVEREF(__pyx_tuple__19);
67831 
67832   /* "View.MemoryView":577
67833  *     def suboffsets(self):
67834  *         if self.view.suboffsets == NULL:
67835  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
67836  *
67837  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
67838  */
67839   __pyx_tuple__20 = PyTuple_New(1); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(3, 577, __pyx_L1_error)
67840   __Pyx_GOTREF(__pyx_tuple__20);
67841   __Pyx_INCREF(__pyx_int_neg_1);
67842   __Pyx_GIVEREF(__pyx_int_neg_1);
67843   PyTuple_SET_ITEM(__pyx_tuple__20, 0, __pyx_int_neg_1);
67844   __Pyx_GIVEREF(__pyx_tuple__20);
67845 
67846   /* "(tree fragment)":2
67847  * def __reduce_cython__(self):
67848  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
67849  * def __setstate_cython__(self, __pyx_state):
67850  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
67851  */
67852   __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(3, 2, __pyx_L1_error)
67853   __Pyx_GOTREF(__pyx_tuple__21);
67854   __Pyx_GIVEREF(__pyx_tuple__21);
67855 
67856   /* "(tree fragment)":4
67857  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
67858  * def __setstate_cython__(self, __pyx_state):
67859  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
67860  */
67861   __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(3, 4, __pyx_L1_error)
67862   __Pyx_GOTREF(__pyx_tuple__22);
67863   __Pyx_GIVEREF(__pyx_tuple__22);
67864 
67865   /* "View.MemoryView":682
67866  *         if item is Ellipsis:
67867  *             if not seen_ellipsis:
67868  *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
67869  *                 seen_ellipsis = True
67870  *             else:
67871  */
67872   __pyx_slice__23 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(3, 682, __pyx_L1_error)
67873   __Pyx_GOTREF(__pyx_slice__23);
67874   __Pyx_GIVEREF(__pyx_slice__23);
67875 
67876   /* "View.MemoryView":703
67877  *     for suboffset in suboffsets[:ndim]:
67878  *         if suboffset >= 0:
67879  *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
67880  *
67881  *
67882  */
67883   __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(3, 703, __pyx_L1_error)
67884   __Pyx_GOTREF(__pyx_tuple__24);
67885   __Pyx_GIVEREF(__pyx_tuple__24);
67886 
67887   /* "(tree fragment)":2
67888  * def __reduce_cython__(self):
67889  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
67890  * def __setstate_cython__(self, __pyx_state):
67891  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
67892  */
67893   __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(3, 2, __pyx_L1_error)
67894   __Pyx_GOTREF(__pyx_tuple__25);
67895   __Pyx_GIVEREF(__pyx_tuple__25);
67896 
67897   /* "(tree fragment)":4
67898  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
67899  * def __setstate_cython__(self, __pyx_state):
67900  *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
67901  */
67902   __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(3, 4, __pyx_L1_error)
67903   __Pyx_GOTREF(__pyx_tuple__26);
67904   __Pyx_GIVEREF(__pyx_tuple__26);
67905 
67906   /* "View.MemoryView":286
67907  *         return self.name
67908  *
67909  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
67910  * cdef strided = Enum("<strided and direct>") # default
67911  * cdef indirect = Enum("<strided and indirect>")
67912  */
67913   __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(3, 286, __pyx_L1_error)
67914   __Pyx_GOTREF(__pyx_tuple__27);
67915   __Pyx_GIVEREF(__pyx_tuple__27);
67916 
67917   /* "View.MemoryView":287
67918  *
67919  * cdef generic = Enum("<strided and direct or indirect>")
67920  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
67921  * cdef indirect = Enum("<strided and indirect>")
67922  *
67923  */
67924   __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(3, 287, __pyx_L1_error)
67925   __Pyx_GOTREF(__pyx_tuple__28);
67926   __Pyx_GIVEREF(__pyx_tuple__28);
67927 
67928   /* "View.MemoryView":288
67929  * cdef generic = Enum("<strided and direct or indirect>")
67930  * cdef strided = Enum("<strided and direct>") # default
67931  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
67932  *
67933  *
67934  */
67935   __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(3, 288, __pyx_L1_error)
67936   __Pyx_GOTREF(__pyx_tuple__29);
67937   __Pyx_GIVEREF(__pyx_tuple__29);
67938 
67939   /* "View.MemoryView":291
67940  *
67941  *
67942  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
67943  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
67944  *
67945  */
67946   __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(3, 291, __pyx_L1_error)
67947   __Pyx_GOTREF(__pyx_tuple__30);
67948   __Pyx_GIVEREF(__pyx_tuple__30);
67949 
67950   /* "View.MemoryView":292
67951  *
67952  * cdef contiguous = Enum("<contiguous and direct>")
67953  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
67954  *
67955  *
67956  */
67957   __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(3, 292, __pyx_L1_error)
67958   __Pyx_GOTREF(__pyx_tuple__31);
67959   __Pyx_GIVEREF(__pyx_tuple__31);
67960 
67961   /* "(tree fragment)":1
67962  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
67963  *     cdef object __pyx_PickleError
67964  *     cdef object __pyx_result
67965  */
67966   __pyx_tuple__32 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(3, 1, __pyx_L1_error)
67967   __Pyx_GOTREF(__pyx_tuple__32);
67968   __Pyx_GIVEREF(__pyx_tuple__32);
67969   __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(3, 1, __pyx_L1_error)
67970   __Pyx_RefNannyFinishContext();
67971   return 0;
67972   __pyx_L1_error:;
67973   __Pyx_RefNannyFinishContext();
67974   return -1;
67975 }
67976 
__Pyx_InitGlobals(void)67977 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
67978   if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
67979   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
67980   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
67981   __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
67982   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
67983   return 0;
67984   __pyx_L1_error:;
67985   return -1;
67986 }
67987 
67988 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
67989 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
67990 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
67991 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
67992 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
67993 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
67994 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
67995 
__Pyx_modinit_global_init_code(void)67996 static int __Pyx_modinit_global_init_code(void) {
67997   __Pyx_RefNannyDeclarations
67998   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
67999   /*--- Global init code ---*/
68000   generic = Py_None; Py_INCREF(Py_None);
68001   strided = Py_None; Py_INCREF(Py_None);
68002   indirect = Py_None; Py_INCREF(Py_None);
68003   contiguous = Py_None; Py_INCREF(Py_None);
68004   indirect_contiguous = Py_None; Py_INCREF(Py_None);
68005   __Pyx_RefNannyFinishContext();
68006   return 0;
68007 }
68008 
__Pyx_modinit_variable_export_code(void)68009 static int __Pyx_modinit_variable_export_code(void) {
68010   __Pyx_RefNannyDeclarations
68011   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
68012   /*--- Variable export code ---*/
68013   __Pyx_RefNannyFinishContext();
68014   return 0;
68015 }
68016 
__Pyx_modinit_function_export_code(void)68017 static int __Pyx_modinit_function_export_code(void) {
68018   __Pyx_RefNannyDeclarations
68019   int __pyx_lineno = 0;
68020   const char *__pyx_filename = NULL;
68021   int __pyx_clineno = 0;
68022   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
68023   /*--- Function export code ---*/
68024   if (__Pyx_ExportFunction("sselect_cov", (void (*)(void))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_sselect_cov, "int (int, int, __pyx_t_5numpy_float32_t *, __pyx_t_5numpy_float32_t *, __pyx_t_5numpy_float32_t *, __pyx_t_5numpy_float32_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68025   if (__Pyx_ExportFunction("dselect_cov", (void (*)(void))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_dselect_cov, "int (int, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68026   if (__Pyx_ExportFunction("cselect_cov", (void (*)(void))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_cselect_cov, "int (int, int, __pyx_t_float_complex *, __pyx_t_float_complex *, __pyx_t_float_complex *, __pyx_t_float_complex *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68027   if (__Pyx_ExportFunction("zselect_cov", (void (*)(void))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_zselect_cov, "int (int, int, __pyx_t_double_complex *, __pyx_t_double_complex *, __pyx_t_double_complex *, __pyx_t_double_complex *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68028   __Pyx_RefNannyFinishContext();
68029   return 0;
68030   __pyx_L1_error:;
68031   __Pyx_RefNannyFinishContext();
68032   return -1;
68033 }
68034 
__Pyx_modinit_type_init_code(void)68035 static int __Pyx_modinit_type_init_code(void) {
68036   __Pyx_RefNannyDeclarations
68037   int __pyx_lineno = 0;
68038   const char *__pyx_filename = NULL;
68039   int __pyx_clineno = 0;
68040   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
68041   /*--- Type init code ---*/
68042   __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_sStatespace = &__pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace;
68043   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace.seek = (PyObject *(*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, unsigned int, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_seek;
68044   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace.set_dimensions = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_set_dimensions;
68045   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace.select_state_cov = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_select_state_cov;
68046   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace.select_missing = (int (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_select_missing;
68047   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace._select_missing_entire_obs = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__select_missing_entire_obs;
68048   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace._select_missing_partial_obs = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace__select_missing_partial_obs;
68049   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace.transform = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform;
68050   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace.transform_diagonalize = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_diagonalize;
68051   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_sStatespace.transform_generalized_collapse = (int (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_sStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_transform_generalized_collapse;
68052   if (PyType_Ready(&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
68053   #if PY_VERSION_HEX < 0x030800B1
68054   __pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace.tp_print = 0;
68055   #endif
68056   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace.tp_dictoffset && __pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace.tp_getattro == PyObject_GenericGetAttr)) {
68057     __pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace.tp_getattro = __Pyx_PyObject_GenericGetAttr;
68058   }
68059   #if CYTHON_COMPILING_IN_CPYTHON
68060   {
68061     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 31, __pyx_L1_error)
68062     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
68063       __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
68064       __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__.doc = __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__;
68065       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11sStatespace_16__next__;
68066     }
68067   }
68068   #endif
68069   if (__Pyx_SetVtable(__pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace.tp_dict, __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_sStatespace) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
68070   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_sStatespace, (PyObject *)&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
68071   __pyx_ptype_11statsmodels_3tsa_10statespace_15_representation_sStatespace = &__pyx_type_11statsmodels_3tsa_10statespace_15_representation_sStatespace;
68072   __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_dStatespace = &__pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace;
68073   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace.seek = (PyObject *(*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, unsigned int, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_seek;
68074   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace.set_dimensions = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_set_dimensions;
68075   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace.select_state_cov = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_select_state_cov;
68076   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace.select_missing = (int (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_select_missing;
68077   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace._select_missing_entire_obs = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__select_missing_entire_obs;
68078   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace._select_missing_partial_obs = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace__select_missing_partial_obs;
68079   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace.transform = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform;
68080   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace.transform_diagonalize = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_diagonalize;
68081   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_dStatespace.transform_generalized_collapse = (int (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_dStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_transform_generalized_collapse;
68082   if (PyType_Ready(&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
68083   #if PY_VERSION_HEX < 0x030800B1
68084   __pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace.tp_print = 0;
68085   #endif
68086   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace.tp_dictoffset && __pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace.tp_getattro == PyObject_GenericGetAttr)) {
68087     __pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace.tp_getattro = __Pyx_PyObject_GenericGetAttr;
68088   }
68089   #if CYTHON_COMPILING_IN_CPYTHON
68090   {
68091     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1028, __pyx_L1_error)
68092     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
68093       __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
68094       __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__.doc = __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__;
68095       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11dStatespace_16__next__;
68096     }
68097   }
68098   #endif
68099   if (__Pyx_SetVtable(__pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace.tp_dict, __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_dStatespace) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
68100   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_dStatespace, (PyObject *)&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
68101   __pyx_ptype_11statsmodels_3tsa_10statespace_15_representation_dStatespace = &__pyx_type_11statsmodels_3tsa_10statespace_15_representation_dStatespace;
68102   __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_cStatespace = &__pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace;
68103   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace.seek = (PyObject *(*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, unsigned int, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_seek;
68104   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace.set_dimensions = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_set_dimensions;
68105   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace.select_state_cov = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_select_state_cov;
68106   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace.select_missing = (int (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_select_missing;
68107   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace._select_missing_entire_obs = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__select_missing_entire_obs;
68108   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace._select_missing_partial_obs = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace__select_missing_partial_obs;
68109   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace.transform = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform;
68110   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace.transform_diagonalize = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_diagonalize;
68111   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_cStatespace.transform_generalized_collapse = (int (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_cStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_transform_generalized_collapse;
68112   if (PyType_Ready(&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace) < 0) __PYX_ERR(0, 2025, __pyx_L1_error)
68113   #if PY_VERSION_HEX < 0x030800B1
68114   __pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace.tp_print = 0;
68115   #endif
68116   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace.tp_dictoffset && __pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace.tp_getattro == PyObject_GenericGetAttr)) {
68117     __pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace.tp_getattro = __Pyx_PyObject_GenericGetAttr;
68118   }
68119   #if CYTHON_COMPILING_IN_CPYTHON
68120   {
68121     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 2025, __pyx_L1_error)
68122     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
68123       __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
68124       __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__.doc = __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__;
68125       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11cStatespace_16__next__;
68126     }
68127   }
68128   #endif
68129   if (__Pyx_SetVtable(__pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace.tp_dict, __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_cStatespace) < 0) __PYX_ERR(0, 2025, __pyx_L1_error)
68130   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_cStatespace, (PyObject *)&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace) < 0) __PYX_ERR(0, 2025, __pyx_L1_error)
68131   __pyx_ptype_11statsmodels_3tsa_10statespace_15_representation_cStatespace = &__pyx_type_11statsmodels_3tsa_10statespace_15_representation_cStatespace;
68132   __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_zStatespace = &__pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace;
68133   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace.seek = (PyObject *(*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, unsigned int, int __pyx_skip_dispatch, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_seek;
68134   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace.set_dimensions = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_set_dimensions;
68135   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace.select_state_cov = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_select_state_cov;
68136   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace.select_missing = (int (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_select_missing;
68137   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace._select_missing_entire_obs = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__select_missing_entire_obs;
68138   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace._select_missing_partial_obs = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace__select_missing_partial_obs;
68139   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace.transform = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform;
68140   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace.transform_diagonalize = (void (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_diagonalize;
68141   __pyx_vtable_11statsmodels_3tsa_10statespace_15_representation_zStatespace.transform_generalized_collapse = (int (*)(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_representation_zStatespace *, unsigned int, unsigned int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse *__pyx_optional_args))__pyx_f_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_transform_generalized_collapse;
68142   if (PyType_Ready(&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace) < 0) __PYX_ERR(0, 3022, __pyx_L1_error)
68143   #if PY_VERSION_HEX < 0x030800B1
68144   __pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace.tp_print = 0;
68145   #endif
68146   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace.tp_dictoffset && __pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace.tp_getattro == PyObject_GenericGetAttr)) {
68147     __pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace.tp_getattro = __Pyx_PyObject_GenericGetAttr;
68148   }
68149   #if CYTHON_COMPILING_IN_CPYTHON
68150   {
68151     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 3022, __pyx_L1_error)
68152     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
68153       __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
68154       __pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__.doc = __pyx_doc_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__;
68155       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_11statsmodels_3tsa_10statespace_15_representation_11zStatespace_16__next__;
68156     }
68157   }
68158   #endif
68159   if (__Pyx_SetVtable(__pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace.tp_dict, __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_representation_zStatespace) < 0) __PYX_ERR(0, 3022, __pyx_L1_error)
68160   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_zStatespace, (PyObject *)&__pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace) < 0) __PYX_ERR(0, 3022, __pyx_L1_error)
68161   __pyx_ptype_11statsmodels_3tsa_10statespace_15_representation_zStatespace = &__pyx_type_11statsmodels_3tsa_10statespace_15_representation_zStatespace;
68162   __pyx_vtabptr_array = &__pyx_vtable_array;
68163   __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
68164   if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(3, 105, __pyx_L1_error)
68165   #if PY_VERSION_HEX < 0x030800B1
68166   __pyx_type___pyx_array.tp_print = 0;
68167   #endif
68168   if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(3, 105, __pyx_L1_error)
68169   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(3, 105, __pyx_L1_error)
68170   __pyx_array_type = &__pyx_type___pyx_array;
68171   if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(3, 279, __pyx_L1_error)
68172   #if PY_VERSION_HEX < 0x030800B1
68173   __pyx_type___pyx_MemviewEnum.tp_print = 0;
68174   #endif
68175   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
68176     __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
68177   }
68178   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(3, 279, __pyx_L1_error)
68179   __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
68180   __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
68181   __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
68182   __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
68183   __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
68184   __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
68185   __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
68186   __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
68187   __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
68188   if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(3, 330, __pyx_L1_error)
68189   #if PY_VERSION_HEX < 0x030800B1
68190   __pyx_type___pyx_memoryview.tp_print = 0;
68191   #endif
68192   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
68193     __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
68194   }
68195   if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(3, 330, __pyx_L1_error)
68196   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(3, 330, __pyx_L1_error)
68197   __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
68198   __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
68199   __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
68200   __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
68201   __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
68202   __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
68203   if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(3, 965, __pyx_L1_error)
68204   #if PY_VERSION_HEX < 0x030800B1
68205   __pyx_type___pyx_memoryviewslice.tp_print = 0;
68206   #endif
68207   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
68208     __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
68209   }
68210   if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(3, 965, __pyx_L1_error)
68211   if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(3, 965, __pyx_L1_error)
68212   __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
68213   __Pyx_RefNannyFinishContext();
68214   return 0;
68215   __pyx_L1_error:;
68216   __Pyx_RefNannyFinishContext();
68217   return -1;
68218 }
68219 
__Pyx_modinit_type_import_code(void)68220 static int __Pyx_modinit_type_import_code(void) {
68221   __Pyx_RefNannyDeclarations
68222   PyObject *__pyx_t_1 = NULL;
68223   int __pyx_lineno = 0;
68224   const char *__pyx_filename = NULL;
68225   int __pyx_clineno = 0;
68226   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
68227   /*--- Type import code ---*/
68228   __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
68229   __Pyx_GOTREF(__pyx_t_1);
68230   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
68231   #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
68232   sizeof(PyTypeObject),
68233   #else
68234   sizeof(PyHeapTypeObject),
68235   #endif
68236   __Pyx_ImportType_CheckSize_Warn);
68237    if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
68238   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68239   __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error)
68240   __Pyx_GOTREF(__pyx_t_1);
68241   __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
68242    if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error)
68243   __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
68244    if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error)
68245   __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
68246    if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error)
68247   __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
68248    if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error)
68249   __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68250    if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error)
68251   __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68252    if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error)
68253   __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68254    if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error)
68255   __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68256    if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error)
68257   __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68258    if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error)
68259   __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68260    if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error)
68261   __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68262    if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error)
68263   __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68264    if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error)
68265   __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68266    if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error)
68267   __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
68268    if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error)
68269   __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
68270    if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error)
68271   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68272   __pyx_t_1 = PyImport_ImportModule("statsmodels.tsa.statespace._initialization"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 17, __pyx_L1_error)
68273   __Pyx_GOTREF(__pyx_t_1);
68274   __pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_sInitialization = __Pyx_ImportType(__pyx_t_1, "statsmodels.tsa.statespace._initialization", "sInitialization", sizeof(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_sInitialization), __Pyx_ImportType_CheckSize_Warn);
68275    if (!__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_sInitialization) __PYX_ERR(5, 17, __pyx_L1_error)
68276   __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_sInitialization = (struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_sInitialization*)__Pyx_GetVtable(__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_sInitialization->tp_dict); if (unlikely(!__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_sInitialization)) __PYX_ERR(5, 17, __pyx_L1_error)
68277   __pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_dInitialization = __Pyx_ImportType(__pyx_t_1, "statsmodels.tsa.statespace._initialization", "dInitialization", sizeof(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_dInitialization), __Pyx_ImportType_CheckSize_Warn);
68278    if (!__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_dInitialization) __PYX_ERR(5, 41, __pyx_L1_error)
68279   __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_dInitialization = (struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_dInitialization*)__Pyx_GetVtable(__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_dInitialization->tp_dict); if (unlikely(!__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_dInitialization)) __PYX_ERR(5, 41, __pyx_L1_error)
68280   __pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_cInitialization = __Pyx_ImportType(__pyx_t_1, "statsmodels.tsa.statespace._initialization", "cInitialization", sizeof(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_cInitialization), __Pyx_ImportType_CheckSize_Warn);
68281    if (!__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_cInitialization) __PYX_ERR(5, 65, __pyx_L1_error)
68282   __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_cInitialization = (struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_cInitialization*)__Pyx_GetVtable(__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_cInitialization->tp_dict); if (unlikely(!__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_cInitialization)) __PYX_ERR(5, 65, __pyx_L1_error)
68283   __pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_zInitialization = __Pyx_ImportType(__pyx_t_1, "statsmodels.tsa.statespace._initialization", "zInitialization", sizeof(struct __pyx_obj_11statsmodels_3tsa_10statespace_15_initialization_zInitialization), __Pyx_ImportType_CheckSize_Warn);
68284    if (!__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_zInitialization) __PYX_ERR(5, 89, __pyx_L1_error)
68285   __pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_zInitialization = (struct __pyx_vtabstruct_11statsmodels_3tsa_10statespace_15_initialization_zInitialization*)__Pyx_GetVtable(__pyx_ptype_11statsmodels_3tsa_10statespace_15_initialization_zInitialization->tp_dict); if (unlikely(!__pyx_vtabptr_11statsmodels_3tsa_10statespace_15_initialization_zInitialization)) __PYX_ERR(5, 89, __pyx_L1_error)
68286   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68287   __Pyx_RefNannyFinishContext();
68288   return 0;
68289   __pyx_L1_error:;
68290   __Pyx_XDECREF(__pyx_t_1);
68291   __Pyx_RefNannyFinishContext();
68292   return -1;
68293 }
68294 
__Pyx_modinit_variable_import_code(void)68295 static int __Pyx_modinit_variable_import_code(void) {
68296   __Pyx_RefNannyDeclarations
68297   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
68298   /*--- Variable import code ---*/
68299   __Pyx_RefNannyFinishContext();
68300   return 0;
68301 }
68302 
__Pyx_modinit_function_import_code(void)68303 static int __Pyx_modinit_function_import_code(void) {
68304   __Pyx_RefNannyDeclarations
68305   PyObject *__pyx_t_1 = NULL;
68306   int __pyx_lineno = 0;
68307   const char *__pyx_filename = NULL;
68308   int __pyx_clineno = 0;
68309   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
68310   /*--- Function import code ---*/
68311   __pyx_t_1 = PyImport_ImportModule("scipy.linalg.cython_blas"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
68312   __Pyx_GOTREF(__pyx_t_1);
68313   if (__Pyx_ImportFunction(__pyx_t_1, "ccopy", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_ccopy, "void (int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68314   if (__Pyx_ImportFunction(__pyx_t_1, "cgemm", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_cgemm, "void (char *, char *, int *, int *, int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68315   if (__Pyx_ImportFunction(__pyx_t_1, "cgemv", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_cgemv, "void (char *, int *, int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68316   if (__Pyx_ImportFunction(__pyx_t_1, "cscal", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_cscal, "void (int *, __pyx_t_float_complex *, __pyx_t_float_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68317   if (__Pyx_ImportFunction(__pyx_t_1, "ctrmv", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_ctrmv, "void (char *, char *, char *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68318   if (__Pyx_ImportFunction(__pyx_t_1, "dasum", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_dasum, "__pyx_t_5scipy_6linalg_11cython_blas_d (int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68319   if (__Pyx_ImportFunction(__pyx_t_1, "dcopy", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_dcopy, "void (int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68320   if (__Pyx_ImportFunction(__pyx_t_1, "dgemm", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_dgemm, "void (char *, char *, int *, int *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68321   if (__Pyx_ImportFunction(__pyx_t_1, "dgemv", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_dgemv, "void (char *, int *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68322   if (__Pyx_ImportFunction(__pyx_t_1, "dscal", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_dscal, "void (int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68323   if (__Pyx_ImportFunction(__pyx_t_1, "dtrmv", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_dtrmv, "void (char *, char *, char *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *, __pyx_t_5scipy_6linalg_11cython_blas_d *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68324   if (__Pyx_ImportFunction(__pyx_t_1, "dzasum", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_dzasum, "__pyx_t_5scipy_6linalg_11cython_blas_d (int *, __pyx_t_double_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68325   if (__Pyx_ImportFunction(__pyx_t_1, "sasum", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_sasum, "__pyx_t_5scipy_6linalg_11cython_blas_s (int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68326   if (__Pyx_ImportFunction(__pyx_t_1, "scasum", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_scasum, "__pyx_t_5scipy_6linalg_11cython_blas_s (int *, __pyx_t_float_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68327   if (__Pyx_ImportFunction(__pyx_t_1, "scopy", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_scopy, "void (int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68328   if (__Pyx_ImportFunction(__pyx_t_1, "sgemm", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_sgemm, "void (char *, char *, int *, int *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68329   if (__Pyx_ImportFunction(__pyx_t_1, "sgemv", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_sgemv, "void (char *, int *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68330   if (__Pyx_ImportFunction(__pyx_t_1, "sscal", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_sscal, "void (int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68331   if (__Pyx_ImportFunction(__pyx_t_1, "strmv", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_strmv, "void (char *, char *, char *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *, __pyx_t_5scipy_6linalg_11cython_blas_s *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68332   if (__Pyx_ImportFunction(__pyx_t_1, "zcopy", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_zcopy, "void (int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68333   if (__Pyx_ImportFunction(__pyx_t_1, "zgemm", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_zgemm, "void (char *, char *, int *, int *, int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68334   if (__Pyx_ImportFunction(__pyx_t_1, "zgemv", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_zgemv, "void (char *, int *, int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68335   if (__Pyx_ImportFunction(__pyx_t_1, "zscal", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_zscal, "void (int *, __pyx_t_double_complex *, __pyx_t_double_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68336   if (__Pyx_ImportFunction(__pyx_t_1, "ztrmv", (void (**)(void))&__pyx_f_5scipy_6linalg_11cython_blas_ztrmv, "void (char *, char *, char *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68337   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68338   __pyx_t_1 = PyImport_ImportModule("scipy.linalg.cython_lapack"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
68339   __Pyx_GOTREF(__pyx_t_1);
68340   if (__Pyx_ImportFunction(__pyx_t_1, "cgetrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_cgetrf, "void (int *, int *, __pyx_t_float_complex *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68341   if (__Pyx_ImportFunction(__pyx_t_1, "cgetrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_cgetrs, "void (char *, int *, int *, __pyx_t_float_complex *, int *, int *, __pyx_t_float_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68342   if (__Pyx_ImportFunction(__pyx_t_1, "cpotrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_cpotrf, "void (char *, int *, __pyx_t_float_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68343   if (__Pyx_ImportFunction(__pyx_t_1, "cpotri", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_cpotri, "void (char *, int *, __pyx_t_float_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68344   if (__Pyx_ImportFunction(__pyx_t_1, "cpotrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_cpotrs, "void (char *, int *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68345   if (__Pyx_ImportFunction(__pyx_t_1, "ctrtrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_ctrtrs, "void (char *, char *, char *, int *, int *, __pyx_t_float_complex *, int *, __pyx_t_float_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68346   if (__Pyx_ImportFunction(__pyx_t_1, "dgetrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_dgetrf, "void (int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68347   if (__Pyx_ImportFunction(__pyx_t_1, "dgetrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_dgetrs, "void (char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68348   if (__Pyx_ImportFunction(__pyx_t_1, "dpotrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_dpotrf, "void (char *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68349   if (__Pyx_ImportFunction(__pyx_t_1, "dpotri", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_dpotri, "void (char *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68350   if (__Pyx_ImportFunction(__pyx_t_1, "dpotrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_dpotrs, "void (char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68351   if (__Pyx_ImportFunction(__pyx_t_1, "dtrtrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_dtrtrs, "void (char *, char *, char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68352   if (__Pyx_ImportFunction(__pyx_t_1, "sgetrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_sgetrf, "void (int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68353   if (__Pyx_ImportFunction(__pyx_t_1, "sgetrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_sgetrs, "void (char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68354   if (__Pyx_ImportFunction(__pyx_t_1, "spotrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_spotrf, "void (char *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68355   if (__Pyx_ImportFunction(__pyx_t_1, "spotri", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_spotri, "void (char *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68356   if (__Pyx_ImportFunction(__pyx_t_1, "spotrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_spotrs, "void (char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68357   if (__Pyx_ImportFunction(__pyx_t_1, "strtrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_strtrs, "void (char *, char *, char *, int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68358   if (__Pyx_ImportFunction(__pyx_t_1, "zgetrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_zgetrf, "void (int *, int *, __pyx_t_double_complex *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68359   if (__Pyx_ImportFunction(__pyx_t_1, "zgetrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_zgetrs, "void (char *, int *, int *, __pyx_t_double_complex *, int *, int *, __pyx_t_double_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68360   if (__Pyx_ImportFunction(__pyx_t_1, "zpotrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_zpotrf, "void (char *, int *, __pyx_t_double_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68361   if (__Pyx_ImportFunction(__pyx_t_1, "zpotri", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_zpotri, "void (char *, int *, __pyx_t_double_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68362   if (__Pyx_ImportFunction(__pyx_t_1, "zpotrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_zpotrs, "void (char *, int *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68363   if (__Pyx_ImportFunction(__pyx_t_1, "ztrtrs", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_ztrtrs, "void (char *, char *, char *, int *, int *, __pyx_t_double_complex *, int *, __pyx_t_double_complex *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68364   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68365   __pyx_t_1 = PyImport_ImportModule("statsmodels.tsa.statespace._tools"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
68366   __Pyx_GOTREF(__pyx_t_1);
68367   if (__Pyx_ImportFunction(__pyx_t_1, "validate_matrix_shape", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape, "PyObject *(PyObject *, Py_ssize_t *, int, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_matrix_shape *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68368   if (__Pyx_ImportFunction(__pyx_t_1, "validate_vector_shape", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape, "PyObject *(PyObject *, Py_ssize_t *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools_validate_vector_shape *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68369   if (__Pyx_ImportFunction(__pyx_t_1, "_ssolve_discrete_lyapunov", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools__ssolve_discrete_lyapunov, "int (__pyx_t_5numpy_float32_t *, __pyx_t_5numpy_float32_t *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__ssolve_discrete_lyapunov *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68370   if (__Pyx_ImportFunction(__pyx_t_1, "_dsolve_discrete_lyapunov", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools__dsolve_discrete_lyapunov, "int (__pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__dsolve_discrete_lyapunov *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68371   if (__Pyx_ImportFunction(__pyx_t_1, "_csolve_discrete_lyapunov", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools__csolve_discrete_lyapunov, "int (__pyx_t_float_complex *, __pyx_t_float_complex *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__csolve_discrete_lyapunov *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68372   if (__Pyx_ImportFunction(__pyx_t_1, "_zsolve_discrete_lyapunov", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools__zsolve_discrete_lyapunov, "int (__pyx_t_double_complex *, __pyx_t_double_complex *, int, struct __pyx_opt_args_11statsmodels_3tsa_10statespace_6_tools__zsolve_discrete_lyapunov *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68373   if (__Pyx_ImportFunction(__pyx_t_1, "_sldl", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools__sldl, "int (__pyx_t_5numpy_float32_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68374   if (__Pyx_ImportFunction(__pyx_t_1, "_dldl", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools__dldl, "int (__pyx_t_5numpy_float64_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68375   if (__Pyx_ImportFunction(__pyx_t_1, "_cldl", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools__cldl, "int (__pyx_t_float_complex *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68376   if (__Pyx_ImportFunction(__pyx_t_1, "_zldl", (void (**)(void))&__pyx_f_11statsmodels_3tsa_10statespace_6_tools__zldl, "int (__pyx_t_double_complex *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68377   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68378   __Pyx_RefNannyFinishContext();
68379   return 0;
68380   __pyx_L1_error:;
68381   __Pyx_XDECREF(__pyx_t_1);
68382   __Pyx_RefNannyFinishContext();
68383   return -1;
68384 }
68385 
68386 
68387 #ifndef CYTHON_NO_PYINIT_EXPORT
68388 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
68389 #elif PY_MAJOR_VERSION < 3
68390 #ifdef __cplusplus
68391 #define __Pyx_PyMODINIT_FUNC extern "C" void
68392 #else
68393 #define __Pyx_PyMODINIT_FUNC void
68394 #endif
68395 #else
68396 #ifdef __cplusplus
68397 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
68398 #else
68399 #define __Pyx_PyMODINIT_FUNC PyObject *
68400 #endif
68401 #endif
68402 
68403 
68404 #if PY_MAJOR_VERSION < 3
68405 __Pyx_PyMODINIT_FUNC init_representation(void) CYTHON_SMALL_CODE; /*proto*/
init_representation(void)68406 __Pyx_PyMODINIT_FUNC init_representation(void)
68407 #else
68408 __Pyx_PyMODINIT_FUNC PyInit__representation(void) CYTHON_SMALL_CODE; /*proto*/
68409 __Pyx_PyMODINIT_FUNC PyInit__representation(void)
68410 #if CYTHON_PEP489_MULTI_PHASE_INIT
68411 {
68412   return PyModuleDef_Init(&__pyx_moduledef);
68413 }
68414 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
68415     #if PY_VERSION_HEX >= 0x030700A1
68416     static PY_INT64_T main_interpreter_id = -1;
68417     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
68418     if (main_interpreter_id == -1) {
68419         main_interpreter_id = current_id;
68420         return (unlikely(current_id == -1)) ? -1 : 0;
68421     } else if (unlikely(main_interpreter_id != current_id))
68422     #else
68423     static PyInterpreterState *main_interpreter = NULL;
68424     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
68425     if (!main_interpreter) {
68426         main_interpreter = current_interpreter;
68427     } else if (unlikely(main_interpreter != current_interpreter))
68428     #endif
68429     {
68430         PyErr_SetString(
68431             PyExc_ImportError,
68432             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
68433         return -1;
68434     }
68435     return 0;
68436 }
68437 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
68438     PyObject *value = PyObject_GetAttrString(spec, from_name);
68439     int result = 0;
68440     if (likely(value)) {
68441         if (allow_none || value != Py_None) {
68442             result = PyDict_SetItemString(moddict, to_name, value);
68443         }
68444         Py_DECREF(value);
68445     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
68446         PyErr_Clear();
68447     } else {
68448         result = -1;
68449     }
68450     return result;
68451 }
68452 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
68453     PyObject *module = NULL, *moddict, *modname;
68454     if (__Pyx_check_single_interpreter())
68455         return NULL;
68456     if (__pyx_m)
68457         return __Pyx_NewRef(__pyx_m);
68458     modname = PyObject_GetAttrString(spec, "name");
68459     if (unlikely(!modname)) goto bad;
68460     module = PyModule_NewObject(modname);
68461     Py_DECREF(modname);
68462     if (unlikely(!module)) goto bad;
68463     moddict = PyModule_GetDict(module);
68464     if (unlikely(!moddict)) goto bad;
68465     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
68466     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
68467     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
68468     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
68469     return module;
68470 bad:
68471     Py_XDECREF(module);
68472     return NULL;
68473 }
68474 
68475 
68476 static CYTHON_SMALL_CODE int __pyx_pymod_exec__representation(PyObject *__pyx_pyinit_module)
68477 #endif
68478 #endif
68479 {
68480   PyObject *__pyx_t_1 = NULL;
68481   int __pyx_t_2;
68482   static PyThread_type_lock __pyx_t_3[8];
68483   int __pyx_lineno = 0;
68484   const char *__pyx_filename = NULL;
68485   int __pyx_clineno = 0;
68486   __Pyx_RefNannyDeclarations
68487   #if CYTHON_PEP489_MULTI_PHASE_INIT
68488   if (__pyx_m) {
68489     if (__pyx_m == __pyx_pyinit_module) return 0;
68490     PyErr_SetString(PyExc_RuntimeError, "Module '_representation' has already been imported. Re-initialisation is not supported.");
68491     return -1;
68492   }
68493   #elif PY_MAJOR_VERSION >= 3
68494   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
68495   #endif
68496   #if CYTHON_REFNANNY
68497 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
68498 if (!__Pyx_RefNanny) {
68499   PyErr_Clear();
68500   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
68501   if (!__Pyx_RefNanny)
68502       Py_FatalError("failed to import 'refnanny' module");
68503 }
68504 #endif
68505   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__representation(void)", 0);
68506   if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68507   #ifdef __Pxy_PyFrame_Initialize_Offsets
68508   __Pxy_PyFrame_Initialize_Offsets();
68509   #endif
68510   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
68511   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
68512   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
68513   #ifdef __Pyx_CyFunction_USED
68514   if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68515   #endif
68516   #ifdef __Pyx_FusedFunction_USED
68517   if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68518   #endif
68519   #ifdef __Pyx_Coroutine_USED
68520   if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68521   #endif
68522   #ifdef __Pyx_Generator_USED
68523   if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68524   #endif
68525   #ifdef __Pyx_AsyncGen_USED
68526   if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68527   #endif
68528   #ifdef __Pyx_StopAsyncIteration_USED
68529   if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68530   #endif
68531   /*--- Library function declarations ---*/
68532   /*--- Threads initialization code ---*/
68533   #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
68534   PyEval_InitThreads();
68535   #endif
68536   /*--- Module creation code ---*/
68537   #if CYTHON_PEP489_MULTI_PHASE_INIT
68538   __pyx_m = __pyx_pyinit_module;
68539   Py_INCREF(__pyx_m);
68540   #else
68541   #if PY_MAJOR_VERSION < 3
68542   __pyx_m = Py_InitModule4("_representation", __pyx_methods, __pyx_k_State_Space_Models_Author_Chad, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
68543   #else
68544   __pyx_m = PyModule_Create(&__pyx_moduledef);
68545   #endif
68546   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
68547   #endif
68548   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
68549   Py_INCREF(__pyx_d);
68550   __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
68551   Py_INCREF(__pyx_b);
68552   __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
68553   Py_INCREF(__pyx_cython_runtime);
68554   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
68555   /*--- Initialize various global constants etc. ---*/
68556   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68557   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
68558   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68559   #endif
68560   if (__pyx_module_is_main_statsmodels__tsa__statespace___representation) {
68561     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68562   }
68563   #if PY_MAJOR_VERSION >= 3
68564   {
68565     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
68566     if (!PyDict_GetItemString(modules, "statsmodels.tsa.statespace._representation")) {
68567       if (unlikely(PyDict_SetItemString(modules, "statsmodels.tsa.statespace._representation", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
68568     }
68569   }
68570   #endif
68571   /*--- Builtin init code ---*/
68572   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68573   /*--- Constants init code ---*/
68574   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68575   /*--- Global type/function init code ---*/
68576   (void)__Pyx_modinit_global_init_code();
68577   (void)__Pyx_modinit_variable_export_code();
68578   if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
68579   if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
68580   if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
68581   (void)__Pyx_modinit_variable_import_code();
68582   if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
68583   /*--- Execution code ---*/
68584   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
68585   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68586   #endif
68587 
68588   /* "statsmodels/tsa/statespace/_representation.pyx":12
68589  *
68590  * # Typical imports
68591  * import numpy as np             # <<<<<<<<<<<<<<
68592  * import warnings
68593  * cimport numpy as np
68594  */
68595   __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
68596   __Pyx_GOTREF(__pyx_t_1);
68597   if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
68598   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68599 
68600   /* "statsmodels/tsa/statespace/_representation.pyx":13
68601  * # Typical imports
68602  * import numpy as np
68603  * import warnings             # <<<<<<<<<<<<<<
68604  * cimport numpy as np
68605  * cimport cython
68606  */
68607   __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
68608   __Pyx_GOTREF(__pyx_t_1);
68609   if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
68610   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68611 
68612   /* "statsmodels/tsa/statespace/_representation.pyx":17
68613  * cimport cython
68614  *
68615  * np.import_array()             # <<<<<<<<<<<<<<
68616  *
68617  * from statsmodels.src.math cimport *
68618  */
68619   __pyx_t_2 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 17, __pyx_L1_error)
68620 
68621   /* "statsmodels/tsa/statespace/_representation.pyx":28
68622  * from statsmodels.tsa.statespace._initialization cimport zInitialization
68623  *
68624  * cdef int FORTRAN = 1             # <<<<<<<<<<<<<<
68625  *
68626  * ## State Space Representation
68627  */
68628   __pyx_v_11statsmodels_3tsa_10statespace_15_representation_FORTRAN = 1;
68629 
68630   /* "statsmodels/tsa/statespace/_representation.pyx":2401
68631  *     #
68632  *     # *Note:* see Durbin and Koopman section 5.6.1
68633  *     def initialize_approximate_diffuse(self, np.complex64_t variance=1e2):             # <<<<<<<<<<<<<<
68634  *         """
68635  *         initialize_approximate_diffuse(variance=1e2)
68636  */
68637   __pyx_k__5 = __pyx_t_float_complex_from_parts(1e2, 0);
68638 
68639   /* "statsmodels/tsa/statespace/_representation.pyx":3398
68640  *     #
68641  *     # *Note:* see Durbin and Koopman section 5.6.1
68642  *     def initialize_approximate_diffuse(self, np.complex128_t variance=1e2):             # <<<<<<<<<<<<<<
68643  *         """
68644  *         initialize_approximate_diffuse(variance=1e2)
68645  */
68646   __pyx_k__6 = __pyx_t_double_complex_from_parts(1e2, 0);
68647 
68648   /* "statsmodels/tsa/statespace/_representation.pyx":1
68649  * #cython: boundscheck=False             # <<<<<<<<<<<<<<
68650  * #cython: wraparound=False
68651  * #cython: cdivision=False
68652  */
68653   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
68654   __Pyx_GOTREF(__pyx_t_1);
68655   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
68656   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68657 
68658   /* "View.MemoryView":209
68659  *         info.obj = self
68660  *
68661  *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
68662  *
68663  *     def __dealloc__(array self):
68664  */
68665   __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 209, __pyx_L1_error)
68666   __Pyx_GOTREF(__pyx_t_1);
68667   if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(3, 209, __pyx_L1_error)
68668   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68669   PyType_Modified(__pyx_array_type);
68670 
68671   /* "View.MemoryView":286
68672  *         return self.name
68673  *
68674  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
68675  * cdef strided = Enum("<strided and direct>") # default
68676  * cdef indirect = Enum("<strided and indirect>")
68677  */
68678   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 286, __pyx_L1_error)
68679   __Pyx_GOTREF(__pyx_t_1);
68680   __Pyx_XGOTREF(generic);
68681   __Pyx_DECREF_SET(generic, __pyx_t_1);
68682   __Pyx_GIVEREF(__pyx_t_1);
68683   __pyx_t_1 = 0;
68684 
68685   /* "View.MemoryView":287
68686  *
68687  * cdef generic = Enum("<strided and direct or indirect>")
68688  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
68689  * cdef indirect = Enum("<strided and indirect>")
68690  *
68691  */
68692   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 287, __pyx_L1_error)
68693   __Pyx_GOTREF(__pyx_t_1);
68694   __Pyx_XGOTREF(strided);
68695   __Pyx_DECREF_SET(strided, __pyx_t_1);
68696   __Pyx_GIVEREF(__pyx_t_1);
68697   __pyx_t_1 = 0;
68698 
68699   /* "View.MemoryView":288
68700  * cdef generic = Enum("<strided and direct or indirect>")
68701  * cdef strided = Enum("<strided and direct>") # default
68702  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
68703  *
68704  *
68705  */
68706   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 288, __pyx_L1_error)
68707   __Pyx_GOTREF(__pyx_t_1);
68708   __Pyx_XGOTREF(indirect);
68709   __Pyx_DECREF_SET(indirect, __pyx_t_1);
68710   __Pyx_GIVEREF(__pyx_t_1);
68711   __pyx_t_1 = 0;
68712 
68713   /* "View.MemoryView":291
68714  *
68715  *
68716  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
68717  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
68718  *
68719  */
68720   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 291, __pyx_L1_error)
68721   __Pyx_GOTREF(__pyx_t_1);
68722   __Pyx_XGOTREF(contiguous);
68723   __Pyx_DECREF_SET(contiguous, __pyx_t_1);
68724   __Pyx_GIVEREF(__pyx_t_1);
68725   __pyx_t_1 = 0;
68726 
68727   /* "View.MemoryView":292
68728  *
68729  * cdef contiguous = Enum("<contiguous and direct>")
68730  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
68731  *
68732  *
68733  */
68734   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 292, __pyx_L1_error)
68735   __Pyx_GOTREF(__pyx_t_1);
68736   __Pyx_XGOTREF(indirect_contiguous);
68737   __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
68738   __Pyx_GIVEREF(__pyx_t_1);
68739   __pyx_t_1 = 0;
68740 
68741   /* "View.MemoryView":316
68742  *
68743  * DEF THREAD_LOCKS_PREALLOCATED = 8
68744  * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
68745  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
68746  *     PyThread_allocate_lock(),
68747  */
68748   __pyx_memoryview_thread_locks_used = 0;
68749 
68750   /* "View.MemoryView":317
68751  * DEF THREAD_LOCKS_PREALLOCATED = 8
68752  * cdef int __pyx_memoryview_thread_locks_used = 0
68753  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
68754  *     PyThread_allocate_lock(),
68755  *     PyThread_allocate_lock(),
68756  */
68757   __pyx_t_3[0] = PyThread_allocate_lock();
68758   __pyx_t_3[1] = PyThread_allocate_lock();
68759   __pyx_t_3[2] = PyThread_allocate_lock();
68760   __pyx_t_3[3] = PyThread_allocate_lock();
68761   __pyx_t_3[4] = PyThread_allocate_lock();
68762   __pyx_t_3[5] = PyThread_allocate_lock();
68763   __pyx_t_3[6] = PyThread_allocate_lock();
68764   __pyx_t_3[7] = PyThread_allocate_lock();
68765   memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_3, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
68766 
68767   /* "View.MemoryView":549
68768  *         info.obj = self
68769  *
68770  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
68771  *
68772  *
68773  */
68774   __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 549, __pyx_L1_error)
68775   __Pyx_GOTREF(__pyx_t_1);
68776   if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(3, 549, __pyx_L1_error)
68777   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68778   PyType_Modified(__pyx_memoryview_type);
68779 
68780   /* "View.MemoryView":995
68781  *         return self.from_object
68782  *
68783  *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
68784  *
68785  *
68786  */
68787   __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 995, __pyx_L1_error)
68788   __Pyx_GOTREF(__pyx_t_1);
68789   if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(3, 995, __pyx_L1_error)
68790   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68791   PyType_Modified(__pyx_memoryviewslice_type);
68792 
68793   /* "(tree fragment)":1
68794  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
68795  *     cdef object __pyx_PickleError
68796  *     cdef object __pyx_result
68797  */
68798   __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1, __pyx_L1_error)
68799   __Pyx_GOTREF(__pyx_t_1);
68800   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
68801   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
68802 
68803   /* "(tree fragment)":11
68804  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
68805  *     return __pyx_result
68806  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
68807  *     __pyx_result.name = __pyx_state[0]
68808  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
68809  */
68810 
68811   /*--- Wrapped vars code ---*/
68812 
68813   goto __pyx_L0;
68814   __pyx_L1_error:;
68815   __Pyx_XDECREF(__pyx_t_1);
68816   if (__pyx_m) {
68817     if (__pyx_d) {
68818       __Pyx_AddTraceback("init statsmodels.tsa.statespace._representation", __pyx_clineno, __pyx_lineno, __pyx_filename);
68819     }
68820     Py_CLEAR(__pyx_m);
68821   } else if (!PyErr_Occurred()) {
68822     PyErr_SetString(PyExc_ImportError, "init statsmodels.tsa.statespace._representation");
68823   }
68824   __pyx_L0:;
68825   __Pyx_RefNannyFinishContext();
68826   #if CYTHON_PEP489_MULTI_PHASE_INIT
68827   return (__pyx_m != NULL) ? 0 : -1;
68828   #elif PY_MAJOR_VERSION >= 3
68829   return __pyx_m;
68830   #else
68831   return;
68832   #endif
68833 }
68834 
68835 /* --- Runtime support code --- */
68836 /* Refnanny */
68837 #if CYTHON_REFNANNY
__Pyx_RefNannyImportAPI(const char * modname)68838 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
68839     PyObject *m = NULL, *p = NULL;
68840     void *r = NULL;
68841     m = PyImport_ImportModule(modname);
68842     if (!m) goto end;
68843     p = PyObject_GetAttrString(m, "RefNannyAPI");
68844     if (!p) goto end;
68845     r = PyLong_AsVoidPtr(p);
68846 end:
68847     Py_XDECREF(p);
68848     Py_XDECREF(m);
68849     return (__Pyx_RefNannyAPIStruct *)r;
68850 }
68851 #endif
68852 
68853 /* PyObjectGetAttrStr */
68854 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetAttrStr(PyObject * obj,PyObject * attr_name)68855 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
68856     PyTypeObject* tp = Py_TYPE(obj);
68857     if (likely(tp->tp_getattro))
68858         return tp->tp_getattro(obj, attr_name);
68859 #if PY_MAJOR_VERSION < 3
68860     if (likely(tp->tp_getattr))
68861         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
68862 #endif
68863     return PyObject_GetAttr(obj, attr_name);
68864 }
68865 #endif
68866 
68867 /* GetBuiltinName */
__Pyx_GetBuiltinName(PyObject * name)68868 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
68869     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
68870     if (unlikely(!result)) {
68871         PyErr_Format(PyExc_NameError,
68872 #if PY_MAJOR_VERSION >= 3
68873             "name '%U' is not defined", name);
68874 #else
68875             "name '%.200s' is not defined", PyString_AS_STRING(name));
68876 #endif
68877     }
68878     return result;
68879 }
68880 
68881 /* RaiseArgTupleInvalid */
__Pyx_RaiseArgtupleInvalid(const char * func_name,int exact,Py_ssize_t num_min,Py_ssize_t num_max,Py_ssize_t num_found)68882 static void __Pyx_RaiseArgtupleInvalid(
68883     const char* func_name,
68884     int exact,
68885     Py_ssize_t num_min,
68886     Py_ssize_t num_max,
68887     Py_ssize_t num_found)
68888 {
68889     Py_ssize_t num_expected;
68890     const char *more_or_less;
68891     if (num_found < num_min) {
68892         num_expected = num_min;
68893         more_or_less = "at least";
68894     } else {
68895         num_expected = num_max;
68896         more_or_less = "at most";
68897     }
68898     if (exact) {
68899         more_or_less = "exactly";
68900     }
68901     PyErr_Format(PyExc_TypeError,
68902                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
68903                  func_name, more_or_less, num_expected,
68904                  (num_expected == 1) ? "" : "s", num_found);
68905 }
68906 
68907 /* RaiseDoubleKeywords */
__Pyx_RaiseDoubleKeywordsError(const char * func_name,PyObject * kw_name)68908 static void __Pyx_RaiseDoubleKeywordsError(
68909     const char* func_name,
68910     PyObject* kw_name)
68911 {
68912     PyErr_Format(PyExc_TypeError,
68913         #if PY_MAJOR_VERSION >= 3
68914         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
68915         #else
68916         "%s() got multiple values for keyword argument '%s'", func_name,
68917         PyString_AsString(kw_name));
68918         #endif
68919 }
68920 
68921 /* ParseKeywords */
__Pyx_ParseOptionalKeywords(PyObject * kwds,PyObject ** argnames[],PyObject * kwds2,PyObject * values[],Py_ssize_t num_pos_args,const char * function_name)68922 static int __Pyx_ParseOptionalKeywords(
68923     PyObject *kwds,
68924     PyObject **argnames[],
68925     PyObject *kwds2,
68926     PyObject *values[],
68927     Py_ssize_t num_pos_args,
68928     const char* function_name)
68929 {
68930     PyObject *key = 0, *value = 0;
68931     Py_ssize_t pos = 0;
68932     PyObject*** name;
68933     PyObject*** first_kw_arg = argnames + num_pos_args;
68934     while (PyDict_Next(kwds, &pos, &key, &value)) {
68935         name = first_kw_arg;
68936         while (*name && (**name != key)) name++;
68937         if (*name) {
68938             values[name-argnames] = value;
68939             continue;
68940         }
68941         name = first_kw_arg;
68942         #if PY_MAJOR_VERSION < 3
68943         if (likely(PyString_Check(key))) {
68944             while (*name) {
68945                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
68946                         && _PyString_Eq(**name, key)) {
68947                     values[name-argnames] = value;
68948                     break;
68949                 }
68950                 name++;
68951             }
68952             if (*name) continue;
68953             else {
68954                 PyObject*** argname = argnames;
68955                 while (argname != first_kw_arg) {
68956                     if ((**argname == key) || (
68957                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
68958                              && _PyString_Eq(**argname, key))) {
68959                         goto arg_passed_twice;
68960                     }
68961                     argname++;
68962                 }
68963             }
68964         } else
68965         #endif
68966         if (likely(PyUnicode_Check(key))) {
68967             while (*name) {
68968                 int cmp = (**name == key) ? 0 :
68969                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
68970                     (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
68971                 #endif
68972                     PyUnicode_Compare(**name, key);
68973                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
68974                 if (cmp == 0) {
68975                     values[name-argnames] = value;
68976                     break;
68977                 }
68978                 name++;
68979             }
68980             if (*name) continue;
68981             else {
68982                 PyObject*** argname = argnames;
68983                 while (argname != first_kw_arg) {
68984                     int cmp = (**argname == key) ? 0 :
68985                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
68986                         (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
68987                     #endif
68988                         PyUnicode_Compare(**argname, key);
68989                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
68990                     if (cmp == 0) goto arg_passed_twice;
68991                     argname++;
68992                 }
68993             }
68994         } else
68995             goto invalid_keyword_type;
68996         if (kwds2) {
68997             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
68998         } else {
68999             goto invalid_keyword;
69000         }
69001     }
69002     return 0;
69003 arg_passed_twice:
69004     __Pyx_RaiseDoubleKeywordsError(function_name, key);
69005     goto bad;
69006 invalid_keyword_type:
69007     PyErr_Format(PyExc_TypeError,
69008         "%.200s() keywords must be strings", function_name);
69009     goto bad;
69010 invalid_keyword:
69011     PyErr_Format(PyExc_TypeError,
69012     #if PY_MAJOR_VERSION < 3
69013         "%.200s() got an unexpected keyword argument '%.200s'",
69014         function_name, PyString_AsString(key));
69015     #else
69016         "%s() got an unexpected keyword argument '%U'",
69017         function_name, key);
69018     #endif
69019 bad:
69020     return -1;
69021 }
69022 
69023 /* MemviewSliceInit */
69024 static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj * memview,int ndim,__Pyx_memviewslice * memviewslice,int memview_is_new_reference)69025 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
69026                         int ndim,
69027                         __Pyx_memviewslice *memviewslice,
69028                         int memview_is_new_reference)
69029 {
69030     __Pyx_RefNannyDeclarations
69031     int i, retval=-1;
69032     Py_buffer *buf = &memview->view;
69033     __Pyx_RefNannySetupContext("init_memviewslice", 0);
69034     if (unlikely(memviewslice->memview || memviewslice->data)) {
69035         PyErr_SetString(PyExc_ValueError,
69036             "memviewslice is already initialized!");
69037         goto fail;
69038     }
69039     if (buf->strides) {
69040         for (i = 0; i < ndim; i++) {
69041             memviewslice->strides[i] = buf->strides[i];
69042         }
69043     } else {
69044         Py_ssize_t stride = buf->itemsize;
69045         for (i = ndim - 1; i >= 0; i--) {
69046             memviewslice->strides[i] = stride;
69047             stride *= buf->shape[i];
69048         }
69049     }
69050     for (i = 0; i < ndim; i++) {
69051         memviewslice->shape[i]   = buf->shape[i];
69052         if (buf->suboffsets) {
69053             memviewslice->suboffsets[i] = buf->suboffsets[i];
69054         } else {
69055             memviewslice->suboffsets[i] = -1;
69056         }
69057     }
69058     memviewslice->memview = memview;
69059     memviewslice->data = (char *)buf->buf;
69060     if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
69061         Py_INCREF(memview);
69062     }
69063     retval = 0;
69064     goto no_fail;
69065 fail:
69066     memviewslice->memview = 0;
69067     memviewslice->data = 0;
69068     retval = -1;
69069 no_fail:
69070     __Pyx_RefNannyFinishContext();
69071     return retval;
69072 }
69073 #ifndef Py_NO_RETURN
69074 #define Py_NO_RETURN
69075 #endif
__pyx_fatalerror(const char * fmt,...)69076 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
69077     va_list vargs;
69078     char msg[200];
69079 #ifdef HAVE_STDARG_PROTOTYPES
69080     va_start(vargs, fmt);
69081 #else
69082     va_start(vargs);
69083 #endif
69084     vsnprintf(msg, 200, fmt, vargs);
69085     va_end(vargs);
69086     Py_FatalError(msg);
69087 }
69088 static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int * acquisition_count,PyThread_type_lock lock)69089 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
69090                                    PyThread_type_lock lock)
69091 {
69092     int result;
69093     PyThread_acquire_lock(lock, 1);
69094     result = (*acquisition_count)++;
69095     PyThread_release_lock(lock);
69096     return result;
69097 }
69098 static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int * acquisition_count,PyThread_type_lock lock)69099 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
69100                                    PyThread_type_lock lock)
69101 {
69102     int result;
69103     PyThread_acquire_lock(lock, 1);
69104     result = (*acquisition_count)--;
69105     PyThread_release_lock(lock);
69106     return result;
69107 }
69108 static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice * memslice,int have_gil,int lineno)69109 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
69110 {
69111     int first_time;
69112     struct __pyx_memoryview_obj *memview = memslice->memview;
69113     if (unlikely(!memview || (PyObject *) memview == Py_None))
69114         return;
69115     if (unlikely(__pyx_get_slice_count(memview) < 0))
69116         __pyx_fatalerror("Acquisition count is %d (line %d)",
69117                          __pyx_get_slice_count(memview), lineno);
69118     first_time = __pyx_add_acquisition_count(memview) == 0;
69119     if (unlikely(first_time)) {
69120         if (have_gil) {
69121             Py_INCREF((PyObject *) memview);
69122         } else {
69123             PyGILState_STATE _gilstate = PyGILState_Ensure();
69124             Py_INCREF((PyObject *) memview);
69125             PyGILState_Release(_gilstate);
69126         }
69127     }
69128 }
__Pyx_XDEC_MEMVIEW(__Pyx_memviewslice * memslice,int have_gil,int lineno)69129 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
69130                                              int have_gil, int lineno) {
69131     int last_time;
69132     struct __pyx_memoryview_obj *memview = memslice->memview;
69133     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
69134         memslice->memview = NULL;
69135         return;
69136     }
69137     if (unlikely(__pyx_get_slice_count(memview) <= 0))
69138         __pyx_fatalerror("Acquisition count is %d (line %d)",
69139                          __pyx_get_slice_count(memview), lineno);
69140     last_time = __pyx_sub_acquisition_count(memview) == 1;
69141     memslice->data = NULL;
69142     if (unlikely(last_time)) {
69143         if (have_gil) {
69144             Py_CLEAR(memslice->memview);
69145         } else {
69146             PyGILState_STATE _gilstate = PyGILState_Ensure();
69147             Py_CLEAR(memslice->memview);
69148             PyGILState_Release(_gilstate);
69149         }
69150     } else {
69151         memslice->memview = NULL;
69152     }
69153 }
69154 
69155 /* PyDictVersioning */
69156 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
__Pyx_get_tp_dict_version(PyObject * obj)69157 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
69158     PyObject *dict = Py_TYPE(obj)->tp_dict;
69159     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
69160 }
__Pyx_get_object_dict_version(PyObject * obj)69161 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
69162     PyObject **dictptr = NULL;
69163     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
69164     if (offset) {
69165 #if CYTHON_COMPILING_IN_CPYTHON
69166         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
69167 #else
69168         dictptr = _PyObject_GetDictPtr(obj);
69169 #endif
69170     }
69171     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
69172 }
__Pyx_object_dict_version_matches(PyObject * obj,PY_UINT64_T tp_dict_version,PY_UINT64_T obj_dict_version)69173 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
69174     PyObject *dict = Py_TYPE(obj)->tp_dict;
69175     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
69176         return 0;
69177     return obj_dict_version == __Pyx_get_object_dict_version(obj);
69178 }
69179 #endif
69180 
69181 /* GetModuleGlobalName */
69182 #if CYTHON_USE_DICT_VERSIONS
__Pyx__GetModuleGlobalName(PyObject * name,PY_UINT64_T * dict_version,PyObject ** dict_cached_value)69183 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
69184 #else
69185 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
69186 #endif
69187 {
69188     PyObject *result;
69189 #if !CYTHON_AVOID_BORROWED_REFS
69190 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
69191     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
69192     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
69193     if (likely(result)) {
69194         return __Pyx_NewRef(result);
69195     } else if (unlikely(PyErr_Occurred())) {
69196         return NULL;
69197     }
69198 #else
69199     result = PyDict_GetItem(__pyx_d, name);
69200     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
69201     if (likely(result)) {
69202         return __Pyx_NewRef(result);
69203     }
69204 #endif
69205 #else
69206     result = PyObject_GetItem(__pyx_d, name);
69207     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
69208     if (likely(result)) {
69209         return __Pyx_NewRef(result);
69210     }
69211     PyErr_Clear();
69212 #endif
69213     return __Pyx_GetBuiltinName(name);
69214 }
69215 
69216 /* PyCFunctionFastCall */
69217 #if CYTHON_FAST_PYCCALL
__Pyx_PyCFunction_FastCall(PyObject * func_obj,PyObject ** args,Py_ssize_t nargs)69218 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
69219     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
69220     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
69221     PyObject *self = PyCFunction_GET_SELF(func);
69222     int flags = PyCFunction_GET_FLAGS(func);
69223     assert(PyCFunction_Check(func));
69224     assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
69225     assert(nargs >= 0);
69226     assert(nargs == 0 || args != NULL);
69227     /* _PyCFunction_FastCallDict() must not be called with an exception set,
69228        because it may clear it (directly or indirectly) and so the
69229        caller loses its exception */
69230     assert(!PyErr_Occurred());
69231     if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
69232         return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
69233     } else {
69234         return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
69235     }
69236 }
69237 #endif
69238 
69239 /* PyFunctionFastCall */
69240 #if CYTHON_FAST_PYCALL
__Pyx_PyFunction_FastCallNoKw(PyCodeObject * co,PyObject ** args,Py_ssize_t na,PyObject * globals)69241 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
69242                                                PyObject *globals) {
69243     PyFrameObject *f;
69244     PyThreadState *tstate = __Pyx_PyThreadState_Current;
69245     PyObject **fastlocals;
69246     Py_ssize_t i;
69247     PyObject *result;
69248     assert(globals != NULL);
69249     /* XXX Perhaps we should create a specialized
69250        PyFrame_New() that doesn't take locals, but does
69251        take builtins without sanity checking them.
69252        */
69253     assert(tstate != NULL);
69254     f = PyFrame_New(tstate, co, globals, NULL);
69255     if (f == NULL) {
69256         return NULL;
69257     }
69258     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
69259     for (i = 0; i < na; i++) {
69260         Py_INCREF(*args);
69261         fastlocals[i] = *args++;
69262     }
69263     result = PyEval_EvalFrameEx(f,0);
69264     ++tstate->recursion_depth;
69265     Py_DECREF(f);
69266     --tstate->recursion_depth;
69267     return result;
69268 }
69269 #if 1 || PY_VERSION_HEX < 0x030600B1
__Pyx_PyFunction_FastCallDict(PyObject * func,PyObject ** args,Py_ssize_t nargs,PyObject * kwargs)69270 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
69271     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
69272     PyObject *globals = PyFunction_GET_GLOBALS(func);
69273     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
69274     PyObject *closure;
69275 #if PY_MAJOR_VERSION >= 3
69276     PyObject *kwdefs;
69277 #endif
69278     PyObject *kwtuple, **k;
69279     PyObject **d;
69280     Py_ssize_t nd;
69281     Py_ssize_t nk;
69282     PyObject *result;
69283     assert(kwargs == NULL || PyDict_Check(kwargs));
69284     nk = kwargs ? PyDict_Size(kwargs) : 0;
69285     if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
69286         return NULL;
69287     }
69288     if (
69289 #if PY_MAJOR_VERSION >= 3
69290             co->co_kwonlyargcount == 0 &&
69291 #endif
69292             likely(kwargs == NULL || nk == 0) &&
69293             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
69294         if (argdefs == NULL && co->co_argcount == nargs) {
69295             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
69296             goto done;
69297         }
69298         else if (nargs == 0 && argdefs != NULL
69299                  && co->co_argcount == Py_SIZE(argdefs)) {
69300             /* function called with no arguments, but all parameters have
69301                a default value: use default values as arguments .*/
69302             args = &PyTuple_GET_ITEM(argdefs, 0);
69303             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
69304             goto done;
69305         }
69306     }
69307     if (kwargs != NULL) {
69308         Py_ssize_t pos, i;
69309         kwtuple = PyTuple_New(2 * nk);
69310         if (kwtuple == NULL) {
69311             result = NULL;
69312             goto done;
69313         }
69314         k = &PyTuple_GET_ITEM(kwtuple, 0);
69315         pos = i = 0;
69316         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
69317             Py_INCREF(k[i]);
69318             Py_INCREF(k[i+1]);
69319             i += 2;
69320         }
69321         nk = i / 2;
69322     }
69323     else {
69324         kwtuple = NULL;
69325         k = NULL;
69326     }
69327     closure = PyFunction_GET_CLOSURE(func);
69328 #if PY_MAJOR_VERSION >= 3
69329     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
69330 #endif
69331     if (argdefs != NULL) {
69332         d = &PyTuple_GET_ITEM(argdefs, 0);
69333         nd = Py_SIZE(argdefs);
69334     }
69335     else {
69336         d = NULL;
69337         nd = 0;
69338     }
69339 #if PY_MAJOR_VERSION >= 3
69340     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
69341                                args, (int)nargs,
69342                                k, (int)nk,
69343                                d, (int)nd, kwdefs, closure);
69344 #else
69345     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
69346                                args, (int)nargs,
69347                                k, (int)nk,
69348                                d, (int)nd, closure);
69349 #endif
69350     Py_XDECREF(kwtuple);
69351 done:
69352     Py_LeaveRecursiveCall();
69353     return result;
69354 }
69355 #endif
69356 #endif
69357 
69358 /* PyObjectCall */
69359 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_Call(PyObject * func,PyObject * arg,PyObject * kw)69360 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
69361     PyObject *result;
69362     ternaryfunc call = Py_TYPE(func)->tp_call;
69363     if (unlikely(!call))
69364         return PyObject_Call(func, arg, kw);
69365     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
69366         return NULL;
69367     result = (*call)(func, arg, kw);
69368     Py_LeaveRecursiveCall();
69369     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
69370         PyErr_SetString(
69371             PyExc_SystemError,
69372             "NULL result without error in PyObject_Call");
69373     }
69374     return result;
69375 }
69376 #endif
69377 
69378 /* PyObjectCall2Args */
__Pyx_PyObject_Call2Args(PyObject * function,PyObject * arg1,PyObject * arg2)69379 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
69380     PyObject *args, *result = NULL;
69381     #if CYTHON_FAST_PYCALL
69382     if (PyFunction_Check(function)) {
69383         PyObject *args[2] = {arg1, arg2};
69384         return __Pyx_PyFunction_FastCall(function, args, 2);
69385     }
69386     #endif
69387     #if CYTHON_FAST_PYCCALL
69388     if (__Pyx_PyFastCFunction_Check(function)) {
69389         PyObject *args[2] = {arg1, arg2};
69390         return __Pyx_PyCFunction_FastCall(function, args, 2);
69391     }
69392     #endif
69393     args = PyTuple_New(2);
69394     if (unlikely(!args)) goto done;
69395     Py_INCREF(arg1);
69396     PyTuple_SET_ITEM(args, 0, arg1);
69397     Py_INCREF(arg2);
69398     PyTuple_SET_ITEM(args, 1, arg2);
69399     Py_INCREF(function);
69400     result = __Pyx_PyObject_Call(function, args, NULL);
69401     Py_DECREF(args);
69402     Py_DECREF(function);
69403 done:
69404     return result;
69405 }
69406 
69407 /* PyObjectCallMethO */
69408 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallMethO(PyObject * func,PyObject * arg)69409 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
69410     PyObject *self, *result;
69411     PyCFunction cfunc;
69412     cfunc = PyCFunction_GET_FUNCTION(func);
69413     self = PyCFunction_GET_SELF(func);
69414     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
69415         return NULL;
69416     result = cfunc(self, arg);
69417     Py_LeaveRecursiveCall();
69418     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
69419         PyErr_SetString(
69420             PyExc_SystemError,
69421             "NULL result without error in PyObject_Call");
69422     }
69423     return result;
69424 }
69425 #endif
69426 
69427 /* PyObjectCallOneArg */
69428 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx__PyObject_CallOneArg(PyObject * func,PyObject * arg)69429 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
69430     PyObject *result;
69431     PyObject *args = PyTuple_New(1);
69432     if (unlikely(!args)) return NULL;
69433     Py_INCREF(arg);
69434     PyTuple_SET_ITEM(args, 0, arg);
69435     result = __Pyx_PyObject_Call(func, args, NULL);
69436     Py_DECREF(args);
69437     return result;
69438 }
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)69439 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
69440 #if CYTHON_FAST_PYCALL
69441     if (PyFunction_Check(func)) {
69442         return __Pyx_PyFunction_FastCall(func, &arg, 1);
69443     }
69444 #endif
69445     if (likely(PyCFunction_Check(func))) {
69446         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
69447             return __Pyx_PyObject_CallMethO(func, arg);
69448 #if CYTHON_FAST_PYCCALL
69449         } else if (__Pyx_PyFastCFunction_Check(func)) {
69450             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
69451 #endif
69452         }
69453     }
69454     return __Pyx__PyObject_CallOneArg(func, arg);
69455 }
69456 #else
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)69457 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
69458     PyObject *result;
69459     PyObject *args = PyTuple_Pack(1, arg);
69460     if (unlikely(!args)) return NULL;
69461     result = __Pyx_PyObject_Call(func, args, NULL);
69462     Py_DECREF(args);
69463     return result;
69464 }
69465 #endif
69466 
69467 /* DictGetItem */
69468 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
__Pyx_PyDict_GetItem(PyObject * d,PyObject * key)69469 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
69470     PyObject *value;
69471     value = PyDict_GetItemWithError(d, key);
69472     if (unlikely(!value)) {
69473         if (!PyErr_Occurred()) {
69474             if (unlikely(PyTuple_Check(key))) {
69475                 PyObject* args = PyTuple_Pack(1, key);
69476                 if (likely(args)) {
69477                     PyErr_SetObject(PyExc_KeyError, args);
69478                     Py_DECREF(args);
69479                 }
69480             } else {
69481                 PyErr_SetObject(PyExc_KeyError, key);
69482             }
69483         }
69484         return NULL;
69485     }
69486     Py_INCREF(value);
69487     return value;
69488 }
69489 #endif
69490 
69491 /* ExtTypeTest */
__Pyx_TypeTest(PyObject * obj,PyTypeObject * type)69492 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
69493     if (unlikely(!type)) {
69494         PyErr_SetString(PyExc_SystemError, "Missing type object");
69495         return 0;
69496     }
69497     if (likely(__Pyx_TypeCheck(obj, type)))
69498         return 1;
69499     PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
69500                  Py_TYPE(obj)->tp_name, type->tp_name);
69501     return 0;
69502 }
69503 
69504 /* BytesEquals */
__Pyx_PyBytes_Equals(PyObject * s1,PyObject * s2,int equals)69505 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
69506 #if CYTHON_COMPILING_IN_PYPY
69507     return PyObject_RichCompareBool(s1, s2, equals);
69508 #else
69509     if (s1 == s2) {
69510         return (equals == Py_EQ);
69511     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
69512         const char *ps1, *ps2;
69513         Py_ssize_t length = PyBytes_GET_SIZE(s1);
69514         if (length != PyBytes_GET_SIZE(s2))
69515             return (equals == Py_NE);
69516         ps1 = PyBytes_AS_STRING(s1);
69517         ps2 = PyBytes_AS_STRING(s2);
69518         if (ps1[0] != ps2[0]) {
69519             return (equals == Py_NE);
69520         } else if (length == 1) {
69521             return (equals == Py_EQ);
69522         } else {
69523             int result;
69524 #if CYTHON_USE_UNICODE_INTERNALS
69525             Py_hash_t hash1, hash2;
69526             hash1 = ((PyBytesObject*)s1)->ob_shash;
69527             hash2 = ((PyBytesObject*)s2)->ob_shash;
69528             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
69529                 return (equals == Py_NE);
69530             }
69531 #endif
69532             result = memcmp(ps1, ps2, (size_t)length);
69533             return (equals == Py_EQ) ? (result == 0) : (result != 0);
69534         }
69535     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
69536         return (equals == Py_NE);
69537     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
69538         return (equals == Py_NE);
69539     } else {
69540         int result;
69541         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
69542         if (!py_result)
69543             return -1;
69544         result = __Pyx_PyObject_IsTrue(py_result);
69545         Py_DECREF(py_result);
69546         return result;
69547     }
69548 #endif
69549 }
69550 
69551 /* UnicodeEquals */
__Pyx_PyUnicode_Equals(PyObject * s1,PyObject * s2,int equals)69552 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
69553 #if CYTHON_COMPILING_IN_PYPY
69554     return PyObject_RichCompareBool(s1, s2, equals);
69555 #else
69556 #if PY_MAJOR_VERSION < 3
69557     PyObject* owned_ref = NULL;
69558 #endif
69559     int s1_is_unicode, s2_is_unicode;
69560     if (s1 == s2) {
69561         goto return_eq;
69562     }
69563     s1_is_unicode = PyUnicode_CheckExact(s1);
69564     s2_is_unicode = PyUnicode_CheckExact(s2);
69565 #if PY_MAJOR_VERSION < 3
69566     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
69567         owned_ref = PyUnicode_FromObject(s2);
69568         if (unlikely(!owned_ref))
69569             return -1;
69570         s2 = owned_ref;
69571         s2_is_unicode = 1;
69572     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
69573         owned_ref = PyUnicode_FromObject(s1);
69574         if (unlikely(!owned_ref))
69575             return -1;
69576         s1 = owned_ref;
69577         s1_is_unicode = 1;
69578     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
69579         return __Pyx_PyBytes_Equals(s1, s2, equals);
69580     }
69581 #endif
69582     if (s1_is_unicode & s2_is_unicode) {
69583         Py_ssize_t length;
69584         int kind;
69585         void *data1, *data2;
69586         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
69587             return -1;
69588         length = __Pyx_PyUnicode_GET_LENGTH(s1);
69589         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
69590             goto return_ne;
69591         }
69592 #if CYTHON_USE_UNICODE_INTERNALS
69593         {
69594             Py_hash_t hash1, hash2;
69595         #if CYTHON_PEP393_ENABLED
69596             hash1 = ((PyASCIIObject*)s1)->hash;
69597             hash2 = ((PyASCIIObject*)s2)->hash;
69598         #else
69599             hash1 = ((PyUnicodeObject*)s1)->hash;
69600             hash2 = ((PyUnicodeObject*)s2)->hash;
69601         #endif
69602             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
69603                 goto return_ne;
69604             }
69605         }
69606 #endif
69607         kind = __Pyx_PyUnicode_KIND(s1);
69608         if (kind != __Pyx_PyUnicode_KIND(s2)) {
69609             goto return_ne;
69610         }
69611         data1 = __Pyx_PyUnicode_DATA(s1);
69612         data2 = __Pyx_PyUnicode_DATA(s2);
69613         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
69614             goto return_ne;
69615         } else if (length == 1) {
69616             goto return_eq;
69617         } else {
69618             int result = memcmp(data1, data2, (size_t)(length * kind));
69619             #if PY_MAJOR_VERSION < 3
69620             Py_XDECREF(owned_ref);
69621             #endif
69622             return (equals == Py_EQ) ? (result == 0) : (result != 0);
69623         }
69624     } else if ((s1 == Py_None) & s2_is_unicode) {
69625         goto return_ne;
69626     } else if ((s2 == Py_None) & s1_is_unicode) {
69627         goto return_ne;
69628     } else {
69629         int result;
69630         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
69631         #if PY_MAJOR_VERSION < 3
69632         Py_XDECREF(owned_ref);
69633         #endif
69634         if (!py_result)
69635             return -1;
69636         result = __Pyx_PyObject_IsTrue(py_result);
69637         Py_DECREF(py_result);
69638         return result;
69639     }
69640 return_eq:
69641     #if PY_MAJOR_VERSION < 3
69642     Py_XDECREF(owned_ref);
69643     #endif
69644     return (equals == Py_EQ);
69645 return_ne:
69646     #if PY_MAJOR_VERSION < 3
69647     Py_XDECREF(owned_ref);
69648     #endif
69649     return (equals == Py_NE);
69650 #endif
69651 }
69652 
69653 /* IterFinish */
__Pyx_IterFinish(void)69654 static CYTHON_INLINE int __Pyx_IterFinish(void) {
69655 #if CYTHON_FAST_THREAD_STATE
69656     PyThreadState *tstate = __Pyx_PyThreadState_Current;
69657     PyObject* exc_type = tstate->curexc_type;
69658     if (unlikely(exc_type)) {
69659         if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
69660             PyObject *exc_value, *exc_tb;
69661             exc_value = tstate->curexc_value;
69662             exc_tb = tstate->curexc_traceback;
69663             tstate->curexc_type = 0;
69664             tstate->curexc_value = 0;
69665             tstate->curexc_traceback = 0;
69666             Py_DECREF(exc_type);
69667             Py_XDECREF(exc_value);
69668             Py_XDECREF(exc_tb);
69669             return 0;
69670         } else {
69671             return -1;
69672         }
69673     }
69674     return 0;
69675 #else
69676     if (unlikely(PyErr_Occurred())) {
69677         if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
69678             PyErr_Clear();
69679             return 0;
69680         } else {
69681             return -1;
69682         }
69683     }
69684     return 0;
69685 #endif
69686 }
69687 
69688 /* PyObjectCallNoArg */
69689 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallNoArg(PyObject * func)69690 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
69691 #if CYTHON_FAST_PYCALL
69692     if (PyFunction_Check(func)) {
69693         return __Pyx_PyFunction_FastCall(func, NULL, 0);
69694     }
69695 #endif
69696 #ifdef __Pyx_CyFunction_USED
69697     if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
69698 #else
69699     if (likely(PyCFunction_Check(func)))
69700 #endif
69701     {
69702         if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
69703             return __Pyx_PyObject_CallMethO(func, NULL);
69704         }
69705     }
69706     return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
69707 }
69708 #endif
69709 
69710 /* PyObjectGetMethod */
__Pyx_PyObject_GetMethod(PyObject * obj,PyObject * name,PyObject ** method)69711 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
69712     PyObject *attr;
69713 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
69714     PyTypeObject *tp = Py_TYPE(obj);
69715     PyObject *descr;
69716     descrgetfunc f = NULL;
69717     PyObject **dictptr, *dict;
69718     int meth_found = 0;
69719     assert (*method == NULL);
69720     if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
69721         attr = __Pyx_PyObject_GetAttrStr(obj, name);
69722         goto try_unpack;
69723     }
69724     if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
69725         return 0;
69726     }
69727     descr = _PyType_Lookup(tp, name);
69728     if (likely(descr != NULL)) {
69729         Py_INCREF(descr);
69730 #if PY_MAJOR_VERSION >= 3
69731         #ifdef __Pyx_CyFunction_USED
69732         if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
69733         #else
69734         if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
69735         #endif
69736 #else
69737         #ifdef __Pyx_CyFunction_USED
69738         if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
69739         #else
69740         if (likely(PyFunction_Check(descr)))
69741         #endif
69742 #endif
69743         {
69744             meth_found = 1;
69745         } else {
69746             f = Py_TYPE(descr)->tp_descr_get;
69747             if (f != NULL && PyDescr_IsData(descr)) {
69748                 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
69749                 Py_DECREF(descr);
69750                 goto try_unpack;
69751             }
69752         }
69753     }
69754     dictptr = _PyObject_GetDictPtr(obj);
69755     if (dictptr != NULL && (dict = *dictptr) != NULL) {
69756         Py_INCREF(dict);
69757         attr = __Pyx_PyDict_GetItemStr(dict, name);
69758         if (attr != NULL) {
69759             Py_INCREF(attr);
69760             Py_DECREF(dict);
69761             Py_XDECREF(descr);
69762             goto try_unpack;
69763         }
69764         Py_DECREF(dict);
69765     }
69766     if (meth_found) {
69767         *method = descr;
69768         return 1;
69769     }
69770     if (f != NULL) {
69771         attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
69772         Py_DECREF(descr);
69773         goto try_unpack;
69774     }
69775     if (descr != NULL) {
69776         *method = descr;
69777         return 0;
69778     }
69779     PyErr_Format(PyExc_AttributeError,
69780 #if PY_MAJOR_VERSION >= 3
69781                  "'%.50s' object has no attribute '%U'",
69782                  tp->tp_name, name);
69783 #else
69784                  "'%.50s' object has no attribute '%.400s'",
69785                  tp->tp_name, PyString_AS_STRING(name));
69786 #endif
69787     return 0;
69788 #else
69789     attr = __Pyx_PyObject_GetAttrStr(obj, name);
69790     goto try_unpack;
69791 #endif
69792 try_unpack:
69793 #if CYTHON_UNPACK_METHODS
69794     if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
69795         PyObject *function = PyMethod_GET_FUNCTION(attr);
69796         Py_INCREF(function);
69797         Py_DECREF(attr);
69798         *method = function;
69799         return 1;
69800     }
69801 #endif
69802     *method = attr;
69803     return 0;
69804 }
69805 
69806 /* PyObjectCallMethod0 */
__Pyx_PyObject_CallMethod0(PyObject * obj,PyObject * method_name)69807 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
69808     PyObject *method = NULL, *result = NULL;
69809     int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
69810     if (likely(is_method)) {
69811         result = __Pyx_PyObject_CallOneArg(method, obj);
69812         Py_DECREF(method);
69813         return result;
69814     }
69815     if (unlikely(!method)) goto bad;
69816     result = __Pyx_PyObject_CallNoArg(method);
69817     Py_DECREF(method);
69818 bad:
69819     return result;
69820 }
69821 
69822 /* RaiseNeedMoreValuesToUnpack */
__Pyx_RaiseNeedMoreValuesError(Py_ssize_t index)69823 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
69824     PyErr_Format(PyExc_ValueError,
69825                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
69826                  index, (index == 1) ? "" : "s");
69827 }
69828 
69829 /* RaiseTooManyValuesToUnpack */
__Pyx_RaiseTooManyValuesError(Py_ssize_t expected)69830 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
69831     PyErr_Format(PyExc_ValueError,
69832                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
69833 }
69834 
69835 /* UnpackItemEndCheck */
__Pyx_IternextUnpackEndCheck(PyObject * retval,Py_ssize_t expected)69836 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
69837     if (unlikely(retval)) {
69838         Py_DECREF(retval);
69839         __Pyx_RaiseTooManyValuesError(expected);
69840         return -1;
69841     } else {
69842         return __Pyx_IterFinish();
69843     }
69844     return 0;
69845 }
69846 
69847 /* RaiseNoneIterError */
__Pyx_RaiseNoneNotIterableError(void)69848 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
69849     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
69850 }
69851 
69852 /* UnpackTupleError */
__Pyx_UnpackTupleError(PyObject * t,Py_ssize_t index)69853 static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
69854     if (t == Py_None) {
69855       __Pyx_RaiseNoneNotIterableError();
69856     } else if (PyTuple_GET_SIZE(t) < index) {
69857       __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
69858     } else {
69859       __Pyx_RaiseTooManyValuesError(index);
69860     }
69861 }
69862 
69863 /* UnpackTuple2 */
__Pyx_unpack_tuple2_exact(PyObject * tuple,PyObject ** pvalue1,PyObject ** pvalue2,int decref_tuple)69864 static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
69865         PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
69866     PyObject *value1 = NULL, *value2 = NULL;
69867 #if CYTHON_COMPILING_IN_PYPY
69868     value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
69869     value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
69870 #else
69871     value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
69872     value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
69873 #endif
69874     if (decref_tuple) {
69875         Py_DECREF(tuple);
69876     }
69877     *pvalue1 = value1;
69878     *pvalue2 = value2;
69879     return 0;
69880 #if CYTHON_COMPILING_IN_PYPY
69881 bad:
69882     Py_XDECREF(value1);
69883     Py_XDECREF(value2);
69884     if (decref_tuple) { Py_XDECREF(tuple); }
69885     return -1;
69886 #endif
69887 }
__Pyx_unpack_tuple2_generic(PyObject * tuple,PyObject ** pvalue1,PyObject ** pvalue2,int has_known_size,int decref_tuple)69888 static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
69889                                        int has_known_size, int decref_tuple) {
69890     Py_ssize_t index;
69891     PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
69892     iternextfunc iternext;
69893     iter = PyObject_GetIter(tuple);
69894     if (unlikely(!iter)) goto bad;
69895     if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
69896     iternext = Py_TYPE(iter)->tp_iternext;
69897     value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
69898     value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
69899     if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
69900     Py_DECREF(iter);
69901     *pvalue1 = value1;
69902     *pvalue2 = value2;
69903     return 0;
69904 unpacking_failed:
69905     if (!has_known_size && __Pyx_IterFinish() == 0)
69906         __Pyx_RaiseNeedMoreValuesError(index);
69907 bad:
69908     Py_XDECREF(iter);
69909     Py_XDECREF(value1);
69910     Py_XDECREF(value2);
69911     if (decref_tuple) { Py_XDECREF(tuple); }
69912     return -1;
69913 }
69914 
69915 /* dict_iter */
__Pyx_dict_iterator(PyObject * iterable,int is_dict,PyObject * method_name,Py_ssize_t * p_orig_length,int * p_source_is_dict)69916 static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
69917                                                    Py_ssize_t* p_orig_length, int* p_source_is_dict) {
69918     is_dict = is_dict || likely(PyDict_CheckExact(iterable));
69919     *p_source_is_dict = is_dict;
69920     if (is_dict) {
69921 #if !CYTHON_COMPILING_IN_PYPY
69922         *p_orig_length = PyDict_Size(iterable);
69923         Py_INCREF(iterable);
69924         return iterable;
69925 #elif PY_MAJOR_VERSION >= 3
69926         static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
69927         PyObject **pp = NULL;
69928         if (method_name) {
69929             const char *name = PyUnicode_AsUTF8(method_name);
69930             if (strcmp(name, "iteritems") == 0) pp = &py_items;
69931             else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
69932             else if (strcmp(name, "itervalues") == 0) pp = &py_values;
69933             if (pp) {
69934                 if (!*pp) {
69935                     *pp = PyUnicode_FromString(name + 4);
69936                     if (!*pp)
69937                         return NULL;
69938                 }
69939                 method_name = *pp;
69940             }
69941         }
69942 #endif
69943     }
69944     *p_orig_length = 0;
69945     if (method_name) {
69946         PyObject* iter;
69947         iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
69948         if (!iterable)
69949             return NULL;
69950 #if !CYTHON_COMPILING_IN_PYPY
69951         if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
69952             return iterable;
69953 #endif
69954         iter = PyObject_GetIter(iterable);
69955         Py_DECREF(iterable);
69956         return iter;
69957     }
69958     return PyObject_GetIter(iterable);
69959 }
__Pyx_dict_iter_next(PyObject * iter_obj,CYTHON_NCP_UNUSED Py_ssize_t orig_length,CYTHON_NCP_UNUSED Py_ssize_t * ppos,PyObject ** pkey,PyObject ** pvalue,PyObject ** pitem,int source_is_dict)69960 static CYTHON_INLINE int __Pyx_dict_iter_next(
69961         PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
69962         PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
69963     PyObject* next_item;
69964 #if !CYTHON_COMPILING_IN_PYPY
69965     if (source_is_dict) {
69966         PyObject *key, *value;
69967         if (unlikely(orig_length != PyDict_Size(iter_obj))) {
69968             PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
69969             return -1;
69970         }
69971         if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
69972             return 0;
69973         }
69974         if (pitem) {
69975             PyObject* tuple = PyTuple_New(2);
69976             if (unlikely(!tuple)) {
69977                 return -1;
69978             }
69979             Py_INCREF(key);
69980             Py_INCREF(value);
69981             PyTuple_SET_ITEM(tuple, 0, key);
69982             PyTuple_SET_ITEM(tuple, 1, value);
69983             *pitem = tuple;
69984         } else {
69985             if (pkey) {
69986                 Py_INCREF(key);
69987                 *pkey = key;
69988             }
69989             if (pvalue) {
69990                 Py_INCREF(value);
69991                 *pvalue = value;
69992             }
69993         }
69994         return 1;
69995     } else if (PyTuple_CheckExact(iter_obj)) {
69996         Py_ssize_t pos = *ppos;
69997         if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
69998         *ppos = pos + 1;
69999         next_item = PyTuple_GET_ITEM(iter_obj, pos);
70000         Py_INCREF(next_item);
70001     } else if (PyList_CheckExact(iter_obj)) {
70002         Py_ssize_t pos = *ppos;
70003         if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
70004         *ppos = pos + 1;
70005         next_item = PyList_GET_ITEM(iter_obj, pos);
70006         Py_INCREF(next_item);
70007     } else
70008 #endif
70009     {
70010         next_item = PyIter_Next(iter_obj);
70011         if (unlikely(!next_item)) {
70012             return __Pyx_IterFinish();
70013         }
70014     }
70015     if (pitem) {
70016         *pitem = next_item;
70017     } else if (pkey && pvalue) {
70018         if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
70019             return -1;
70020     } else if (pkey) {
70021         *pkey = next_item;
70022     } else {
70023         *pvalue = next_item;
70024     }
70025     return 1;
70026 }
70027 
70028 /* GetItemInt */
__Pyx_GetItemInt_Generic(PyObject * o,PyObject * j)70029 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
70030     PyObject *r;
70031     if (!j) return NULL;
70032     r = PyObject_GetItem(o, j);
70033     Py_DECREF(j);
70034     return r;
70035 }
__Pyx_GetItemInt_List_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)70036 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
70037                                                               CYTHON_NCP_UNUSED int wraparound,
70038                                                               CYTHON_NCP_UNUSED int boundscheck) {
70039 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
70040     Py_ssize_t wrapped_i = i;
70041     if (wraparound & unlikely(i < 0)) {
70042         wrapped_i += PyList_GET_SIZE(o);
70043     }
70044     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
70045         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
70046         Py_INCREF(r);
70047         return r;
70048     }
70049     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
70050 #else
70051     return PySequence_GetItem(o, i);
70052 #endif
70053 }
__Pyx_GetItemInt_Tuple_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)70054 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
70055                                                               CYTHON_NCP_UNUSED int wraparound,
70056                                                               CYTHON_NCP_UNUSED int boundscheck) {
70057 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
70058     Py_ssize_t wrapped_i = i;
70059     if (wraparound & unlikely(i < 0)) {
70060         wrapped_i += PyTuple_GET_SIZE(o);
70061     }
70062     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
70063         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
70064         Py_INCREF(r);
70065         return r;
70066     }
70067     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
70068 #else
70069     return PySequence_GetItem(o, i);
70070 #endif
70071 }
__Pyx_GetItemInt_Fast(PyObject * o,Py_ssize_t i,int is_list,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)70072 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
70073                                                      CYTHON_NCP_UNUSED int wraparound,
70074                                                      CYTHON_NCP_UNUSED int boundscheck) {
70075 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
70076     if (is_list || PyList_CheckExact(o)) {
70077         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
70078         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
70079             PyObject *r = PyList_GET_ITEM(o, n);
70080             Py_INCREF(r);
70081             return r;
70082         }
70083     }
70084     else if (PyTuple_CheckExact(o)) {
70085         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
70086         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
70087             PyObject *r = PyTuple_GET_ITEM(o, n);
70088             Py_INCREF(r);
70089             return r;
70090         }
70091     } else {
70092         PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
70093         if (likely(m && m->sq_item)) {
70094             if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
70095                 Py_ssize_t l = m->sq_length(o);
70096                 if (likely(l >= 0)) {
70097                     i += l;
70098                 } else {
70099                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
70100                         return NULL;
70101                     PyErr_Clear();
70102                 }
70103             }
70104             return m->sq_item(o, i);
70105         }
70106     }
70107 #else
70108     if (is_list || PySequence_Check(o)) {
70109         return PySequence_GetItem(o, i);
70110     }
70111 #endif
70112     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
70113 }
70114 
70115 /* PyErrFetchRestore */
70116 #if CYTHON_FAST_THREAD_STATE
__Pyx_ErrRestoreInState(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)70117 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
70118     PyObject *tmp_type, *tmp_value, *tmp_tb;
70119     tmp_type = tstate->curexc_type;
70120     tmp_value = tstate->curexc_value;
70121     tmp_tb = tstate->curexc_traceback;
70122     tstate->curexc_type = type;
70123     tstate->curexc_value = value;
70124     tstate->curexc_traceback = tb;
70125     Py_XDECREF(tmp_type);
70126     Py_XDECREF(tmp_value);
70127     Py_XDECREF(tmp_tb);
70128 }
__Pyx_ErrFetchInState(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)70129 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
70130     *type = tstate->curexc_type;
70131     *value = tstate->curexc_value;
70132     *tb = tstate->curexc_traceback;
70133     tstate->curexc_type = 0;
70134     tstate->curexc_value = 0;
70135     tstate->curexc_traceback = 0;
70136 }
70137 #endif
70138 
70139 /* RaiseException */
70140 #if PY_MAJOR_VERSION < 3
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,CYTHON_UNUSED PyObject * cause)70141 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
70142                         CYTHON_UNUSED PyObject *cause) {
70143     __Pyx_PyThreadState_declare
70144     Py_XINCREF(type);
70145     if (!value || value == Py_None)
70146         value = NULL;
70147     else
70148         Py_INCREF(value);
70149     if (!tb || tb == Py_None)
70150         tb = NULL;
70151     else {
70152         Py_INCREF(tb);
70153         if (!PyTraceBack_Check(tb)) {
70154             PyErr_SetString(PyExc_TypeError,
70155                 "raise: arg 3 must be a traceback or None");
70156             goto raise_error;
70157         }
70158     }
70159     if (PyType_Check(type)) {
70160 #if CYTHON_COMPILING_IN_PYPY
70161         if (!value) {
70162             Py_INCREF(Py_None);
70163             value = Py_None;
70164         }
70165 #endif
70166         PyErr_NormalizeException(&type, &value, &tb);
70167     } else {
70168         if (value) {
70169             PyErr_SetString(PyExc_TypeError,
70170                 "instance exception may not have a separate value");
70171             goto raise_error;
70172         }
70173         value = type;
70174         type = (PyObject*) Py_TYPE(type);
70175         Py_INCREF(type);
70176         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
70177             PyErr_SetString(PyExc_TypeError,
70178                 "raise: exception class must be a subclass of BaseException");
70179             goto raise_error;
70180         }
70181     }
70182     __Pyx_PyThreadState_assign
70183     __Pyx_ErrRestore(type, value, tb);
70184     return;
70185 raise_error:
70186     Py_XDECREF(value);
70187     Py_XDECREF(type);
70188     Py_XDECREF(tb);
70189     return;
70190 }
70191 #else
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,PyObject * cause)70192 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
70193     PyObject* owned_instance = NULL;
70194     if (tb == Py_None) {
70195         tb = 0;
70196     } else if (tb && !PyTraceBack_Check(tb)) {
70197         PyErr_SetString(PyExc_TypeError,
70198             "raise: arg 3 must be a traceback or None");
70199         goto bad;
70200     }
70201     if (value == Py_None)
70202         value = 0;
70203     if (PyExceptionInstance_Check(type)) {
70204         if (value) {
70205             PyErr_SetString(PyExc_TypeError,
70206                 "instance exception may not have a separate value");
70207             goto bad;
70208         }
70209         value = type;
70210         type = (PyObject*) Py_TYPE(value);
70211     } else if (PyExceptionClass_Check(type)) {
70212         PyObject *instance_class = NULL;
70213         if (value && PyExceptionInstance_Check(value)) {
70214             instance_class = (PyObject*) Py_TYPE(value);
70215             if (instance_class != type) {
70216                 int is_subclass = PyObject_IsSubclass(instance_class, type);
70217                 if (!is_subclass) {
70218                     instance_class = NULL;
70219                 } else if (unlikely(is_subclass == -1)) {
70220                     goto bad;
70221                 } else {
70222                     type = instance_class;
70223                 }
70224             }
70225         }
70226         if (!instance_class) {
70227             PyObject *args;
70228             if (!value)
70229                 args = PyTuple_New(0);
70230             else if (PyTuple_Check(value)) {
70231                 Py_INCREF(value);
70232                 args = value;
70233             } else
70234                 args = PyTuple_Pack(1, value);
70235             if (!args)
70236                 goto bad;
70237             owned_instance = PyObject_Call(type, args, NULL);
70238             Py_DECREF(args);
70239             if (!owned_instance)
70240                 goto bad;
70241             value = owned_instance;
70242             if (!PyExceptionInstance_Check(value)) {
70243                 PyErr_Format(PyExc_TypeError,
70244                              "calling %R should have returned an instance of "
70245                              "BaseException, not %R",
70246                              type, Py_TYPE(value));
70247                 goto bad;
70248             }
70249         }
70250     } else {
70251         PyErr_SetString(PyExc_TypeError,
70252             "raise: exception class must be a subclass of BaseException");
70253         goto bad;
70254     }
70255     if (cause) {
70256         PyObject *fixed_cause;
70257         if (cause == Py_None) {
70258             fixed_cause = NULL;
70259         } else if (PyExceptionClass_Check(cause)) {
70260             fixed_cause = PyObject_CallObject(cause, NULL);
70261             if (fixed_cause == NULL)
70262                 goto bad;
70263         } else if (PyExceptionInstance_Check(cause)) {
70264             fixed_cause = cause;
70265             Py_INCREF(fixed_cause);
70266         } else {
70267             PyErr_SetString(PyExc_TypeError,
70268                             "exception causes must derive from "
70269                             "BaseException");
70270             goto bad;
70271         }
70272         PyException_SetCause(value, fixed_cause);
70273     }
70274     PyErr_SetObject(type, value);
70275     if (tb) {
70276 #if CYTHON_COMPILING_IN_PYPY
70277         PyObject *tmp_type, *tmp_value, *tmp_tb;
70278         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
70279         Py_INCREF(tb);
70280         PyErr_Restore(tmp_type, tmp_value, tb);
70281         Py_XDECREF(tmp_tb);
70282 #else
70283         PyThreadState *tstate = __Pyx_PyThreadState_Current;
70284         PyObject* tmp_tb = tstate->curexc_traceback;
70285         if (tb != tmp_tb) {
70286             Py_INCREF(tb);
70287             tstate->curexc_traceback = tb;
70288             Py_XDECREF(tmp_tb);
70289         }
70290 #endif
70291     }
70292 bad:
70293     Py_XDECREF(owned_instance);
70294     return;
70295 }
70296 #endif
70297 
70298 /* WriteUnraisableException */
__Pyx_WriteUnraisable(const char * name,CYTHON_UNUSED int clineno,CYTHON_UNUSED int lineno,CYTHON_UNUSED const char * filename,int full_traceback,CYTHON_UNUSED int nogil)70299 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
70300                                   CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
70301                                   int full_traceback, CYTHON_UNUSED int nogil) {
70302     PyObject *old_exc, *old_val, *old_tb;
70303     PyObject *ctx;
70304     __Pyx_PyThreadState_declare
70305 #ifdef WITH_THREAD
70306     PyGILState_STATE state;
70307     if (nogil)
70308         state = PyGILState_Ensure();
70309 #ifdef _MSC_VER
70310     else state = (PyGILState_STATE)-1;
70311 #endif
70312 #endif
70313     __Pyx_PyThreadState_assign
70314     __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
70315     if (full_traceback) {
70316         Py_XINCREF(old_exc);
70317         Py_XINCREF(old_val);
70318         Py_XINCREF(old_tb);
70319         __Pyx_ErrRestore(old_exc, old_val, old_tb);
70320         PyErr_PrintEx(1);
70321     }
70322     #if PY_MAJOR_VERSION < 3
70323     ctx = PyString_FromString(name);
70324     #else
70325     ctx = PyUnicode_FromString(name);
70326     #endif
70327     __Pyx_ErrRestore(old_exc, old_val, old_tb);
70328     if (!ctx) {
70329         PyErr_WriteUnraisable(Py_None);
70330     } else {
70331         PyErr_WriteUnraisable(ctx);
70332         Py_DECREF(ctx);
70333     }
70334 #ifdef WITH_THREAD
70335     if (nogil)
70336         PyGILState_Release(state);
70337 #endif
70338 }
70339 
70340 /* PyIntCompare */
__Pyx_PyInt_EqObjC(PyObject * op1,PyObject * op2,CYTHON_UNUSED long intval,CYTHON_UNUSED long inplace)70341 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
70342     if (op1 == op2) {
70343         Py_RETURN_TRUE;
70344     }
70345     #if PY_MAJOR_VERSION < 3
70346     if (likely(PyInt_CheckExact(op1))) {
70347         const long b = intval;
70348         long a = PyInt_AS_LONG(op1);
70349         if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
70350     }
70351     #endif
70352     #if CYTHON_USE_PYLONG_INTERNALS
70353     if (likely(PyLong_CheckExact(op1))) {
70354         int unequal;
70355         unsigned long uintval;
70356         Py_ssize_t size = Py_SIZE(op1);
70357         const digit* digits = ((PyLongObject*)op1)->ob_digit;
70358         if (intval == 0) {
70359             if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
70360         } else if (intval < 0) {
70361             if (size >= 0)
70362                 Py_RETURN_FALSE;
70363             intval = -intval;
70364             size = -size;
70365         } else {
70366             if (size <= 0)
70367                 Py_RETURN_FALSE;
70368         }
70369         uintval = (unsigned long) intval;
70370 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
70371         if (uintval >> (PyLong_SHIFT * 4)) {
70372             unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
70373                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
70374         } else
70375 #endif
70376 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
70377         if (uintval >> (PyLong_SHIFT * 3)) {
70378             unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
70379                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
70380         } else
70381 #endif
70382 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
70383         if (uintval >> (PyLong_SHIFT * 2)) {
70384             unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
70385                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
70386         } else
70387 #endif
70388 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
70389         if (uintval >> (PyLong_SHIFT * 1)) {
70390             unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
70391                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
70392         } else
70393 #endif
70394             unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
70395         if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
70396     }
70397     #endif
70398     if (PyFloat_CheckExact(op1)) {
70399         const long b = intval;
70400         double a = PyFloat_AS_DOUBLE(op1);
70401         if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
70402     }
70403     return (
70404         PyObject_RichCompare(op1, op2, Py_EQ));
70405 }
70406 
70407 /* None */
__Pyx_mod_int(int a,int b)70408 static CYTHON_INLINE int __Pyx_mod_int(int a, int b) {
70409     int r = a % b;
70410     r += ((r != 0) & ((r ^ b) < 0)) * b;
70411     return r;
70412 }
70413 
70414 /* None */
__Pyx_div_int(int a,int b)70415 static CYTHON_INLINE int __Pyx_div_int(int a, int b) {
70416     int q = a / b;
70417     int r = a - q*b;
70418     q -= ((r != 0) & ((r ^ b) < 0));
70419     return q;
70420 }
70421 
70422 /* GetTopmostException */
70423 #if CYTHON_USE_EXC_INFO_STACK
70424 static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState * tstate)70425 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
70426 {
70427     _PyErr_StackItem *exc_info = tstate->exc_info;
70428     while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
70429            exc_info->previous_item != NULL)
70430     {
70431         exc_info = exc_info->previous_item;
70432     }
70433     return exc_info;
70434 }
70435 #endif
70436 
70437 /* SaveResetException */
70438 #if CYTHON_FAST_THREAD_STATE
__Pyx__ExceptionSave(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)70439 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
70440     #if CYTHON_USE_EXC_INFO_STACK
70441     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
70442     *type = exc_info->exc_type;
70443     *value = exc_info->exc_value;
70444     *tb = exc_info->exc_traceback;
70445     #else
70446     *type = tstate->exc_type;
70447     *value = tstate->exc_value;
70448     *tb = tstate->exc_traceback;
70449     #endif
70450     Py_XINCREF(*type);
70451     Py_XINCREF(*value);
70452     Py_XINCREF(*tb);
70453 }
__Pyx__ExceptionReset(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)70454 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
70455     PyObject *tmp_type, *tmp_value, *tmp_tb;
70456     #if CYTHON_USE_EXC_INFO_STACK
70457     _PyErr_StackItem *exc_info = tstate->exc_info;
70458     tmp_type = exc_info->exc_type;
70459     tmp_value = exc_info->exc_value;
70460     tmp_tb = exc_info->exc_traceback;
70461     exc_info->exc_type = type;
70462     exc_info->exc_value = value;
70463     exc_info->exc_traceback = tb;
70464     #else
70465     tmp_type = tstate->exc_type;
70466     tmp_value = tstate->exc_value;
70467     tmp_tb = tstate->exc_traceback;
70468     tstate->exc_type = type;
70469     tstate->exc_value = value;
70470     tstate->exc_traceback = tb;
70471     #endif
70472     Py_XDECREF(tmp_type);
70473     Py_XDECREF(tmp_value);
70474     Py_XDECREF(tmp_tb);
70475 }
70476 #endif
70477 
70478 /* PyErrExceptionMatches */
70479 #if CYTHON_FAST_THREAD_STATE
__Pyx_PyErr_ExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)70480 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
70481     Py_ssize_t i, n;
70482     n = PyTuple_GET_SIZE(tuple);
70483 #if PY_MAJOR_VERSION >= 3
70484     for (i=0; i<n; i++) {
70485         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
70486     }
70487 #endif
70488     for (i=0; i<n; i++) {
70489         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
70490     }
70491     return 0;
70492 }
__Pyx_PyErr_ExceptionMatchesInState(PyThreadState * tstate,PyObject * err)70493 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
70494     PyObject *exc_type = tstate->curexc_type;
70495     if (exc_type == err) return 1;
70496     if (unlikely(!exc_type)) return 0;
70497     if (unlikely(PyTuple_Check(err)))
70498         return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
70499     return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
70500 }
70501 #endif
70502 
70503 /* GetException */
70504 #if CYTHON_FAST_THREAD_STATE
__Pyx__GetException(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)70505 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
70506 #else
70507 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
70508 #endif
70509 {
70510     PyObject *local_type, *local_value, *local_tb;
70511 #if CYTHON_FAST_THREAD_STATE
70512     PyObject *tmp_type, *tmp_value, *tmp_tb;
70513     local_type = tstate->curexc_type;
70514     local_value = tstate->curexc_value;
70515     local_tb = tstate->curexc_traceback;
70516     tstate->curexc_type = 0;
70517     tstate->curexc_value = 0;
70518     tstate->curexc_traceback = 0;
70519 #else
70520     PyErr_Fetch(&local_type, &local_value, &local_tb);
70521 #endif
70522     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
70523 #if CYTHON_FAST_THREAD_STATE
70524     if (unlikely(tstate->curexc_type))
70525 #else
70526     if (unlikely(PyErr_Occurred()))
70527 #endif
70528         goto bad;
70529     #if PY_MAJOR_VERSION >= 3
70530     if (local_tb) {
70531         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
70532             goto bad;
70533     }
70534     #endif
70535     Py_XINCREF(local_tb);
70536     Py_XINCREF(local_type);
70537     Py_XINCREF(local_value);
70538     *type = local_type;
70539     *value = local_value;
70540     *tb = local_tb;
70541 #if CYTHON_FAST_THREAD_STATE
70542     #if CYTHON_USE_EXC_INFO_STACK
70543     {
70544         _PyErr_StackItem *exc_info = tstate->exc_info;
70545         tmp_type = exc_info->exc_type;
70546         tmp_value = exc_info->exc_value;
70547         tmp_tb = exc_info->exc_traceback;
70548         exc_info->exc_type = local_type;
70549         exc_info->exc_value = local_value;
70550         exc_info->exc_traceback = local_tb;
70551     }
70552     #else
70553     tmp_type = tstate->exc_type;
70554     tmp_value = tstate->exc_value;
70555     tmp_tb = tstate->exc_traceback;
70556     tstate->exc_type = local_type;
70557     tstate->exc_value = local_value;
70558     tstate->exc_traceback = local_tb;
70559     #endif
70560     Py_XDECREF(tmp_type);
70561     Py_XDECREF(tmp_value);
70562     Py_XDECREF(tmp_tb);
70563 #else
70564     PyErr_SetExcInfo(local_type, local_value, local_tb);
70565 #endif
70566     return 0;
70567 bad:
70568     *type = 0;
70569     *value = 0;
70570     *tb = 0;
70571     Py_XDECREF(local_type);
70572     Py_XDECREF(local_value);
70573     Py_XDECREF(local_tb);
70574     return -1;
70575 }
70576 
70577 /* ArgTypeTest */
__Pyx__ArgTypeTest(PyObject * obj,PyTypeObject * type,const char * name,int exact)70578 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
70579 {
70580     if (unlikely(!type)) {
70581         PyErr_SetString(PyExc_SystemError, "Missing type object");
70582         return 0;
70583     }
70584     else if (exact) {
70585         #if PY_MAJOR_VERSION == 2
70586         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
70587         #endif
70588     }
70589     else {
70590         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
70591     }
70592     PyErr_Format(PyExc_TypeError,
70593         "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
70594         name, type->tp_name, Py_TYPE(obj)->tp_name);
70595     return 0;
70596 }
70597 
70598 /* None */
__Pyx_div_Py_ssize_t(Py_ssize_t a,Py_ssize_t b)70599 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
70600     Py_ssize_t q = a / b;
70601     Py_ssize_t r = a - q*b;
70602     q -= ((r != 0) & ((r ^ b) < 0));
70603     return q;
70604 }
70605 
70606 /* GetAttr */
__Pyx_GetAttr(PyObject * o,PyObject * n)70607 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
70608 #if CYTHON_USE_TYPE_SLOTS
70609 #if PY_MAJOR_VERSION >= 3
70610     if (likely(PyUnicode_Check(n)))
70611 #else
70612     if (likely(PyString_Check(n)))
70613 #endif
70614         return __Pyx_PyObject_GetAttrStr(o, n);
70615 #endif
70616     return PyObject_GetAttr(o, n);
70617 }
70618 
70619 /* ObjectGetItem */
70620 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetIndex(PyObject * obj,PyObject * index)70621 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
70622     PyObject *runerr;
70623     Py_ssize_t key_value;
70624     PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
70625     if (unlikely(!(m && m->sq_item))) {
70626         PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
70627         return NULL;
70628     }
70629     key_value = __Pyx_PyIndex_AsSsize_t(index);
70630     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
70631         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
70632     }
70633     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
70634         PyErr_Clear();
70635         PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
70636     }
70637     return NULL;
70638 }
__Pyx_PyObject_GetItem(PyObject * obj,PyObject * key)70639 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
70640     PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
70641     if (likely(m && m->mp_subscript)) {
70642         return m->mp_subscript(obj, key);
70643     }
70644     return __Pyx_PyObject_GetIndex(obj, key);
70645 }
70646 #endif
70647 
70648 /* decode_c_string */
__Pyx_decode_c_string(const char * cstring,Py_ssize_t start,Py_ssize_t stop,const char * encoding,const char * errors,PyObject * (* decode_func)(const char * s,Py_ssize_t size,const char * errors))70649 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
70650          const char* cstring, Py_ssize_t start, Py_ssize_t stop,
70651          const char* encoding, const char* errors,
70652          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
70653     Py_ssize_t length;
70654     if (unlikely((start < 0) | (stop < 0))) {
70655         size_t slen = strlen(cstring);
70656         if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
70657             PyErr_SetString(PyExc_OverflowError,
70658                             "c-string too long to convert to Python");
70659             return NULL;
70660         }
70661         length = (Py_ssize_t) slen;
70662         if (start < 0) {
70663             start += length;
70664             if (start < 0)
70665                 start = 0;
70666         }
70667         if (stop < 0)
70668             stop += length;
70669     }
70670     if (unlikely(stop <= start))
70671         return __Pyx_NewRef(__pyx_empty_unicode);
70672     length = stop - start;
70673     cstring += start;
70674     if (decode_func) {
70675         return decode_func(cstring, length, errors);
70676     } else {
70677         return PyUnicode_Decode(cstring, length, encoding, errors);
70678     }
70679 }
70680 
70681 /* GetAttr3 */
__Pyx_GetAttr3Default(PyObject * d)70682 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
70683     __Pyx_PyThreadState_declare
70684     __Pyx_PyThreadState_assign
70685     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
70686         return NULL;
70687     __Pyx_PyErr_Clear();
70688     Py_INCREF(d);
70689     return d;
70690 }
__Pyx_GetAttr3(PyObject * o,PyObject * n,PyObject * d)70691 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
70692     PyObject *r = __Pyx_GetAttr(o, n);
70693     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
70694 }
70695 
70696 /* SwapException */
70697 #if CYTHON_FAST_THREAD_STATE
__Pyx__ExceptionSwap(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)70698 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
70699     PyObject *tmp_type, *tmp_value, *tmp_tb;
70700     #if CYTHON_USE_EXC_INFO_STACK
70701     _PyErr_StackItem *exc_info = tstate->exc_info;
70702     tmp_type = exc_info->exc_type;
70703     tmp_value = exc_info->exc_value;
70704     tmp_tb = exc_info->exc_traceback;
70705     exc_info->exc_type = *type;
70706     exc_info->exc_value = *value;
70707     exc_info->exc_traceback = *tb;
70708     #else
70709     tmp_type = tstate->exc_type;
70710     tmp_value = tstate->exc_value;
70711     tmp_tb = tstate->exc_traceback;
70712     tstate->exc_type = *type;
70713     tstate->exc_value = *value;
70714     tstate->exc_traceback = *tb;
70715     #endif
70716     *type = tmp_type;
70717     *value = tmp_value;
70718     *tb = tmp_tb;
70719 }
70720 #else
__Pyx_ExceptionSwap(PyObject ** type,PyObject ** value,PyObject ** tb)70721 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
70722     PyObject *tmp_type, *tmp_value, *tmp_tb;
70723     PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
70724     PyErr_SetExcInfo(*type, *value, *tb);
70725     *type = tmp_type;
70726     *value = tmp_value;
70727     *tb = tmp_tb;
70728 }
70729 #endif
70730 
70731 /* Import */
__Pyx_Import(PyObject * name,PyObject * from_list,int level)70732 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
70733     PyObject *empty_list = 0;
70734     PyObject *module = 0;
70735     PyObject *global_dict = 0;
70736     PyObject *empty_dict = 0;
70737     PyObject *list;
70738     #if PY_MAJOR_VERSION < 3
70739     PyObject *py_import;
70740     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
70741     if (!py_import)
70742         goto bad;
70743     #endif
70744     if (from_list)
70745         list = from_list;
70746     else {
70747         empty_list = PyList_New(0);
70748         if (!empty_list)
70749             goto bad;
70750         list = empty_list;
70751     }
70752     global_dict = PyModule_GetDict(__pyx_m);
70753     if (!global_dict)
70754         goto bad;
70755     empty_dict = PyDict_New();
70756     if (!empty_dict)
70757         goto bad;
70758     {
70759         #if PY_MAJOR_VERSION >= 3
70760         if (level == -1) {
70761             if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
70762                 module = PyImport_ImportModuleLevelObject(
70763                     name, global_dict, empty_dict, list, 1);
70764                 if (!module) {
70765                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
70766                         goto bad;
70767                     PyErr_Clear();
70768                 }
70769             }
70770             level = 0;
70771         }
70772         #endif
70773         if (!module) {
70774             #if PY_MAJOR_VERSION < 3
70775             PyObject *py_level = PyInt_FromLong(level);
70776             if (!py_level)
70777                 goto bad;
70778             module = PyObject_CallFunctionObjArgs(py_import,
70779                 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
70780             Py_DECREF(py_level);
70781             #else
70782             module = PyImport_ImportModuleLevelObject(
70783                 name, global_dict, empty_dict, list, level);
70784             #endif
70785         }
70786     }
70787 bad:
70788     #if PY_MAJOR_VERSION < 3
70789     Py_XDECREF(py_import);
70790     #endif
70791     Py_XDECREF(empty_list);
70792     Py_XDECREF(empty_dict);
70793     return module;
70794 }
70795 
70796 /* FastTypeChecks */
70797 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_InBases(PyTypeObject * a,PyTypeObject * b)70798 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
70799     while (a) {
70800         a = a->tp_base;
70801         if (a == b)
70802             return 1;
70803     }
70804     return b == &PyBaseObject_Type;
70805 }
__Pyx_IsSubtype(PyTypeObject * a,PyTypeObject * b)70806 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
70807     PyObject *mro;
70808     if (a == b) return 1;
70809     mro = a->tp_mro;
70810     if (likely(mro)) {
70811         Py_ssize_t i, n;
70812         n = PyTuple_GET_SIZE(mro);
70813         for (i = 0; i < n; i++) {
70814             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
70815                 return 1;
70816         }
70817         return 0;
70818     }
70819     return __Pyx_InBases(a, b);
70820 }
70821 #if PY_MAJOR_VERSION == 2
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)70822 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
70823     PyObject *exception, *value, *tb;
70824     int res;
70825     __Pyx_PyThreadState_declare
70826     __Pyx_PyThreadState_assign
70827     __Pyx_ErrFetch(&exception, &value, &tb);
70828     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
70829     if (unlikely(res == -1)) {
70830         PyErr_WriteUnraisable(err);
70831         res = 0;
70832     }
70833     if (!res) {
70834         res = PyObject_IsSubclass(err, exc_type2);
70835         if (unlikely(res == -1)) {
70836             PyErr_WriteUnraisable(err);
70837             res = 0;
70838         }
70839     }
70840     __Pyx_ErrRestore(exception, value, tb);
70841     return res;
70842 }
70843 #else
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)70844 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
70845     int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
70846     if (!res) {
70847         res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
70848     }
70849     return res;
70850 }
70851 #endif
__Pyx_PyErr_GivenExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)70852 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
70853     Py_ssize_t i, n;
70854     assert(PyExceptionClass_Check(exc_type));
70855     n = PyTuple_GET_SIZE(tuple);
70856 #if PY_MAJOR_VERSION >= 3
70857     for (i=0; i<n; i++) {
70858         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
70859     }
70860 #endif
70861     for (i=0; i<n; i++) {
70862         PyObject *t = PyTuple_GET_ITEM(tuple, i);
70863         #if PY_MAJOR_VERSION < 3
70864         if (likely(exc_type == t)) return 1;
70865         #endif
70866         if (likely(PyExceptionClass_Check(t))) {
70867             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
70868         } else {
70869         }
70870     }
70871     return 0;
70872 }
__Pyx_PyErr_GivenExceptionMatches(PyObject * err,PyObject * exc_type)70873 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
70874     if (likely(err == exc_type)) return 1;
70875     if (likely(PyExceptionClass_Check(err))) {
70876         if (likely(PyExceptionClass_Check(exc_type))) {
70877             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
70878         } else if (likely(PyTuple_Check(exc_type))) {
70879             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
70880         } else {
70881         }
70882     }
70883     return PyErr_GivenExceptionMatches(err, exc_type);
70884 }
__Pyx_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)70885 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
70886     assert(PyExceptionClass_Check(exc_type1));
70887     assert(PyExceptionClass_Check(exc_type2));
70888     if (likely(err == exc_type1 || err == exc_type2)) return 1;
70889     if (likely(PyExceptionClass_Check(err))) {
70890         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
70891     }
70892     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
70893 }
70894 #endif
70895 
70896 /* PyIntBinop */
70897 #if !CYTHON_COMPILING_IN_PYPY
__Pyx_PyInt_AddObjC(PyObject * op1,PyObject * op2,CYTHON_UNUSED long intval,int inplace,int zerodivision_check)70898 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
70899     (void)inplace;
70900     (void)zerodivision_check;
70901     #if PY_MAJOR_VERSION < 3
70902     if (likely(PyInt_CheckExact(op1))) {
70903         const long b = intval;
70904         long x;
70905         long a = PyInt_AS_LONG(op1);
70906             x = (long)((unsigned long)a + b);
70907             if (likely((x^a) >= 0 || (x^b) >= 0))
70908                 return PyInt_FromLong(x);
70909             return PyLong_Type.tp_as_number->nb_add(op1, op2);
70910     }
70911     #endif
70912     #if CYTHON_USE_PYLONG_INTERNALS
70913     if (likely(PyLong_CheckExact(op1))) {
70914         const long b = intval;
70915         long a, x;
70916 #ifdef HAVE_LONG_LONG
70917         const PY_LONG_LONG llb = intval;
70918         PY_LONG_LONG lla, llx;
70919 #endif
70920         const digit* digits = ((PyLongObject*)op1)->ob_digit;
70921         const Py_ssize_t size = Py_SIZE(op1);
70922         if (likely(__Pyx_sst_abs(size) <= 1)) {
70923             a = likely(size) ? digits[0] : 0;
70924             if (size == -1) a = -a;
70925         } else {
70926             switch (size) {
70927                 case -2:
70928                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
70929                         a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
70930                         break;
70931 #ifdef HAVE_LONG_LONG
70932                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
70933                         lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
70934                         goto long_long;
70935 #endif
70936                     }
70937                     CYTHON_FALLTHROUGH;
70938                 case 2:
70939                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
70940                         a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
70941                         break;
70942 #ifdef HAVE_LONG_LONG
70943                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
70944                         lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
70945                         goto long_long;
70946 #endif
70947                     }
70948                     CYTHON_FALLTHROUGH;
70949                 case -3:
70950                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
70951                         a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
70952                         break;
70953 #ifdef HAVE_LONG_LONG
70954                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
70955                         lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
70956                         goto long_long;
70957 #endif
70958                     }
70959                     CYTHON_FALLTHROUGH;
70960                 case 3:
70961                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
70962                         a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
70963                         break;
70964 #ifdef HAVE_LONG_LONG
70965                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
70966                         lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
70967                         goto long_long;
70968 #endif
70969                     }
70970                     CYTHON_FALLTHROUGH;
70971                 case -4:
70972                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
70973                         a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
70974                         break;
70975 #ifdef HAVE_LONG_LONG
70976                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
70977                         lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
70978                         goto long_long;
70979 #endif
70980                     }
70981                     CYTHON_FALLTHROUGH;
70982                 case 4:
70983                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
70984                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
70985                         break;
70986 #ifdef HAVE_LONG_LONG
70987                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
70988                         lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
70989                         goto long_long;
70990 #endif
70991                     }
70992                     CYTHON_FALLTHROUGH;
70993                 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
70994             }
70995         }
70996                 x = a + b;
70997             return PyLong_FromLong(x);
70998 #ifdef HAVE_LONG_LONG
70999         long_long:
71000                 llx = lla + llb;
71001             return PyLong_FromLongLong(llx);
71002 #endif
71003 
71004 
71005     }
71006     #endif
71007     if (PyFloat_CheckExact(op1)) {
71008         const long b = intval;
71009         double a = PyFloat_AS_DOUBLE(op1);
71010             double result;
71011             PyFPE_START_PROTECT("add", return NULL)
71012             result = ((double)a) + (double)b;
71013             PyFPE_END_PROTECT(result)
71014             return PyFloat_FromDouble(result);
71015     }
71016     return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
71017 }
71018 #endif
71019 
71020 /* None */
__Pyx_RaiseUnboundLocalError(const char * varname)71021 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
71022     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
71023 }
71024 
71025 /* None */
__Pyx_div_long(long a,long b)71026 static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
71027     long q = a / b;
71028     long r = a - q*b;
71029     q -= ((r != 0) & ((r ^ b) < 0));
71030     return q;
71031 }
71032 
71033 /* ImportFrom */
__Pyx_ImportFrom(PyObject * module,PyObject * name)71034 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
71035     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
71036     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
71037         PyErr_Format(PyExc_ImportError,
71038         #if PY_MAJOR_VERSION < 3
71039             "cannot import name %.230s", PyString_AS_STRING(name));
71040         #else
71041             "cannot import name %S", name);
71042         #endif
71043     }
71044     return value;
71045 }
71046 
71047 /* HasAttr */
__Pyx_HasAttr(PyObject * o,PyObject * n)71048 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
71049     PyObject *r;
71050     if (unlikely(!__Pyx_PyBaseString_Check(n))) {
71051         PyErr_SetString(PyExc_TypeError,
71052                         "hasattr(): attribute name must be string");
71053         return -1;
71054     }
71055     r = __Pyx_GetAttr(o, n);
71056     if (unlikely(!r)) {
71057         PyErr_Clear();
71058         return 0;
71059     } else {
71060         Py_DECREF(r);
71061         return 1;
71062     }
71063 }
71064 
71065 /* PyObject_GenericGetAttrNoDict */
71066 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_RaiseGenericGetAttributeError(PyTypeObject * tp,PyObject * attr_name)71067 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
71068     PyErr_Format(PyExc_AttributeError,
71069 #if PY_MAJOR_VERSION >= 3
71070                  "'%.50s' object has no attribute '%U'",
71071                  tp->tp_name, attr_name);
71072 #else
71073                  "'%.50s' object has no attribute '%.400s'",
71074                  tp->tp_name, PyString_AS_STRING(attr_name));
71075 #endif
71076     return NULL;
71077 }
__Pyx_PyObject_GenericGetAttrNoDict(PyObject * obj,PyObject * attr_name)71078 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
71079     PyObject *descr;
71080     PyTypeObject *tp = Py_TYPE(obj);
71081     if (unlikely(!PyString_Check(attr_name))) {
71082         return PyObject_GenericGetAttr(obj, attr_name);
71083     }
71084     assert(!tp->tp_dictoffset);
71085     descr = _PyType_Lookup(tp, attr_name);
71086     if (unlikely(!descr)) {
71087         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
71088     }
71089     Py_INCREF(descr);
71090     #if PY_MAJOR_VERSION < 3
71091     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
71092     #endif
71093     {
71094         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
71095         if (unlikely(f)) {
71096             PyObject *res = f(descr, obj, (PyObject *)tp);
71097             Py_DECREF(descr);
71098             return res;
71099         }
71100     }
71101     return descr;
71102 }
71103 #endif
71104 
71105 /* PyObject_GenericGetAttr */
71106 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_PyObject_GenericGetAttr(PyObject * obj,PyObject * attr_name)71107 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
71108     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
71109         return PyObject_GenericGetAttr(obj, attr_name);
71110     }
71111     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
71112 }
71113 #endif
71114 
71115 /* SetVTable */
__Pyx_SetVtable(PyObject * dict,void * vtable)71116 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
71117 #if PY_VERSION_HEX >= 0x02070000
71118     PyObject *ob = PyCapsule_New(vtable, 0, 0);
71119 #else
71120     PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
71121 #endif
71122     if (!ob)
71123         goto bad;
71124     if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
71125         goto bad;
71126     Py_DECREF(ob);
71127     return 0;
71128 bad:
71129     Py_XDECREF(ob);
71130     return -1;
71131 }
71132 
71133 /* PyObjectGetAttrStrNoError */
__Pyx_PyObject_GetAttrStr_ClearAttributeError(void)71134 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
71135     __Pyx_PyThreadState_declare
71136     __Pyx_PyThreadState_assign
71137     if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
71138         __Pyx_PyErr_Clear();
71139 }
__Pyx_PyObject_GetAttrStrNoError(PyObject * obj,PyObject * attr_name)71140 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
71141     PyObject *result;
71142 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
71143     PyTypeObject* tp = Py_TYPE(obj);
71144     if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
71145         return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
71146     }
71147 #endif
71148     result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
71149     if (unlikely(!result)) {
71150         __Pyx_PyObject_GetAttrStr_ClearAttributeError();
71151     }
71152     return result;
71153 }
71154 
71155 /* SetupReduce */
__Pyx_setup_reduce_is_named(PyObject * meth,PyObject * name)71156 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
71157   int ret;
71158   PyObject *name_attr;
71159   name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
71160   if (likely(name_attr)) {
71161       ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
71162   } else {
71163       ret = -1;
71164   }
71165   if (unlikely(ret < 0)) {
71166       PyErr_Clear();
71167       ret = 0;
71168   }
71169   Py_XDECREF(name_attr);
71170   return ret;
71171 }
__Pyx_setup_reduce(PyObject * type_obj)71172 static int __Pyx_setup_reduce(PyObject* type_obj) {
71173     int ret = 0;
71174     PyObject *object_reduce = NULL;
71175     PyObject *object_reduce_ex = NULL;
71176     PyObject *reduce = NULL;
71177     PyObject *reduce_ex = NULL;
71178     PyObject *reduce_cython = NULL;
71179     PyObject *setstate = NULL;
71180     PyObject *setstate_cython = NULL;
71181 #if CYTHON_USE_PYTYPE_LOOKUP
71182     if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
71183 #else
71184     if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
71185 #endif
71186 #if CYTHON_USE_PYTYPE_LOOKUP
71187     object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
71188 #else
71189     object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
71190 #endif
71191     reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
71192     if (reduce_ex == object_reduce_ex) {
71193 #if CYTHON_USE_PYTYPE_LOOKUP
71194         object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
71195 #else
71196         object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
71197 #endif
71198         reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
71199         if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
71200             reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
71201             if (likely(reduce_cython)) {
71202                 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
71203                 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
71204             } else if (reduce == object_reduce || PyErr_Occurred()) {
71205                 goto __PYX_BAD;
71206             }
71207             setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
71208             if (!setstate) PyErr_Clear();
71209             if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
71210                 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
71211                 if (likely(setstate_cython)) {
71212                     ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
71213                     ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
71214                 } else if (!setstate || PyErr_Occurred()) {
71215                     goto __PYX_BAD;
71216                 }
71217             }
71218             PyType_Modified((PyTypeObject*)type_obj);
71219         }
71220     }
71221     goto __PYX_GOOD;
71222 __PYX_BAD:
71223     if (!PyErr_Occurred())
71224         PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
71225     ret = -1;
71226 __PYX_GOOD:
71227 #if !CYTHON_USE_PYTYPE_LOOKUP
71228     Py_XDECREF(object_reduce);
71229     Py_XDECREF(object_reduce_ex);
71230 #endif
71231     Py_XDECREF(reduce);
71232     Py_XDECREF(reduce_ex);
71233     Py_XDECREF(reduce_cython);
71234     Py_XDECREF(setstate);
71235     Py_XDECREF(setstate_cython);
71236     return ret;
71237 }
71238 
71239 /* TypeImport */
71240 #ifndef __PYX_HAVE_RT_ImportType
71241 #define __PYX_HAVE_RT_ImportType
__Pyx_ImportType(PyObject * module,const char * module_name,const char * class_name,size_t size,enum __Pyx_ImportType_CheckSize check_size)71242 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
71243     size_t size, enum __Pyx_ImportType_CheckSize check_size)
71244 {
71245     PyObject *result = 0;
71246     char warning[200];
71247     Py_ssize_t basicsize;
71248 #ifdef Py_LIMITED_API
71249     PyObject *py_basicsize;
71250 #endif
71251     result = PyObject_GetAttrString(module, class_name);
71252     if (!result)
71253         goto bad;
71254     if (!PyType_Check(result)) {
71255         PyErr_Format(PyExc_TypeError,
71256             "%.200s.%.200s is not a type object",
71257             module_name, class_name);
71258         goto bad;
71259     }
71260 #ifndef Py_LIMITED_API
71261     basicsize = ((PyTypeObject *)result)->tp_basicsize;
71262 #else
71263     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
71264     if (!py_basicsize)
71265         goto bad;
71266     basicsize = PyLong_AsSsize_t(py_basicsize);
71267     Py_DECREF(py_basicsize);
71268     py_basicsize = 0;
71269     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
71270         goto bad;
71271 #endif
71272     if ((size_t)basicsize < size) {
71273         PyErr_Format(PyExc_ValueError,
71274             "%.200s.%.200s size changed, may indicate binary incompatibility. "
71275             "Expected %zd from C header, got %zd from PyObject",
71276             module_name, class_name, size, basicsize);
71277         goto bad;
71278     }
71279     if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
71280         PyErr_Format(PyExc_ValueError,
71281             "%.200s.%.200s size changed, may indicate binary incompatibility. "
71282             "Expected %zd from C header, got %zd from PyObject",
71283             module_name, class_name, size, basicsize);
71284         goto bad;
71285     }
71286     else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
71287         PyOS_snprintf(warning, sizeof(warning),
71288             "%s.%s size changed, may indicate binary incompatibility. "
71289             "Expected %zd from C header, got %zd from PyObject",
71290             module_name, class_name, size, basicsize);
71291         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
71292     }
71293     return (PyTypeObject *)result;
71294 bad:
71295     Py_XDECREF(result);
71296     return NULL;
71297 }
71298 #endif
71299 
71300 /* GetVTable */
__Pyx_GetVtable(PyObject * dict)71301 static void* __Pyx_GetVtable(PyObject *dict) {
71302     void* ptr;
71303     PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
71304     if (!ob)
71305         goto bad;
71306 #if PY_VERSION_HEX >= 0x02070000
71307     ptr = PyCapsule_GetPointer(ob, 0);
71308 #else
71309     ptr = PyCObject_AsVoidPtr(ob);
71310 #endif
71311     if (!ptr && !PyErr_Occurred())
71312         PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
71313     Py_DECREF(ob);
71314     return ptr;
71315 bad:
71316     Py_XDECREF(ob);
71317     return NULL;
71318 }
71319 
71320 /* CLineInTraceback */
71321 #ifndef CYTHON_CLINE_IN_TRACEBACK
__Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState * tstate,int c_line)71322 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
71323     PyObject *use_cline;
71324     PyObject *ptype, *pvalue, *ptraceback;
71325 #if CYTHON_COMPILING_IN_CPYTHON
71326     PyObject **cython_runtime_dict;
71327 #endif
71328     if (unlikely(!__pyx_cython_runtime)) {
71329         return c_line;
71330     }
71331     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
71332 #if CYTHON_COMPILING_IN_CPYTHON
71333     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
71334     if (likely(cython_runtime_dict)) {
71335         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
71336             use_cline, *cython_runtime_dict,
71337             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
71338     } else
71339 #endif
71340     {
71341       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
71342       if (use_cline_obj) {
71343         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
71344         Py_DECREF(use_cline_obj);
71345       } else {
71346         PyErr_Clear();
71347         use_cline = NULL;
71348       }
71349     }
71350     if (!use_cline) {
71351         c_line = 0;
71352         PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
71353     }
71354     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
71355         c_line = 0;
71356     }
71357     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
71358     return c_line;
71359 }
71360 #endif
71361 
71362 /* CodeObjectCache */
__pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry * entries,int count,int code_line)71363 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
71364     int start = 0, mid = 0, end = count - 1;
71365     if (end >= 0 && code_line > entries[end].code_line) {
71366         return count;
71367     }
71368     while (start < end) {
71369         mid = start + (end - start) / 2;
71370         if (code_line < entries[mid].code_line) {
71371             end = mid;
71372         } else if (code_line > entries[mid].code_line) {
71373              start = mid + 1;
71374         } else {
71375             return mid;
71376         }
71377     }
71378     if (code_line <= entries[mid].code_line) {
71379         return mid;
71380     } else {
71381         return mid + 1;
71382     }
71383 }
__pyx_find_code_object(int code_line)71384 static PyCodeObject *__pyx_find_code_object(int code_line) {
71385     PyCodeObject* code_object;
71386     int pos;
71387     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
71388         return NULL;
71389     }
71390     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
71391     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
71392         return NULL;
71393     }
71394     code_object = __pyx_code_cache.entries[pos].code_object;
71395     Py_INCREF(code_object);
71396     return code_object;
71397 }
__pyx_insert_code_object(int code_line,PyCodeObject * code_object)71398 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
71399     int pos, i;
71400     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
71401     if (unlikely(!code_line)) {
71402         return;
71403     }
71404     if (unlikely(!entries)) {
71405         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
71406         if (likely(entries)) {
71407             __pyx_code_cache.entries = entries;
71408             __pyx_code_cache.max_count = 64;
71409             __pyx_code_cache.count = 1;
71410             entries[0].code_line = code_line;
71411             entries[0].code_object = code_object;
71412             Py_INCREF(code_object);
71413         }
71414         return;
71415     }
71416     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
71417     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
71418         PyCodeObject* tmp = entries[pos].code_object;
71419         entries[pos].code_object = code_object;
71420         Py_DECREF(tmp);
71421         return;
71422     }
71423     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
71424         int new_max = __pyx_code_cache.max_count + 64;
71425         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
71426             __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
71427         if (unlikely(!entries)) {
71428             return;
71429         }
71430         __pyx_code_cache.entries = entries;
71431         __pyx_code_cache.max_count = new_max;
71432     }
71433     for (i=__pyx_code_cache.count; i>pos; i--) {
71434         entries[i] = entries[i-1];
71435     }
71436     entries[pos].code_line = code_line;
71437     entries[pos].code_object = code_object;
71438     __pyx_code_cache.count++;
71439     Py_INCREF(code_object);
71440 }
71441 
71442 /* AddTraceback */
71443 #include "compile.h"
71444 #include "frameobject.h"
71445 #include "traceback.h"
__Pyx_CreateCodeObjectForTraceback(const char * funcname,int c_line,int py_line,const char * filename)71446 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
71447             const char *funcname, int c_line,
71448             int py_line, const char *filename) {
71449     PyCodeObject *py_code = 0;
71450     PyObject *py_srcfile = 0;
71451     PyObject *py_funcname = 0;
71452     #if PY_MAJOR_VERSION < 3
71453     py_srcfile = PyString_FromString(filename);
71454     #else
71455     py_srcfile = PyUnicode_FromString(filename);
71456     #endif
71457     if (!py_srcfile) goto bad;
71458     if (c_line) {
71459         #if PY_MAJOR_VERSION < 3
71460         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
71461         #else
71462         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
71463         #endif
71464     }
71465     else {
71466         #if PY_MAJOR_VERSION < 3
71467         py_funcname = PyString_FromString(funcname);
71468         #else
71469         py_funcname = PyUnicode_FromString(funcname);
71470         #endif
71471     }
71472     if (!py_funcname) goto bad;
71473     py_code = __Pyx_PyCode_New(
71474         0,
71475         0,
71476         0,
71477         0,
71478         0,
71479         __pyx_empty_bytes, /*PyObject *code,*/
71480         __pyx_empty_tuple, /*PyObject *consts,*/
71481         __pyx_empty_tuple, /*PyObject *names,*/
71482         __pyx_empty_tuple, /*PyObject *varnames,*/
71483         __pyx_empty_tuple, /*PyObject *freevars,*/
71484         __pyx_empty_tuple, /*PyObject *cellvars,*/
71485         py_srcfile,   /*PyObject *filename,*/
71486         py_funcname,  /*PyObject *name,*/
71487         py_line,
71488         __pyx_empty_bytes  /*PyObject *lnotab*/
71489     );
71490     Py_DECREF(py_srcfile);
71491     Py_DECREF(py_funcname);
71492     return py_code;
71493 bad:
71494     Py_XDECREF(py_srcfile);
71495     Py_XDECREF(py_funcname);
71496     return NULL;
71497 }
__Pyx_AddTraceback(const char * funcname,int c_line,int py_line,const char * filename)71498 static void __Pyx_AddTraceback(const char *funcname, int c_line,
71499                                int py_line, const char *filename) {
71500     PyCodeObject *py_code = 0;
71501     PyFrameObject *py_frame = 0;
71502     PyThreadState *tstate = __Pyx_PyThreadState_Current;
71503     if (c_line) {
71504         c_line = __Pyx_CLineForTraceback(tstate, c_line);
71505     }
71506     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
71507     if (!py_code) {
71508         py_code = __Pyx_CreateCodeObjectForTraceback(
71509             funcname, c_line, py_line, filename);
71510         if (!py_code) goto bad;
71511         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
71512     }
71513     py_frame = PyFrame_New(
71514         tstate,            /*PyThreadState *tstate,*/
71515         py_code,           /*PyCodeObject *code,*/
71516         __pyx_d,    /*PyObject *globals,*/
71517         0                  /*PyObject *locals*/
71518     );
71519     if (!py_frame) goto bad;
71520     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
71521     PyTraceBack_Here(py_frame);
71522 bad:
71523     Py_XDECREF(py_code);
71524     Py_XDECREF(py_frame);
71525 }
71526 
71527 #if PY_MAJOR_VERSION < 3
__Pyx_GetBuffer(PyObject * obj,Py_buffer * view,int flags)71528 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
71529     if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
71530         if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
71531         if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
71532     PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
71533     return -1;
71534 }
__Pyx_ReleaseBuffer(Py_buffer * view)71535 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
71536     PyObject *obj = view->obj;
71537     if (!obj) return;
71538     if (PyObject_CheckBuffer(obj)) {
71539         PyBuffer_Release(view);
71540         return;
71541     }
71542     if ((0)) {}
71543     view->obj = NULL;
71544     Py_DECREF(obj);
71545 }
71546 #endif
71547 
71548 
71549 /* MemviewSliceIsContig */
71550 static int
__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs,char order,int ndim)71551 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
71552 {
71553     int i, index, step, start;
71554     Py_ssize_t itemsize = mvs.memview->view.itemsize;
71555     if (order == 'F') {
71556         step = 1;
71557         start = 0;
71558     } else {
71559         step = -1;
71560         start = ndim - 1;
71561     }
71562     for (i = 0; i < ndim; i++) {
71563         index = start + step * i;
71564         if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
71565             return 0;
71566         itemsize *= mvs.shape[index];
71567     }
71568     return 1;
71569 }
71570 
71571 /* OverlappingSlices */
71572 static void
__pyx_get_array_memory_extents(__Pyx_memviewslice * slice,void ** out_start,void ** out_end,int ndim,size_t itemsize)71573 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
71574                                void **out_start, void **out_end,
71575                                int ndim, size_t itemsize)
71576 {
71577     char *start, *end;
71578     int i;
71579     start = end = slice->data;
71580     for (i = 0; i < ndim; i++) {
71581         Py_ssize_t stride = slice->strides[i];
71582         Py_ssize_t extent = slice->shape[i];
71583         if (extent == 0) {
71584             *out_start = *out_end = start;
71585             return;
71586         } else {
71587             if (stride > 0)
71588                 end += stride * (extent - 1);
71589             else
71590                 start += stride * (extent - 1);
71591         }
71592     }
71593     *out_start = start;
71594     *out_end = end + itemsize;
71595 }
71596 static int
__pyx_slices_overlap(__Pyx_memviewslice * slice1,__Pyx_memviewslice * slice2,int ndim,size_t itemsize)71597 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
71598                      __Pyx_memviewslice *slice2,
71599                      int ndim, size_t itemsize)
71600 {
71601     void *start1, *end1, *start2, *end2;
71602     __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
71603     __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
71604     return (start1 < end2) && (start2 < end1);
71605 }
71606 
71607 /* Capsule */
71608 static CYTHON_INLINE PyObject *
__pyx_capsule_create(void * p,CYTHON_UNUSED const char * sig)71609 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
71610 {
71611     PyObject *cobj;
71612 #if PY_VERSION_HEX >= 0x02070000
71613     cobj = PyCapsule_New(p, sig, NULL);
71614 #else
71615     cobj = PyCObject_FromVoidPtr(p, NULL);
71616 #endif
71617     return cobj;
71618 }
71619 
71620 /* IsLittleEndian */
__Pyx_Is_Little_Endian(void)71621 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
71622 {
71623   union {
71624     uint32_t u32;
71625     uint8_t u8[4];
71626   } S;
71627   S.u32 = 0x01020304;
71628   return S.u8[0] == 4;
71629 }
71630 
71631 /* BufferFormatCheck */
__Pyx_BufFmt_Init(__Pyx_BufFmt_Context * ctx,__Pyx_BufFmt_StackElem * stack,__Pyx_TypeInfo * type)71632 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
71633                               __Pyx_BufFmt_StackElem* stack,
71634                               __Pyx_TypeInfo* type) {
71635   stack[0].field = &ctx->root;
71636   stack[0].parent_offset = 0;
71637   ctx->root.type = type;
71638   ctx->root.name = "buffer dtype";
71639   ctx->root.offset = 0;
71640   ctx->head = stack;
71641   ctx->head->field = &ctx->root;
71642   ctx->fmt_offset = 0;
71643   ctx->head->parent_offset = 0;
71644   ctx->new_packmode = '@';
71645   ctx->enc_packmode = '@';
71646   ctx->new_count = 1;
71647   ctx->enc_count = 0;
71648   ctx->enc_type = 0;
71649   ctx->is_complex = 0;
71650   ctx->is_valid_array = 0;
71651   ctx->struct_alignment = 0;
71652   while (type->typegroup == 'S') {
71653     ++ctx->head;
71654     ctx->head->field = type->fields;
71655     ctx->head->parent_offset = 0;
71656     type = type->fields->type;
71657   }
71658 }
__Pyx_BufFmt_ParseNumber(const char ** ts)71659 static int __Pyx_BufFmt_ParseNumber(const char** ts) {
71660     int count;
71661     const char* t = *ts;
71662     if (*t < '0' || *t > '9') {
71663       return -1;
71664     } else {
71665         count = *t++ - '0';
71666         while (*t >= '0' && *t <= '9') {
71667             count *= 10;
71668             count += *t++ - '0';
71669         }
71670     }
71671     *ts = t;
71672     return count;
71673 }
__Pyx_BufFmt_ExpectNumber(const char ** ts)71674 static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
71675     int number = __Pyx_BufFmt_ParseNumber(ts);
71676     if (number == -1)
71677         PyErr_Format(PyExc_ValueError,\
71678                      "Does not understand character buffer dtype format string ('%c')", **ts);
71679     return number;
71680 }
__Pyx_BufFmt_RaiseUnexpectedChar(char ch)71681 static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
71682   PyErr_Format(PyExc_ValueError,
71683                "Unexpected format string character: '%c'", ch);
71684 }
__Pyx_BufFmt_DescribeTypeChar(char ch,int is_complex)71685 static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
71686   switch (ch) {
71687     case '?': return "'bool'";
71688     case 'c': return "'char'";
71689     case 'b': return "'signed char'";
71690     case 'B': return "'unsigned char'";
71691     case 'h': return "'short'";
71692     case 'H': return "'unsigned short'";
71693     case 'i': return "'int'";
71694     case 'I': return "'unsigned int'";
71695     case 'l': return "'long'";
71696     case 'L': return "'unsigned long'";
71697     case 'q': return "'long long'";
71698     case 'Q': return "'unsigned long long'";
71699     case 'f': return (is_complex ? "'complex float'" : "'float'");
71700     case 'd': return (is_complex ? "'complex double'" : "'double'");
71701     case 'g': return (is_complex ? "'complex long double'" : "'long double'");
71702     case 'T': return "a struct";
71703     case 'O': return "Python object";
71704     case 'P': return "a pointer";
71705     case 's': case 'p': return "a string";
71706     case 0: return "end";
71707     default: return "unparseable format string";
71708   }
71709 }
__Pyx_BufFmt_TypeCharToStandardSize(char ch,int is_complex)71710 static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
71711   switch (ch) {
71712     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
71713     case 'h': case 'H': return 2;
71714     case 'i': case 'I': case 'l': case 'L': return 4;
71715     case 'q': case 'Q': return 8;
71716     case 'f': return (is_complex ? 8 : 4);
71717     case 'd': return (is_complex ? 16 : 8);
71718     case 'g': {
71719       PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
71720       return 0;
71721     }
71722     case 'O': case 'P': return sizeof(void*);
71723     default:
71724       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
71725       return 0;
71726     }
71727 }
__Pyx_BufFmt_TypeCharToNativeSize(char ch,int is_complex)71728 static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
71729   switch (ch) {
71730     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
71731     case 'h': case 'H': return sizeof(short);
71732     case 'i': case 'I': return sizeof(int);
71733     case 'l': case 'L': return sizeof(long);
71734     #ifdef HAVE_LONG_LONG
71735     case 'q': case 'Q': return sizeof(PY_LONG_LONG);
71736     #endif
71737     case 'f': return sizeof(float) * (is_complex ? 2 : 1);
71738     case 'd': return sizeof(double) * (is_complex ? 2 : 1);
71739     case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
71740     case 'O': case 'P': return sizeof(void*);
71741     default: {
71742       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
71743       return 0;
71744     }
71745   }
71746 }
71747 typedef struct { char c; short x; } __Pyx_st_short;
71748 typedef struct { char c; int x; } __Pyx_st_int;
71749 typedef struct { char c; long x; } __Pyx_st_long;
71750 typedef struct { char c; float x; } __Pyx_st_float;
71751 typedef struct { char c; double x; } __Pyx_st_double;
71752 typedef struct { char c; long double x; } __Pyx_st_longdouble;
71753 typedef struct { char c; void *x; } __Pyx_st_void_p;
71754 #ifdef HAVE_LONG_LONG
71755 typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
71756 #endif
__Pyx_BufFmt_TypeCharToAlignment(char ch,CYTHON_UNUSED int is_complex)71757 static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
71758   switch (ch) {
71759     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
71760     case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
71761     case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
71762     case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
71763 #ifdef HAVE_LONG_LONG
71764     case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
71765 #endif
71766     case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
71767     case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
71768     case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
71769     case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
71770     default:
71771       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
71772       return 0;
71773     }
71774 }
71775 /* These are for computing the padding at the end of the struct to align
71776    on the first member of the struct. This will probably the same as above,
71777    but we don't have any guarantees.
71778  */
71779 typedef struct { short x; char c; } __Pyx_pad_short;
71780 typedef struct { int x; char c; } __Pyx_pad_int;
71781 typedef struct { long x; char c; } __Pyx_pad_long;
71782 typedef struct { float x; char c; } __Pyx_pad_float;
71783 typedef struct { double x; char c; } __Pyx_pad_double;
71784 typedef struct { long double x; char c; } __Pyx_pad_longdouble;
71785 typedef struct { void *x; char c; } __Pyx_pad_void_p;
71786 #ifdef HAVE_LONG_LONG
71787 typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
71788 #endif
__Pyx_BufFmt_TypeCharToPadding(char ch,CYTHON_UNUSED int is_complex)71789 static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
71790   switch (ch) {
71791     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
71792     case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
71793     case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
71794     case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
71795 #ifdef HAVE_LONG_LONG
71796     case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
71797 #endif
71798     case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
71799     case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
71800     case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
71801     case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
71802     default:
71803       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
71804       return 0;
71805     }
71806 }
__Pyx_BufFmt_TypeCharToGroup(char ch,int is_complex)71807 static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
71808   switch (ch) {
71809     case 'c':
71810         return 'H';
71811     case 'b': case 'h': case 'i':
71812     case 'l': case 'q': case 's': case 'p':
71813         return 'I';
71814     case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
71815         return 'U';
71816     case 'f': case 'd': case 'g':
71817         return (is_complex ? 'C' : 'R');
71818     case 'O':
71819         return 'O';
71820     case 'P':
71821         return 'P';
71822     default: {
71823       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
71824       return 0;
71825     }
71826   }
71827 }
__Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context * ctx)71828 static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
71829   if (ctx->head == NULL || ctx->head->field == &ctx->root) {
71830     const char* expected;
71831     const char* quote;
71832     if (ctx->head == NULL) {
71833       expected = "end";
71834       quote = "";
71835     } else {
71836       expected = ctx->head->field->type->name;
71837       quote = "'";
71838     }
71839     PyErr_Format(PyExc_ValueError,
71840                  "Buffer dtype mismatch, expected %s%s%s but got %s",
71841                  quote, expected, quote,
71842                  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
71843   } else {
71844     __Pyx_StructField* field = ctx->head->field;
71845     __Pyx_StructField* parent = (ctx->head - 1)->field;
71846     PyErr_Format(PyExc_ValueError,
71847                  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
71848                  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
71849                  parent->type->name, field->name);
71850   }
71851 }
__Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context * ctx)71852 static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
71853   char group;
71854   size_t size, offset, arraysize = 1;
71855   if (ctx->enc_type == 0) return 0;
71856   if (ctx->head->field->type->arraysize[0]) {
71857     int i, ndim = 0;
71858     if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
71859         ctx->is_valid_array = ctx->head->field->type->ndim == 1;
71860         ndim = 1;
71861         if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
71862             PyErr_Format(PyExc_ValueError,
71863                          "Expected a dimension of size %zu, got %zu",
71864                          ctx->head->field->type->arraysize[0], ctx->enc_count);
71865             return -1;
71866         }
71867     }
71868     if (!ctx->is_valid_array) {
71869       PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
71870                    ctx->head->field->type->ndim, ndim);
71871       return -1;
71872     }
71873     for (i = 0; i < ctx->head->field->type->ndim; i++) {
71874       arraysize *= ctx->head->field->type->arraysize[i];
71875     }
71876     ctx->is_valid_array = 0;
71877     ctx->enc_count = 1;
71878   }
71879   group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
71880   do {
71881     __Pyx_StructField* field = ctx->head->field;
71882     __Pyx_TypeInfo* type = field->type;
71883     if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
71884       size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
71885     } else {
71886       size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
71887     }
71888     if (ctx->enc_packmode == '@') {
71889       size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
71890       size_t align_mod_offset;
71891       if (align_at == 0) return -1;
71892       align_mod_offset = ctx->fmt_offset % align_at;
71893       if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
71894       if (ctx->struct_alignment == 0)
71895           ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
71896                                                                  ctx->is_complex);
71897     }
71898     if (type->size != size || type->typegroup != group) {
71899       if (type->typegroup == 'C' && type->fields != NULL) {
71900         size_t parent_offset = ctx->head->parent_offset + field->offset;
71901         ++ctx->head;
71902         ctx->head->field = type->fields;
71903         ctx->head->parent_offset = parent_offset;
71904         continue;
71905       }
71906       if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
71907       } else {
71908           __Pyx_BufFmt_RaiseExpected(ctx);
71909           return -1;
71910       }
71911     }
71912     offset = ctx->head->parent_offset + field->offset;
71913     if (ctx->fmt_offset != offset) {
71914       PyErr_Format(PyExc_ValueError,
71915                    "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
71916                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
71917       return -1;
71918     }
71919     ctx->fmt_offset += size;
71920     if (arraysize)
71921       ctx->fmt_offset += (arraysize - 1) * size;
71922     --ctx->enc_count;
71923     while (1) {
71924       if (field == &ctx->root) {
71925         ctx->head = NULL;
71926         if (ctx->enc_count != 0) {
71927           __Pyx_BufFmt_RaiseExpected(ctx);
71928           return -1;
71929         }
71930         break;
71931       }
71932       ctx->head->field = ++field;
71933       if (field->type == NULL) {
71934         --ctx->head;
71935         field = ctx->head->field;
71936         continue;
71937       } else if (field->type->typegroup == 'S') {
71938         size_t parent_offset = ctx->head->parent_offset + field->offset;
71939         if (field->type->fields->type == NULL) continue;
71940         field = field->type->fields;
71941         ++ctx->head;
71942         ctx->head->field = field;
71943         ctx->head->parent_offset = parent_offset;
71944         break;
71945       } else {
71946         break;
71947       }
71948     }
71949   } while (ctx->enc_count);
71950   ctx->enc_type = 0;
71951   ctx->is_complex = 0;
71952   return 0;
71953 }
71954 static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context * ctx,const char ** tsp)71955 __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
71956 {
71957     const char *ts = *tsp;
71958     int i = 0, number, ndim;
71959     ++ts;
71960     if (ctx->new_count != 1) {
71961         PyErr_SetString(PyExc_ValueError,
71962                         "Cannot handle repeated arrays in format string");
71963         return NULL;
71964     }
71965     if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
71966     ndim = ctx->head->field->type->ndim;
71967     while (*ts && *ts != ')') {
71968         switch (*ts) {
71969             case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
71970             default:  break;
71971         }
71972         number = __Pyx_BufFmt_ExpectNumber(&ts);
71973         if (number == -1) return NULL;
71974         if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
71975             return PyErr_Format(PyExc_ValueError,
71976                         "Expected a dimension of size %zu, got %d",
71977                         ctx->head->field->type->arraysize[i], number);
71978         if (*ts != ',' && *ts != ')')
71979             return PyErr_Format(PyExc_ValueError,
71980                                 "Expected a comma in format string, got '%c'", *ts);
71981         if (*ts == ',') ts++;
71982         i++;
71983     }
71984     if (i != ndim)
71985         return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
71986                             ctx->head->field->type->ndim, i);
71987     if (!*ts) {
71988         PyErr_SetString(PyExc_ValueError,
71989                         "Unexpected end of format string, expected ')'");
71990         return NULL;
71991     }
71992     ctx->is_valid_array = 1;
71993     ctx->new_count = 1;
71994     *tsp = ++ts;
71995     return Py_None;
71996 }
__Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context * ctx,const char * ts)71997 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
71998   int got_Z = 0;
71999   while (1) {
72000     switch(*ts) {
72001       case 0:
72002         if (ctx->enc_type != 0 && ctx->head == NULL) {
72003           __Pyx_BufFmt_RaiseExpected(ctx);
72004           return NULL;
72005         }
72006         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
72007         if (ctx->head != NULL) {
72008           __Pyx_BufFmt_RaiseExpected(ctx);
72009           return NULL;
72010         }
72011         return ts;
72012       case ' ':
72013       case '\r':
72014       case '\n':
72015         ++ts;
72016         break;
72017       case '<':
72018         if (!__Pyx_Is_Little_Endian()) {
72019           PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
72020           return NULL;
72021         }
72022         ctx->new_packmode = '=';
72023         ++ts;
72024         break;
72025       case '>':
72026       case '!':
72027         if (__Pyx_Is_Little_Endian()) {
72028           PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
72029           return NULL;
72030         }
72031         ctx->new_packmode = '=';
72032         ++ts;
72033         break;
72034       case '=':
72035       case '@':
72036       case '^':
72037         ctx->new_packmode = *ts++;
72038         break;
72039       case 'T':
72040         {
72041           const char* ts_after_sub;
72042           size_t i, struct_count = ctx->new_count;
72043           size_t struct_alignment = ctx->struct_alignment;
72044           ctx->new_count = 1;
72045           ++ts;
72046           if (*ts != '{') {
72047             PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
72048             return NULL;
72049           }
72050           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
72051           ctx->enc_type = 0;
72052           ctx->enc_count = 0;
72053           ctx->struct_alignment = 0;
72054           ++ts;
72055           ts_after_sub = ts;
72056           for (i = 0; i != struct_count; ++i) {
72057             ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
72058             if (!ts_after_sub) return NULL;
72059           }
72060           ts = ts_after_sub;
72061           if (struct_alignment) ctx->struct_alignment = struct_alignment;
72062         }
72063         break;
72064       case '}':
72065         {
72066           size_t alignment = ctx->struct_alignment;
72067           ++ts;
72068           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
72069           ctx->enc_type = 0;
72070           if (alignment && ctx->fmt_offset % alignment) {
72071             ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
72072           }
72073         }
72074         return ts;
72075       case 'x':
72076         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
72077         ctx->fmt_offset += ctx->new_count;
72078         ctx->new_count = 1;
72079         ctx->enc_count = 0;
72080         ctx->enc_type = 0;
72081         ctx->enc_packmode = ctx->new_packmode;
72082         ++ts;
72083         break;
72084       case 'Z':
72085         got_Z = 1;
72086         ++ts;
72087         if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
72088           __Pyx_BufFmt_RaiseUnexpectedChar('Z');
72089           return NULL;
72090         }
72091         CYTHON_FALLTHROUGH;
72092       case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
72093       case 'l': case 'L': case 'q': case 'Q':
72094       case 'f': case 'd': case 'g':
72095       case 'O': case 'p':
72096         if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
72097             (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
72098           ctx->enc_count += ctx->new_count;
72099           ctx->new_count = 1;
72100           got_Z = 0;
72101           ++ts;
72102           break;
72103         }
72104         CYTHON_FALLTHROUGH;
72105       case 's':
72106         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
72107         ctx->enc_count = ctx->new_count;
72108         ctx->enc_packmode = ctx->new_packmode;
72109         ctx->enc_type = *ts;
72110         ctx->is_complex = got_Z;
72111         ++ts;
72112         ctx->new_count = 1;
72113         got_Z = 0;
72114         break;
72115       case ':':
72116         ++ts;
72117         while(*ts != ':') ++ts;
72118         ++ts;
72119         break;
72120       case '(':
72121         if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
72122         break;
72123       default:
72124         {
72125           int number = __Pyx_BufFmt_ExpectNumber(&ts);
72126           if (number == -1) return NULL;
72127           ctx->new_count = (size_t)number;
72128         }
72129     }
72130   }
72131 }
72132 
72133 /* TypeInfoCompare */
72134   static int
__pyx_typeinfo_cmp(__Pyx_TypeInfo * a,__Pyx_TypeInfo * b)72135 __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
72136 {
72137     int i;
72138     if (!a || !b)
72139         return 0;
72140     if (a == b)
72141         return 1;
72142     if (a->size != b->size || a->typegroup != b->typegroup ||
72143             a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
72144         if (a->typegroup == 'H' || b->typegroup == 'H') {
72145             return a->size == b->size;
72146         } else {
72147             return 0;
72148         }
72149     }
72150     if (a->ndim) {
72151         for (i = 0; i < a->ndim; i++)
72152             if (a->arraysize[i] != b->arraysize[i])
72153                 return 0;
72154     }
72155     if (a->typegroup == 'S') {
72156         if (a->flags != b->flags)
72157             return 0;
72158         if (a->fields || b->fields) {
72159             if (!(a->fields && b->fields))
72160                 return 0;
72161             for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
72162                 __Pyx_StructField *field_a = a->fields + i;
72163                 __Pyx_StructField *field_b = b->fields + i;
72164                 if (field_a->offset != field_b->offset ||
72165                     !__pyx_typeinfo_cmp(field_a->type, field_b->type))
72166                     return 0;
72167             }
72168             return !a->fields[i].type && !b->fields[i].type;
72169         }
72170     }
72171     return 1;
72172 }
72173 
72174 /* MemviewSliceValidateAndInit */
72175   static int
__pyx_check_strides(Py_buffer * buf,int dim,int ndim,int spec)72176 __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
72177 {
72178     if (buf->shape[dim] <= 1)
72179         return 1;
72180     if (buf->strides) {
72181         if (spec & __Pyx_MEMVIEW_CONTIG) {
72182             if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
72183                 if (unlikely(buf->strides[dim] != sizeof(void *))) {
72184                     PyErr_Format(PyExc_ValueError,
72185                                  "Buffer is not indirectly contiguous "
72186                                  "in dimension %d.", dim);
72187                     goto fail;
72188                 }
72189             } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
72190                 PyErr_SetString(PyExc_ValueError,
72191                                 "Buffer and memoryview are not contiguous "
72192                                 "in the same dimension.");
72193                 goto fail;
72194             }
72195         }
72196         if (spec & __Pyx_MEMVIEW_FOLLOW) {
72197             Py_ssize_t stride = buf->strides[dim];
72198             if (stride < 0)
72199                 stride = -stride;
72200             if (unlikely(stride < buf->itemsize)) {
72201                 PyErr_SetString(PyExc_ValueError,
72202                                 "Buffer and memoryview are not contiguous "
72203                                 "in the same dimension.");
72204                 goto fail;
72205             }
72206         }
72207     } else {
72208         if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
72209             PyErr_Format(PyExc_ValueError,
72210                          "C-contiguous buffer is not contiguous in "
72211                          "dimension %d", dim);
72212             goto fail;
72213         } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
72214             PyErr_Format(PyExc_ValueError,
72215                          "C-contiguous buffer is not indirect in "
72216                          "dimension %d", dim);
72217             goto fail;
72218         } else if (unlikely(buf->suboffsets)) {
72219             PyErr_SetString(PyExc_ValueError,
72220                             "Buffer exposes suboffsets but no strides");
72221             goto fail;
72222         }
72223     }
72224     return 1;
72225 fail:
72226     return 0;
72227 }
72228 static int
__pyx_check_suboffsets(Py_buffer * buf,int dim,CYTHON_UNUSED int ndim,int spec)72229 __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
72230 {
72231     if (spec & __Pyx_MEMVIEW_DIRECT) {
72232         if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
72233             PyErr_Format(PyExc_ValueError,
72234                          "Buffer not compatible with direct access "
72235                          "in dimension %d.", dim);
72236             goto fail;
72237         }
72238     }
72239     if (spec & __Pyx_MEMVIEW_PTR) {
72240         if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
72241             PyErr_Format(PyExc_ValueError,
72242                          "Buffer is not indirectly accessible "
72243                          "in dimension %d.", dim);
72244             goto fail;
72245         }
72246     }
72247     return 1;
72248 fail:
72249     return 0;
72250 }
72251 static int
__pyx_verify_contig(Py_buffer * buf,int ndim,int c_or_f_flag)72252 __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
72253 {
72254     int i;
72255     if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
72256         Py_ssize_t stride = 1;
72257         for (i = 0; i < ndim; i++) {
72258             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
72259                 PyErr_SetString(PyExc_ValueError,
72260                     "Buffer not fortran contiguous.");
72261                 goto fail;
72262             }
72263             stride = stride * buf->shape[i];
72264         }
72265     } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
72266         Py_ssize_t stride = 1;
72267         for (i = ndim - 1; i >- 1; i--) {
72268             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
72269                 PyErr_SetString(PyExc_ValueError,
72270                     "Buffer not C contiguous.");
72271                 goto fail;
72272             }
72273             stride = stride * buf->shape[i];
72274         }
72275     }
72276     return 1;
72277 fail:
72278     return 0;
72279 }
__Pyx_ValidateAndInit_memviewslice(int * axes_specs,int c_or_f_flag,int buf_flags,int ndim,__Pyx_TypeInfo * dtype,__Pyx_BufFmt_StackElem stack[],__Pyx_memviewslice * memviewslice,PyObject * original_obj)72280 static int __Pyx_ValidateAndInit_memviewslice(
72281                 int *axes_specs,
72282                 int c_or_f_flag,
72283                 int buf_flags,
72284                 int ndim,
72285                 __Pyx_TypeInfo *dtype,
72286                 __Pyx_BufFmt_StackElem stack[],
72287                 __Pyx_memviewslice *memviewslice,
72288                 PyObject *original_obj)
72289 {
72290     struct __pyx_memoryview_obj *memview, *new_memview;
72291     __Pyx_RefNannyDeclarations
72292     Py_buffer *buf;
72293     int i, spec = 0, retval = -1;
72294     __Pyx_BufFmt_Context ctx;
72295     int from_memoryview = __pyx_memoryview_check(original_obj);
72296     __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
72297     if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
72298                                                             original_obj)->typeinfo)) {
72299         memview = (struct __pyx_memoryview_obj *) original_obj;
72300         new_memview = NULL;
72301     } else {
72302         memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
72303                                             original_obj, buf_flags, 0, dtype);
72304         new_memview = memview;
72305         if (unlikely(!memview))
72306             goto fail;
72307     }
72308     buf = &memview->view;
72309     if (unlikely(buf->ndim != ndim)) {
72310         PyErr_Format(PyExc_ValueError,
72311                 "Buffer has wrong number of dimensions (expected %d, got %d)",
72312                 ndim, buf->ndim);
72313         goto fail;
72314     }
72315     if (new_memview) {
72316         __Pyx_BufFmt_Init(&ctx, stack, dtype);
72317         if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
72318     }
72319     if (unlikely((unsigned) buf->itemsize != dtype->size)) {
72320         PyErr_Format(PyExc_ValueError,
72321                      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
72322                      "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
72323                      buf->itemsize,
72324                      (buf->itemsize > 1) ? "s" : "",
72325                      dtype->name,
72326                      dtype->size,
72327                      (dtype->size > 1) ? "s" : "");
72328         goto fail;
72329     }
72330     if (buf->len > 0) {
72331         for (i = 0; i < ndim; i++) {
72332             spec = axes_specs[i];
72333             if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
72334                 goto fail;
72335             if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
72336                 goto fail;
72337         }
72338         if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
72339             goto fail;
72340     }
72341     if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
72342                                          new_memview != NULL) == -1)) {
72343         goto fail;
72344     }
72345     retval = 0;
72346     goto no_fail;
72347 fail:
72348     Py_XDECREF(new_memview);
72349     retval = -1;
72350 no_fail:
72351     __Pyx_RefNannyFinishContext();
72352     return retval;
72353 }
72354 
72355 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(PyObject * obj,int writable_flag)72356   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float32_t(PyObject *obj, int writable_flag) {
72357     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72358     __Pyx_BufFmt_StackElem stack[1];
72359     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
72360     int retcode;
72361     if (obj == Py_None) {
72362         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72363         return result;
72364     }
72365     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
72366                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
72367                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, stack,
72368                                                  &result, obj);
72369     if (unlikely(retcode == -1))
72370         goto __pyx_fail;
72371     return result;
72372 __pyx_fail:
72373     result.memview = NULL;
72374     result.data = NULL;
72375     return result;
72376 }
72377 
72378 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(PyObject * obj,int writable_flag)72379   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float32_t(PyObject *obj, int writable_flag) {
72380     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72381     __Pyx_BufFmt_StackElem stack[1];
72382     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
72383     int retcode;
72384     if (obj == Py_None) {
72385         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72386         return result;
72387     }
72388     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
72389                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 3,
72390                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, stack,
72391                                                  &result, obj);
72392     if (unlikely(retcode == -1))
72393         goto __pyx_fail;
72394     return result;
72395 __pyx_fail:
72396     result.memview = NULL;
72397     result.data = NULL;
72398     return result;
72399 }
72400 
72401 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(PyObject * obj,int writable_flag)72402   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float32_t(PyObject *obj, int writable_flag) {
72403     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72404     __Pyx_BufFmt_StackElem stack[1];
72405     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
72406     int retcode;
72407     if (obj == Py_None) {
72408         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72409         return result;
72410     }
72411     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
72412                                                  PyBUF_RECORDS_RO | writable_flag, 1,
72413                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, stack,
72414                                                  &result, obj);
72415     if (unlikely(retcode == -1))
72416         goto __pyx_fail;
72417     return result;
72418 __pyx_fail:
72419     result.memview = NULL;
72420     result.data = NULL;
72421     return result;
72422 }
72423 
72424 /* CIntFromPyVerify */
72425   #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
72426     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
72427 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
72428     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
72429 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
72430     {\
72431         func_type value = func_value;\
72432         if (sizeof(target_type) < sizeof(func_type)) {\
72433             if (unlikely(value != (func_type) (target_type) value)) {\
72434                 func_type zero = 0;\
72435                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
72436                     return (target_type) -1;\
72437                 if (is_unsigned && unlikely(value < zero))\
72438                     goto raise_neg_overflow;\
72439                 else\
72440                     goto raise_overflow;\
72441             }\
72442         }\
72443         return (target_type) value;\
72444     }
72445 
72446 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(PyObject * obj,int writable_flag)72447   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd__nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) {
72448     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72449     __Pyx_BufFmt_StackElem stack[1];
72450     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
72451     int retcode;
72452     if (obj == Py_None) {
72453         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72454         return result;
72455     }
72456     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
72457                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
72458                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack,
72459                                                  &result, obj);
72460     if (unlikely(retcode == -1))
72461         goto __pyx_fail;
72462     return result;
72463 __pyx_fail:
72464     result.memview = NULL;
72465     result.data = NULL;
72466     return result;
72467 }
72468 
72469 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(PyObject * obj,int writable_flag)72470   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd_d__nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) {
72471     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72472     __Pyx_BufFmt_StackElem stack[1];
72473     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
72474     int retcode;
72475     if (obj == Py_None) {
72476         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72477         return result;
72478     }
72479     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
72480                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 3,
72481                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack,
72482                                                  &result, obj);
72483     if (unlikely(retcode == -1))
72484         goto __pyx_fail;
72485     return result;
72486 __pyx_fail:
72487     result.memview = NULL;
72488     result.data = NULL;
72489     return result;
72490 }
72491 
72492 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject * obj,int writable_flag)72493   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(PyObject *obj, int writable_flag) {
72494     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72495     __Pyx_BufFmt_StackElem stack[1];
72496     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
72497     int retcode;
72498     if (obj == Py_None) {
72499         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72500         return result;
72501     }
72502     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
72503                                                  PyBUF_RECORDS_RO | writable_flag, 1,
72504                                                  &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, stack,
72505                                                  &result, obj);
72506     if (unlikely(retcode == -1))
72507         goto __pyx_fail;
72508     return result;
72509 __pyx_fail:
72510     result.memview = NULL;
72511     result.data = NULL;
72512     return result;
72513 }
72514 
72515 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(PyObject * obj,int writable_flag)72516   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_float_complex(PyObject *obj, int writable_flag) {
72517     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72518     __Pyx_BufFmt_StackElem stack[1];
72519     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
72520     int retcode;
72521     if (obj == Py_None) {
72522         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72523         return result;
72524     }
72525     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
72526                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
72527                                                  &__Pyx_TypeInfo___pyx_t_float_complex, stack,
72528                                                  &result, obj);
72529     if (unlikely(retcode == -1))
72530         goto __pyx_fail;
72531     return result;
72532 __pyx_fail:
72533     result.memview = NULL;
72534     result.data = NULL;
72535     return result;
72536 }
72537 
72538 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(PyObject * obj,int writable_flag)72539   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_float_complex(PyObject *obj, int writable_flag) {
72540     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72541     __Pyx_BufFmt_StackElem stack[1];
72542     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
72543     int retcode;
72544     if (obj == Py_None) {
72545         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72546         return result;
72547     }
72548     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
72549                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 3,
72550                                                  &__Pyx_TypeInfo___pyx_t_float_complex, stack,
72551                                                  &result, obj);
72552     if (unlikely(retcode == -1))
72553         goto __pyx_fail;
72554     return result;
72555 __pyx_fail:
72556     result.memview = NULL;
72557     result.data = NULL;
72558     return result;
72559 }
72560 
72561 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(PyObject * obj,int writable_flag)72562   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_float_complex(PyObject *obj, int writable_flag) {
72563     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72564     __Pyx_BufFmt_StackElem stack[1];
72565     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
72566     int retcode;
72567     if (obj == Py_None) {
72568         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72569         return result;
72570     }
72571     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
72572                                                  PyBUF_RECORDS_RO | writable_flag, 1,
72573                                                  &__Pyx_TypeInfo___pyx_t_float_complex, stack,
72574                                                  &result, obj);
72575     if (unlikely(retcode == -1))
72576         goto __pyx_fail;
72577     return result;
72578 __pyx_fail:
72579     result.memview = NULL;
72580     result.data = NULL;
72581     return result;
72582 }
72583 
72584 /* Declarations */
72585   #if CYTHON_CCOMPLEX
72586   #ifdef __cplusplus
__pyx_t_float_complex_from_parts(float x,float y)72587     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
72588       return ::std::complex< float >(x, y);
72589     }
72590   #else
__pyx_t_float_complex_from_parts(float x,float y)72591     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
72592       return x + y*(__pyx_t_float_complex)_Complex_I;
72593     }
72594   #endif
72595 #else
__pyx_t_float_complex_from_parts(float x,float y)72596     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
72597       __pyx_t_float_complex z;
72598       z.real = x;
72599       z.imag = y;
72600       return z;
72601     }
72602 #endif
72603 
72604 /* Arithmetic */
72605   #if CYTHON_CCOMPLEX
72606 #else
__Pyx_c_eq_float(__pyx_t_float_complex a,__pyx_t_float_complex b)72607     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
72608        return (a.real == b.real) && (a.imag == b.imag);
72609     }
__Pyx_c_sum_float(__pyx_t_float_complex a,__pyx_t_float_complex b)72610     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
72611         __pyx_t_float_complex z;
72612         z.real = a.real + b.real;
72613         z.imag = a.imag + b.imag;
72614         return z;
72615     }
__Pyx_c_diff_float(__pyx_t_float_complex a,__pyx_t_float_complex b)72616     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
72617         __pyx_t_float_complex z;
72618         z.real = a.real - b.real;
72619         z.imag = a.imag - b.imag;
72620         return z;
72621     }
__Pyx_c_prod_float(__pyx_t_float_complex a,__pyx_t_float_complex b)72622     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
72623         __pyx_t_float_complex z;
72624         z.real = a.real * b.real - a.imag * b.imag;
72625         z.imag = a.real * b.imag + a.imag * b.real;
72626         return z;
72627     }
72628     #if 1
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)72629     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
72630         if (b.imag == 0) {
72631             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
72632         } else if (fabsf(b.real) >= fabsf(b.imag)) {
72633             if (b.real == 0 && b.imag == 0) {
72634                 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
72635             } else {
72636                 float r = b.imag / b.real;
72637                 float s = (float)(1.0) / (b.real + b.imag * r);
72638                 return __pyx_t_float_complex_from_parts(
72639                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
72640             }
72641         } else {
72642             float r = b.real / b.imag;
72643             float s = (float)(1.0) / (b.imag + b.real * r);
72644             return __pyx_t_float_complex_from_parts(
72645                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
72646         }
72647     }
72648     #else
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)72649     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
72650         if (b.imag == 0) {
72651             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
72652         } else {
72653             float denom = b.real * b.real + b.imag * b.imag;
72654             return __pyx_t_float_complex_from_parts(
72655                 (a.real * b.real + a.imag * b.imag) / denom,
72656                 (a.imag * b.real - a.real * b.imag) / denom);
72657         }
72658     }
72659     #endif
__Pyx_c_neg_float(__pyx_t_float_complex a)72660     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
72661         __pyx_t_float_complex z;
72662         z.real = -a.real;
72663         z.imag = -a.imag;
72664         return z;
72665     }
__Pyx_c_is_zero_float(__pyx_t_float_complex a)72666     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
72667        return (a.real == 0) && (a.imag == 0);
72668     }
__Pyx_c_conj_float(__pyx_t_float_complex a)72669     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
72670         __pyx_t_float_complex z;
72671         z.real =  a.real;
72672         z.imag = -a.imag;
72673         return z;
72674     }
72675     #if 1
__Pyx_c_abs_float(__pyx_t_float_complex z)72676         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
72677           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
72678             return sqrtf(z.real*z.real + z.imag*z.imag);
72679           #else
72680             return hypotf(z.real, z.imag);
72681           #endif
72682         }
__Pyx_c_pow_float(__pyx_t_float_complex a,__pyx_t_float_complex b)72683         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
72684             __pyx_t_float_complex z;
72685             float r, lnr, theta, z_r, z_theta;
72686             if (b.imag == 0 && b.real == (int)b.real) {
72687                 if (b.real < 0) {
72688                     float denom = a.real * a.real + a.imag * a.imag;
72689                     a.real = a.real / denom;
72690                     a.imag = -a.imag / denom;
72691                     b.real = -b.real;
72692                 }
72693                 switch ((int)b.real) {
72694                     case 0:
72695                         z.real = 1;
72696                         z.imag = 0;
72697                         return z;
72698                     case 1:
72699                         return a;
72700                     case 2:
72701                         return __Pyx_c_prod_float(a, a);
72702                     case 3:
72703                         z = __Pyx_c_prod_float(a, a);
72704                         return __Pyx_c_prod_float(z, a);
72705                     case 4:
72706                         z = __Pyx_c_prod_float(a, a);
72707                         return __Pyx_c_prod_float(z, z);
72708                 }
72709             }
72710             if (a.imag == 0) {
72711                 if (a.real == 0) {
72712                     return a;
72713                 } else if (b.imag == 0) {
72714                     z.real = powf(a.real, b.real);
72715                     z.imag = 0;
72716                     return z;
72717                 } else if (a.real > 0) {
72718                     r = a.real;
72719                     theta = 0;
72720                 } else {
72721                     r = -a.real;
72722                     theta = atan2f(0.0, -1.0);
72723                 }
72724             } else {
72725                 r = __Pyx_c_abs_float(a);
72726                 theta = atan2f(a.imag, a.real);
72727             }
72728             lnr = logf(r);
72729             z_r = expf(lnr * b.real - theta * b.imag);
72730             z_theta = theta * b.real + lnr * b.imag;
72731             z.real = z_r * cosf(z_theta);
72732             z.imag = z_r * sinf(z_theta);
72733             return z;
72734         }
72735     #endif
72736 #endif
72737 
72738 /* FromPy */
__Pyx_PyComplex_As___pyx_t_float_complex(PyObject * o)72739   static __pyx_t_float_complex __Pyx_PyComplex_As___pyx_t_float_complex(PyObject* o) {
72740     Py_complex cval;
72741 #if !CYTHON_COMPILING_IN_PYPY
72742     if (PyComplex_CheckExact(o))
72743         cval = ((PyComplexObject *)o)->cval;
72744     else
72745 #endif
72746         cval = PyComplex_AsCComplex(o);
72747     return __pyx_t_float_complex_from_parts(
72748                (float)cval.real,
72749                (float)cval.imag);
72750 }
72751 
72752 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(PyObject * obj,int writable_flag)72753   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd____pyx_t_double_complex(PyObject *obj, int writable_flag) {
72754     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72755     __Pyx_BufFmt_StackElem stack[1];
72756     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
72757     int retcode;
72758     if (obj == Py_None) {
72759         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72760         return result;
72761     }
72762     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
72763                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
72764                                                  &__Pyx_TypeInfo___pyx_t_double_complex, stack,
72765                                                  &result, obj);
72766     if (unlikely(retcode == -1))
72767         goto __pyx_fail;
72768     return result;
72769 __pyx_fail:
72770     result.memview = NULL;
72771     result.data = NULL;
72772     return result;
72773 }
72774 
72775 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(PyObject * obj,int writable_flag)72776   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd_d____pyx_t_double_complex(PyObject *obj, int writable_flag) {
72777     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72778     __Pyx_BufFmt_StackElem stack[1];
72779     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
72780     int retcode;
72781     if (obj == Py_None) {
72782         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72783         return result;
72784     }
72785     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
72786                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 3,
72787                                                  &__Pyx_TypeInfo___pyx_t_double_complex, stack,
72788                                                  &result, obj);
72789     if (unlikely(retcode == -1))
72790         goto __pyx_fail;
72791     return result;
72792 __pyx_fail:
72793     result.memview = NULL;
72794     result.data = NULL;
72795     return result;
72796 }
72797 
72798 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(PyObject * obj,int writable_flag)72799   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds___pyx_t_double_complex(PyObject *obj, int writable_flag) {
72800     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
72801     __Pyx_BufFmt_StackElem stack[1];
72802     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
72803     int retcode;
72804     if (obj == Py_None) {
72805         result.memview = (struct __pyx_memoryview_obj *) Py_None;
72806         return result;
72807     }
72808     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
72809                                                  PyBUF_RECORDS_RO | writable_flag, 1,
72810                                                  &__Pyx_TypeInfo___pyx_t_double_complex, stack,
72811                                                  &result, obj);
72812     if (unlikely(retcode == -1))
72813         goto __pyx_fail;
72814     return result;
72815 __pyx_fail:
72816     result.memview = NULL;
72817     result.data = NULL;
72818     return result;
72819 }
72820 
72821 /* Declarations */
72822   #if CYTHON_CCOMPLEX
72823   #ifdef __cplusplus
__pyx_t_double_complex_from_parts(double x,double y)72824     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
72825       return ::std::complex< double >(x, y);
72826     }
72827   #else
__pyx_t_double_complex_from_parts(double x,double y)72828     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
72829       return x + y*(__pyx_t_double_complex)_Complex_I;
72830     }
72831   #endif
72832 #else
__pyx_t_double_complex_from_parts(double x,double y)72833     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
72834       __pyx_t_double_complex z;
72835       z.real = x;
72836       z.imag = y;
72837       return z;
72838     }
72839 #endif
72840 
72841 /* Arithmetic */
72842   #if CYTHON_CCOMPLEX
72843 #else
__Pyx_c_eq_double(__pyx_t_double_complex a,__pyx_t_double_complex b)72844     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
72845        return (a.real == b.real) && (a.imag == b.imag);
72846     }
__Pyx_c_sum_double(__pyx_t_double_complex a,__pyx_t_double_complex b)72847     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
72848         __pyx_t_double_complex z;
72849         z.real = a.real + b.real;
72850         z.imag = a.imag + b.imag;
72851         return z;
72852     }
__Pyx_c_diff_double(__pyx_t_double_complex a,__pyx_t_double_complex b)72853     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
72854         __pyx_t_double_complex z;
72855         z.real = a.real - b.real;
72856         z.imag = a.imag - b.imag;
72857         return z;
72858     }
__Pyx_c_prod_double(__pyx_t_double_complex a,__pyx_t_double_complex b)72859     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
72860         __pyx_t_double_complex z;
72861         z.real = a.real * b.real - a.imag * b.imag;
72862         z.imag = a.real * b.imag + a.imag * b.real;
72863         return z;
72864     }
72865     #if 1
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)72866     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
72867         if (b.imag == 0) {
72868             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
72869         } else if (fabs(b.real) >= fabs(b.imag)) {
72870             if (b.real == 0 && b.imag == 0) {
72871                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
72872             } else {
72873                 double r = b.imag / b.real;
72874                 double s = (double)(1.0) / (b.real + b.imag * r);
72875                 return __pyx_t_double_complex_from_parts(
72876                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
72877             }
72878         } else {
72879             double r = b.real / b.imag;
72880             double s = (double)(1.0) / (b.imag + b.real * r);
72881             return __pyx_t_double_complex_from_parts(
72882                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
72883         }
72884     }
72885     #else
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)72886     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
72887         if (b.imag == 0) {
72888             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
72889         } else {
72890             double denom = b.real * b.real + b.imag * b.imag;
72891             return __pyx_t_double_complex_from_parts(
72892                 (a.real * b.real + a.imag * b.imag) / denom,
72893                 (a.imag * b.real - a.real * b.imag) / denom);
72894         }
72895     }
72896     #endif
__Pyx_c_neg_double(__pyx_t_double_complex a)72897     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
72898         __pyx_t_double_complex z;
72899         z.real = -a.real;
72900         z.imag = -a.imag;
72901         return z;
72902     }
__Pyx_c_is_zero_double(__pyx_t_double_complex a)72903     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
72904        return (a.real == 0) && (a.imag == 0);
72905     }
__Pyx_c_conj_double(__pyx_t_double_complex a)72906     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
72907         __pyx_t_double_complex z;
72908         z.real =  a.real;
72909         z.imag = -a.imag;
72910         return z;
72911     }
72912     #if 1
__Pyx_c_abs_double(__pyx_t_double_complex z)72913         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
72914           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
72915             return sqrt(z.real*z.real + z.imag*z.imag);
72916           #else
72917             return hypot(z.real, z.imag);
72918           #endif
72919         }
__Pyx_c_pow_double(__pyx_t_double_complex a,__pyx_t_double_complex b)72920         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
72921             __pyx_t_double_complex z;
72922             double r, lnr, theta, z_r, z_theta;
72923             if (b.imag == 0 && b.real == (int)b.real) {
72924                 if (b.real < 0) {
72925                     double denom = a.real * a.real + a.imag * a.imag;
72926                     a.real = a.real / denom;
72927                     a.imag = -a.imag / denom;
72928                     b.real = -b.real;
72929                 }
72930                 switch ((int)b.real) {
72931                     case 0:
72932                         z.real = 1;
72933                         z.imag = 0;
72934                         return z;
72935                     case 1:
72936                         return a;
72937                     case 2:
72938                         return __Pyx_c_prod_double(a, a);
72939                     case 3:
72940                         z = __Pyx_c_prod_double(a, a);
72941                         return __Pyx_c_prod_double(z, a);
72942                     case 4:
72943                         z = __Pyx_c_prod_double(a, a);
72944                         return __Pyx_c_prod_double(z, z);
72945                 }
72946             }
72947             if (a.imag == 0) {
72948                 if (a.real == 0) {
72949                     return a;
72950                 } else if (b.imag == 0) {
72951                     z.real = pow(a.real, b.real);
72952                     z.imag = 0;
72953                     return z;
72954                 } else if (a.real > 0) {
72955                     r = a.real;
72956                     theta = 0;
72957                 } else {
72958                     r = -a.real;
72959                     theta = atan2(0.0, -1.0);
72960                 }
72961             } else {
72962                 r = __Pyx_c_abs_double(a);
72963                 theta = atan2(a.imag, a.real);
72964             }
72965             lnr = log(r);
72966             z_r = exp(lnr * b.real - theta * b.imag);
72967             z_theta = theta * b.real + lnr * b.imag;
72968             z.real = z_r * cos(z_theta);
72969             z.imag = z_r * sin(z_theta);
72970             return z;
72971         }
72972     #endif
72973 #endif
72974 
72975 /* FromPy */
__Pyx_PyComplex_As___pyx_t_double_complex(PyObject * o)72976   static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject* o) {
72977     Py_complex cval;
72978 #if !CYTHON_COMPILING_IN_PYPY
72979     if (PyComplex_CheckExact(o))
72980         cval = ((PyComplexObject *)o)->cval;
72981     else
72982 #endif
72983         cval = PyComplex_AsCComplex(o);
72984     return __pyx_t_double_complex_from_parts(
72985                (double)cval.real,
72986                (double)cval.imag);
72987 }
72988 
72989 /* MemviewDtypeToObject */
__pyx_memview_get_nn___pyx_t_5numpy_float32_t(const char * itemp)72990   static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_float32_t(const char *itemp) {
72991     return (PyObject *) PyFloat_FromDouble(*(__pyx_t_5numpy_float32_t *) itemp);
72992 }
__pyx_memview_set_nn___pyx_t_5numpy_float32_t(const char * itemp,PyObject * obj)72993 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_float32_t(const char *itemp, PyObject *obj) {
72994     __pyx_t_5numpy_float32_t value = __pyx_PyFloat_AsFloat(obj);
72995     if ((value == ((npy_float32)-1)) && PyErr_Occurred())
72996         return 0;
72997     *(__pyx_t_5numpy_float32_t *) itemp = value;
72998     return 1;
72999 }
73000 
73001 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_dcd__int(PyObject * obj,int writable_flag)73002   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dcd__int(PyObject *obj, int writable_flag) {
73003     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
73004     __Pyx_BufFmt_StackElem stack[1];
73005     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW) };
73006     int retcode;
73007     if (obj == Py_None) {
73008         result.memview = (struct __pyx_memoryview_obj *) Py_None;
73009         return result;
73010     }
73011     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_F_CONTIG,
73012                                                  (PyBUF_F_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
73013                                                  &__Pyx_TypeInfo_int, stack,
73014                                                  &result, obj);
73015     if (unlikely(retcode == -1))
73016         goto __pyx_fail;
73017     return result;
73018 __pyx_fail:
73019     result.memview = NULL;
73020     result.data = NULL;
73021     return result;
73022 }
73023 
73024 /* MemviewDtypeToObject */
__pyx_memview_get_int(const char * itemp)73025   static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp) {
73026     return (PyObject *) __Pyx_PyInt_From_int(*(int *) itemp);
73027 }
__pyx_memview_set_int(const char * itemp,PyObject * obj)73028 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj) {
73029     int value = __Pyx_PyInt_As_int(obj);
73030     if ((value == (int)-1) && PyErr_Occurred())
73031         return 0;
73032     *(int *) itemp = value;
73033     return 1;
73034 }
73035 
73036 /* ObjectToMemviewSlice */
__Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject * obj,int writable_flag)73037   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *obj, int writable_flag) {
73038     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
73039     __Pyx_BufFmt_StackElem stack[1];
73040     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
73041     int retcode;
73042     if (obj == Py_None) {
73043         result.memview = (struct __pyx_memoryview_obj *) Py_None;
73044         return result;
73045     }
73046     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
73047                                                  PyBUF_RECORDS_RO | writable_flag, 1,
73048                                                  &__Pyx_TypeInfo_int, stack,
73049                                                  &result, obj);
73050     if (unlikely(retcode == -1))
73051         goto __pyx_fail;
73052     return result;
73053 __pyx_fail:
73054     result.memview = NULL;
73055     result.data = NULL;
73056     return result;
73057 }
73058 
73059 /* None */
__Pyx_pow_long(long b,long e)73060   static CYTHON_INLINE long __Pyx_pow_long(long b, long e) {
73061     long t = b;
73062     switch (e) {
73063         case 3:
73064             t *= b;
73065         CYTHON_FALLTHROUGH;
73066         case 2:
73067             t *= b;
73068         CYTHON_FALLTHROUGH;
73069         case 1:
73070             return t;
73071         case 0:
73072             return 1;
73073     }
73074     #if 1
73075     if (unlikely(e<0)) return 0;
73076     #endif
73077     t = 1;
73078     while (likely(e)) {
73079         t *= (b * (e&1)) | ((~e)&1);
73080         b *= b;
73081         e >>= 1;
73082     }
73083     return t;
73084 }
73085 
73086 /* MemviewDtypeToObject */
__pyx_memview_get_nn___pyx_t_5numpy_float64_t(const char * itemp)73087   static CYTHON_INLINE PyObject *__pyx_memview_get_nn___pyx_t_5numpy_float64_t(const char *itemp) {
73088     return (PyObject *) PyFloat_FromDouble(*(__pyx_t_5numpy_float64_t *) itemp);
73089 }
__pyx_memview_set_nn___pyx_t_5numpy_float64_t(const char * itemp,PyObject * obj)73090 static CYTHON_INLINE int __pyx_memview_set_nn___pyx_t_5numpy_float64_t(const char *itemp, PyObject *obj) {
73091     __pyx_t_5numpy_float64_t value = __pyx_PyFloat_AsDouble(obj);
73092     if ((value == ((npy_float64)-1)) && PyErr_Occurred())
73093         return 0;
73094     *(__pyx_t_5numpy_float64_t *) itemp = value;
73095     return 1;
73096 }
73097 
73098 /* MemviewDtypeToObject */
__pyx_memview_get___pyx_t_float_complex(const char * itemp)73099   static CYTHON_INLINE PyObject *__pyx_memview_get___pyx_t_float_complex(const char *itemp) {
73100     return (PyObject *) __pyx_PyComplex_FromComplex(*(__pyx_t_float_complex *) itemp);
73101 }
__pyx_memview_set___pyx_t_float_complex(const char * itemp,PyObject * obj)73102 static CYTHON_INLINE int __pyx_memview_set___pyx_t_float_complex(const char *itemp, PyObject *obj) {
73103     __pyx_t_float_complex value = __Pyx_PyComplex_As___pyx_t_float_complex(obj);
73104     if (PyErr_Occurred())
73105         return 0;
73106     *(__pyx_t_float_complex *) itemp = value;
73107     return 1;
73108 }
73109 
73110 /* MemviewDtypeToObject */
__pyx_memview_get___pyx_t_double_complex(const char * itemp)73111   static CYTHON_INLINE PyObject *__pyx_memview_get___pyx_t_double_complex(const char *itemp) {
73112     return (PyObject *) __pyx_PyComplex_FromComplex(*(__pyx_t_double_complex *) itemp);
73113 }
__pyx_memview_set___pyx_t_double_complex(const char * itemp,PyObject * obj)73114 static CYTHON_INLINE int __pyx_memview_set___pyx_t_double_complex(const char *itemp, PyObject *obj) {
73115     __pyx_t_double_complex value = __Pyx_PyComplex_As___pyx_t_double_complex(obj);
73116     if (PyErr_Occurred())
73117         return 0;
73118     *(__pyx_t_double_complex *) itemp = value;
73119     return 1;
73120 }
73121 
73122 /* MemviewSliceCopyTemplate */
73123   static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice * from_mvs,const char * mode,int ndim,size_t sizeof_dtype,int contig_flag,int dtype_is_object)73124 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
73125                                  const char *mode, int ndim,
73126                                  size_t sizeof_dtype, int contig_flag,
73127                                  int dtype_is_object)
73128 {
73129     __Pyx_RefNannyDeclarations
73130     int i;
73131     __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
73132     struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
73133     Py_buffer *buf = &from_memview->view;
73134     PyObject *shape_tuple = NULL;
73135     PyObject *temp_int = NULL;
73136     struct __pyx_array_obj *array_obj = NULL;
73137     struct __pyx_memoryview_obj *memview_obj = NULL;
73138     __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
73139     for (i = 0; i < ndim; i++) {
73140         if (unlikely(from_mvs->suboffsets[i] >= 0)) {
73141             PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
73142                                            "indirect dimensions (axis %d)", i);
73143             goto fail;
73144         }
73145     }
73146     shape_tuple = PyTuple_New(ndim);
73147     if (unlikely(!shape_tuple)) {
73148         goto fail;
73149     }
73150     __Pyx_GOTREF(shape_tuple);
73151     for(i = 0; i < ndim; i++) {
73152         temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
73153         if(unlikely(!temp_int)) {
73154             goto fail;
73155         } else {
73156             PyTuple_SET_ITEM(shape_tuple, i, temp_int);
73157             temp_int = NULL;
73158         }
73159     }
73160     array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
73161     if (unlikely(!array_obj)) {
73162         goto fail;
73163     }
73164     __Pyx_GOTREF(array_obj);
73165     memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
73166                                     (PyObject *) array_obj, contig_flag,
73167                                     dtype_is_object,
73168                                     from_mvs->memview->typeinfo);
73169     if (unlikely(!memview_obj))
73170         goto fail;
73171     if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
73172         goto fail;
73173     if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
73174                                                 dtype_is_object) < 0))
73175         goto fail;
73176     goto no_fail;
73177 fail:
73178     __Pyx_XDECREF(new_mvs.memview);
73179     new_mvs.memview = NULL;
73180     new_mvs.data = NULL;
73181 no_fail:
73182     __Pyx_XDECREF(shape_tuple);
73183     __Pyx_XDECREF(temp_int);
73184     __Pyx_XDECREF(array_obj);
73185     __Pyx_RefNannyFinishContext();
73186     return new_mvs;
73187 }
73188 
73189 /* CIntFromPy */
__Pyx_PyInt_As_unsigned_int(PyObject * x)73190   static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
73191 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73192 #pragma GCC diagnostic push
73193 #pragma GCC diagnostic ignored "-Wconversion"
73194 #endif
73195     const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
73196 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73197 #pragma GCC diagnostic pop
73198 #endif
73199     const int is_unsigned = neg_one > const_zero;
73200 #if PY_MAJOR_VERSION < 3
73201     if (likely(PyInt_Check(x))) {
73202         if (sizeof(unsigned int) < sizeof(long)) {
73203             __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
73204         } else {
73205             long val = PyInt_AS_LONG(x);
73206             if (is_unsigned && unlikely(val < 0)) {
73207                 goto raise_neg_overflow;
73208             }
73209             return (unsigned int) val;
73210         }
73211     } else
73212 #endif
73213     if (likely(PyLong_Check(x))) {
73214         if (is_unsigned) {
73215 #if CYTHON_USE_PYLONG_INTERNALS
73216             const digit* digits = ((PyLongObject*)x)->ob_digit;
73217             switch (Py_SIZE(x)) {
73218                 case  0: return (unsigned int) 0;
73219                 case  1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
73220                 case 2:
73221                     if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
73222                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73223                             __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73224                         } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
73225                             return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
73226                         }
73227                     }
73228                     break;
73229                 case 3:
73230                     if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
73231                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73232                             __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73233                         } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
73234                             return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
73235                         }
73236                     }
73237                     break;
73238                 case 4:
73239                     if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
73240                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73241                             __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73242                         } else if (8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT) {
73243                             return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
73244                         }
73245                     }
73246                     break;
73247             }
73248 #endif
73249 #if CYTHON_COMPILING_IN_CPYTHON
73250             if (unlikely(Py_SIZE(x) < 0)) {
73251                 goto raise_neg_overflow;
73252             }
73253 #else
73254             {
73255                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
73256                 if (unlikely(result < 0))
73257                     return (unsigned int) -1;
73258                 if (unlikely(result == 1))
73259                     goto raise_neg_overflow;
73260             }
73261 #endif
73262             if (sizeof(unsigned int) <= sizeof(unsigned long)) {
73263                 __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
73264 #ifdef HAVE_LONG_LONG
73265             } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
73266                 __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
73267 #endif
73268             }
73269         } else {
73270 #if CYTHON_USE_PYLONG_INTERNALS
73271             const digit* digits = ((PyLongObject*)x)->ob_digit;
73272             switch (Py_SIZE(x)) {
73273                 case  0: return (unsigned int) 0;
73274                 case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
73275                 case  1: __PYX_VERIFY_RETURN_INT(unsigned int,  digit, +digits[0])
73276                 case -2:
73277                     if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
73278                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73279                             __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73280                         } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
73281                             return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
73282                         }
73283                     }
73284                     break;
73285                 case 2:
73286                     if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
73287                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73288                             __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73289                         } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
73290                             return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
73291                         }
73292                     }
73293                     break;
73294                 case -3:
73295                     if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
73296                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73297                             __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73298                         } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
73299                             return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
73300                         }
73301                     }
73302                     break;
73303                 case 3:
73304                     if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
73305                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73306                             __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73307                         } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
73308                             return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
73309                         }
73310                     }
73311                     break;
73312                 case -4:
73313                     if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
73314                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73315                             __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73316                         } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
73317                             return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
73318                         }
73319                     }
73320                     break;
73321                 case 4:
73322                     if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
73323                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73324                             __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73325                         } else if (8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT) {
73326                             return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
73327                         }
73328                     }
73329                     break;
73330             }
73331 #endif
73332             if (sizeof(unsigned int) <= sizeof(long)) {
73333                 __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
73334 #ifdef HAVE_LONG_LONG
73335             } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
73336                 __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
73337 #endif
73338             }
73339         }
73340         {
73341 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
73342             PyErr_SetString(PyExc_RuntimeError,
73343                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
73344 #else
73345             unsigned int val;
73346             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
73347  #if PY_MAJOR_VERSION < 3
73348             if (likely(v) && !PyLong_Check(v)) {
73349                 PyObject *tmp = v;
73350                 v = PyNumber_Long(tmp);
73351                 Py_DECREF(tmp);
73352             }
73353  #endif
73354             if (likely(v)) {
73355                 int one = 1; int is_little = (int)*(unsigned char *)&one;
73356                 unsigned char *bytes = (unsigned char *)&val;
73357                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
73358                                               bytes, sizeof(val),
73359                                               is_little, !is_unsigned);
73360                 Py_DECREF(v);
73361                 if (likely(!ret))
73362                     return val;
73363             }
73364 #endif
73365             return (unsigned int) -1;
73366         }
73367     } else {
73368         unsigned int val;
73369         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
73370         if (!tmp) return (unsigned int) -1;
73371         val = __Pyx_PyInt_As_unsigned_int(tmp);
73372         Py_DECREF(tmp);
73373         return val;
73374     }
73375 raise_overflow:
73376     PyErr_SetString(PyExc_OverflowError,
73377         "value too large to convert to unsigned int");
73378     return (unsigned int) -1;
73379 raise_neg_overflow:
73380     PyErr_SetString(PyExc_OverflowError,
73381         "can't convert negative value to unsigned int");
73382     return (unsigned int) -1;
73383 }
73384 
73385 /* CIntToPy */
__Pyx_PyInt_From_int(int value)73386   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
73387 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73388 #pragma GCC diagnostic push
73389 #pragma GCC diagnostic ignored "-Wconversion"
73390 #endif
73391     const int neg_one = (int) -1, const_zero = (int) 0;
73392 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73393 #pragma GCC diagnostic pop
73394 #endif
73395     const int is_unsigned = neg_one > const_zero;
73396     if (is_unsigned) {
73397         if (sizeof(int) < sizeof(long)) {
73398             return PyInt_FromLong((long) value);
73399         } else if (sizeof(int) <= sizeof(unsigned long)) {
73400             return PyLong_FromUnsignedLong((unsigned long) value);
73401 #ifdef HAVE_LONG_LONG
73402         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
73403             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
73404 #endif
73405         }
73406     } else {
73407         if (sizeof(int) <= sizeof(long)) {
73408             return PyInt_FromLong((long) value);
73409 #ifdef HAVE_LONG_LONG
73410         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
73411             return PyLong_FromLongLong((PY_LONG_LONG) value);
73412 #endif
73413         }
73414     }
73415     {
73416         int one = 1; int little = (int)*(unsigned char *)&one;
73417         unsigned char *bytes = (unsigned char *)&value;
73418         return _PyLong_FromByteArray(bytes, sizeof(int),
73419                                      little, !is_unsigned);
73420     }
73421 }
73422 
73423 /* CIntFromPy */
__Pyx_PyInt_As_int(PyObject * x)73424   static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
73425 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73426 #pragma GCC diagnostic push
73427 #pragma GCC diagnostic ignored "-Wconversion"
73428 #endif
73429     const int neg_one = (int) -1, const_zero = (int) 0;
73430 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73431 #pragma GCC diagnostic pop
73432 #endif
73433     const int is_unsigned = neg_one > const_zero;
73434 #if PY_MAJOR_VERSION < 3
73435     if (likely(PyInt_Check(x))) {
73436         if (sizeof(int) < sizeof(long)) {
73437             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
73438         } else {
73439             long val = PyInt_AS_LONG(x);
73440             if (is_unsigned && unlikely(val < 0)) {
73441                 goto raise_neg_overflow;
73442             }
73443             return (int) val;
73444         }
73445     } else
73446 #endif
73447     if (likely(PyLong_Check(x))) {
73448         if (is_unsigned) {
73449 #if CYTHON_USE_PYLONG_INTERNALS
73450             const digit* digits = ((PyLongObject*)x)->ob_digit;
73451             switch (Py_SIZE(x)) {
73452                 case  0: return (int) 0;
73453                 case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
73454                 case 2:
73455                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
73456                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73457                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73458                         } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
73459                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
73460                         }
73461                     }
73462                     break;
73463                 case 3:
73464                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
73465                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73466                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73467                         } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
73468                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
73469                         }
73470                     }
73471                     break;
73472                 case 4:
73473                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
73474                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73475                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73476                         } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
73477                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
73478                         }
73479                     }
73480                     break;
73481             }
73482 #endif
73483 #if CYTHON_COMPILING_IN_CPYTHON
73484             if (unlikely(Py_SIZE(x) < 0)) {
73485                 goto raise_neg_overflow;
73486             }
73487 #else
73488             {
73489                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
73490                 if (unlikely(result < 0))
73491                     return (int) -1;
73492                 if (unlikely(result == 1))
73493                     goto raise_neg_overflow;
73494             }
73495 #endif
73496             if (sizeof(int) <= sizeof(unsigned long)) {
73497                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
73498 #ifdef HAVE_LONG_LONG
73499             } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
73500                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
73501 #endif
73502             }
73503         } else {
73504 #if CYTHON_USE_PYLONG_INTERNALS
73505             const digit* digits = ((PyLongObject*)x)->ob_digit;
73506             switch (Py_SIZE(x)) {
73507                 case  0: return (int) 0;
73508                 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
73509                 case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
73510                 case -2:
73511                     if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
73512                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73513                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73514                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
73515                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
73516                         }
73517                     }
73518                     break;
73519                 case 2:
73520                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
73521                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73522                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73523                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
73524                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
73525                         }
73526                     }
73527                     break;
73528                 case -3:
73529                     if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
73530                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73531                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73532                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
73533                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
73534                         }
73535                     }
73536                     break;
73537                 case 3:
73538                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
73539                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73540                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73541                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
73542                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
73543                         }
73544                     }
73545                     break;
73546                 case -4:
73547                     if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
73548                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73549                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73550                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
73551                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
73552                         }
73553                     }
73554                     break;
73555                 case 4:
73556                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
73557                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73558                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73559                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
73560                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
73561                         }
73562                     }
73563                     break;
73564             }
73565 #endif
73566             if (sizeof(int) <= sizeof(long)) {
73567                 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
73568 #ifdef HAVE_LONG_LONG
73569             } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
73570                 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
73571 #endif
73572             }
73573         }
73574         {
73575 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
73576             PyErr_SetString(PyExc_RuntimeError,
73577                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
73578 #else
73579             int val;
73580             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
73581  #if PY_MAJOR_VERSION < 3
73582             if (likely(v) && !PyLong_Check(v)) {
73583                 PyObject *tmp = v;
73584                 v = PyNumber_Long(tmp);
73585                 Py_DECREF(tmp);
73586             }
73587  #endif
73588             if (likely(v)) {
73589                 int one = 1; int is_little = (int)*(unsigned char *)&one;
73590                 unsigned char *bytes = (unsigned char *)&val;
73591                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
73592                                               bytes, sizeof(val),
73593                                               is_little, !is_unsigned);
73594                 Py_DECREF(v);
73595                 if (likely(!ret))
73596                     return val;
73597             }
73598 #endif
73599             return (int) -1;
73600         }
73601     } else {
73602         int val;
73603         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
73604         if (!tmp) return (int) -1;
73605         val = __Pyx_PyInt_As_int(tmp);
73606         Py_DECREF(tmp);
73607         return val;
73608     }
73609 raise_overflow:
73610     PyErr_SetString(PyExc_OverflowError,
73611         "value too large to convert to int");
73612     return (int) -1;
73613 raise_neg_overflow:
73614     PyErr_SetString(PyExc_OverflowError,
73615         "can't convert negative value to int");
73616     return (int) -1;
73617 }
73618 
73619 /* CIntToPy */
__Pyx_PyInt_From_long(long value)73620   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
73621 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73622 #pragma GCC diagnostic push
73623 #pragma GCC diagnostic ignored "-Wconversion"
73624 #endif
73625     const long neg_one = (long) -1, const_zero = (long) 0;
73626 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73627 #pragma GCC diagnostic pop
73628 #endif
73629     const int is_unsigned = neg_one > const_zero;
73630     if (is_unsigned) {
73631         if (sizeof(long) < sizeof(long)) {
73632             return PyInt_FromLong((long) value);
73633         } else if (sizeof(long) <= sizeof(unsigned long)) {
73634             return PyLong_FromUnsignedLong((unsigned long) value);
73635 #ifdef HAVE_LONG_LONG
73636         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
73637             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
73638 #endif
73639         }
73640     } else {
73641         if (sizeof(long) <= sizeof(long)) {
73642             return PyInt_FromLong((long) value);
73643 #ifdef HAVE_LONG_LONG
73644         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
73645             return PyLong_FromLongLong((PY_LONG_LONG) value);
73646 #endif
73647         }
73648     }
73649     {
73650         int one = 1; int little = (int)*(unsigned char *)&one;
73651         unsigned char *bytes = (unsigned char *)&value;
73652         return _PyLong_FromByteArray(bytes, sizeof(long),
73653                                      little, !is_unsigned);
73654     }
73655 }
73656 
73657 /* CIntToPy */
__Pyx_PyInt_From_unsigned_int(unsigned int value)73658   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
73659 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73660 #pragma GCC diagnostic push
73661 #pragma GCC diagnostic ignored "-Wconversion"
73662 #endif
73663     const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
73664 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73665 #pragma GCC diagnostic pop
73666 #endif
73667     const int is_unsigned = neg_one > const_zero;
73668     if (is_unsigned) {
73669         if (sizeof(unsigned int) < sizeof(long)) {
73670             return PyInt_FromLong((long) value);
73671         } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
73672             return PyLong_FromUnsignedLong((unsigned long) value);
73673 #ifdef HAVE_LONG_LONG
73674         } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
73675             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
73676 #endif
73677         }
73678     } else {
73679         if (sizeof(unsigned int) <= sizeof(long)) {
73680             return PyInt_FromLong((long) value);
73681 #ifdef HAVE_LONG_LONG
73682         } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
73683             return PyLong_FromLongLong((PY_LONG_LONG) value);
73684 #endif
73685         }
73686     }
73687     {
73688         int one = 1; int little = (int)*(unsigned char *)&one;
73689         unsigned char *bytes = (unsigned char *)&value;
73690         return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
73691                                      little, !is_unsigned);
73692     }
73693 }
73694 
73695 /* CIntFromPy */
__Pyx_PyInt_As_long(PyObject * x)73696   static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
73697 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73698 #pragma GCC diagnostic push
73699 #pragma GCC diagnostic ignored "-Wconversion"
73700 #endif
73701     const long neg_one = (long) -1, const_zero = (long) 0;
73702 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73703 #pragma GCC diagnostic pop
73704 #endif
73705     const int is_unsigned = neg_one > const_zero;
73706 #if PY_MAJOR_VERSION < 3
73707     if (likely(PyInt_Check(x))) {
73708         if (sizeof(long) < sizeof(long)) {
73709             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
73710         } else {
73711             long val = PyInt_AS_LONG(x);
73712             if (is_unsigned && unlikely(val < 0)) {
73713                 goto raise_neg_overflow;
73714             }
73715             return (long) val;
73716         }
73717     } else
73718 #endif
73719     if (likely(PyLong_Check(x))) {
73720         if (is_unsigned) {
73721 #if CYTHON_USE_PYLONG_INTERNALS
73722             const digit* digits = ((PyLongObject*)x)->ob_digit;
73723             switch (Py_SIZE(x)) {
73724                 case  0: return (long) 0;
73725                 case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
73726                 case 2:
73727                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
73728                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73729                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73730                         } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
73731                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
73732                         }
73733                     }
73734                     break;
73735                 case 3:
73736                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
73737                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73738                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73739                         } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
73740                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
73741                         }
73742                     }
73743                     break;
73744                 case 4:
73745                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
73746                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73747                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73748                         } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
73749                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
73750                         }
73751                     }
73752                     break;
73753             }
73754 #endif
73755 #if CYTHON_COMPILING_IN_CPYTHON
73756             if (unlikely(Py_SIZE(x) < 0)) {
73757                 goto raise_neg_overflow;
73758             }
73759 #else
73760             {
73761                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
73762                 if (unlikely(result < 0))
73763                     return (long) -1;
73764                 if (unlikely(result == 1))
73765                     goto raise_neg_overflow;
73766             }
73767 #endif
73768             if (sizeof(long) <= sizeof(unsigned long)) {
73769                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
73770 #ifdef HAVE_LONG_LONG
73771             } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
73772                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
73773 #endif
73774             }
73775         } else {
73776 #if CYTHON_USE_PYLONG_INTERNALS
73777             const digit* digits = ((PyLongObject*)x)->ob_digit;
73778             switch (Py_SIZE(x)) {
73779                 case  0: return (long) 0;
73780                 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
73781                 case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
73782                 case -2:
73783                     if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
73784                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73785                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73786                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
73787                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
73788                         }
73789                     }
73790                     break;
73791                 case 2:
73792                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
73793                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73794                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73795                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
73796                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
73797                         }
73798                     }
73799                     break;
73800                 case -3:
73801                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
73802                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73803                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73804                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
73805                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
73806                         }
73807                     }
73808                     break;
73809                 case 3:
73810                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
73811                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73812                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73813                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
73814                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
73815                         }
73816                     }
73817                     break;
73818                 case -4:
73819                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
73820                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73821                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73822                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
73823                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
73824                         }
73825                     }
73826                     break;
73827                 case 4:
73828                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
73829                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73830                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73831                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
73832                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
73833                         }
73834                     }
73835                     break;
73836             }
73837 #endif
73838             if (sizeof(long) <= sizeof(long)) {
73839                 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
73840 #ifdef HAVE_LONG_LONG
73841             } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
73842                 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
73843 #endif
73844             }
73845         }
73846         {
73847 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
73848             PyErr_SetString(PyExc_RuntimeError,
73849                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
73850 #else
73851             long val;
73852             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
73853  #if PY_MAJOR_VERSION < 3
73854             if (likely(v) && !PyLong_Check(v)) {
73855                 PyObject *tmp = v;
73856                 v = PyNumber_Long(tmp);
73857                 Py_DECREF(tmp);
73858             }
73859  #endif
73860             if (likely(v)) {
73861                 int one = 1; int is_little = (int)*(unsigned char *)&one;
73862                 unsigned char *bytes = (unsigned char *)&val;
73863                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
73864                                               bytes, sizeof(val),
73865                                               is_little, !is_unsigned);
73866                 Py_DECREF(v);
73867                 if (likely(!ret))
73868                     return val;
73869             }
73870 #endif
73871             return (long) -1;
73872         }
73873     } else {
73874         long val;
73875         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
73876         if (!tmp) return (long) -1;
73877         val = __Pyx_PyInt_As_long(tmp);
73878         Py_DECREF(tmp);
73879         return val;
73880     }
73881 raise_overflow:
73882     PyErr_SetString(PyExc_OverflowError,
73883         "value too large to convert to long");
73884     return (long) -1;
73885 raise_neg_overflow:
73886     PyErr_SetString(PyExc_OverflowError,
73887         "can't convert negative value to long");
73888     return (long) -1;
73889 }
73890 
73891 /* CIntFromPy */
__Pyx_PyInt_As_char(PyObject * x)73892   static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
73893 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73894 #pragma GCC diagnostic push
73895 #pragma GCC diagnostic ignored "-Wconversion"
73896 #endif
73897     const char neg_one = (char) -1, const_zero = (char) 0;
73898 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
73899 #pragma GCC diagnostic pop
73900 #endif
73901     const int is_unsigned = neg_one > const_zero;
73902 #if PY_MAJOR_VERSION < 3
73903     if (likely(PyInt_Check(x))) {
73904         if (sizeof(char) < sizeof(long)) {
73905             __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
73906         } else {
73907             long val = PyInt_AS_LONG(x);
73908             if (is_unsigned && unlikely(val < 0)) {
73909                 goto raise_neg_overflow;
73910             }
73911             return (char) val;
73912         }
73913     } else
73914 #endif
73915     if (likely(PyLong_Check(x))) {
73916         if (is_unsigned) {
73917 #if CYTHON_USE_PYLONG_INTERNALS
73918             const digit* digits = ((PyLongObject*)x)->ob_digit;
73919             switch (Py_SIZE(x)) {
73920                 case  0: return (char) 0;
73921                 case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
73922                 case 2:
73923                     if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
73924                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73925                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73926                         } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
73927                             return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
73928                         }
73929                     }
73930                     break;
73931                 case 3:
73932                     if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
73933                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73934                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73935                         } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
73936                             return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
73937                         }
73938                     }
73939                     break;
73940                 case 4:
73941                     if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
73942                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
73943                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73944                         } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
73945                             return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
73946                         }
73947                     }
73948                     break;
73949             }
73950 #endif
73951 #if CYTHON_COMPILING_IN_CPYTHON
73952             if (unlikely(Py_SIZE(x) < 0)) {
73953                 goto raise_neg_overflow;
73954             }
73955 #else
73956             {
73957                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
73958                 if (unlikely(result < 0))
73959                     return (char) -1;
73960                 if (unlikely(result == 1))
73961                     goto raise_neg_overflow;
73962             }
73963 #endif
73964             if (sizeof(char) <= sizeof(unsigned long)) {
73965                 __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
73966 #ifdef HAVE_LONG_LONG
73967             } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
73968                 __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
73969 #endif
73970             }
73971         } else {
73972 #if CYTHON_USE_PYLONG_INTERNALS
73973             const digit* digits = ((PyLongObject*)x)->ob_digit;
73974             switch (Py_SIZE(x)) {
73975                 case  0: return (char) 0;
73976                 case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
73977                 case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
73978                 case -2:
73979                     if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
73980                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73981                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73982                         } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
73983                             return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
73984                         }
73985                     }
73986                     break;
73987                 case 2:
73988                     if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
73989                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
73990                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
73991                         } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
73992                             return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
73993                         }
73994                     }
73995                     break;
73996                 case -3:
73997                     if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
73998                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
73999                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
74000                         } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
74001                             return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
74002                         }
74003                     }
74004                     break;
74005                 case 3:
74006                     if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
74007                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
74008                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
74009                         } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
74010                             return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
74011                         }
74012                     }
74013                     break;
74014                 case -4:
74015                     if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
74016                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
74017                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
74018                         } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
74019                             return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
74020                         }
74021                     }
74022                     break;
74023                 case 4:
74024                     if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
74025                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
74026                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
74027                         } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
74028                             return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
74029                         }
74030                     }
74031                     break;
74032             }
74033 #endif
74034             if (sizeof(char) <= sizeof(long)) {
74035                 __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
74036 #ifdef HAVE_LONG_LONG
74037             } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
74038                 __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
74039 #endif
74040             }
74041         }
74042         {
74043 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
74044             PyErr_SetString(PyExc_RuntimeError,
74045                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
74046 #else
74047             char val;
74048             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
74049  #if PY_MAJOR_VERSION < 3
74050             if (likely(v) && !PyLong_Check(v)) {
74051                 PyObject *tmp = v;
74052                 v = PyNumber_Long(tmp);
74053                 Py_DECREF(tmp);
74054             }
74055  #endif
74056             if (likely(v)) {
74057                 int one = 1; int is_little = (int)*(unsigned char *)&one;
74058                 unsigned char *bytes = (unsigned char *)&val;
74059                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
74060                                               bytes, sizeof(val),
74061                                               is_little, !is_unsigned);
74062                 Py_DECREF(v);
74063                 if (likely(!ret))
74064                     return val;
74065             }
74066 #endif
74067             return (char) -1;
74068         }
74069     } else {
74070         char val;
74071         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
74072         if (!tmp) return (char) -1;
74073         val = __Pyx_PyInt_As_char(tmp);
74074         Py_DECREF(tmp);
74075         return val;
74076     }
74077 raise_overflow:
74078     PyErr_SetString(PyExc_OverflowError,
74079         "value too large to convert to char");
74080     return (char) -1;
74081 raise_neg_overflow:
74082     PyErr_SetString(PyExc_OverflowError,
74083         "can't convert negative value to char");
74084     return (char) -1;
74085 }
74086 
74087 /* CheckBinaryVersion */
__Pyx_check_binary_version(void)74088   static int __Pyx_check_binary_version(void) {
74089     char ctversion[4], rtversion[4];
74090     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
74091     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
74092     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
74093         char message[200];
74094         PyOS_snprintf(message, sizeof(message),
74095                       "compiletime version %s of module '%.100s' "
74096                       "does not match runtime version %s",
74097                       ctversion, __Pyx_MODULE_NAME, rtversion);
74098         return PyErr_WarnEx(NULL, message, 1);
74099     }
74100     return 0;
74101 }
74102 
74103 /* FunctionExport */
__Pyx_ExportFunction(const char * name,void (* f)(void),const char * sig)74104   static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
74105     PyObject *d = 0;
74106     PyObject *cobj = 0;
74107     union {
74108         void (*fp)(void);
74109         void *p;
74110     } tmp;
74111     d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
74112     if (!d) {
74113         PyErr_Clear();
74114         d = PyDict_New();
74115         if (!d)
74116             goto bad;
74117         Py_INCREF(d);
74118         if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
74119             goto bad;
74120     }
74121     tmp.fp = f;
74122 #if PY_VERSION_HEX >= 0x02070000
74123     cobj = PyCapsule_New(tmp.p, sig, 0);
74124 #else
74125     cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
74126 #endif
74127     if (!cobj)
74128         goto bad;
74129     if (PyDict_SetItemString(d, name, cobj) < 0)
74130         goto bad;
74131     Py_DECREF(cobj);
74132     Py_DECREF(d);
74133     return 0;
74134 bad:
74135     Py_XDECREF(cobj);
74136     Py_XDECREF(d);
74137     return -1;
74138 }
74139 
74140 /* FunctionImport */
74141   #ifndef __PYX_HAVE_RT_ImportFunction
74142 #define __PYX_HAVE_RT_ImportFunction
__Pyx_ImportFunction(PyObject * module,const char * funcname,void (** f)(void),const char * sig)74143 static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
74144     PyObject *d = 0;
74145     PyObject *cobj = 0;
74146     union {
74147         void (*fp)(void);
74148         void *p;
74149     } tmp;
74150     d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
74151     if (!d)
74152         goto bad;
74153     cobj = PyDict_GetItemString(d, funcname);
74154     if (!cobj) {
74155         PyErr_Format(PyExc_ImportError,
74156             "%.200s does not export expected C function %.200s",
74157                 PyModule_GetName(module), funcname);
74158         goto bad;
74159     }
74160 #if PY_VERSION_HEX >= 0x02070000
74161     if (!PyCapsule_IsValid(cobj, sig)) {
74162         PyErr_Format(PyExc_TypeError,
74163             "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
74164              PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
74165         goto bad;
74166     }
74167     tmp.p = PyCapsule_GetPointer(cobj, sig);
74168 #else
74169     {const char *desc, *s1, *s2;
74170     desc = (const char *)PyCObject_GetDesc(cobj);
74171     if (!desc)
74172         goto bad;
74173     s1 = desc; s2 = sig;
74174     while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
74175     if (*s1 != *s2) {
74176         PyErr_Format(PyExc_TypeError,
74177             "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
74178              PyModule_GetName(module), funcname, sig, desc);
74179         goto bad;
74180     }
74181     tmp.p = PyCObject_AsVoidPtr(cobj);}
74182 #endif
74183     *f = tmp.fp;
74184     if (!(*f))
74185         goto bad;
74186     Py_DECREF(d);
74187     return 0;
74188 bad:
74189     Py_XDECREF(d);
74190     return -1;
74191 }
74192 #endif
74193 
74194 /* InitStrings */
__Pyx_InitStrings(__Pyx_StringTabEntry * t)74195   static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
74196     while (t->p) {
74197         #if PY_MAJOR_VERSION < 3
74198         if (t->is_unicode) {
74199             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
74200         } else if (t->intern) {
74201             *t->p = PyString_InternFromString(t->s);
74202         } else {
74203             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
74204         }
74205         #else
74206         if (t->is_unicode | t->is_str) {
74207             if (t->intern) {
74208                 *t->p = PyUnicode_InternFromString(t->s);
74209             } else if (t->encoding) {
74210                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
74211             } else {
74212                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
74213             }
74214         } else {
74215             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
74216         }
74217         #endif
74218         if (!*t->p)
74219             return -1;
74220         if (PyObject_Hash(*t->p) == -1)
74221             return -1;
74222         ++t;
74223     }
74224     return 0;
74225 }
74226 
__Pyx_PyUnicode_FromString(const char * c_str)74227 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
74228     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
74229 }
__Pyx_PyObject_AsString(PyObject * o)74230 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
74231     Py_ssize_t ignore;
74232     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
74233 }
74234 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
74235 #if !CYTHON_PEP393_ENABLED
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)74236 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
74237     char* defenc_c;
74238     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
74239     if (!defenc) return NULL;
74240     defenc_c = PyBytes_AS_STRING(defenc);
74241 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
74242     {
74243         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
74244         char* c;
74245         for (c = defenc_c; c < end; c++) {
74246             if ((unsigned char) (*c) >= 128) {
74247                 PyUnicode_AsASCIIString(o);
74248                 return NULL;
74249             }
74250         }
74251     }
74252 #endif
74253     *length = PyBytes_GET_SIZE(defenc);
74254     return defenc_c;
74255 }
74256 #else
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)74257 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
74258     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
74259 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
74260     if (likely(PyUnicode_IS_ASCII(o))) {
74261         *length = PyUnicode_GET_LENGTH(o);
74262         return PyUnicode_AsUTF8(o);
74263     } else {
74264         PyUnicode_AsASCIIString(o);
74265         return NULL;
74266     }
74267 #else
74268     return PyUnicode_AsUTF8AndSize(o, length);
74269 #endif
74270 }
74271 #endif
74272 #endif
__Pyx_PyObject_AsStringAndSize(PyObject * o,Py_ssize_t * length)74273 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
74274 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
74275     if (
74276 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
74277             __Pyx_sys_getdefaultencoding_not_ascii &&
74278 #endif
74279             PyUnicode_Check(o)) {
74280         return __Pyx_PyUnicode_AsStringAndSize(o, length);
74281     } else
74282 #endif
74283 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
74284     if (PyByteArray_Check(o)) {
74285         *length = PyByteArray_GET_SIZE(o);
74286         return PyByteArray_AS_STRING(o);
74287     } else
74288 #endif
74289     {
74290         char* result;
74291         int r = PyBytes_AsStringAndSize(o, &result, length);
74292         if (unlikely(r < 0)) {
74293             return NULL;
74294         } else {
74295             return result;
74296         }
74297     }
74298 }
__Pyx_PyObject_IsTrue(PyObject * x)74299 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
74300    int is_true = x == Py_True;
74301    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
74302    else return PyObject_IsTrue(x);
74303 }
__Pyx_PyObject_IsTrueAndDecref(PyObject * x)74304 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
74305     int retval;
74306     if (unlikely(!x)) return -1;
74307     retval = __Pyx_PyObject_IsTrue(x);
74308     Py_DECREF(x);
74309     return retval;
74310 }
__Pyx_PyNumber_IntOrLongWrongResultType(PyObject * result,const char * type_name)74311 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
74312 #if PY_MAJOR_VERSION >= 3
74313     if (PyLong_Check(result)) {
74314         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
74315                 "__int__ returned non-int (type %.200s).  "
74316                 "The ability to return an instance of a strict subclass of int "
74317                 "is deprecated, and may be removed in a future version of Python.",
74318                 Py_TYPE(result)->tp_name)) {
74319             Py_DECREF(result);
74320             return NULL;
74321         }
74322         return result;
74323     }
74324 #endif
74325     PyErr_Format(PyExc_TypeError,
74326                  "__%.4s__ returned non-%.4s (type %.200s)",
74327                  type_name, type_name, Py_TYPE(result)->tp_name);
74328     Py_DECREF(result);
74329     return NULL;
74330 }
__Pyx_PyNumber_IntOrLong(PyObject * x)74331 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
74332 #if CYTHON_USE_TYPE_SLOTS
74333   PyNumberMethods *m;
74334 #endif
74335   const char *name = NULL;
74336   PyObject *res = NULL;
74337 #if PY_MAJOR_VERSION < 3
74338   if (likely(PyInt_Check(x) || PyLong_Check(x)))
74339 #else
74340   if (likely(PyLong_Check(x)))
74341 #endif
74342     return __Pyx_NewRef(x);
74343 #if CYTHON_USE_TYPE_SLOTS
74344   m = Py_TYPE(x)->tp_as_number;
74345   #if PY_MAJOR_VERSION < 3
74346   if (m && m->nb_int) {
74347     name = "int";
74348     res = m->nb_int(x);
74349   }
74350   else if (m && m->nb_long) {
74351     name = "long";
74352     res = m->nb_long(x);
74353   }
74354   #else
74355   if (likely(m && m->nb_int)) {
74356     name = "int";
74357     res = m->nb_int(x);
74358   }
74359   #endif
74360 #else
74361   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
74362     res = PyNumber_Int(x);
74363   }
74364 #endif
74365   if (likely(res)) {
74366 #if PY_MAJOR_VERSION < 3
74367     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
74368 #else
74369     if (unlikely(!PyLong_CheckExact(res))) {
74370 #endif
74371         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
74372     }
74373   }
74374   else if (!PyErr_Occurred()) {
74375     PyErr_SetString(PyExc_TypeError,
74376                     "an integer is required");
74377   }
74378   return res;
74379 }
74380 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
74381   Py_ssize_t ival;
74382   PyObject *x;
74383 #if PY_MAJOR_VERSION < 3
74384   if (likely(PyInt_CheckExact(b))) {
74385     if (sizeof(Py_ssize_t) >= sizeof(long))
74386         return PyInt_AS_LONG(b);
74387     else
74388         return PyInt_AsSsize_t(b);
74389   }
74390 #endif
74391   if (likely(PyLong_CheckExact(b))) {
74392     #if CYTHON_USE_PYLONG_INTERNALS
74393     const digit* digits = ((PyLongObject*)b)->ob_digit;
74394     const Py_ssize_t size = Py_SIZE(b);
74395     if (likely(__Pyx_sst_abs(size) <= 1)) {
74396         ival = likely(size) ? digits[0] : 0;
74397         if (size == -1) ival = -ival;
74398         return ival;
74399     } else {
74400       switch (size) {
74401          case 2:
74402            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
74403              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
74404            }
74405            break;
74406          case -2:
74407            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
74408              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
74409            }
74410            break;
74411          case 3:
74412            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
74413              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
74414            }
74415            break;
74416          case -3:
74417            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
74418              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
74419            }
74420            break;
74421          case 4:
74422            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
74423              return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
74424            }
74425            break;
74426          case -4:
74427            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
74428              return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
74429            }
74430            break;
74431       }
74432     }
74433     #endif
74434     return PyLong_AsSsize_t(b);
74435   }
74436   x = PyNumber_Index(b);
74437   if (!x) return -1;
74438   ival = PyInt_AsSsize_t(x);
74439   Py_DECREF(x);
74440   return ival;
74441 }
74442 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
74443   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
74444 }
74445 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
74446     return PyInt_FromSize_t(ival);
74447 }
74448 
74449 
74450 #endif /* Py_PYTHON_H */
74451