Cython: adjustment.pyx

Generated by Cython 3.1.8

Yellow lines hint at Python interaction.
Click on a line that starts with a "`+`" to see the C code that Cython generated for it.

Raw output: adjustment.c

    +0001: # cython: embedsignature=True

      __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_get_adjustment_locs_line_222, __pyx_mstate_global->__pyx_kp_u_Compute_indices_suitable_for_pa) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_from_assets_and_dates_line_264, __pyx_mstate_global->__pyx_kp_u_Helper_for_constructing_an_Adju) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0002: from cpython cimport Py_EQ

     0003:

     0004: # ------------------------------------------------------------------

     0005: # Imports

     0006: # ------------------------------------------------------------------

    +0007: from pandas import isnull, Timestamp

      __pyx_t_6 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_isnull, __pyx_mstate_global->__pyx_n_u_Timestamp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pandas, __pyx_t_6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_isnull); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_isnull, __pyx_t_6) < (0)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Timestamp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Timestamp, __pyx_t_6) < (0)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0008: cimport numpy as np

     0009: from numpy cimport float64_t, uint8_t, int64_t

    +0010: from numpy import asarray, datetime64, float64, int64, bool_, uint8

      __pyx_t_3 = __Pyx_PyList_Pack(6, __pyx_mstate_global->__pyx_n_u_asarray, __pyx_mstate_global->__pyx_n_u_datetime64, __pyx_mstate_global->__pyx_n_u_float64, __pyx_mstate_global->__pyx_n_u_int64, __pyx_mstate_global->__pyx_n_u_bool, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_numpy, __pyx_t_3, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_asarray, __pyx_t_3) < (0)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_datetime64, __pyx_t_3) < (0)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_float64, __pyx_t_3) < (0)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_int64, __pyx_t_3) < (0)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_bool, __pyx_t_3) < (0)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_uint8, __pyx_t_3) < (0)) __PYX_ERR(0, 10, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

     0011:

     0012: # NB: we do **not** redeclare anything that already lives in

     0013: #     adjustment.pxd – that avoids the redeclare warnings.

     0014: #     The .pxd provides:

     0015: #         * cpdef enum AdjustmentKind { MULTIPLY, ADD, OVERWRITE }

     0016: #         * fused    column_type

     0017: #         * declarations of the Adjustment classes

     0018: #         * the signature for make_adjustment_from_indices_fused()

     0019: # ------------------------------------------------------------------

     0020: from .adjustment cimport AdjustmentKind      # brings in the C enum

     0021: # column_type, Int64Index_t, DatetimeIndex_t, Timestamp_t, Adjustment

     0022: # are also available automatically from the .pxd.

     0023:

    +0024: from zipline.utils.compat import unicode

      __pyx_t_6 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_zipline_utils_compat, __pyx_t_6, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 24, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_unicode, __pyx_t_6) < (0)) __PYX_ERR(0, 24, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0025:

     0026:

     0027: # ------------------------------------------------------------------

     0028: # Expose the enum members as Python-level attributes *once*.

     0029: # The enum in the .pxd gives us compile-time constants, but they’re

     0030: # not automatically inserted into the module dict.  We add them

     0031: # dynamically so pure-Python code (and tests) can access them.

     0032: # ------------------------------------------------------------------

    +0033: import sys as _sys

      __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_sys, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys_2, __pyx_t_3) < (0)) __PYX_ERR(0, 33, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0034: _mod_dict = _sys.modules[__name__].__dict__

      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sys_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_modules); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_mod_dict, __pyx_t_3) < (0)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0035: _mod_dict.setdefault('ADD',       int(AdjustmentKind.ADD))

      __pyx_t_12 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_mod_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_setdefault); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_10 = NULL;
      __Pyx_INCREF((PyObject *)(&PyLong_Type));
      __pyx_t_2 = ((PyObject *)(&PyLong_Type));
      __pyx_t_11 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_ADD); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 35, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ADD, __pyx_t_6};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0036: _mod_dict.setdefault('MULTIPLY',  int(AdjustmentKind.MULTIPLY))

      __pyx_t_13 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_mod_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_setdefault); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 36, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_2 = NULL;
      __Pyx_INCREF((PyObject *)(&PyLong_Type));
      __pyx_t_11 = ((PyObject *)(&PyLong_Type));
      __pyx_t_10 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_MULTIPLY); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 36, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_mstate_global->__pyx_n_u_MULTIPLY, __pyx_t_6};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0037: _mod_dict.setdefault('OVERWRITE', int(AdjustmentKind.OVERWRITE))

      __pyx_t_12 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_mod_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_setdefault); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_11 = NULL;
      __Pyx_INCREF((PyObject *)(&PyLong_Type));
      __pyx_t_10 = ((PyObject *)(&PyLong_Type));
      __pyx_t_2 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_OVERWRITE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_2};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 37, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_mstate_global->__pyx_n_u_OVERWRITE, __pyx_t_6};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0038:

     0039: # ------------------------------------------------------------------

     0040: # Human-readable names for error messages.

     0041: # (Uses the Python attributes we just inserted.)

     0042: # ------------------------------------------------------------------

     0043: ADJUSTMENT_KIND_NAMES = {

    +0044:     MULTIPLY:  'MULTIPLY',

      __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_MULTIPLY); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_MULTIPLY) < (0)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    +0045:     ADD:       'ADD',

      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_ADD); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_ADD) < (0)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    +0046:     OVERWRITE: 'OVERWRITE',

      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_OVERWRITE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, __pyx_mstate_global->__pyx_n_u_OVERWRITE) < (0)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ADJUSTMENT_KIND_NAMES, __pyx_t_3) < (0)) __PYX_ERR(0, 43, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0047: }

     0048:

     0049: cdef dict _float_adjustment_types = {

    +0050:     ADD: Float64Add,

      __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_ADD); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Add)) < (0)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    +0051:     MULTIPLY: Float64Multiply,

      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_MULTIPLY); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Multiply)) < (0)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    +0052:     OVERWRITE: Float64Overwrite,

      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_OVERWRITE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Overwrite)) < (0)) __PYX_ERR(0, 50, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XGOTREF(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types);
      __Pyx_DECREF_SET(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types, ((PyObject*)__pyx_t_3));
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

     0053: }

     0054: cdef dict _datetime_adjustment_types = {

    +0055:     OVERWRITE: Datetime64Overwrite,

      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_OVERWRITE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 55, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime64Overwrite)) < (0)) __PYX_ERR(0, 55, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XGOTREF(__pyx_v_7zipline_3lib_10adjustment__datetime_adjustment_types);
      __Pyx_DECREF_SET(__pyx_v_7zipline_3lib_10adjustment__datetime_adjustment_types, ((PyObject*)__pyx_t_3));
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

     0056: }

     0057: cdef dict _object_adjustment_types = {

    +0058:     OVERWRITE: ObjectOverwrite,

      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_OVERWRITE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 58, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_ObjectOverwrite)) < (0)) __PYX_ERR(0, 58, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XGOTREF(__pyx_v_7zipline_3lib_10adjustment__object_adjustment_types);
      __Pyx_DECREF_SET(__pyx_v_7zipline_3lib_10adjustment__object_adjustment_types, ((PyObject*)__pyx_t_3));
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

     0059: }

     0060: cdef dict _int_adjustment_types = {

    +0061:     OVERWRITE: Int64Overwrite,

      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_OVERWRITE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 61, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Int64Overwrite)) < (0)) __PYX_ERR(0, 61, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XGOTREF(__pyx_v_7zipline_3lib_10adjustment__int_adjustment_types);
      __Pyx_DECREF_SET(__pyx_v_7zipline_3lib_10adjustment__int_adjustment_types, ((PyObject*)__pyx_t_3));
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

     0062: }

     0063: cdef dict _boolean_adjustment_types = {

    +0064:     OVERWRITE: BooleanOverwrite,

      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_e_7zipline_3lib_10adjustment_OVERWRITE); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 64, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (PyDict_SetItem(__pyx_t_3, __pyx_t_13, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_BooleanOverwrite)) < (0)) __PYX_ERR(0, 64, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XGOTREF(__pyx_v_7zipline_3lib_10adjustment__boolean_adjustment_types);
      __Pyx_DECREF_SET(__pyx_v_7zipline_3lib_10adjustment__boolean_adjustment_types, ((PyObject*)__pyx_t_3));
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;

     0065: }

     0066:

     0067:

    +0068: cdef _is_float(object value):

    static PyObject *__pyx_f_7zipline_3lib_10adjustment__is_float(PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39]))
      __Pyx_TraceStartFunc("_is_float", __pyx_f[0], 68, 0, 0, 0, __PYX_ERR(0, 68, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 68, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._is_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0069:     return isinstance(value, (float, float64))

      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_float64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyFloat_Check(__pyx_v_value);
      if (!__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_3 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1);
      __pyx_t_2 = __pyx_t_3;
      __pyx_L3_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 69, __pyx_L1_error));
      goto __pyx_L0;

     0070:

     0071:

    +0072: cdef _is_datetime(object value):

    static PyObject *__pyx_f_7zipline_3lib_10adjustment__is_datetime(PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40]))
      __Pyx_TraceStartFunc("_is_datetime", __pyx_f[0], 72, 0, 0, 0, __PYX_ERR(0, 72, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 72, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._is_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0073:     return isinstance(value, (datetime64, Timestamp))

      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1);
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2);
      __pyx_t_3 = __pyx_t_4;
      __pyx_L3_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 73, __pyx_L1_error));
      goto __pyx_L0;

     0074:

     0075:

    +0076: cdef _is_int(object value):

    static PyObject *__pyx_f_7zipline_3lib_10adjustment__is_int(PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41]))
      __Pyx_TraceStartFunc("_is_int", __pyx_f[0], 76, 0, 0, 0, __PYX_ERR(0, 76, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 76, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._is_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0077:     return isinstance(value, (int, int64))

      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyLong_Check(__pyx_v_value);
      if (!__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_3 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1);
      __pyx_t_2 = __pyx_t_3;
      __pyx_L3_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 77, __pyx_L1_error));
      goto __pyx_L0;

     0078:

     0079:

    +0080: cdef _is_obj(object value):

    static PyObject *__pyx_f_7zipline_3lib_10adjustment__is_obj(PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42]))
      __Pyx_TraceStartFunc("_is_obj", __pyx_f[0], 80, 0, 0, 0, __PYX_ERR(0, 80, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 80, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._is_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0081:     return isinstance(value, (bytes, unicode, type(None)))

      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)Py_TYPE(Py_None)));
      __pyx_t_2 = ((PyObject *)Py_TYPE(Py_None));
      __pyx_t_4 = PyBytes_Check(__pyx_v_value);
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1);
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2);
      __pyx_t_3 = __pyx_t_4;
      __pyx_L3_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 81, __pyx_L1_error));
      goto __pyx_L0;

     0082:

     0083:

    +0084: cdef _is_bool(object value):

    static PyObject *__pyx_f_7zipline_3lib_10adjustment__is_bool(PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43]))
      __Pyx_TraceStartFunc("_is_bool", __pyx_f[0], 84, 0, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 84, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._is_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0085:     return isinstance(value, (bool, bool_, uint8))

      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_bool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_uint8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyBool_Check(__pyx_v_value);
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1);
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2);
      __pyx_t_3 = __pyx_t_4;
      __pyx_L3_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 85, __pyx_L1_error));
      goto __pyx_L0;

     0086:

     0087:

    +0088: cpdef choose_adjustment_type(AdjustmentKind adjustment_kind, object value):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_1choose_adjustment_type(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_choose_adjustment_type(enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44]))
      __Pyx_TraceStartFunc("choose_adjustment_type", __pyx_f[0], 88, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 88, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 88, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.choose_adjustment_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_1choose_adjustment_type(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_choose_adjustment_type, "choose_adjustment_type(AdjustmentKind adjustment_kind, value)\n\nMake an adjustment object of the type appropriate for the given kind and\nvalue.\n\nParameters\n----------\nadjustment_kind : {ADD, MULTIPLY, OVERWRITE}\n    The kind of adjustment to construct.\nvalue : object\n    The value parameter to the adjustment.  Only floating-point values and\n    datetime-like values are currently supported");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_1choose_adjustment_type = {"choose_adjustment_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_1choose_adjustment_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_choose_adjustment_type};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_1choose_adjustment_type(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind;
      PyObject *__pyx_v_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("choose_adjustment_type (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_adjustment_kind,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[2] = {0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 88, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 88, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 88, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "choose_adjustment_type", 0) < (0)) __PYX_ERR(0, 88, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("choose_adjustment_type", 1, 2, 2, i); __PYX_ERR(0, 88, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 88, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 88, __pyx_L3_error)
        }
        __pyx_v_adjustment_kind = ((enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind)__Pyx_PyLong_As_enum____pyx_t_7zipline_3lib_10adjustment_AdjustmentKind(values[0])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L3_error)
        __pyx_v_value = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("choose_adjustment_type", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 88, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.choose_adjustment_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_choose_adjustment_type(__pyx_self, __pyx_v_adjustment_kind, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_choose_adjustment_type(CYTHON_UNUSED PyObject *__pyx_self, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44]))
      __Pyx_TraceStartFunc("choose_adjustment_type (wrapper)", __pyx_f[0], 88, 0, 0, 0, __PYX_ERR(0, 88, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_choose_adjustment_type(__pyx_v_adjustment_kind, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 88, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.choose_adjustment_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_1choose_adjustment_type, 0, __pyx_mstate_global->__pyx_n_u_choose_adjustment_type, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_choose_adjustment_type, __pyx_t_3) < (0)) __PYX_ERR(0, 88, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0089:     """

     0090:     Make an adjustment object of the type appropriate for the given kind and

     0091:     value.

     0092:

     0093:     Parameters

     0094:     ----------

     0095:     adjustment_kind : {ADD, MULTIPLY, OVERWRITE}

     0096:         The kind of adjustment to construct.

     0097:     value : object

     0098:         The value parameter to the adjustment.  Only floating-point values and

     0099:         datetime-like values are currently supported

     0100:     """

    +0101:     if adjustment_kind in (ADD, MULTIPLY):

      switch (__pyx_v_adjustment_kind) {
        case __pyx_e_7zipline_3lib_10adjustment_ADD:
        case __pyx_e_7zipline_3lib_10adjustment_MULTIPLY:
    /* … */
        break;
        case __pyx_e_7zipline_3lib_10adjustment_OVERWRITE:

    +0102:         if not _is_float(value):

        __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment__is_float(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 102, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_3 = (!__pyx_t_2);
        if (unlikely(__pyx_t_3)) {
    /* … */
        }

    +0103:             raise TypeError(

          __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_builtin_TypeError);
          __pyx_t_5 = __pyx_builtin_TypeError;

    +0104:                 "Can't construct %s Adjustment with value of type %r.\n"

          __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 5, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 31 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 74, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_10 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(0, 103, __pyx_L1_error)

     0105:                 "ADD and MULTIPLY adjustments are only supported for "

     0106:                 "floating point data." % (

    +0107:                     ADJUSTMENT_KIND_NAMES[adjustment_kind],

          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ADJUSTMENT_KIND_NAMES); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 107, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    +0108:                     type(value),

          __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_value))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 108, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_Can_t_construct;
          __pyx_t_9[1] = __pyx_t_7;
          __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_Adjustment_with_value_of_type;
          __pyx_t_9[3] = __pyx_t_8;
          __pyx_t_9[4] = __pyx_mstate_global->__pyx_kp_u_ADD_and_MULTIPLY_adjustments_ar;

     0109:                 )

     0110:             )

    +0111:         return _float_adjustment_types[adjustment_kind]

        __Pyx_XDECREF(__pyx_r);
        if (unlikely(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 111, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 21, 0, __PYX_ERR(0, 111, __pyx_L1_error));
        goto __pyx_L0;

     0112:

    +0113:     elif adjustment_kind == OVERWRITE:

        break;
        default:

    +0114:         if _is_float(value):

        __pyx_t_5 = __pyx_f_7zipline_3lib_10adjustment__is_float(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 114, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_3) {
    /* … */
        }

    +0115:             return _float_adjustment_types[adjustment_kind]

          __Pyx_XDECREF(__pyx_r);
          if (unlikely(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 115, __pyx_L1_error)
          }
          __pyx_t_5 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          __Pyx_TraceReturnValue(__pyx_r, 32, 0, __PYX_ERR(0, 115, __pyx_L1_error));
          goto __pyx_L0;

    +0116:         elif _is_datetime(value):

        __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment__is_datetime(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_3) {
    /* … */
        }

    +0117:             return _datetime_adjustment_types[adjustment_kind]

          __Pyx_XDECREF(__pyx_r);
          if (unlikely(__pyx_v_7zipline_3lib_10adjustment__datetime_adjustment_types == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 117, __pyx_L1_error)
          }
          __pyx_t_1 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__datetime_adjustment_types, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_r = __pyx_t_5;
          __pyx_t_5 = 0;
          __Pyx_TraceReturnValue(__pyx_r, 39, 0, __PYX_ERR(0, 117, __pyx_L1_error));
          goto __pyx_L0;

    +0118:         elif _is_bool(value):

        __pyx_t_5 = __pyx_f_7zipline_3lib_10adjustment__is_bool(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 118, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_3) {
    /* … */
        }

    +0119:             return _boolean_adjustment_types[adjustment_kind]

          __Pyx_XDECREF(__pyx_r);
          if (unlikely(__pyx_v_7zipline_3lib_10adjustment__boolean_adjustment_types == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 119, __pyx_L1_error)
          }
          __pyx_t_5 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__boolean_adjustment_types, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          __Pyx_TraceReturnValue(__pyx_r, 46, 0, __PYX_ERR(0, 119, __pyx_L1_error));
          goto __pyx_L0;

    +0120:         elif _is_int(value):

        __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment__is_int(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 120, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_3) {
    /* … */
        }

    +0121:             return _int_adjustment_types[adjustment_kind]

          __Pyx_XDECREF(__pyx_r);
          if (unlikely(__pyx_v_7zipline_3lib_10adjustment__int_adjustment_types == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 121, __pyx_L1_error)
          }
          __pyx_t_1 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__int_adjustment_types, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_r = __pyx_t_5;
          __pyx_t_5 = 0;
          __Pyx_TraceReturnValue(__pyx_r, 53, 0, __PYX_ERR(0, 121, __pyx_L1_error));
          goto __pyx_L0;

    +0122:         elif _is_obj(value):

        __pyx_t_5 = __pyx_f_7zipline_3lib_10adjustment__is_obj(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 122, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (likely(__pyx_t_3)) {
    /* … */
        }

    +0123:             return _object_adjustment_types[adjustment_kind]

          __Pyx_XDECREF(__pyx_r);
          if (unlikely(__pyx_v_7zipline_3lib_10adjustment__object_adjustment_types == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 123, __pyx_L1_error)
          }
          __pyx_t_5 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__object_adjustment_types, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          __Pyx_TraceReturnValue(__pyx_r, 60, 0, __PYX_ERR(0, 123, __pyx_L1_error));
          goto __pyx_L0;

     0124:         else:

    +0125:             raise TypeError(

        /*else*/ {
          __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_builtin_TypeError);
          __pyx_t_6 = __pyx_builtin_TypeError;

     0126:                 "Don't know how to make overwrite "

    +0127:                 "adjustments for values of type %r." % type(value),

          __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Don_t_know_how_to_make_overwrite, ((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_10 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(0, 125, __pyx_L1_error)
        }

     0128:             )

     0129:

     0130:     else:

    +0131:         raise ValueError("Unknown adjustment type %d." % adjustment_kind)

        __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_4 = __pyx_builtin_ValueError;
        __pyx_t_5 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unknown_adjustment_type_d, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 131, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 131, __pyx_L1_error)
        break;
      }

     0132:

     0133:

    +0134: cpdef Adjustment make_adjustment_from_indices(Py_ssize_t first_row,

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_3make_adjustment_from_indices(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_f_7zipline_3lib_10adjustment_make_adjustment_from_indices(Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_column, Py_ssize_t __pyx_v_last_column, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyTypeObject *__pyx_v_type_ = 0;
      struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45]))
      __Pyx_TraceStartFunc("make_adjustment_from_indices", __pyx_f[0], 134, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 134, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 134, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_type_);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_3make_adjustment_from_indices(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_2make_adjustment_from_indices, "make_adjustment_from_indices(Py_ssize_t first_row, Py_ssize_t last_row, Py_ssize_t first_column, Py_ssize_t last_column, AdjustmentKind adjustment_kind, value) -> Adjustment\n\nMake an Adjustment object from row/column indices into a baseline array.");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_3make_adjustment_from_indices = {"make_adjustment_from_indices", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_3make_adjustment_from_indices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_2make_adjustment_from_indices};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_3make_adjustment_from_indices(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      Py_ssize_t __pyx_v_first_row;
      Py_ssize_t __pyx_v_last_row;
      Py_ssize_t __pyx_v_first_column;
      Py_ssize_t __pyx_v_last_column;
      enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind;
      PyObject *__pyx_v_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("make_adjustment_from_indices (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_column,&__pyx_mstate_global->__pyx_n_u_last_column,&__pyx_mstate_global->__pyx_n_u_adjustment_kind,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[6] = {0,0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 134, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 134, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 134, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 134, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 134, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 134, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 134, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "make_adjustment_from_indices", 0) < (0)) __PYX_ERR(0, 134, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 6; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("make_adjustment_from_indices", 1, 6, 6, i); __PYX_ERR(0, 134, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 6)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 134, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 134, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 134, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 134, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 134, __pyx_L3_error)
          values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 134, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_first_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_last_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L3_error)
        __pyx_v_first_column = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_first_column == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error)
        __pyx_v_last_column = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_last_column == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L3_error)
        __pyx_v_adjustment_kind = ((enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind)__Pyx_PyLong_As_enum____pyx_t_7zipline_3lib_10adjustment_AdjustmentKind(values[4])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L3_error)
        __pyx_v_value = values[5];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("make_adjustment_from_indices", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 134, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_2make_adjustment_from_indices(__pyx_self, __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_column, __pyx_v_last_column, __pyx_v_adjustment_kind, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_2make_adjustment_from_indices(CYTHON_UNUSED PyObject *__pyx_self, Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_column, Py_ssize_t __pyx_v_last_column, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45]))
      __Pyx_TraceStartFunc("make_adjustment_from_indices (wrapper)", __pyx_f[0], 134, 0, 0, 0, __PYX_ERR(0, 134, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((PyObject *)__pyx_f_7zipline_3lib_10adjustment_make_adjustment_from_indices(__pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_column, __pyx_v_last_column, __pyx_v_adjustment_kind, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 134, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_3make_adjustment_from_indices, 0, __pyx_mstate_global->__pyx_n_u_make_adjustment_from_indices, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_make_adjustment_from_indices, __pyx_t_3) < (0)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0135:                                               Py_ssize_t last_row,

     0136:                                               Py_ssize_t first_column,

     0137:                                               Py_ssize_t last_column,

     0138:                                               AdjustmentKind adjustment_kind,

     0139:                                               object value):

     0140:     """

     0141:     Make an Adjustment object from row/column indices into a baseline array.

     0142:     """

    +0143:     cdef type type_ = choose_adjustment_type(adjustment_kind, value)

      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_choose_adjustment_type(__pyx_v_adjustment_kind, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_1))) __PYX_ERR(0, 143, __pyx_L1_error)
      __pyx_v_type_ = ((PyTypeObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     0144:     # NOTE_SS: Cython appears to generate incorrect code here if values are

     0145:     # passed by name.  This is true even if cython.always_allow_keywords is

     0146:     # enabled.  Yay Cython.

    +0147:     return type_(first_row, last_row, first_column, last_column, value)

      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_type_);
      __pyx_t_3 = ((PyObject *)__pyx_v_type_);
      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_v_first_column); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_last_column); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_v_value};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment))))) __PYX_ERR(0, 147, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue((PyObject *)__pyx_r, 6, 0, __PYX_ERR(0, 147, __pyx_L1_error));
      goto __pyx_L0;

     0148:

     0149:

    +0150: cdef type _choose_adjustment_type(AdjustmentKind adjustment_kind,

    static PyTypeObject *__pyx_fuse_0__pyx_f_7zipline_3lib_10adjustment__choose_adjustment_type(enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, __pyx_t_5numpy_int64_t __pyx_v_value) {
      PyTypeObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46]))
      __Pyx_TraceStartFunc("__pyx_fuse_0_choose_adjustment_type", __pyx_f[0], 150, 0, 0, 0, __PYX_ERR(0, 150, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 150, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._choose_adjustment_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyTypeObject *__pyx_fuse_1__pyx_f_7zipline_3lib_10adjustment__choose_adjustment_type(enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, CYTHON_UNUSED __pyx_t_5numpy_float64_t __pyx_v_value) {
      PyTypeObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47]))
      __Pyx_TraceStartFunc("__pyx_fuse_1_choose_adjustment_type", __pyx_f[0], 150, 0, 0, 0, __PYX_ERR(0, 150, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 150, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._choose_adjustment_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyTypeObject *__pyx_fuse_2__pyx_f_7zipline_3lib_10adjustment__choose_adjustment_type(enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, __pyx_t_5numpy_uint8_t __pyx_v_value) {
      PyTypeObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48]))
      __Pyx_TraceStartFunc("__pyx_fuse_2_choose_adjustment_type", __pyx_f[0], 150, 0, 0, 0, __PYX_ERR(0, 150, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 150, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._choose_adjustment_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyTypeObject *__pyx_fuse_3__pyx_f_7zipline_3lib_10adjustment__choose_adjustment_type(enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, PyObject *__pyx_v_value) {
      PyTypeObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49]))
      __Pyx_TraceStartFunc("__pyx_fuse_3_choose_adjustment_type", __pyx_f[0], 150, 0, 0, 0, __PYX_ERR(0, 150, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 150, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._choose_adjustment_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0151:                                   column_type value):

    +0152:     if adjustment_kind in (ADD, MULTIPLY):

      switch (__pyx_v_adjustment_kind) {
        case __pyx_e_7zipline_3lib_10adjustment_ADD:
        case __pyx_e_7zipline_3lib_10adjustment_MULTIPLY:
    /* … */
        break;
        case __pyx_e_7zipline_3lib_10adjustment_OVERWRITE:
    /* … */
      switch (__pyx_v_adjustment_kind) {
        case __pyx_e_7zipline_3lib_10adjustment_ADD:
        case __pyx_e_7zipline_3lib_10adjustment_MULTIPLY:
    /* … */
        break;
        case __pyx_e_7zipline_3lib_10adjustment_OVERWRITE:
    /* … */
      switch (__pyx_v_adjustment_kind) {
        case __pyx_e_7zipline_3lib_10adjustment_ADD:
        case __pyx_e_7zipline_3lib_10adjustment_MULTIPLY:
    /* … */
        break;
        case __pyx_e_7zipline_3lib_10adjustment_OVERWRITE:
    /* … */
      switch (__pyx_v_adjustment_kind) {
        case __pyx_e_7zipline_3lib_10adjustment_ADD:
        case __pyx_e_7zipline_3lib_10adjustment_MULTIPLY:
    /* … */
        break;
        case __pyx_e_7zipline_3lib_10adjustment_OVERWRITE:

     0153:         if column_type is np.float64_t:

    +0154:             return _float_adjustment_types[adjustment_kind]

        __Pyx_XDECREF((PyObject *)__pyx_r);
        if (unlikely(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 154, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(PyType_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_2))) __PYX_ERR(0, 154, __pyx_L1_error)
        __pyx_r = ((PyTypeObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_TraceReturnValue((PyObject *)__pyx_r, 6, 0, __PYX_ERR(0, 154, __pyx_L1_error));
        goto __pyx_L0;

     0155:         else:

    +0156:             raise TypeError(

        __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_3 = __pyx_builtin_TypeError;
    /* … */
        __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_3 = __pyx_builtin_TypeError;
    /* … */
        __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_3 = __pyx_builtin_TypeError;

    +0157:                 "Can't construct %s Adjustment with value of type %r.\n"

        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 31 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 74, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 156, __pyx_L1_error)
    /* … */
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 31 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 74, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 156, __pyx_L1_error)
    /* … */
        __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 31 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 74, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 156, __pyx_L1_error)

     0158:                 "ADD and MULTIPLY adjustments are only supported for "

     0159:                 "floating point data." % (

    +0160:                     ADJUSTMENT_KIND_NAMES[adjustment_kind],

        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ADJUSTMENT_KIND_NAMES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    /* … */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ADJUSTMENT_KIND_NAMES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    /* … */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ADJUSTMENT_KIND_NAMES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    +0161:                     type(value),

        __pyx_t_6 = __Pyx_PyLong_From_npy_int64(__pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_t_6))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Can_t_construct;
        __pyx_t_7[1] = __pyx_t_5;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_Adjustment_with_value_of_type;
        __pyx_t_7[3] = __pyx_t_4;
        __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_ADD_and_MULTIPLY_adjustments_ar;
    /* … */
        __pyx_t_6 = __Pyx_PyLong_From_npy_uint8(__pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_t_6))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Can_t_construct;
        __pyx_t_7[1] = __pyx_t_5;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_Adjustment_with_value_of_type;
        __pyx_t_7[3] = __pyx_t_4;
        __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_ADD_and_MULTIPLY_adjustments_ar;
    /* … */
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_value))), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_Can_t_construct;
        __pyx_t_7[1] = __pyx_t_5;
        __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_Adjustment_with_value_of_type;
        __pyx_t_7[3] = __pyx_t_6;
        __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_ADD_and_MULTIPLY_adjustments_ar;

     0162:                 )

     0163:             )

     0164:

    +0165:     elif adjustment_kind == OVERWRITE:

        break;
        default:
    /* … */
        break;
        default:
    /* … */
        break;
        default:
    /* … */
        break;
        default:

     0166:         if column_type is np.float64_t:

    +0167:             return _float_adjustment_types[adjustment_kind]

        __Pyx_XDECREF((PyObject *)__pyx_r);
        if (unlikely(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 167, __pyx_L1_error)
        }
        __pyx_t_2 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__float_adjustment_types, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_1))) __PYX_ERR(0, 167, __pyx_L1_error)
        __pyx_r = ((PyTypeObject*)__pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_TraceReturnValue((PyObject *)__pyx_r, 13, 0, __PYX_ERR(0, 167, __pyx_L1_error));
        goto __pyx_L0;

     0168:         elif column_type is np.int64_t:

    +0169:             return _int_adjustment_types[adjustment_kind]

        __Pyx_XDECREF((PyObject *)__pyx_r);
        if (unlikely(__pyx_v_7zipline_3lib_10adjustment__int_adjustment_types == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 169, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__int_adjustment_types, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(PyType_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_3))) __PYX_ERR(0, 169, __pyx_L1_error)
        __pyx_r = ((PyTypeObject*)__pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_TraceReturnValue((PyObject *)__pyx_r, 19, 0, __PYX_ERR(0, 169, __pyx_L1_error));
        goto __pyx_L0;

     0170:         elif column_type is np.uint8_t:

    +0171:             return _boolean_adjustment_types[adjustment_kind]

        __Pyx_XDECREF((PyObject *)__pyx_r);
        if (unlikely(__pyx_v_7zipline_3lib_10adjustment__boolean_adjustment_types == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 171, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__boolean_adjustment_types, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(PyType_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_3))) __PYX_ERR(0, 171, __pyx_L1_error)
        __pyx_r = ((PyTypeObject*)__pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_TraceReturnValue((PyObject *)__pyx_r, 19, 0, __PYX_ERR(0, 171, __pyx_L1_error));
        goto __pyx_L0;

     0172:         elif column_type is object:

    +0173:             return _object_adjustment_types[adjustment_kind]

        __Pyx_XDECREF((PyObject *)__pyx_r);
        if (unlikely(__pyx_v_7zipline_3lib_10adjustment__object_adjustment_types == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 173, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_7zipline_3lib_10adjustment__object_adjustment_types, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(PyType_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_3))) __PYX_ERR(0, 173, __pyx_L1_error)
        __pyx_r = ((PyTypeObject*)__pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_TraceReturnValue((PyObject *)__pyx_r, 19, 0, __PYX_ERR(0, 173, __pyx_L1_error));
        goto __pyx_L0;

     0174:         else:

     0175:             raise TypeError(

     0176:                 "Don't know how to make overwrite "

     0177:                 "adjustments for values of type %r." % type(value),

     0178:             )

     0179:

     0180:     else:

    +0181:         raise ValueError("Unknown adjustment type %d." % adjustment_kind)

        __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_6 = __pyx_builtin_ValueError;
        __pyx_t_2 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unknown_adjustment_type_d, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 181, __pyx_L1_error)
        break;
      }
    /* … */
        __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_3 = __pyx_builtin_ValueError;
        __pyx_t_4 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unknown_adjustment_type_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 181, __pyx_L1_error)
        break;
      }
    /* … */
        __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_6 = __pyx_builtin_ValueError;
        __pyx_t_2 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unknown_adjustment_type_d, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 181, __pyx_L1_error)
        break;
      }
    /* … */
        __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_4 = __pyx_builtin_ValueError;
        __pyx_t_2 = __Pyx_Enum_191398__7zipline_3lib_10adjustment_enum__dunderpyx_t_7__etc_to_py(__pyx_v_adjustment_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Unknown_adjustment_type_d, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 181, __pyx_L1_error)
        break;
      }

     0182:

     0183:

    +0184: cdef Adjustment make_adjustment_from_indices_fused(Py_ssize_t first_row,

    static struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_fuse_0__pyx_f_7zipline_3lib_10adjustment_make_adjustment_from_indices_fused(Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_column, Py_ssize_t __pyx_v_last_column, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, __pyx_t_5numpy_int64_t __pyx_v_value) {
      PyTypeObject *__pyx_v_type_ = 0;
      struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50]))
      __Pyx_TraceStartFunc("__pyx_fuse_0make_adjustment_from_indices_fused", __pyx_f[0], 184, 0, 0, 0, __PYX_ERR(0, 184, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 184, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_indices_fused", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_type_);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_fuse_1__pyx_f_7zipline_3lib_10adjustment_make_adjustment_from_indices_fused(Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_column, Py_ssize_t __pyx_v_last_column, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, __pyx_t_5numpy_float64_t __pyx_v_value) {
      PyTypeObject *__pyx_v_type_ = 0;
      struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51]))
      __Pyx_TraceStartFunc("__pyx_fuse_1make_adjustment_from_indices_fused", __pyx_f[0], 184, 0, 0, 0, __PYX_ERR(0, 184, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 184, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_indices_fused", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_type_);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_fuse_2__pyx_f_7zipline_3lib_10adjustment_make_adjustment_from_indices_fused(Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_column, Py_ssize_t __pyx_v_last_column, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, __pyx_t_5numpy_uint8_t __pyx_v_value) {
      PyTypeObject *__pyx_v_type_ = 0;
      struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52]))
      __Pyx_TraceStartFunc("__pyx_fuse_2make_adjustment_from_indices_fused", __pyx_f[0], 184, 0, 0, 0, __PYX_ERR(0, 184, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 184, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_indices_fused", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_type_);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_fuse_3__pyx_f_7zipline_3lib_10adjustment_make_adjustment_from_indices_fused(Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_column, Py_ssize_t __pyx_v_last_column, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, PyObject *__pyx_v_value) {
      PyTypeObject *__pyx_v_type_ = 0;
      struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53]))
      __Pyx_TraceStartFunc("__pyx_fuse_3make_adjustment_from_indices_fused", __pyx_f[0], 184, 0, 0, 0, __PYX_ERR(0, 184, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 184, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_indices_fused", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_type_);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0185:                                                    Py_ssize_t last_row,

     0186:                                                    Py_ssize_t first_column,

     0187:                                                    Py_ssize_t last_column,

     0188:                                                    AdjustmentKind adjustment_kind,

     0189:                                                    column_type value):

     0190:     """

     0191:     Make an Adjustment object from row/column indices into a baseline array.

     0192:     """

    +0193:     cdef type type_ = _choose_adjustment_type(adjustment_kind, value)

      __pyx_t_1 = ((PyObject *)__pyx_fuse_0__pyx_f_7zipline_3lib_10adjustment__choose_adjustment_type(__pyx_v_adjustment_kind, __pyx_v_value)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_type_ = ((PyTypeObject*)__pyx_t_1);
      __pyx_t_1 = 0;
    /* … */
      __pyx_t_1 = ((PyObject *)__pyx_fuse_1__pyx_f_7zipline_3lib_10adjustment__choose_adjustment_type(__pyx_v_adjustment_kind, __pyx_v_value)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_type_ = ((PyTypeObject*)__pyx_t_1);
      __pyx_t_1 = 0;
    /* … */
      __pyx_t_1 = ((PyObject *)__pyx_fuse_2__pyx_f_7zipline_3lib_10adjustment__choose_adjustment_type(__pyx_v_adjustment_kind, __pyx_v_value)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_type_ = ((PyTypeObject*)__pyx_t_1);
      __pyx_t_1 = 0;
    /* … */
      __pyx_t_1 = ((PyObject *)__pyx_fuse_3__pyx_f_7zipline_3lib_10adjustment__choose_adjustment_type(__pyx_v_adjustment_kind, __pyx_v_value)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_type_ = ((PyTypeObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     0194:     # NOTE_SS: Cython appears to generate incorrect code here if values are

     0195:     # passed by name.  This is true even if cython.always_allow_keywords is

     0196:     # enabled.  Yay Cython.

    +0197:     return type_(first_row, last_row, first_column, last_column, value)

      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_type_);
      __pyx_t_3 = ((PyObject *)__pyx_v_type_);
      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_v_first_column); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_last_column); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyLong_From_npy_int64(__pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 1;
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment))))) __PYX_ERR(0, 197, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue((PyObject *)__pyx_r, 6, 0, __PYX_ERR(0, 197, __pyx_L1_error));
      goto __pyx_L0;
    /* … */
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_type_);
      __pyx_t_3 = ((PyObject *)__pyx_v_type_);
      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_v_first_column); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_last_column); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 1;
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment))))) __PYX_ERR(0, 197, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue((PyObject *)__pyx_r, 6, 0, __PYX_ERR(0, 197, __pyx_L1_error));
      goto __pyx_L0;
    /* … */
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_type_);
      __pyx_t_3 = ((PyObject *)__pyx_v_type_);
      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_v_first_column); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_last_column); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyLong_From_npy_uint8(__pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 1;
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_9, (6-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment))))) __PYX_ERR(0, 197, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue((PyObject *)__pyx_r, 6, 0, __PYX_ERR(0, 197, __pyx_L1_error));
      goto __pyx_L0;
    /* … */
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __pyx_t_2 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_v_type_);
      __pyx_t_3 = ((PyObject *)__pyx_v_type_);
      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyLong_FromSsize_t(__pyx_v_first_column); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_last_column); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = 1;
      {
        PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_v_value};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_8, (6-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment))))) __PYX_ERR(0, 197, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue((PyObject *)__pyx_r, 6, 0, __PYX_ERR(0, 197, __pyx_L1_error));
      goto __pyx_L0;

     0198:

     0199:

    +0200: cpdef make_adjustment_from_labels(DatetimeIndex_t dates_index,

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_5make_adjustment_from_labels(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_make_adjustment_from_labels(__pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index, __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date, __pyx_t_5numpy_int64_t __pyx_v_asset_id, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyTypeObject *__pyx_v_type_ = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54]))
      __Pyx_TraceStartFunc("make_adjustment_from_labels", __pyx_f[0], 200, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 200, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 200, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_type_);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_5make_adjustment_from_labels(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_4make_adjustment_from_labels, "make_adjustment_from_labels(DatetimeIndex_t dates_index, Int64Index_t assets_index, Timestamp_t start_date, Timestamp_t end_date, int64_t asset_id, AdjustmentKind adjustment_kind, value)\n\nMake an Adjustment object from date/asset labels into a labelled baseline\narray.");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_5make_adjustment_from_labels = {"make_adjustment_from_labels", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_5make_adjustment_from_labels, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_4make_adjustment_from_labels};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_5make_adjustment_from_labels(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index = 0;
      __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index = 0;
      __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date = 0;
      __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date = 0;
      __pyx_t_5numpy_int64_t __pyx_v_asset_id;
      enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind;
      PyObject *__pyx_v_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("make_adjustment_from_labels (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dates_index,&__pyx_mstate_global->__pyx_n_u_assets_index,&__pyx_mstate_global->__pyx_n_u_start_date,&__pyx_mstate_global->__pyx_n_u_end_date,&__pyx_mstate_global->__pyx_n_u_asset_id,&__pyx_mstate_global->__pyx_n_u_adjustment_kind,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[7] = {0,0,0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 200, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  7:
            values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 200, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 200, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 200, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 200, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 200, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 200, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 200, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "make_adjustment_from_labels", 0) < (0)) __PYX_ERR(0, 200, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 7; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("make_adjustment_from_labels", 1, 7, 7, i); __PYX_ERR(0, 200, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 7)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 200, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 200, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 200, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 200, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 200, __pyx_L3_error)
          values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 200, __pyx_L3_error)
          values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 200, __pyx_L3_error)
        }
        __pyx_v_dates_index = ((__pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t)values[0]);
        __pyx_v_assets_index = ((__pyx_t_7zipline_3lib_10adjustment_Int64Index_t)values[1]);
        __pyx_v_start_date = ((__pyx_t_7zipline_3lib_10adjustment_Timestamp_t)values[2]);
        __pyx_v_end_date = ((__pyx_t_7zipline_3lib_10adjustment_Timestamp_t)values[3]);
        __pyx_v_asset_id = __Pyx_PyLong_As_npy_int64(values[4]); if (unlikely((__pyx_v_asset_id == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 204, __pyx_L3_error)
        __pyx_v_adjustment_kind = ((enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind)__Pyx_PyLong_As_enum____pyx_t_7zipline_3lib_10adjustment_AdjustmentKind(values[5])); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 205, __pyx_L3_error)
        __pyx_v_value = values[6];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("make_adjustment_from_labels", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 200, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_4make_adjustment_from_labels(__pyx_self, __pyx_v_dates_index, __pyx_v_assets_index, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_asset_id, __pyx_v_adjustment_kind, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_4make_adjustment_from_labels(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index, __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date, __pyx_t_5numpy_int64_t __pyx_v_asset_id, enum __pyx_t_7zipline_3lib_10adjustment_AdjustmentKind __pyx_v_adjustment_kind, PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54]))
      __Pyx_TraceStartFunc("make_adjustment_from_labels (wrapper)", __pyx_f[0], 200, 0, 0, 0, __PYX_ERR(0, 200, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_make_adjustment_from_labels(__pyx_v_dates_index, __pyx_v_assets_index, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_asset_id, __pyx_v_adjustment_kind, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 200, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.make_adjustment_from_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_5make_adjustment_from_labels, 0, __pyx_mstate_global->__pyx_n_u_make_adjustment_from_labels, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_make_adjustment_from_labels, __pyx_t_3) < (0)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0201:                                   Int64Index_t assets_index,

     0202:                                   Timestamp_t start_date,

     0203:                                   Timestamp_t end_date,

     0204:                                   np.int64_t asset_id,

     0205:                                   AdjustmentKind adjustment_kind,

     0206:                                   object value):

     0207:     """

     0208:     Make an Adjustment object from date/asset labels into a labelled baseline

     0209:     array.

     0210:     """

    +0211:     cdef type type_ = choose_adjustment_type(adjustment_kind, value)

      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_choose_adjustment_type(__pyx_v_adjustment_kind, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("type", __pyx_t_1))) __PYX_ERR(0, 211, __pyx_L1_error)
      __pyx_v_type_ = ((PyTypeObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +0212:     return type_.from_assets_and_dates(

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = ((PyObject *)__pyx_v_type_);
      __Pyx_INCREF(__pyx_t_2);

     0213:         dates_index,

     0214:         assets_index,

     0215:         start_date,

     0216:         end_date,

    +0217:         asset_id,

      __pyx_t_3 = __Pyx_PyLong_From_npy_int64(__pyx_v_asset_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0218:         value,

      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[7] = {__pyx_t_2, ((PyObject *)__pyx_v_dates_index), ((PyObject *)__pyx_v_assets_index), ((PyObject *)__pyx_v_start_date), ((PyObject *)__pyx_v_end_date), __pyx_t_3, __pyx_v_value};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_assets_and_dates, __pyx_callargs+__pyx_t_4, (7-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 6, 0, __PYX_ERR(0, 212, __pyx_L1_error));
      goto __pyx_L0;

     0219:     )

     0220:

     0221:

    +0222: cpdef tuple get_adjustment_locs(DatetimeIndex_t dates_index,

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_7get_adjustment_locs(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_get_adjustment_locs(__pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index, __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date, __pyx_t_5numpy_int64_t __pyx_v_asset_id, CYTHON_UNUSED int __pyx_skip_dispatch) {
      int __pyx_v_start_date_loc;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55]))
      __Pyx_TraceStartFunc("get_adjustment_locs", __pyx_f[0], 222, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 222, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 222, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.get_adjustment_locs", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_7get_adjustment_locs(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_6get_adjustment_locs, "get_adjustment_locs(DatetimeIndex_t dates_index, Int64Index_t assets_index, Timestamp_t start_date, Timestamp_t end_date, int64_t asset_id) -> tuple\n\nCompute indices suitable for passing to an Adjustment constructor.\n\nIf the specified dates aren't in dates_index, we return the index of the\nfirst date **BEFORE** the supplied date.\n\nExample:\n\n>>> from pandas import date_range, Int64Index, Timestamp\n>>> dates = date_range('2014-01-01', '2014-01-07')\n>>> assets = Int64Index(range(10))\n>>> get_adjustment_locs(\n...     dates,\n...     assets,\n...     Timestamp('2014-01-03'),\n...     Timestamp('2014-01-05'),\n...     3,\n... )\n(2, 4, 3)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_7get_adjustment_locs = {"get_adjustment_locs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_7get_adjustment_locs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_6get_adjustment_locs};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_7get_adjustment_locs(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index = 0;
      __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index = 0;
      __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date = 0;
      __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date = 0;
      __pyx_t_5numpy_int64_t __pyx_v_asset_id;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_adjustment_locs (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dates_index,&__pyx_mstate_global->__pyx_n_u_assets_index,&__pyx_mstate_global->__pyx_n_u_start_date,&__pyx_mstate_global->__pyx_n_u_end_date,&__pyx_mstate_global->__pyx_n_u_asset_id,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 222, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 222, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 222, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 222, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 222, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 222, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_adjustment_locs", 0) < (0)) __PYX_ERR(0, 222, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_adjustment_locs", 1, 5, 5, i); __PYX_ERR(0, 222, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 222, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 222, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 222, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 222, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 222, __pyx_L3_error)
        }
        __pyx_v_dates_index = ((__pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t)values[0]);
        __pyx_v_assets_index = ((__pyx_t_7zipline_3lib_10adjustment_Int64Index_t)values[1]);
        __pyx_v_start_date = ((__pyx_t_7zipline_3lib_10adjustment_Timestamp_t)values[2]);
        __pyx_v_end_date = ((__pyx_t_7zipline_3lib_10adjustment_Timestamp_t)values[3]);
        __pyx_v_asset_id = __Pyx_PyLong_As_npy_int64(values[4]); if (unlikely((__pyx_v_asset_id == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("get_adjustment_locs", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 222, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.get_adjustment_locs", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_6get_adjustment_locs(__pyx_self, __pyx_v_dates_index, __pyx_v_assets_index, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_asset_id);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_6get_adjustment_locs(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index, __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date, __pyx_t_5numpy_int64_t __pyx_v_asset_id) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55]))
      __Pyx_TraceStartFunc("get_adjustment_locs (wrapper)", __pyx_f[0], 222, 0, 0, 0, __PYX_ERR(0, 222, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_get_adjustment_locs(__pyx_v_dates_index, __pyx_v_assets_index, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_asset_id, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 222, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.get_adjustment_locs", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_7get_adjustment_locs, 0, __pyx_mstate_global->__pyx_n_u_get_adjustment_locs, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_adjustment_locs, __pyx_t_3) < (0)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0223:                                 Int64Index_t assets_index,

     0224:                                 Timestamp_t start_date,

     0225:                                 Timestamp_t end_date,

     0226:                                 np.int64_t asset_id):

     0227:     """

     0228:     Compute indices suitable for passing to an Adjustment constructor.

     0229:

     0230:     If the specified dates aren't in dates_index, we return the index of the

     0231:     first date **BEFORE** the supplied date.

     0232:

     0233:     Example:

     0234:

     0235:     >>> from pandas import date_range, Int64Index, Timestamp

     0236:     >>> dates = date_range('2014-01-01', '2014-01-07')

     0237:     >>> assets = Int64Index(range(10))

     0238:     >>> get_adjustment_locs(

     0239:     ...     dates,

     0240:     ...     assets,

     0241:     ...     Timestamp('2014-01-03'),

     0242:     ...     Timestamp('2014-01-05'),

     0243:     ...     3,

     0244:     ... )

     0245:     (2, 4, 3)

     0246:     """

     0247:     cdef int start_date_loc

     0248:

     0249:     # None or NaT signifies "All values before the end_date".

    +0250:     if isnull(start_date):

      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_isnull); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_start_date)};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {
    /* … */
        goto __pyx_L3;
      }

    +0251:         start_date_loc = 0

        __pyx_v_start_date_loc = 0;

     0252:     else:

     0253:         # Location of earliest date on or after start_date.

    +0254:         start_date_loc = dates_index.get_indexer([start_date], method='bfill')[0]

      /*else*/ {
        __pyx_t_3 = ((PyObject *)__pyx_v_dates_index);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_start_date);
        __Pyx_GIVEREF(__pyx_v_start_date);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_start_date)) != (0)) __PYX_ERR(0, 254, __pyx_L1_error);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_2};
          __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_method, __pyx_mstate_global->__pyx_n_u_bfill, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 254, __pyx_L1_error)
          __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_get_indexer, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_start_date_loc = __pyx_t_7;
      }
      __pyx_L3:;

     0255:

    +0256:     return (

      __Pyx_XDECREF(__pyx_r);

    +0257:         start_date_loc,

      __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_start_date_loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    /* … */
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 257, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 257, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_9);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_9) != (0)) __PYX_ERR(0, 257, __pyx_L1_error);
      __pyx_t_6 = 0;
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_r = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 17, 0, __PYX_ERR(0, 256, __pyx_L1_error));
      goto __pyx_L0;

     0258:         # Location of latest date on or before start_date.

    +0259:         dates_index.get_indexer([end_date], method='ffill')[0],

      __pyx_t_2 = ((PyObject *)__pyx_v_dates_index);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_end_date);
      __Pyx_GIVEREF(__pyx_v_end_date);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_end_date)) != (0)) __PYX_ERR(0, 259, __pyx_L1_error);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_method, __pyx_mstate_global->__pyx_n_u_ffill, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 259, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_get_indexer, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 259, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0260:         assets_index.get_indexer([asset_id])[0],  # Must be exact match.

      __pyx_t_3 = ((PyObject *)__pyx_v_assets_index);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyLong_From_npy_int64(__pyx_v_asset_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 260, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_indexer, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0261:     )

     0262:

     0263:

    +0264: cpdef _from_assets_and_dates(cls,

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_9_from_assets_and_dates(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment__from_assets_and_dates(PyObject *__pyx_v_cls, __pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index, __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date, __pyx_t_5numpy_int64_t __pyx_v_asset_id, PyObject *__pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_first_row;
      Py_ssize_t __pyx_v_last_row;
      Py_ssize_t __pyx_v_col;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56]))
      __Pyx_TraceStartFunc("_from_assets_and_dates", __pyx_f[0], 264, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 264, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 264, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._from_assets_and_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_9_from_assets_and_dates(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_8_from_assets_and_dates, "_from_assets_and_dates(cls, DatetimeIndex_t dates_index, Int64Index_t assets_index, Timestamp_t start_date, Timestamp_t end_date, int64_t asset_id, value)\n\nHelper for constructing an Adjustment instance from coordinates in\nassets/dates indices.\n\nExample\n-------\n\n>>> from pandas import date_range, Int64Index, Timestamp\n>>> dates = date_range('2014-01-01', '2014-01-07')\n>>> assets = Int64Index(range(10))\n>>> Float64Multiply.from_assets_and_dates(\n...     dates,\n...     assets,\n...     Timestamp('2014-01-03'),\n...     Timestamp('2014-01-05'),\n...     3,\n...     0.5,\n... )\nFloat64Multiply(first_row=2, last_row=4, first_col=3, last_col=3, value=0.500000)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_9_from_assets_and_dates = {"_from_assets_and_dates", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_9_from_assets_and_dates, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_8_from_assets_and_dates};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_9_from_assets_and_dates(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_cls = 0;
      __pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index = 0;
      __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index = 0;
      __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date = 0;
      __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date = 0;
      __pyx_t_5numpy_int64_t __pyx_v_asset_id;
      PyObject *__pyx_v_value = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_from_assets_and_dates (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_dates_index,&__pyx_mstate_global->__pyx_n_u_assets_index,&__pyx_mstate_global->__pyx_n_u_start_date,&__pyx_mstate_global->__pyx_n_u_end_date,&__pyx_mstate_global->__pyx_n_u_asset_id,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[7] = {0,0,0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 264, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  7:
            values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 264, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 264, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 264, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 264, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 264, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 264, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 264, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_from_assets_and_dates", 0) < (0)) __PYX_ERR(0, 264, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 7; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_from_assets_and_dates", 1, 7, 7, i); __PYX_ERR(0, 264, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 7)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 264, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 264, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 264, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 264, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 264, __pyx_L3_error)
          values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 264, __pyx_L3_error)
          values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 264, __pyx_L3_error)
        }
        __pyx_v_cls = values[0];
        __pyx_v_dates_index = ((__pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t)values[1]);
        __pyx_v_assets_index = ((__pyx_t_7zipline_3lib_10adjustment_Int64Index_t)values[2]);
        __pyx_v_start_date = ((__pyx_t_7zipline_3lib_10adjustment_Timestamp_t)values[3]);
        __pyx_v_end_date = ((__pyx_t_7zipline_3lib_10adjustment_Timestamp_t)values[4]);
        __pyx_v_asset_id = __Pyx_PyLong_As_npy_int64(values[5]); if (unlikely((__pyx_v_asset_id == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L3_error)
        __pyx_v_value = values[6];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_from_assets_and_dates", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 264, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment._from_assets_and_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_8_from_assets_and_dates(__pyx_self, __pyx_v_cls, __pyx_v_dates_index, __pyx_v_assets_index, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_asset_id, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_8_from_assets_and_dates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, __pyx_t_7zipline_3lib_10adjustment_DatetimeIndex_t __pyx_v_dates_index, __pyx_t_7zipline_3lib_10adjustment_Int64Index_t __pyx_v_assets_index, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_start_date, __pyx_t_7zipline_3lib_10adjustment_Timestamp_t __pyx_v_end_date, __pyx_t_5numpy_int64_t __pyx_v_asset_id, PyObject *__pyx_v_value) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56]))
      __Pyx_TraceStartFunc("_from_assets_and_dates (wrapper)", __pyx_f[0], 264, 0, 0, 0, __PYX_ERR(0, 264, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment__from_assets_and_dates(__pyx_v_cls, __pyx_v_dates_index, __pyx_v_assets_index, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_asset_id, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 264, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._from_assets_and_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_9_from_assets_and_dates, 0, __pyx_mstate_global->__pyx_n_u_from_assets_and_dates_2, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_from_assets_and_dates_2, __pyx_t_3) < (0)) __PYX_ERR(0, 264, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0265:                              DatetimeIndex_t dates_index,

     0266:                              Int64Index_t assets_index,

     0267:                              Timestamp_t start_date,

     0268:                              Timestamp_t end_date,

     0269:                              np.int64_t asset_id,

     0270:                              object value):

     0271:     """

     0272:     Helper for constructing an Adjustment instance from coordinates in

     0273:     assets/dates indices.

     0274:

     0275:     Example

     0276:     -------

     0277:

     0278:     >>> from pandas import date_range, Int64Index, Timestamp

     0279:     >>> dates = date_range('2014-01-01', '2014-01-07')

     0280:     >>> assets = Int64Index(range(10))

     0281:     >>> Float64Multiply.from_assets_and_dates(

     0282:     ...     dates,

     0283:     ...     assets,

     0284:     ...     Timestamp('2014-01-03'),

     0285:     ...     Timestamp('2014-01-05'),

     0286:     ...     3,

     0287:     ...     0.5,

     0288:     ... )

     0289:     Float64Multiply(first_row=2, last_row=4, first_col=3, last_col=3, value=0.500000)

     0290:     """

     0291:     cdef:

     0292:         Py_ssize_t first_row, last_row, col

     0293:

    +0294:     first_row, last_row, col = get_adjustment_locs(

      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_get_adjustment_locs(__pyx_v_dates_index, __pyx_v_assets_index, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_asset_id, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (likely(__pyx_t_1 != Py_None)) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(sequence);
        if (unlikely(size != 3)) {
          if (size > 3) __Pyx_RaiseTooManyValuesError(3);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 294, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 294, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_first_row = __pyx_t_5;
      __pyx_v_last_row = __pyx_t_6;
      __pyx_v_col = __pyx_t_7;

     0295:         dates_index,

     0296:         assets_index,

     0297:         start_date,

     0298:         end_date,

     0299:         asset_id,

     0300:     )

    +0301:     return cls(

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_cls);
      __pyx_t_3 = __pyx_v_cls;

    +0302:         first_row=first_row,

      __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

    +0303:         last_row=last_row,

      __pyx_t_8 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 303, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);

    +0304:         first_col=col,

      __pyx_t_9 = PyLong_FromSsize_t(__pyx_v_col); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);

    +0305:         last_col=col,

      __pyx_t_10 = PyLong_FromSsize_t(__pyx_v_col); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);

    +0306:         value=value,

      __pyx_t_11 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_11 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_4, NULL};
        __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 301, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_2, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 301, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_8, __pyx_t_12, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 301, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_9, __pyx_t_12, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 301, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_10, __pyx_t_12, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 301, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_value, __pyx_v_value, __pyx_t_12, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 301, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_3, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 11, 0, __PYX_ERR(0, 301, __pyx_L1_error));
      goto __pyx_L0;

     0307:     )

     0308:

     0309:

    +0310: cdef class Adjustment:

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment {
      PyObject *(*_key)(struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment *__pyx_vtabptr_7zipline_3lib_10adjustment_Adjustment;

     0311:     """

     0312:     Base class for Adjustments.

     0313:

     0314:     Subclasses should inherit and provide a `value` attribute and a `mutate`

     0315:     method.

     0316:     """

    +0317:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_10Adjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_10Adjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      Py_ssize_t __pyx_v_first_row;
      Py_ssize_t __pyx_v_last_row;
      Py_ssize_t __pyx_v_first_col;
      Py_ssize_t __pyx_v_last_col;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,0};
      PyObject* values[4] = {0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 317, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 317, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 317, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 317, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 317, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 317, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, i); __PYX_ERR(0, 317, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 4)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 317, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 317, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 317, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 317, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_first_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 318, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_last_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_first_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_last_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 317, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.Adjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_10Adjustment___init__(((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_10Adjustment___init__(struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_v_self, Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_col, Py_ssize_t __pyx_v_last_col) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 317, 0, 0, 0, __PYX_ERR(0, 317, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 317, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 317, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Adjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0318:                  Py_ssize_t first_row,

     0319:                  Py_ssize_t last_row,

     0320:                  Py_ssize_t first_col,

     0321:                  Py_ssize_t last_col):

    +0322:         if not (0 <= first_row <= last_row):

      __pyx_t_1 = (0 <= __pyx_v_first_row);
      if (__pyx_t_1) {
        __pyx_t_1 = (__pyx_v_first_row <= __pyx_v_last_row);
      }
      __pyx_t_2 = (!__pyx_t_1);
      if (unlikely(__pyx_t_2)) {
    /* … */
      }

    +0323:             raise ValueError(

        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_5 = __pyx_builtin_ValueError;

    +0324:                 'first_row must be in the range [0, last_row], got:'

        __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 61 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127);
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 323, __pyx_L1_error)

     0325:                 ' first_row=%s last_row=%s' % (

    +0326:                     first_row,

        __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_first_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);

    +0327:                     last_row,

        __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_last_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 327, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_first_row_must_be_in_the_range_0;
        __pyx_t_8[1] = __pyx_t_6;
        __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_last_row_2;
        __pyx_t_8[3] = __pyx_t_7;

     0328:                 ),

     0329:             )

    +0330:         if not (0 <= first_col <= last_col):

      __pyx_t_2 = (0 <= __pyx_v_first_col);
      if (__pyx_t_2) {
        __pyx_t_2 = (__pyx_v_first_col <= __pyx_v_last_col);
      }
      __pyx_t_1 = (!__pyx_t_2);
      if (unlikely(__pyx_t_1)) {
    /* … */
      }

    +0331:             raise ValueError(

        __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_9 = __pyx_builtin_ValueError;

    +0332:                 'first_col must be in the range [0, last_col], got:'

        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 61 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127);
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 331, __pyx_L1_error)

     0333:                 ' first_col=%s last_col=%s' % (

    +0334:                     first_col,

        __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_first_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);

    +0335:                     last_col,

        __pyx_t_7 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_last_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_first_col_must_be_in_the_range_0;
        __pyx_t_8[1] = __pyx_t_4;
        __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_last_col_2;
        __pyx_t_8[3] = __pyx_t_7;

     0336:                 ),

     0337:             )

     0338:

    +0339:         self.first_col = first_col

      __pyx_v_self->first_col = __pyx_v_first_col;

    +0340:         self.last_col = last_col

      __pyx_v_self->last_col = __pyx_v_last_col;

    +0341:         self.first_row = first_row

      __pyx_v_self->first_row = __pyx_v_first_row;

    +0342:         self.last_row = last_row

      __pyx_v_self->last_row = __pyx_v_last_row;

     0343:

    +0344:     from_assets_and_dates = classmethod(_from_assets_and_dates)

      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_from_assets_and_dates_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment, __pyx_mstate_global->__pyx_n_u_from_assets_and_dates, __pyx_t_13) < (0)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

     0345:

    +0346:     def __richcmp__(self, object other, int op):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_10Adjustment_2__richcmp__(((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_10Adjustment_2__richcmp__(struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58]))
      __Pyx_TraceStartFunc("__richcmp__", __pyx_f[0], 346, 0, 0, 0, __PYX_ERR(0, 346, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 346, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Adjustment.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0347:         """

     0348:         Rich comparison method.  Only Equality is defined.

     0349:         """

    +0350:         if op != Py_EQ or type(self) != type(other):

      __pyx_t_2 = (__pyx_v_op != Py_EQ);
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), ((PyObject *)Py_TYPE(__pyx_v_other)), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 350, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {
    /* … */
      }

    +0351:             return NotImplemented

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_builtin_NotImplemented);
        __pyx_r = __pyx_builtin_NotImplemented;
        __Pyx_TraceReturnValue(__pyx_r, 13, 0, __PYX_ERR(0, 351, __pyx_L1_error));
        goto __pyx_L0;

     0352:

    +0353:         return self._key() == other._key()

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = ((struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment *)__pyx_v_self->__pyx_vtab)->_key(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __pyx_v_other;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_key, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 15, 0, __PYX_ERR(0, 353, __pyx_L1_error));
      goto __pyx_L0;

     0354:

    +0355:     cpdef tuple _key(self):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_5_key(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_10Adjustment__key(struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_v_self, int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59]))
      __Pyx_TraceStartFunc("_key", __pyx_f[0], 355, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 355, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_10Adjustment_5_key)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_2))) __PYX_ERR(0, 355, __pyx_L1_error)
            __pyx_r = ((PyObject*)__pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 355, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 355, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Adjustment._key", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_5_key(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_10Adjustment_4_key, "Adjustment._key(self) -> tuple\n\nComparison key");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_10Adjustment_5_key = {"_key", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_5_key, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_10Adjustment_4_key};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_5_key(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_key (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("_key", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("_key", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_10Adjustment_4_key(((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_10Adjustment_4_key(struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59]))
      __Pyx_TraceStartFunc("_key (wrapper)", __pyx_f[0], 355, 0, 0, 0, __PYX_ERR(0, 355, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_10Adjustment__key(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 355, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Adjustment._key", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_10Adjustment_5_key, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Adjustment__key, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment, __pyx_mstate_global->__pyx_n_u_key, __pyx_t_13) < (0)) __PYX_ERR(0, 355, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

     0356:         """

     0357:         Comparison key

     0358:         """

    +0359:         return (

      __Pyx_XDECREF(__pyx_r);

    +0360:             self.first_row,

      __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->first_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    /* … */
      __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 360, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 360, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 360, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 360, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_3) != (0)) __PYX_ERR(0, 360, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_6) != (0)) __PYX_ERR(0, 360, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_4 = 0;
      __pyx_t_3 = 0;
      __pyx_t_6 = 0;
      __pyx_r = ((PyObject*)__pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 359, __pyx_L1_error));
      goto __pyx_L0;

    +0361:             self.last_row,

      __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->last_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

    +0362:             self.first_col,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_self->first_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0363:             self.last_col,

      __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_self->last_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0364:             self.value,

      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

     0365:         )

     0366:

    +0367:     def __reduce__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_7__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_10Adjustment_6__reduce__, "Adjustment.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_10Adjustment_7__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_7__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_10Adjustment_6__reduce__};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Adjustment_7__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_10Adjustment_6__reduce__(((struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_10Adjustment_6__reduce__(struct __pyx_obj_7zipline_3lib_10adjustment_Adjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60]))
      __Pyx_TraceStartFunc("__reduce__", __pyx_f[0], 367, 0, 0, 0, __PYX_ERR(0, 367, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 367, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Adjustment.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_10Adjustment_7__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Adjustment___reduce, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Adjustment, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_13) < (0)) __PYX_ERR(0, 367, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

    +0368:         return type(self), self._key()

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment *)__pyx_v_self->__pyx_vtab)->_key(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(0, 368, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 368, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 368, __pyx_L1_error));
      goto __pyx_L0;

     0369:

     0370:

    +0371: cdef class Float64Adjustment(Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Adjustment {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment __pyx_base;
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Adjustment *__pyx_vtabptr_7zipline_3lib_10adjustment_Float64Adjustment;

     0372:     """

     0373:     Base class for adjustments that operate on Float64 data.

     0374:     """

    +0375:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_17Float64Adjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_17Float64Adjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      Py_ssize_t __pyx_v_first_row;
      Py_ssize_t __pyx_v_last_row;
      Py_ssize_t __pyx_v_first_col;
      Py_ssize_t __pyx_v_last_col;
      __pyx_t_5numpy_float64_t __pyx_v_value;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 375, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 375, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 375, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 375, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 375, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 375, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 375, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 375, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 375, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 375, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 375, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 375, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 375, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_first_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 376, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_last_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 377, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_first_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_last_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 379, __pyx_L3_error)
        __pyx_v_value = __Pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_value == ((npy_float64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 380, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 375, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Adjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_17Float64Adjustment___init__(((struct __pyx_obj_7zipline_3lib_10adjustment_Float64Adjustment *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_17Float64Adjustment___init__(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Adjustment *__pyx_v_self, Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_col, Py_ssize_t __pyx_v_last_col, __pyx_t_5numpy_float64_t __pyx_v_value) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 375, 0, 0, 0, __PYX_ERR(0, 375, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 375, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 375, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Adjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0376:                  Py_ssize_t first_row,

     0377:                  Py_ssize_t last_row,

     0378:                  Py_ssize_t first_col,

     0379:                  Py_ssize_t last_col,

     0380:                  float64_t value):

     0381:

    +0382:         super(Float64Adjustment, self).__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Adjustment), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +0383:             first_row=first_row,

      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0384:             last_row=last_row,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0385:             first_col=first_col,

      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_first_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 385, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

    +0386:             last_col=last_col,

      __pyx_t_8 = PyLong_FromSsize_t(__pyx_v_last_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 386, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 382, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_4, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 382, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_7, __pyx_t_9, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 382, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_8, __pyx_t_9, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 382, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0387:         )

    +0388:         self.value = value

      __pyx_v_self->value = __pyx_v_value;

     0389:

    +0390:     from_assets_and_dates = classmethod(_from_assets_and_dates)

      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_from_assets_and_dates_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Adjustment, __pyx_mstate_global->__pyx_n_u_from_assets_and_dates, __pyx_t_3) < (0)) __PYX_ERR(0, 390, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0391:

    +0392:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_17Float64Adjustment_3__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_17Float64Adjustment_3__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_17Float64Adjustment_2__repr__(((struct __pyx_obj_7zipline_3lib_10adjustment_Float64Adjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_17Float64Adjustment_2__repr__(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Adjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66]))
      __Pyx_TraceStartFunc("__repr__", __pyx_f[0], 392, 0, 0, 0, __PYX_ERR(0, 392, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 392, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Adjustment.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0393:         return (

      __Pyx_XDECREF(__pyx_r);

    +0394:             "%s(first_row=%d, last_row=%d,"

      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 11 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 393, __pyx_L1_error));
      goto __pyx_L0;

     0395:             " first_col=%d, last_col=%d, value=%f)" % (

    +0396:                 type(self).__name__,

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0397:                 self.first_row,

      __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

    +0398:                 self.last_row,

      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0399:                 self.first_col,

      __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0400:                 self.last_col,

      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0401:                 self.value,

      __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_f); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 401, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8[0] = __pyx_t_2;
      __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u_first_row_2;
      __pyx_t_8[2] = __pyx_t_1;
      __pyx_t_8[3] = __pyx_mstate_global->__pyx_kp_u_last_row_3;
      __pyx_t_8[4] = __pyx_t_3;
      __pyx_t_8[5] = __pyx_mstate_global->__pyx_kp_u_first_col_2;
      __pyx_t_8[6] = __pyx_t_4;
      __pyx_t_8[7] = __pyx_mstate_global->__pyx_kp_u_last_col_3;
      __pyx_t_8[8] = __pyx_t_5;
      __pyx_t_8[9] = __pyx_mstate_global->__pyx_kp_u_value_2;
      __pyx_t_8[10] = __pyx_t_7;
      __pyx_t_8[11] = __pyx_mstate_global->__pyx_kp_u__5;

     0402:             )

     0403:         )

     0404:

     0405:

    +0406: cdef class Float64Multiply(Float64Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Multiply {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Adjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Multiply *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Multiply *__pyx_vtabptr_7zipline_3lib_10adjustment_Float64Multiply;

     0407:     """

     0408:     An adjustment that multiplies by a float.

     0409:

     0410:     Example

     0411:     -------

     0412:

     0413:     >>> import numpy as np

     0414:     >>> arr = np.arange(9, dtype=float).reshape(3, 3)

     0415:     >>> arr

     0416:     array([[ 0.,  1.,  2.],

     0417:            [ 3.,  4.,  5.],

     0418:            [ 6.,  7.,  8.]])

     0419:

     0420:     >>> adj = Float64Multiply(

     0421:     ...     first_row=1,

     0422:     ...     last_row=2,

     0423:     ...     first_col=1,

     0424:     ...     last_col=2,

     0425:     ...     value=4.0,

     0426:     ... )

     0427:     >>> adj.mutate(arr)

     0428:     >>> arr

     0429:     array([[  0.,   1.,   2.],

     0430:            [  3.,  16.,  20.],

     0431:            [  6.,  28.,  32.]])

     0432:     """

     0433:

    +0434:     cpdef mutate(self, float64_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_15Float64Multiply_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_15Float64Multiply_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Multiply *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __pyx_t_5numpy_float64_t __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 434, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 434, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Multiply &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_15Float64Multiply_1mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 434, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 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_5)) __PYX_ERR(0, 434, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 434, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 434, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 434, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Multiply.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_15Float64Multiply_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_15Float64Multiply_mutate, "Float64Multiply.mutate(self, float64_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_15Float64Multiply_1mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_15Float64Multiply_1mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_15Float64Multiply_mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_15Float64Multiply_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 434, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 434, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 434, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 434, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 434, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 434, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 434, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Multiply.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_15Float64Multiply_mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Float64Multiply *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_15Float64Multiply_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Multiply *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 434, 0, 0, 0, __PYX_ERR(0, 434, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 434, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_15Float64Multiply_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 434, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Multiply.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_15Float64Multiply_1mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Float64Multiply_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Multiply, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 434, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0435:         cdef Py_ssize_t row, col

    +0436:         cdef float64_t value = self.value

      __pyx_t_7 = __pyx_v_self->__pyx_base.value;
      __pyx_v_value = __pyx_t_7;

     0437:

     0438:         # last_col + 1 because last_col should also be affected.

    +0439:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

     0440:             # last_row + 1 because last_row should also be affected.

    +0441:             for row in range(self.first_row, self.last_row + 1):

        __pyx_t_11 = (__pyx_v_self->__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_12 = __pyx_t_11;
        for (__pyx_t_13 = __pyx_v_self->__pyx_base.__pyx_base.first_row; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
          __pyx_v_row = __pyx_t_13;

    +0442:                 data[row, col] *= value

          __pyx_t_14 = __pyx_v_row;
          __pyx_t_15 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_14 < 0) {
            __pyx_t_14 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 442, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_14 * __pyx_v_data.strides[0]) ) + __pyx_t_15 * __pyx_v_data.strides[1]) )) *= __pyx_v_value;
        }
      }

     0443:

     0444:

    +0445: cdef class Float64Overwrite(Float64Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Overwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Adjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Overwrite *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Overwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_Float64Overwrite;

     0446:     """

     0447:     An adjustment that overwrites with a float.

     0448:

     0449:     Example

     0450:     -------

     0451:

     0452:     >>> import numpy as np

     0453:     >>> arr = np.arange(9, dtype=float).reshape(3, 3)

     0454:     >>> arr

     0455:     array([[ 0.,  1.,  2.],

     0456:            [ 3.,  4.,  5.],

     0457:            [ 6.,  7.,  8.]])

     0458:

     0459:     >>> adj = Float64Overwrite(

     0460:     ...     first_row=1,

     0461:     ...     last_row=2,

     0462:     ...     first_col=1,

     0463:     ...     last_col=2,

     0464:     ...     value=0.0,

     0465:     ... )

     0466:     >>> adj.mutate(arr)

     0467:     >>> arr

     0468:     array([[ 0.,  1.,  2.],

     0469:            [ 3.,  0.,  0.],

     0470:            [ 6.,  0.,  0.]])

     0471:     """

     0472:

    +0473:     cpdef mutate(self, float64_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_16Float64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_16Float64Overwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Overwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __pyx_t_5numpy_float64_t __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 473, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 473, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Overwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_16Float64Overwrite_1mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 473, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 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_5)) __PYX_ERR(0, 473, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 473, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 473, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 473, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_16Float64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_16Float64Overwrite_mutate, "Float64Overwrite.mutate(self, float64_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_16Float64Overwrite_1mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_16Float64Overwrite_1mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_16Float64Overwrite_mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_16Float64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 473, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 473, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 473, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 473, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 473, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 473, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 473, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_16Float64Overwrite_mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Float64Overwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_16Float64Overwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Overwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 473, 0, 0, 0, __PYX_ERR(0, 473, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 473, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_16Float64Overwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 473, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_16Float64Overwrite_1mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Float64Overwrite_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Overwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0474:         cdef Py_ssize_t row, col

    +0475:         cdef float64_t value = self.value

      __pyx_t_7 = __pyx_v_self->__pyx_base.value;
      __pyx_v_value = __pyx_t_7;

     0476:

     0477:         # last_col + 1 because last_col should also be affected.

    +0478:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

     0479:             # last_row + 1 because last_row should also be affected.

    +0480:             for row in range(self.first_row, self.last_row + 1):

        __pyx_t_11 = (__pyx_v_self->__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_12 = __pyx_t_11;
        for (__pyx_t_13 = __pyx_v_self->__pyx_base.__pyx_base.first_row; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
          __pyx_v_row = __pyx_t_13;

    +0481:                 data[row, col] = value

          __pyx_t_14 = __pyx_v_row;
          __pyx_t_15 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_14 < 0) {
            __pyx_t_14 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 481, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_14 * __pyx_v_data.strides[0]) ) + __pyx_t_15 * __pyx_v_data.strides[1]) )) = __pyx_v_value;
        }
      }

     0482:

     0483:

    +0484: cdef class ArrayAdjustment(Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_ArrayAdjustment {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment __pyx_base;
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_ArrayAdjustment *__pyx_vtabptr_7zipline_3lib_10adjustment_ArrayAdjustment;

     0485:     """

     0486:     Base class for ArrayAdjustments.

     0487:

     0488:     Subclasses should inherit and provide a `values` attribute and a `mutate`

     0489:     method.

     0490:     """

    +0491:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_15ArrayAdjustment_1__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_15ArrayAdjustment_1__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_15ArrayAdjustment___repr__(((struct __pyx_obj_7zipline_3lib_10adjustment_ArrayAdjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_15ArrayAdjustment___repr__(struct __pyx_obj_7zipline_3lib_10adjustment_ArrayAdjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71]))
      __Pyx_TraceStartFunc("__repr__", __pyx_f[0], 491, 0, 0, 0, __PYX_ERR(0, 491, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 491, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.ArrayAdjustment.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0492:             return (

      __Pyx_XDECREF(__pyx_r);

    +0493:                 "%s(first_row=%d, last_row=%d,"

      __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_9, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 11 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 493, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 492, __pyx_L1_error));
      goto __pyx_L0;

     0494:                 " first_col=%d, last_col=%d, values=%s)" % (

    +0495:                     type(self).__name__,

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0496:                     self.first_row,

      __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

    +0497:                     self.last_row,

      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0498:                     self.first_col,

      __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0499:                     self.last_col,

      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 499, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0500:                     asarray(self.values),

      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_values_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_8), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9[0] = __pyx_t_2;
      __pyx_t_9[1] = __pyx_mstate_global->__pyx_kp_u_first_row_2;
      __pyx_t_9[2] = __pyx_t_1;
      __pyx_t_9[3] = __pyx_mstate_global->__pyx_kp_u_last_row_3;
      __pyx_t_9[4] = __pyx_t_3;
      __pyx_t_9[5] = __pyx_mstate_global->__pyx_kp_u_first_col_2;
      __pyx_t_9[6] = __pyx_t_4;
      __pyx_t_9[7] = __pyx_mstate_global->__pyx_kp_u_last_col_3;
      __pyx_t_9[8] = __pyx_t_5;
      __pyx_t_9[9] = __pyx_mstate_global->__pyx_kp_u_values;
      __pyx_t_9[10] = __pyx_t_7;
      __pyx_t_9[11] = __pyx_mstate_global->__pyx_kp_u__5;

     0501:                 )

     0502:             )

     0503:

    +0504: cdef class Float641DArrayOverwrite(ArrayAdjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float641DArrayOverwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_ArrayAdjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Float641DArrayOverwrite *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float641DArrayOverwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_Float641DArrayOverwrite;

     0505:     """

     0506:     An adjustment that overwrites subarrays with a value for each subarray.

     0507:

     0508:     Example

     0509:     -------

     0510:

     0511:     >>> import numpy as np

     0512:     >>> arr = np.arange(25, dtype=float).reshape(5, 5)

     0513:     >>> arr

     0514:     array([[  0.,   1.,   2.,   3.,   4.],

     0515:            [  5.,   6.,   7.,   8.,   9.],

     0516:            [ 10.,  11.,  12.,  13.,  14.],

     0517:            [ 15.,  16.,  17.,  18.,  19.],

     0518:            [ 20.,  21.,  22.,  23.,  24.]])

     0519:     >>> adj = Float641DArrayOverwrite(

     0520:     ...     row_start=0,

     0521:     ...     row_end=3,

     0522:     ...     column_start=0,

     0523:     ...     column_end=0,

     0524:     ...     values=np.array([1, 2, 3, 4]),

     0525:     )

     0526:     >>> adj.mutate(arr)

     0527:     >>> arr

     0528:     array([[  1.,   1.,   2.,   3.,   4.],

     0529:            [  2.,   6.,   7.,   8.,   9.],

     0530:            [ 3.,  11.,  12.,  13.,  14.],

     0531:            [ 4.,  16.,  17.,  18.,  19.],

     0532:            [ 20.,  21.,  22.,  23.,  24.]])

     0533:     """

    +0534:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      __pyx_t_5numpy_int64_t __pyx_v_first_row;
      __pyx_t_5numpy_int64_t __pyx_v_last_row;
      __pyx_t_5numpy_int64_t __pyx_v_first_col;
      __pyx_t_5numpy_int64_t __pyx_v_last_col;
      __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_values_2,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 534, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 534, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 534, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 534, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 534, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 534, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 534, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 534, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 534, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 534, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 534, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 534, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 534, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyLong_As_npy_int64(values[0]); if (unlikely((__pyx_v_first_row == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 535, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyLong_As_npy_int64(values[1]); if (unlikely((__pyx_v_last_row == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 536, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyLong_As_npy_int64(values[2]); if (unlikely((__pyx_v_first_col == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyLong_As_npy_int64(values[3]); if (unlikely((__pyx_v_last_col == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 538, __pyx_L3_error)
        __pyx_v_values = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_float64_t(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_values.memview)) __PYX_ERR(0, 539, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 534, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Float641DArrayOverwrite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_23Float641DArrayOverwrite___init__(((struct __pyx_obj_7zipline_3lib_10adjustment_Float641DArrayOverwrite *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_values);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_23Float641DArrayOverwrite___init__(struct __pyx_obj_7zipline_3lib_10adjustment_Float641DArrayOverwrite *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_first_row, __pyx_t_5numpy_int64_t __pyx_v_last_row, __pyx_t_5numpy_int64_t __pyx_v_first_col, __pyx_t_5numpy_int64_t __pyx_v_last_col, __Pyx_memviewslice __pyx_v_values) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 534, 0, 0, 0, __PYX_ERR(0, 534, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 534, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 534, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float641DArrayOverwrite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0535:                  int64_t first_row,

     0536:                  int64_t last_row,

     0537:                  int64_t first_col,

     0538:                  int64_t last_col,

     0539:                  float64_t[:] values):

    +0540:         super(Float641DArrayOverwrite, self).__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float641DArrayOverwrite), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +0541:             first_row=first_row,

      __pyx_t_5 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0542:             last_row=last_row,

      __pyx_t_4 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0543:             first_col=first_col,

      __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

    +0544:             last_col=last_col,

      __pyx_t_8 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 540, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_4, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 540, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_7, __pyx_t_9, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 540, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_8, __pyx_t_9, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 540, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0545:         )

    +0546:         if last_row + 1 - first_row != len(values):

      __pyx_t_10 = __Pyx_MemoryView_Len(__pyx_v_values);
      __pyx_t_11 = (((__pyx_v_last_row + 1) - __pyx_v_first_row) != __pyx_t_10);
      if (unlikely(__pyx_t_11)) {
    /* … */
      }

    +0547:             raise ValueError(

        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_9 = __pyx_builtin_ValueError;

    +0548:                 "Mismatch: got %d values for rows starting at index %d and "

        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 547, __pyx_L1_error)

    +0549:                 "ending at index %d." % (len(values), first_row, last_row)

        __pyx_t_10 = __Pyx_MemoryView_Len(__pyx_v_values);
        __pyx_t_8 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_10, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_7), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_7), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Mismatch_got;
        __pyx_t_12[1] = __pyx_t_8;
        __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_values_for_rows_starting_at_ind;
        __pyx_t_12[3] = __pyx_t_4;
        __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_and_ending_at_index;
        __pyx_t_12[5] = __pyx_t_5;
        __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__2;

     0550:             )

    +0551:         self.values = values

      __PYX_XCLEAR_MEMVIEW(&__pyx_v_self->values, 0);
      __PYX_INC_MEMVIEW(&__pyx_v_values, 1);
      __pyx_v_self->values = __pyx_v_values;

     0552:

    +0553:     cpdef mutate(self, float64_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Float641DArrayOverwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 553, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 553, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float641DArrayOverwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_3mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 553, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 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_5)) __PYX_ERR(0, 553, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 553, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 553, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 553, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float641DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_2mutate, "Float641DArrayOverwrite.mutate(self, float64_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_3mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_3mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_2mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 553, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 553, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 553, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 553, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 553, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 553, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 553, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Float641DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_2mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Float641DArrayOverwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_2mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Float641DArrayOverwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 553, 0, 0, 0, __PYX_ERR(0, 553, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 553, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 553, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float641DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_23Float641DArrayOverwrite_3mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Float641DArrayOverwrite_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float641DArrayOverwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 553, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0554:         cdef Py_ssize_t i, row, col

    +0555:         cdef float64_t[:] values = self.values

      if (unlikely(!__pyx_v_self->values.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 555, __pyx_L1_error)}
      __pyx_t_7 = __pyx_v_self->values;
      __PYX_INC_MEMVIEW(&__pyx_t_7, 1);
      __pyx_v_values = __pyx_t_7;
      __pyx_t_7.memview = NULL;
      __pyx_t_7.data = NULL;

    +0556:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

    +0557:             for i, row in enumerate(range(self.first_row, self.last_row + 1)):

        __pyx_t_11 = 0;
        __pyx_t_12 = (__pyx_v_self->__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_13 = __pyx_t_12;
        for (__pyx_t_14 = __pyx_v_self->__pyx_base.__pyx_base.first_row; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
          __pyx_v_row = __pyx_t_14;
          __pyx_v_i = __pyx_t_11;
          __pyx_t_11 = (__pyx_t_11 + 1);

    +0558:                 data[row, col] = values[i]

          __pyx_t_15 = __pyx_v_i;
          __pyx_t_16 = -1;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_values.shape[0];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_values.shape[0])) __pyx_t_16 = 0;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 558, __pyx_L1_error)
          }
          __pyx_t_17 = __pyx_v_row;
          __pyx_t_18 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_17 < 0) {
            __pyx_t_17 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_17 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_18 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 558, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_17 * __pyx_v_data.strides[0]) ) + __pyx_t_18 * __pyx_v_data.strides[1]) )) = (*((__pyx_t_5numpy_float64_t *) ( /* dim=0 */ (__pyx_v_values.data + __pyx_t_15 * __pyx_v_values.strides[0]) )));
        }
      }

     0559:

     0560:

    +0561: cdef class Datetime641DArrayOverwrite(ArrayAdjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_ArrayAdjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite;

     0562:     """

     0563:     An adjustment that overwrites subarrays with a value for each subarray.

     0564:

     0565:     Example

     0566:     -------

     0567:

     0568:     >>> import numpy as np; import pandas as pd

     0569:     >>> dts = pd.date_range('2014', freq='D', periods=9, tz='UTC')

     0570:     >>> arr = dts.values.reshape(3, 3)

     0571:     >>> arr == np.datetime64(0, 'ns')

     0572:     array([[False, False, False],

     0573:        [False, False, False],

     0574:        [False, False, False]], dtype=bool)

     0575:     >>> adj = Datetime641DArrayOverwrite(

     0576:     ...           first_row=1,

     0577:     ...           last_row=2,

     0578:     ...           first_col=1,

     0579:     ...           last_col=2,

     0580:     ...           values=np.array([

     0581:     ...               np.datetime64(0, 'ns'),

     0582:     ...               np.datetime64(1, 'ns')

     0583:     ...           ])

     0584:     ...       )

     0585:     >>> adj.mutate(arr.view(np.int64))

     0586:     >>> arr == np.datetime64(0, 'ns')

     0587:     array([[False, False, False],

     0588:        [False,  True,  True],

     0589:        [False, False, False]], dtype=bool)

     0590:     >>> arr == np.datetime64(1, 'ns')

     0591:     array([[False, False, False],

     0592:        [False, False, False],

     0593:        [False,  True,  True]], dtype=bool)

     0594:     """

    +0595:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      __pyx_t_5numpy_int64_t __pyx_v_first_row;
      __pyx_t_5numpy_int64_t __pyx_v_last_row;
      __pyx_t_5numpy_int64_t __pyx_v_first_col;
      __pyx_t_5numpy_int64_t __pyx_v_last_col;
      PyObject *__pyx_v_values = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_values_2,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 595, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 595, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 595, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 595, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 595, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 595, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 595, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 595, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 595, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 595, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 595, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 595, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 595, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyLong_As_npy_int64(values[0]); if (unlikely((__pyx_v_first_row == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyLong_As_npy_int64(values[1]); if (unlikely((__pyx_v_last_row == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyLong_As_npy_int64(values[2]); if (unlikely((__pyx_v_first_col == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 598, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyLong_As_npy_int64(values[3]); if (unlikely((__pyx_v_last_col == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L3_error)
        __pyx_v_values = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 595, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime641DArrayOverwrite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite___init__(((struct __pyx_obj_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_values);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite___init__(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_first_row, __pyx_t_5numpy_int64_t __pyx_v_last_row, __pyx_t_5numpy_int64_t __pyx_v_first_col, __pyx_t_5numpy_int64_t __pyx_v_last_col, PyObject *__pyx_v_values) {
      PyObject *__pyx_7genexpr__pyx_v_value = NULL;
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 595, 0, 0, 0, __PYX_ERR(0, 595, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 595, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __PYX_XCLEAR_MEMVIEW(&__pyx_t_14, 1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 595, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime641DArrayOverwrite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_value);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0596:                  int64_t first_row,

     0597:                  int64_t last_row,

     0598:                  int64_t first_col,

     0599:                  int64_t last_col,

     0600:                  object values):

    +0601:         super(Datetime641DArrayOverwrite, self).__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +0602:             first_row=first_row,

      __pyx_t_5 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0603:             last_row=last_row,

      __pyx_t_4 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0604:             first_col=first_col,

      __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

    +0605:             last_col=last_col,

      __pyx_t_8 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 601, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 601, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_4, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 601, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_7, __pyx_t_9, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 601, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_8, __pyx_t_9, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 601, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0606:         )

    +0607:         if last_row + 1 - first_row != len(values):

      __pyx_t_10 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 607, __pyx_L1_error)
      __pyx_t_11 = (((__pyx_v_last_row + 1) - __pyx_v_first_row) != __pyx_t_10);
      if (unlikely(__pyx_t_11)) {
    /* … */
      }

    +0608:             raise ValueError("Mismatch: got %d values for rows starting at"

        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_9 = __pyx_builtin_ValueError;
    /* … */
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 608, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 608, __pyx_L1_error)

     0609:             " index %d and ending at index %d." % (

    +0610:                 len(values), first_row, last_row)

        __pyx_t_10 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 610, __pyx_L1_error)
        __pyx_t_8 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_10, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_7), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_7), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Mismatch_got;
        __pyx_t_12[1] = __pyx_t_8;
        __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_values_for_rows_starting_at_ind;
        __pyx_t_12[3] = __pyx_t_4;
        __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_and_ending_at_index;
        __pyx_t_12[5] = __pyx_t_5;
        __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__2;

     0611:             )

    +0612:         self.values = asarray([datetime_to_int(value) for value in values])

      __pyx_t_9 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      { /* enter inner scope */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
          __pyx_t_5 = __pyx_v_values; __Pyx_INCREF(__pyx_t_5);
          __pyx_t_10 = 0;
          __pyx_t_13 = NULL;
        } else {
          __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 612, __pyx_L6_error)
        }
        for (;;) {
          if (likely(!__pyx_t_13)) {
            if (likely(PyList_CheckExact(__pyx_t_5))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 612, __pyx_L6_error)
                #endif
                if (__pyx_t_10 >= __pyx_temp) break;
              }
              __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_5, __pyx_t_10);
              ++__pyx_t_10;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 612, __pyx_L6_error)
                #endif
                if (__pyx_t_10 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10));
              #else
              __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_10);
              #endif
              ++__pyx_t_10;
            }
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L6_error)
          } else {
            __pyx_t_4 = __pyx_t_13(__pyx_t_5);
            if (unlikely(!__pyx_t_4)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 612, __pyx_L6_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_value, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = __pyx_f_7zipline_3lib_10adjustment_datetime_to_int(__pyx_7genexpr__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 612, __pyx_L6_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v_value); __pyx_7genexpr__pyx_v_value = 0;
        goto __pyx_L10_exit_scope;
        __pyx_L6_error:;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v_value); __pyx_7genexpr__pyx_v_value = 0;
        goto __pyx_L1_error;
        __pyx_L10_exit_scope:;
      } /* exit inner scope */
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_9);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_int64_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_self->values, 0);
      __pyx_v_self->values = __pyx_t_14;
      __pyx_t_14.memview = NULL;
      __pyx_t_14.data = NULL;

     0613:

    +0614:     cpdef mutate(self, int64_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 614, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 614, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_3mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 614, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int64_t, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 614, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 614, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 614, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime641DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_2mutate, "Datetime641DArrayOverwrite.mutate(self, int64_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_3mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_3mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_2mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 614, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 614, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 614, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 614, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 614, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 614, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 614, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime641DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_2mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_2mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 614, 0, 0, 0, __PYX_ERR(0, 614, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 614, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 614, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime641DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_3mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Datetime641DArrayOverwrite_mutat, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0615:         cdef Py_ssize_t i, row, col

    +0616:         cdef int64_t[:] values = self.values

      if (unlikely(!__pyx_v_self->values.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 616, __pyx_L1_error)}
      __pyx_t_7 = __pyx_v_self->values;
      __PYX_INC_MEMVIEW(&__pyx_t_7, 1);
      __pyx_v_values = __pyx_t_7;
      __pyx_t_7.memview = NULL;
      __pyx_t_7.data = NULL;

    +0617:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

    +0618:             for i, row in enumerate(range(self.first_row, self.last_row + 1)):

        __pyx_t_11 = 0;
        __pyx_t_12 = (__pyx_v_self->__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_13 = __pyx_t_12;
        for (__pyx_t_14 = __pyx_v_self->__pyx_base.__pyx_base.first_row; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
          __pyx_v_row = __pyx_t_14;
          __pyx_v_i = __pyx_t_11;
          __pyx_t_11 = (__pyx_t_11 + 1);

    +0619:                 data[row, col] = values[i]

          __pyx_t_15 = __pyx_v_i;
          __pyx_t_16 = -1;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_values.shape[0];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_values.shape[0])) __pyx_t_16 = 0;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 619, __pyx_L1_error)
          }
          __pyx_t_17 = __pyx_v_row;
          __pyx_t_18 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_17 < 0) {
            __pyx_t_17 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_17 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_18 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 619, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_int64_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_17 * __pyx_v_data.strides[0]) ) + __pyx_t_18 * __pyx_v_data.strides[1]) )) = (*((__pyx_t_5numpy_int64_t *) ( /* dim=0 */ (__pyx_v_values.data + __pyx_t_15 * __pyx_v_values.strides[0]) )));
        }
      }

     0620:

    +0621:     def __reduce__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_5__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_4__reduce__, "Datetime641DArrayOverwrite.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_4__reduce__};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_5__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_4__reduce__(((struct __pyx_obj_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_4__reduce__(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78]))
      __Pyx_TraceStartFunc("__reduce__", __pyx_f[0], 621, 0, 0, 0, __PYX_ERR(0, 621, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 621, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime641DArrayOverwrite.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_26Datetime641DArrayOverwrite_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Datetime641DArrayOverwrite___red, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime641DArrayOverwrite, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_3) < (0)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0622:         return type(self), (

      __Pyx_XDECREF(__pyx_r);
    /* … */
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(0, 622, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 622, __pyx_L1_error);
      __pyx_t_7 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 622, __pyx_L1_error));
      goto __pyx_L0;

    +0623:             self.first_row,

      __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    /* … */
      __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 623, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 623, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 623, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 623, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 623, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;

    +0624:             self.last_row,

      __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.last_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

    +0625:             self.first_col,

      __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0626:             self.last_col,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.last_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0627:             self.values.view('datetime64[ns]'),

      if (unlikely(!__pyx_v_self->values.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 627, __pyx_L1_error)}
      __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_self->values, 1, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int64_t, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 627, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __pyx_t_7;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_datetime64_ns};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }

     0628:         )

     0629:

     0630:

    +0631: cdef class Object1DArrayOverwrite(ArrayAdjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Object1DArrayOverwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_ArrayAdjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Object1DArrayOverwrite *, PyObject *, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Object1DArrayOverwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_Object1DArrayOverwrite;

    +0632:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      __pyx_t_5numpy_int64_t __pyx_v_first_row;
      __pyx_t_5numpy_int64_t __pyx_v_last_row;
      __pyx_t_5numpy_int64_t __pyx_v_first_col;
      __pyx_t_5numpy_int64_t __pyx_v_last_col;
      PyObject *__pyx_v_values = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_values_2,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 632, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 632, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 632, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 632, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 632, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 632, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 632, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 632, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 632, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 632, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 632, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 632, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 632, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyLong_As_npy_int64(values[0]); if (unlikely((__pyx_v_first_row == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 633, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyLong_As_npy_int64(values[1]); if (unlikely((__pyx_v_last_row == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 634, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyLong_As_npy_int64(values[2]); if (unlikely((__pyx_v_first_col == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 635, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyLong_As_npy_int64(values[3]); if (unlikely((__pyx_v_last_col == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L3_error)
        __pyx_v_values = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 632, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.Object1DArrayOverwrite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_22Object1DArrayOverwrite___init__(((struct __pyx_obj_7zipline_3lib_10adjustment_Object1DArrayOverwrite *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_values);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_22Object1DArrayOverwrite___init__(struct __pyx_obj_7zipline_3lib_10adjustment_Object1DArrayOverwrite *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_first_row, __pyx_t_5numpy_int64_t __pyx_v_last_row, __pyx_t_5numpy_int64_t __pyx_v_first_col, __pyx_t_5numpy_int64_t __pyx_v_last_col, PyObject *__pyx_v_values) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 632, 0, 0, 0, __PYX_ERR(0, 632, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 632, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 632, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Object1DArrayOverwrite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0633:                  int64_t first_row,

     0634:                  int64_t last_row,

     0635:                  int64_t first_col,

     0636:                  int64_t last_col,

     0637:                  object values):

    +0638:         super(Object1DArrayOverwrite, self).__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Object1DArrayOverwrite), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +0639:             first_row=first_row,

      __pyx_t_5 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0640:             last_row=last_row,

      __pyx_t_4 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0641:             first_col=first_col,

      __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 641, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

    +0642:             last_col=last_col,

      __pyx_t_8 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 638, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_4, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_7, __pyx_t_9, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_8, __pyx_t_9, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 638, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0643:         )

    +0644:         if last_row + 1 - first_row != len(values):

      __pyx_t_10 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 644, __pyx_L1_error)
      __pyx_t_11 = (((__pyx_v_last_row + 1) - __pyx_v_first_row) != __pyx_t_10);
      if (unlikely(__pyx_t_11)) {
    /* … */
      }

    +0645:             raise ValueError(

        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_9 = __pyx_builtin_ValueError;

    +0646:                 "Mismatch: got %d values for rows starting at index %d and "

        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 645, __pyx_L1_error)

    +0647:                 "ending at index %d." % (len(values), first_row, last_row)

        __pyx_t_10 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 647, __pyx_L1_error)
        __pyx_t_8 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_10, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_7), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_row); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_7), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Mismatch_got;
        __pyx_t_12[1] = __pyx_t_8;
        __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_values_for_rows_starting_at_ind;
        __pyx_t_12[3] = __pyx_t_4;
        __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_and_ending_at_index;
        __pyx_t_12[5] = __pyx_t_5;
        __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__2;

     0648:             )

    +0649:         self.values = values[:, None]

      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_values, __pyx_mstate_global->__pyx_tuple[2]); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->values);
      __Pyx_DECREF(__pyx_v_self->values);
      __pyx_v_self->values = __pyx_t_1;
      __pyx_t_1 = 0;
    /* … */
      __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_slice[0], Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

     0650:

    +0651:     cpdef mutate(self, object data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Object1DArrayOverwrite *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 651, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 651, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Object1DArrayOverwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_3mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_data};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 651, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 651, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 651, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Object1DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_2mutate, "Object1DArrayOverwrite.mutate(self, data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_3mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_3mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_2mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_data = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 651, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 651, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 651, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 651, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 651, __pyx_L3_error)
        }
        __pyx_v_data = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 651, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.Object1DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_2mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Object1DArrayOverwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_2mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Object1DArrayOverwrite *__pyx_v_self, PyObject *__pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 651, 0, 0, 0, __PYX_ERR(0, 651, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 651, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Object1DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_22Object1DArrayOverwrite_3mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Object1DArrayOverwrite_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Object1DArrayOverwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 651, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0652:         # data is an object here because this is intended to be used with a

     0653:         # `zipline.lib.LabelArray`.

     0654:

    +0655:         data[

      __pyx_t_3 = PySlice_New(__pyx_t_2, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    /* … */
      __pyx_t_6 = PySlice_New(__pyx_t_4, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 655, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 655, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_6 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_data, __pyx_t_2, __pyx_t_1) < 0))) __PYX_ERR(0, 655, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0656:             self.first_row:self.last_row + 1,

      __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyLong_FromSsize_t((__pyx_v_self->__pyx_base.__pyx_base.last_row + 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0657:             self.first_col:self.last_col + 1,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PyLong_FromSsize_t((__pyx_v_self->__pyx_base.__pyx_base.last_col + 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

    +0658:         ] = self.values

      __pyx_t_1 = __pyx_v_self->values;
      __Pyx_INCREF(__pyx_t_1);

     0659:

     0660:

     0661:

    +0662: cdef class Boolean1DArrayOverwrite(ArrayAdjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_ArrayAdjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite;

    +0663:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      __pyx_t_5numpy_int64_t __pyx_v_first_row;
      __pyx_t_5numpy_int64_t __pyx_v_last_row;
      __pyx_t_5numpy_int64_t __pyx_v_first_col;
      __pyx_t_5numpy_int64_t __pyx_v_last_col;
      PyObject *__pyx_v_values = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_values_2,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 663, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 663, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 663, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 663, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 663, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 663, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 663, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 663, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 663, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 663, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 663, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 663, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 663, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyLong_As_npy_int64(values[0]); if (unlikely((__pyx_v_first_row == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 664, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyLong_As_npy_int64(values[1]); if (unlikely((__pyx_v_last_row == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 665, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyLong_As_npy_int64(values[2]); if (unlikely((__pyx_v_first_col == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 666, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyLong_As_npy_int64(values[3]); if (unlikely((__pyx_v_last_col == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L3_error)
        __pyx_v_values = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 663, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.Boolean1DArrayOverwrite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite___init__(((struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_values);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite___init__(struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_first_row, __pyx_t_5numpy_int64_t __pyx_v_last_row, __pyx_t_5numpy_int64_t __pyx_v_first_col, __pyx_t_5numpy_int64_t __pyx_v_last_col, PyObject *__pyx_v_values) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 663, 0, 0, 0, __PYX_ERR(0, 663, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 663, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __PYX_XCLEAR_MEMVIEW(&__pyx_t_13, 1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 663, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Boolean1DArrayOverwrite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0664:                  int64_t first_row,

     0665:                  int64_t last_row,

     0666:                  int64_t first_col,

     0667:                  int64_t last_col,

     0668:                  object values):

    +0669:         if values.dtype.kind != 'b':

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_b, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 669, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_t_3)) {
    /* … */
      }

    +0670:             raise TypeError('dtype is not bool, got: %r' % values.dtype)

        __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_4 = __pyx_builtin_TypeError;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_dtype_is_not_bool_got_r, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 670, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 670, __pyx_L1_error)

     0671:

    +0672:         super(Boolean1DArrayOverwrite, self).__init__(

      __pyx_t_1 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite), ((PyObject *)__pyx_v_self)};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __pyx_t_4 = __pyx_t_6;
      __Pyx_INCREF(__pyx_t_4);

    +0673:             first_row=first_row,

      __pyx_t_5 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0674:             last_row=last_row,

      __pyx_t_1 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

    +0675:             first_col=first_col,

      __pyx_t_8 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 675, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);

    +0676:             last_col=last_col,

      __pyx_t_9 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_col); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_4, NULL};
        __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 672, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_1, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 672, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 672, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_9, __pyx_t_10, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 672, __pyx_L1_error)
        __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0677:         )

     0678:

    +0679:         if last_row + 1 - first_row != len(values):

      __pyx_t_11 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 679, __pyx_L1_error)
      __pyx_t_3 = (((__pyx_v_last_row + 1) - __pyx_v_first_row) != __pyx_t_11);
      if (unlikely(__pyx_t_3)) {
    /* … */
      }

    +0680:             raise ValueError(

        __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_10 = __pyx_builtin_ValueError;

    +0681:                 "Mismatch: got %d values for rows starting at index %d and "

        __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_12, 7, 14 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 21 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5));
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 680, __pyx_L1_error)

    +0682:                 "ending at index %d." % (len(values), first_row, last_row)

        __pyx_t_11 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 682, __pyx_L1_error)
        __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_11, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_PyLong_From_npy_int64(__pyx_v_first_row); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_8), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyLong_From_npy_int64(__pyx_v_last_row); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_8), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Mismatch_got;
        __pyx_t_12[1] = __pyx_t_9;
        __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_values_for_rows_starting_at_ind;
        __pyx_t_12[3] = __pyx_t_1;
        __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u_and_ending_at_index;
        __pyx_t_12[5] = __pyx_t_5;
        __pyx_t_12[6] = __pyx_mstate_global->__pyx_kp_u__2;

     0683:             )

    +0684:         self.values = values.view('uint8')

      __pyx_t_10 = __pyx_v_values;
      __Pyx_INCREF(__pyx_t_10);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_n_u_uint8};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_nn___pyx_t_5numpy_uint8_t(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 684, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_self->values, 0);
      __pyx_v_self->values = __pyx_t_13;
      __pyx_t_13.memview = NULL;
      __pyx_t_13.data = NULL;

     0685:

    +0686:     cpdef mutate(self, np.uint8_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 686, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 686, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_3mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 686, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_uint8_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_uint8_t, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 686, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 686, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 686, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Boolean1DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_2mutate, "Boolean1DArrayOverwrite.mutate(self, uint8_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_3mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_3mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_2mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_3mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 686, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 686, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 686, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 686, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 686, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint8_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 686, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 686, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Boolean1DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_2mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_2mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 686, 0, 0, 0, __PYX_ERR(0, 686, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 686, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 686, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Boolean1DArrayOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_3mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Boolean1DArrayOverwrite_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0687:         cdef Py_ssize_t i, row, col

    +0688:         cdef np.uint8_t[:] values = self.values

      if (unlikely(!__pyx_v_self->values.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 688, __pyx_L1_error)}
      __pyx_t_7 = __pyx_v_self->values;
      __PYX_INC_MEMVIEW(&__pyx_t_7, 1);
      __pyx_v_values = __pyx_t_7;
      __pyx_t_7.memview = NULL;
      __pyx_t_7.data = NULL;

    +0689:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

    +0690:             for i, row in enumerate(range(self.first_row, self.last_row + 1)):

        __pyx_t_11 = 0;
        __pyx_t_12 = (__pyx_v_self->__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_13 = __pyx_t_12;
        for (__pyx_t_14 = __pyx_v_self->__pyx_base.__pyx_base.first_row; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
          __pyx_v_row = __pyx_t_14;
          __pyx_v_i = __pyx_t_11;
          __pyx_t_11 = (__pyx_t_11 + 1);

    +0691:                 data[row, col] = values[i]

          __pyx_t_15 = __pyx_v_i;
          __pyx_t_16 = -1;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_values.shape[0];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_values.shape[0])) __pyx_t_16 = 0;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 691, __pyx_L1_error)
          }
          __pyx_t_17 = __pyx_v_row;
          __pyx_t_18 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_17 < 0) {
            __pyx_t_17 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_17 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_18 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 691, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_uint8_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_17 * __pyx_v_data.strides[0]) ) + __pyx_t_18 * __pyx_v_data.strides[1]) )) = (*((__pyx_t_5numpy_uint8_t *) ( /* dim=0 */ (__pyx_v_values.data + __pyx_t_15 * __pyx_v_values.strides[0]) )));
        }
      }

     0692:

    +0693:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_5__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_5__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_4__repr__(((struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_4__repr__(struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88]))
      __Pyx_TraceStartFunc("__repr__", __pyx_f[0], 693, 0, 0, 0, __PYX_ERR(0, 693, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 693, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Boolean1DArrayOverwrite.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0694:         return (

      __Pyx_XDECREF(__pyx_r);

    +0695:             "%s(first_row=%d, last_row=%d,"

      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 11 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 694, __pyx_L1_error));
      goto __pyx_L0;

     0696:             " first_col=%d, last_col=%d, value=%r)" % (

    +0697:                 type(self).__name__,

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0698:                 self.first_row,

      __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.__pyx_base.first_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

    +0699:                 self.last_row,

      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.__pyx_base.last_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0700:                 self.first_col,

      __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.__pyx_base.first_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0701:                 self.last_col,

      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.__pyx_base.last_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0702:                 self.value.view('?'),

      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_view); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[3], NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8[0] = __pyx_t_2;
      __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u_first_row_2;
      __pyx_t_8[2] = __pyx_t_1;
      __pyx_t_8[3] = __pyx_mstate_global->__pyx_kp_u_last_row_3;
      __pyx_t_8[4] = __pyx_t_3;
      __pyx_t_8[5] = __pyx_mstate_global->__pyx_kp_u_first_col_2;
      __pyx_t_8[6] = __pyx_t_4;
      __pyx_t_8[7] = __pyx_mstate_global->__pyx_kp_u_last_col_3;
      __pyx_t_8[8] = __pyx_t_5;
      __pyx_t_8[9] = __pyx_mstate_global->__pyx_kp_u_value_2;
      __pyx_t_8[10] = __pyx_t_7;
      __pyx_t_8[11] = __pyx_mstate_global->__pyx_kp_u__5;
    /* … */
      __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_kp_u__6); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

     0703:             )

     0704:         )

     0705:

    +0706:     def __reduce__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_7__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_6__reduce__, "Boolean1DArrayOverwrite.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_7__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_7__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_6__reduce__};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_7__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_6__reduce__(((struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_6__reduce__(struct __pyx_obj_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89]))
      __Pyx_TraceStartFunc("__reduce__", __pyx_f[0], 706, 0, 0, 0, __PYX_ERR(0, 706, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 706, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Boolean1DArrayOverwrite.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_23Boolean1DArrayOverwrite_7__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Boolean1DArrayOverwrite___reduce, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Boolean1DArrayOverwrite, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_3) < (0)) __PYX_ERR(0, 706, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0707:         return type(self), (

      __Pyx_XDECREF(__pyx_r);
    /* … */
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(0, 707, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 707, __pyx_L1_error);
      __pyx_t_7 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 707, __pyx_L1_error));
      goto __pyx_L0;

    +0708:             self.first_row,

      __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    /* … */
      __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 708, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 708, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 708, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 708, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 708, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 708, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;

    +0709:             self.last_row,

      __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.last_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

    +0710:             self.first_col,

      __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0711:             self.last_col,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.last_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0712:             self.value.view('?'),

      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 712, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __pyx_t_7;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u__6};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 712, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }

     0713:         )

     0714:

     0715:

    +0716: cdef class Float64Add(Float64Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Add {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Adjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Add *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Float64Add *__pyx_vtabptr_7zipline_3lib_10adjustment_Float64Add;

     0717:     """

     0718:     An adjustment that adds a float.

     0719:

     0720:     Example

     0721:     -------

     0722:

     0723:     >>> import numpy as np

     0724:     >>> arr = np.arange(9, dtype=float).reshape(3, 3)

     0725:     >>> arr

     0726:     array([[ 0.,  1.,  2.],

     0727:            [ 3.,  4.,  5.],

     0728:            [ 6.,  7.,  8.]])

     0729:

     0730:     >>> adj = Float64Add(

     0731:     ...     first_row=1,

     0732:     ...     last_row=2,

     0733:     ...     first_col=1,

     0734:     ...     last_col=2,

     0735:     ...     value=1.0,

     0736:     ... )

     0737:     >>> adj.mutate(arr)

     0738:     >>> arr

     0739:     array([[ 0.,  1.,  2.],

     0740:            [ 3.,  5.,  6.],

     0741:            [ 6.,  8.,  9.]])

     0742:     """

     0743:

    +0744:     cpdef mutate(self, float64_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Float64Add_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_10Float64Add_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Add *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __pyx_t_5numpy_float64_t __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 744, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 744, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Add &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_10Float64Add_1mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 744, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 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_5)) __PYX_ERR(0, 744, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 744, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 744, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 744, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Add.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Float64Add_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_10Float64Add_mutate, "Float64Add.mutate(self, float64_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_10Float64Add_1mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_10Float64Add_1mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_10Float64Add_mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_10Float64Add_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 744, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 744, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 744, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 744, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 744, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_float64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 744, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 744, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Add.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_10Float64Add_mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Float64Add *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_10Float64Add_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Float64Add *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 744, 0, 0, 0, __PYX_ERR(0, 744, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 744, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_10Float64Add_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 744, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Float64Add.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_10Float64Add_1mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Float64Add_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Float64Add, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0745:         cdef Py_ssize_t row, col

    +0746:         cdef float64_t value = self.value

      __pyx_t_7 = __pyx_v_self->__pyx_base.value;
      __pyx_v_value = __pyx_t_7;

     0747:

     0748:         # last_col + 1 because last_col should also be affected.

    +0749:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

     0750:             # last_row + 1 because last_row should also be affected.

    +0751:             for row in range(self.first_row, self.last_row + 1):

        __pyx_t_11 = (__pyx_v_self->__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_12 = __pyx_t_11;
        for (__pyx_t_13 = __pyx_v_self->__pyx_base.__pyx_base.first_row; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
          __pyx_v_row = __pyx_t_13;

    +0752:                 data[row, col] += value

          __pyx_t_14 = __pyx_v_row;
          __pyx_t_15 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_14 < 0) {
            __pyx_t_14 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 752, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_float64_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_14 * __pyx_v_data.strides[0]) ) + __pyx_t_15 * __pyx_v_data.strides[1]) )) += __pyx_v_value;
        }
      }

     0753:

     0754:

    +0755: cdef class _Int64Adjustment(Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment__Int64Adjustment {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment __pyx_base;
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment__Int64Adjustment *__pyx_vtabptr_7zipline_3lib_10adjustment__Int64Adjustment;

     0756:     """

     0757:     Base class for adjustments that operate on integral data.

     0758:

     0759:     This is private because we never actually operate on integers as data, but

     0760:     we use integer arrays to represent datetime and timedelta data.

     0761:     """

    +0762:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_16_Int64Adjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_16_Int64Adjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      Py_ssize_t __pyx_v_first_row;
      Py_ssize_t __pyx_v_last_row;
      Py_ssize_t __pyx_v_first_col;
      Py_ssize_t __pyx_v_last_col;
      __pyx_t_5numpy_int64_t __pyx_v_value;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 762, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 762, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 762, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 762, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 762, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 762, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 762, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 762, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 762, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 762, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 762, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 762, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 762, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_first_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_last_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 764, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_first_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 765, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_last_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 766, __pyx_L3_error)
        __pyx_v_value = __Pyx_PyLong_As_npy_int64(values[4]); if (unlikely((__pyx_v_value == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 762, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment._Int64Adjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_16_Int64Adjustment___init__(((struct __pyx_obj_7zipline_3lib_10adjustment__Int64Adjustment *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_16_Int64Adjustment___init__(struct __pyx_obj_7zipline_3lib_10adjustment__Int64Adjustment *__pyx_v_self, Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_col, Py_ssize_t __pyx_v_last_col, __pyx_t_5numpy_int64_t __pyx_v_value) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 762, 0, 0, 0, __PYX_ERR(0, 762, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 762, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 762, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._Int64Adjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0763:                  Py_ssize_t first_row,

     0764:                  Py_ssize_t last_row,

     0765:                  Py_ssize_t first_col,

     0766:                  Py_ssize_t last_col,

     0767:                  int64_t value):

    +0768:         super(_Int64Adjustment, self).__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment__Int64Adjustment), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +0769:             first_row=first_row,

      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 769, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0770:             last_row=last_row,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 770, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0771:             first_col=first_col,

      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_first_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

    +0772:             last_col=last_col,

      __pyx_t_8 = PyLong_FromSsize_t(__pyx_v_last_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 768, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_4, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 768, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_7, __pyx_t_9, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 768, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_8, __pyx_t_9, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 768, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0773:         )

    +0774:         self.value = value

      __pyx_v_self->value = __pyx_v_value;

     0775:

    +0776:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_16_Int64Adjustment_3__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_16_Int64Adjustment_3__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_16_Int64Adjustment_2__repr__(((struct __pyx_obj_7zipline_3lib_10adjustment__Int64Adjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_16_Int64Adjustment_2__repr__(struct __pyx_obj_7zipline_3lib_10adjustment__Int64Adjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94]))
      __Pyx_TraceStartFunc("__repr__", __pyx_f[0], 776, 0, 0, 0, __PYX_ERR(0, 776, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 776, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._Int64Adjustment.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0777:         return (

      __Pyx_XDECREF(__pyx_r);

    +0778:             "%s(first_row=%d, last_row=%d,"

      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 11 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 778, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 777, __pyx_L1_error));
      goto __pyx_L0;

     0779:             " first_col=%d, last_col=%d, value=%d)" % (

    +0780:                 type(self).__name__,

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0781:                 self.first_row,

      __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

    +0782:                 self.last_row,

      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0783:                 self.first_col,

      __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0784:                 self.last_col,

      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0785:                 self.value,

      __pyx_t_6 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_6), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8[0] = __pyx_t_2;
      __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u_first_row_2;
      __pyx_t_8[2] = __pyx_t_1;
      __pyx_t_8[3] = __pyx_mstate_global->__pyx_kp_u_last_row_3;
      __pyx_t_8[4] = __pyx_t_3;
      __pyx_t_8[5] = __pyx_mstate_global->__pyx_kp_u_first_col_2;
      __pyx_t_8[6] = __pyx_t_4;
      __pyx_t_8[7] = __pyx_mstate_global->__pyx_kp_u_last_col_3;
      __pyx_t_8[8] = __pyx_t_5;
      __pyx_t_8[9] = __pyx_mstate_global->__pyx_kp_u_value_2;
      __pyx_t_8[10] = __pyx_t_7;
      __pyx_t_8[11] = __pyx_mstate_global->__pyx_kp_u__5;

     0786:             )

     0787:         )

     0788:

     0789:

    +0790: cdef class Int64Overwrite(_Int64Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Int64Overwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment__Int64Adjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Int64Overwrite *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Int64Overwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_Int64Overwrite;

     0791:     """

     0792:     An adjustment that overwrites with an int.

     0793:

     0794:     Example

     0795:     -------

     0796:

     0797:     >>> import numpy as np

     0798:     >>> arr = np.arange(9, dtype=int).reshape(3, 3)

     0799:     >>> arr

     0800:     array([[ 0,  1,  2],

     0801:            [ 3,  4,  5],

     0802:            [ 6,  7,  8]])

     0803:

     0804:     >>> adj = Int64Overwrite(

     0805:     ...     first_row=1,

     0806:     ...     last_row=2,

     0807:     ...     first_col=1,

     0808:     ...     last_col=2,

     0809:     ...     value=0,

     0810:     ... )

     0811:     >>> adj.mutate(arr)

     0812:     >>> arr

     0813:     array([[ 0,  1,  2],

     0814:            [ 3,  0,  0],

     0815:            [ 6,  0,  0]])

     0816:     """

     0817:

    +0818:     cpdef mutate(self, int64_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_14Int64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_14Int64Overwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Int64Overwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __pyx_t_5numpy_int64_t __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 818, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 818, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Int64Overwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_14Int64Overwrite_1mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 818, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int64_t, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 818, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 818, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 818, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 818, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Int64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_14Int64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_14Int64Overwrite_mutate, "Int64Overwrite.mutate(self, int64_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_14Int64Overwrite_1mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_14Int64Overwrite_1mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_14Int64Overwrite_mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_14Int64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 818, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 818, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 818, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 818, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 818, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 818, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 818, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Int64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_14Int64Overwrite_mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Int64Overwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_14Int64Overwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Int64Overwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 818, 0, 0, 0, __PYX_ERR(0, 818, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 818, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_14Int64Overwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 818, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Int64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_14Int64Overwrite_1mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Int64Overwrite_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Int64Overwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0819:         cdef Py_ssize_t row, col

    +0820:         cdef int64_t value = self.value

      __pyx_t_7 = __pyx_v_self->__pyx_base.value;
      __pyx_v_value = __pyx_t_7;

     0821:

     0822:         # last_col + 1 because last_col should also be affected.

    +0823:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

     0824:             # last_row + 1 because last_row should also be affected.

    +0825:             for row in range(self.first_row, self.last_row + 1):

        __pyx_t_11 = (__pyx_v_self->__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_12 = __pyx_t_11;
        for (__pyx_t_13 = __pyx_v_self->__pyx_base.__pyx_base.first_row; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
          __pyx_v_row = __pyx_t_13;

    +0826:                 data[row, col] = value

          __pyx_t_14 = __pyx_v_row;
          __pyx_t_15 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_14 < 0) {
            __pyx_t_14 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 826, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_int64_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_14 * __pyx_v_data.strides[0]) ) + __pyx_t_15 * __pyx_v_data.strides[1]) )) = __pyx_v_value;
        }
      }

     0827:

     0828:

    +0829: cdef datetime_to_int(object datetimelike):

    static PyObject *__pyx_f_7zipline_3lib_10adjustment_datetime_to_int(PyObject *__pyx_v_datetimelike) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98]))
      __Pyx_TraceStartFunc("datetime_to_int", __pyx_f[0], 829, 0, 0, 0, __PYX_ERR(0, 829, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 829, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.datetime_to_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0830:     """

     0831:     Coerce a datetime-like object to the int format used by AdjustedArrays of

     0832:     Datetime64 type.

     0833:     """

    +0834:     if isinstance(datetimelike, Timestamp):

      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_IsInstance(__pyx_v_datetimelike, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {
    /* … */
      }

    +0835:         return datetimelike.value

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetimelike, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 6, 0, __PYX_ERR(0, 835, __pyx_L1_error));
        goto __pyx_L0;

     0836:

    +0837:     if not isinstance(datetimelike, datetime64):

      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_IsInstance(__pyx_v_datetimelike, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 837, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = (!__pyx_t_2);
      if (unlikely(__pyx_t_3)) {
    /* … */
      }

    +0838:         raise TypeError("Expected datetime64, got %s" % type(datetimelike))

        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_5 = __pyx_builtin_TypeError;
        __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_datetime64_got_s, ((PyObject *)Py_TYPE(__pyx_v_datetimelike))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 838, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 838, __pyx_L1_error)

     0839:

    +0840:     elif datetimelike.dtype.name != 'datetime64[ns]':

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetimelike, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 840, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_datetime64_ns, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 840, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(__pyx_t_3)) {
    /* … */
      }

    +0841:         raise TypeError(

        __pyx_t_1 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_6 = __pyx_builtin_TypeError;

     0842:             "Expected datetime64[ns], got %s",

    +0843:             datetimelike.dtype.name,

        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_datetimelike, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Expected_datetime64_ns_got_s, __pyx_t_8};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 841, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 841, __pyx_L1_error)

     0844:         )

     0845:

    +0846:     return datetimelike.astype(int64)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __pyx_v_datetimelike;
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8};
        __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_astype, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 35, 0, __PYX_ERR(0, 846, __pyx_L1_error));
      goto __pyx_L0;

     0847:

     0848:

    +0849: cdef class Datetime64Adjustment(_Int64Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Datetime64Adjustment {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment__Int64Adjustment __pyx_base;
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Datetime64Adjustment *__pyx_vtabptr_7zipline_3lib_10adjustment_Datetime64Adjustment;

     0850:     """

     0851:     Base class for adjustments that operate on Datetime64 data.

     0852:

     0853:     Notes

     0854:     -----

     0855:     Numpy stores datetime64 values in arrays of type int64.  There's no

     0856:     straightforward way to work with statically-typed datetime64 data, so

     0857:     instead we work with int64 values everywhere, and we do validation/coercion

     0858:     at API boundaries.

     0859:     """

    +0860:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_20Datetime64Adjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_20Datetime64Adjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      Py_ssize_t __pyx_v_first_row;
      Py_ssize_t __pyx_v_last_row;
      Py_ssize_t __pyx_v_first_col;
      Py_ssize_t __pyx_v_last_col;
      PyObject *__pyx_v_value = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 860, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 860, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 860, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 860, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 860, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 860, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 860, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 860, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 860, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 860, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 860, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 860, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 860, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_first_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_last_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 862, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_first_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 863, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_last_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L3_error)
        __pyx_v_value = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 860, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime64Adjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_20Datetime64Adjustment___init__(((struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Adjustment *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_20Datetime64Adjustment___init__(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Adjustment *__pyx_v_self, Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_col, Py_ssize_t __pyx_v_last_col, PyObject *__pyx_v_value) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 860, 0, 0, 0, __PYX_ERR(0, 860, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 860, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 860, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime64Adjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0861:                  Py_ssize_t first_row,

     0862:                  Py_ssize_t last_row,

     0863:                  Py_ssize_t first_col,

     0864:                  Py_ssize_t last_col,

     0865:                  object value):

     0866:

    +0867:         super(Datetime64Adjustment, self).__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime64Adjustment), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +0868:             first_row=first_row,

      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 868, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0869:             last_row=last_row,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0870:             first_col=first_col,

      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_first_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

    +0871:             last_col=last_col,

      __pyx_t_8 = PyLong_FromSsize_t(__pyx_v_last_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);

    +0872:             value=datetime_to_int(value),

      __pyx_t_9 = __pyx_f_7zipline_3lib_10adjustment_datetime_to_int(__pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 867, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_10, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_4, __pyx_t_10, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_7, __pyx_t_10, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_8, __pyx_t_10, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_value, __pyx_t_9, __pyx_t_10, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0873:         )

     0874:

    +0875:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_20Datetime64Adjustment_3__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_20Datetime64Adjustment_3__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_20Datetime64Adjustment_2__repr__(((struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Adjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_20Datetime64Adjustment_2__repr__(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Adjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100]))
      __Pyx_TraceStartFunc("__repr__", __pyx_f[0], 875, 0, 0, 0, __PYX_ERR(0, 875, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 875, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime64Adjustment.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0876:         return (

      __Pyx_XDECREF(__pyx_r);

    +0877:             "%s(first_row=%d, last_row=%d,"

      __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_9, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 11 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 876, __pyx_L1_error));
      goto __pyx_L0;

     0878:             " first_col=%d, last_col=%d, value=%r)" % (

    +0879:                 type(self).__name__,

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0880:                 self.first_row,

      __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.__pyx_base.first_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

    +0881:                 self.last_row,

      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.__pyx_base.last_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0882:                 self.first_col,

      __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.__pyx_base.first_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0883:                 self.last_col,

      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.__pyx_base.last_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0884:                 datetime64(self.value, 'ns'),

      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->__pyx_base.value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7) != (0)) __PYX_ERR(0, 884, __pyx_L1_error);
      __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_ns);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_ns);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_mstate_global->__pyx_n_u_ns) != (0)) __PYX_ERR(0, 884, __pyx_L1_error);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_7), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9[0] = __pyx_t_2;
      __pyx_t_9[1] = __pyx_mstate_global->__pyx_kp_u_first_row_2;
      __pyx_t_9[2] = __pyx_t_1;
      __pyx_t_9[3] = __pyx_mstate_global->__pyx_kp_u_last_row_3;
      __pyx_t_9[4] = __pyx_t_3;
      __pyx_t_9[5] = __pyx_mstate_global->__pyx_kp_u_first_col_2;
      __pyx_t_9[6] = __pyx_t_4;
      __pyx_t_9[7] = __pyx_mstate_global->__pyx_kp_u_last_col_3;
      __pyx_t_9[8] = __pyx_t_5;
      __pyx_t_9[9] = __pyx_mstate_global->__pyx_kp_u_value_2;
      __pyx_t_9[10] = __pyx_t_8;
      __pyx_t_9[11] = __pyx_mstate_global->__pyx_kp_u__5;

     0885:             )

     0886:         )

     0887:

    +0888:     def __reduce__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_20Datetime64Adjustment_5__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_20Datetime64Adjustment_4__reduce__, "Datetime64Adjustment.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_20Datetime64Adjustment_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_20Datetime64Adjustment_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_20Datetime64Adjustment_4__reduce__};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_20Datetime64Adjustment_5__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_20Datetime64Adjustment_4__reduce__(((struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Adjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_20Datetime64Adjustment_4__reduce__(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Adjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101]))
      __Pyx_TraceStartFunc("__reduce__", __pyx_f[0], 888, 0, 0, 0, __PYX_ERR(0, 888, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 888, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime64Adjustment.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_20Datetime64Adjustment_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Datetime64Adjustment___reduce, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime64Adjustment, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_3) < (0)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0889:         return type(self), (

      __Pyx_XDECREF(__pyx_r);
    /* … */
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(0, 889, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 889, __pyx_L1_error);
      __pyx_t_7 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 889, __pyx_L1_error));
      goto __pyx_L0;

    +0890:             self.first_row,

      __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    /* … */
      __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 890, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 890, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 890, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 890, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 890, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;

    +0891:             self.last_row,

      __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.last_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

    +0892:             self.first_col,

      __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0893:             self.last_col,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.last_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0894:             datetime64(self.value, 'ns'),

      __pyx_t_6 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_datetime64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->__pyx_base.value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_6);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_9 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_8, __pyx_mstate_global->__pyx_n_u_ns};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }

     0895:         )

     0896:

     0897:

    +0898: cdef class Datetime64Overwrite(Datetime64Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Datetime64Overwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Datetime64Adjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Overwrite *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Datetime64Overwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_Datetime64Overwrite;

     0899:     """

     0900:     An adjustment that overwrites with a datetime.

     0901:

     0902:     This operates on int64 data which should be interpreted as nanoseconds

     0903:     since the epoch.

     0904:

     0905:     Example

     0906:     -------

     0907:

     0908:     >>> import numpy as np; import pandas as pd

     0909:     >>> dts = pd.date_range('2014', freq='D', periods=9, tz='UTC')

     0910:     >>> arr = dts.values.reshape(3, 3)

     0911:     >>> arr == np.datetime64(0, 'ns')

     0912:     array([[False, False, False],

     0913:            [False, False, False],

     0914:            [False, False, False]], dtype=bool)

     0915:     >>> adj = Datetime64Overwrite(

     0916:     ...     first_row=1,

     0917:     ...     last_row=2,

     0918:     ...     first_col=1,

     0919:     ...     last_col=2,

     0920:     ...     value=np.datetime64(0, 'ns'),

     0921:     ... )

     0922:     >>> adj.mutate(arr.view(np.int64))

     0923:     >>> arr == np.datetime64(0, 'ns')

     0924:     array([[False, False, False],

     0925:            [False,  True,  True],

     0926:            [False,  True,  True]], dtype=bool)

     0927:     """

    +0928:     cpdef mutate(self, int64_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_19Datetime64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_19Datetime64Overwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Overwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __pyx_t_5numpy_int64_t __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 928, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 928, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime64Overwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_19Datetime64Overwrite_1mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 928, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_int64_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_int64_t, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 928, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 928, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 928, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 928, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 928, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_19Datetime64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_19Datetime64Overwrite_mutate, "Datetime64Overwrite.mutate(self, int64_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_19Datetime64Overwrite_1mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_19Datetime64Overwrite_1mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_19Datetime64Overwrite_mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_19Datetime64Overwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 928, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 928, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 928, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 928, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 928, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_int64_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 928, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 928, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_19Datetime64Overwrite_mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Overwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_19Datetime64Overwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_Datetime64Overwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 928, 0, 0, 0, __PYX_ERR(0, 928, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 928, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_19Datetime64Overwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 928, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.Datetime64Overwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_19Datetime64Overwrite_1mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Datetime64Overwrite_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_Datetime64Overwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 928, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0929:         cdef Py_ssize_t row, col

    +0930:         cdef int64_t value = self.value

      __pyx_t_7 = __pyx_v_self->__pyx_base.__pyx_base.value;
      __pyx_v_value = __pyx_t_7;

     0931:

     0932:         # last_col + 1 because last_col should also be affected.

    +0933:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

     0934:             # last_row + 1 because last_row should also be affected.

    +0935:             for row in range(self.first_row, self.last_row + 1):

        __pyx_t_11 = (__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_12 = __pyx_t_11;
        for (__pyx_t_13 = __pyx_v_self->__pyx_base.__pyx_base.__pyx_base.first_row; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
          __pyx_v_row = __pyx_t_13;

    +0936:                 data[row, col] = value

          __pyx_t_14 = __pyx_v_row;
          __pyx_t_15 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_14 < 0) {
            __pyx_t_14 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 936, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_int64_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_14 * __pyx_v_data.strides[0]) ) + __pyx_t_15 * __pyx_v_data.strides[1]) )) = __pyx_v_value;
        }
      }

     0937:

     0938:

    +0939: cdef class _ObjectAdjustment(Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment__ObjectAdjustment {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment __pyx_base;
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment__ObjectAdjustment *__pyx_vtabptr_7zipline_3lib_10adjustment__ObjectAdjustment;

     0940:     """

     0941:     Base class for adjustments that operate on arbitrary objects.

     0942:

     0943:     We use only this for categorical data, where our data buffer is an array of

     0944:     indices into an array of unique Python string objects.

     0945:     """

    +0946:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_17_ObjectAdjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_17_ObjectAdjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      Py_ssize_t __pyx_v_first_row;
      Py_ssize_t __pyx_v_last_row;
      Py_ssize_t __pyx_v_first_col;
      Py_ssize_t __pyx_v_last_col;
      PyObject *__pyx_v_value = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 946, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 946, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 946, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 946, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 946, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 946, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 946, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 946, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 946, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 946, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 946, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 946, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 946, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_first_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 947, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_last_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 948, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_first_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_last_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L3_error)
        __pyx_v_value = values[4];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 946, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment._ObjectAdjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_17_ObjectAdjustment___init__(((struct __pyx_obj_7zipline_3lib_10adjustment__ObjectAdjustment *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_17_ObjectAdjustment___init__(struct __pyx_obj_7zipline_3lib_10adjustment__ObjectAdjustment *__pyx_v_self, Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_col, Py_ssize_t __pyx_v_last_col, PyObject *__pyx_v_value) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 946, 0, 0, 0, __PYX_ERR(0, 946, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 946, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 946, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._ObjectAdjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0947:                  Py_ssize_t first_row,

     0948:                  Py_ssize_t last_row,

     0949:                  Py_ssize_t first_col,

     0950:                  Py_ssize_t last_col,

     0951:                  object value):

    +0952:         super(_ObjectAdjustment, self).__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment__ObjectAdjustment), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +0953:             first_row=first_row,

      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0954:             last_row=last_row,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0955:             first_col=first_col,

      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_first_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

    +0956:             last_col=last_col,

      __pyx_t_8 = PyLong_FromSsize_t(__pyx_v_last_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 952, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_4, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 952, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_7, __pyx_t_9, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 952, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_8, __pyx_t_9, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 952, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0957:         )

    +0958:         self.value = value

      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __Pyx_GOTREF(__pyx_v_self->value);
      __Pyx_DECREF(__pyx_v_self->value);
      __pyx_v_self->value = __pyx_v_value;

     0959:

    +0960:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_17_ObjectAdjustment_3__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_17_ObjectAdjustment_3__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_17_ObjectAdjustment_2__repr__(((struct __pyx_obj_7zipline_3lib_10adjustment__ObjectAdjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_17_ObjectAdjustment_2__repr__(struct __pyx_obj_7zipline_3lib_10adjustment__ObjectAdjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104]))
      __Pyx_TraceStartFunc("__repr__", __pyx_f[0], 960, 0, 0, 0, __PYX_ERR(0, 960, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 960, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment._ObjectAdjustment.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0961:         return (

      __Pyx_XDECREF(__pyx_r);

    +0962:             "%s(first_row=%d, last_row=%d,"

      __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 11 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6));
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 961, __pyx_L1_error));
      goto __pyx_L0;

     0963:             " first_col=%d, last_col=%d, value=%r)" % (

    +0964:                 type(self).__name__,

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0965:                 self.first_row,

      __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

    +0966:                 self.last_row,

      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +0967:                 self.first_col,

      __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +0968:                 self.last_col,

      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +0969:                 self.value,

      __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_self->value), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 969, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7[0] = __pyx_t_2;
      __pyx_t_7[1] = __pyx_mstate_global->__pyx_kp_u_first_row_2;
      __pyx_t_7[2] = __pyx_t_1;
      __pyx_t_7[3] = __pyx_mstate_global->__pyx_kp_u_last_row_3;
      __pyx_t_7[4] = __pyx_t_3;
      __pyx_t_7[5] = __pyx_mstate_global->__pyx_kp_u_first_col_2;
      __pyx_t_7[6] = __pyx_t_4;
      __pyx_t_7[7] = __pyx_mstate_global->__pyx_kp_u_last_col_3;
      __pyx_t_7[8] = __pyx_t_5;
      __pyx_t_7[9] = __pyx_mstate_global->__pyx_kp_u_value_2;
      __pyx_t_7[10] = __pyx_t_6;
      __pyx_t_7[11] = __pyx_mstate_global->__pyx_kp_u__5;

     0970:             )

     0971:         )

     0972:

     0973:

    +0974: cdef class ObjectOverwrite(_ObjectAdjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_ObjectOverwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment__ObjectAdjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_ObjectOverwrite *, PyObject *, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_ObjectOverwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_ObjectOverwrite;

     0975:

    +0976:     cpdef mutate(self, object data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_15ObjectOverwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_15ObjectOverwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_ObjectOverwrite *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 976, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 976, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_ObjectOverwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_15ObjectOverwrite_1mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_data};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 976, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 976, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 976, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.ObjectOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_15ObjectOverwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_15ObjectOverwrite_mutate, "ObjectOverwrite.mutate(self, data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_15ObjectOverwrite_1mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_15ObjectOverwrite_1mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_15ObjectOverwrite_mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_15ObjectOverwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_data = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 976, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 976, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 976, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 976, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 976, __pyx_L3_error)
        }
        __pyx_v_data = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 976, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.ObjectOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_15ObjectOverwrite_mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_ObjectOverwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_15ObjectOverwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_ObjectOverwrite *__pyx_v_self, PyObject *__pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 976, 0, 0, 0, __PYX_ERR(0, 976, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_15ObjectOverwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 976, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.ObjectOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_15ObjectOverwrite_1mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ObjectOverwrite_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_ObjectOverwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0977:         # data is an object here because this is intended to be used with a

     0978:         # `zipline.lib.LabelArray`.

     0979:

     0980:         # We don't do this in a loop because we only want to look up the label

     0981:         # code in the array's categories once.

    +0982:         data.set_scalar(

      __pyx_t_2 = __pyx_v_data;
      __Pyx_INCREF(__pyx_t_2);

     0983:             (

    +0984:                 slice(self.first_row, self.last_row + 1),

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyLong_FromSsize_t((__pyx_v_self->__pyx_base.__pyx_base.last_row + 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PySlice_New(__pyx_t_4, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    /* … */
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 984, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 984, __pyx_L1_error);
      __pyx_t_6 = 0;
      __pyx_t_7 = 0;

    +0985:                 slice(self.first_col, self.last_col + 1),

      __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.__pyx_base.first_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyLong_FromSsize_t((__pyx_v_self->__pyx_base.__pyx_base.last_col + 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PySlice_New(__pyx_t_3, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     0986:             ),

    +0987:             self.value,

      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_self->__pyx_base.value};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_set_scalar, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0988:         )

     0989:

     0990:

    +0991: cdef class BooleanAdjustment(Adjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_BooleanAdjustment {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_Adjustment __pyx_base;
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_BooleanAdjustment *__pyx_vtabptr_7zipline_3lib_10adjustment_BooleanAdjustment;

     0992:     """

     0993:     Base class for adjustments that operate on boolean data.

     0994:

     0995:     Notes

     0996:     -----

     0997:     Numpy stores boolean values in arrays of type uint8.  There's no

     0998:     straightforward way to work with statically-typed boolean data, so

     0999:     instead we work with uint8 values everywhere, and we do validation/coercion

     1000:     at API boundaries.

     1001:     """

    +1002:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_3lib_10adjustment_17BooleanAdjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_3lib_10adjustment_17BooleanAdjustment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      Py_ssize_t __pyx_v_first_row;
      Py_ssize_t __pyx_v_last_row;
      Py_ssize_t __pyx_v_first_col;
      Py_ssize_t __pyx_v_last_col;
      int __pyx_v_value;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_first_row,&__pyx_mstate_global->__pyx_n_u_last_row,&__pyx_mstate_global->__pyx_n_u_first_col,&__pyx_mstate_global->__pyx_n_u_last_col,&__pyx_mstate_global->__pyx_n_u_value,0};
      PyObject* values[5] = {0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1002, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1002, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1002, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1002, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1002, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1002, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1002, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, i); __PYX_ERR(0, 1002, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 5)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1002, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1002, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1002, __pyx_L3_error)
          values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1002, __pyx_L3_error)
          values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1002, __pyx_L3_error)
        }
        __pyx_v_first_row = __Pyx_PyIndex_AsSsize_t(values[0]); if (unlikely((__pyx_v_first_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L3_error)
        __pyx_v_last_row = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_last_row == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L3_error)
        __pyx_v_first_col = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_first_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1005, __pyx_L3_error)
        __pyx_v_last_col = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_last_col == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1006, __pyx_L3_error)
        __pyx_v_value = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1002, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.lib.adjustment.BooleanAdjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_17BooleanAdjustment___init__(((struct __pyx_obj_7zipline_3lib_10adjustment_BooleanAdjustment *)__pyx_v_self), __pyx_v_first_row, __pyx_v_last_row, __pyx_v_first_col, __pyx_v_last_col, __pyx_v_value);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_3lib_10adjustment_17BooleanAdjustment___init__(struct __pyx_obj_7zipline_3lib_10adjustment_BooleanAdjustment *__pyx_v_self, Py_ssize_t __pyx_v_first_row, Py_ssize_t __pyx_v_last_row, Py_ssize_t __pyx_v_first_col, Py_ssize_t __pyx_v_last_col, int __pyx_v_value) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 1002, 0, 0, 0, __PYX_ERR(0, 1002, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 1002, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 1002, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.BooleanAdjustment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     1003:                  Py_ssize_t first_row,

     1004:                  Py_ssize_t last_row,

     1005:                  Py_ssize_t first_col,

     1006:                  Py_ssize_t last_col,

     1007:                  bint value):

     1008:

    +1009:         super(BooleanAdjustment, self).__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_BooleanAdjustment), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +1010:             first_row=first_row,

      __pyx_t_5 = PyLong_FromSsize_t(__pyx_v_first_row); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1010, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +1011:             last_row=last_row,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_last_row); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +1012:             first_col=first_col,

      __pyx_t_7 = PyLong_FromSsize_t(__pyx_v_first_col); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);

    +1013:             last_col=last_col,

      __pyx_t_8 = PyLong_FromSsize_t(__pyx_v_last_col); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1009, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_row, __pyx_t_5, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1009, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_row, __pyx_t_4, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1009, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_col, __pyx_t_7, __pyx_t_9, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1009, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_last_col, __pyx_t_8, __pyx_t_9, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 1009, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1014:         )

    +1015:         self.value = value

      __pyx_v_self->value = __pyx_v_value;

     1016:

    +1017:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_17BooleanAdjustment_3__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_17BooleanAdjustment_3__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_17BooleanAdjustment_2__repr__(((struct __pyx_obj_7zipline_3lib_10adjustment_BooleanAdjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_17BooleanAdjustment_2__repr__(struct __pyx_obj_7zipline_3lib_10adjustment_BooleanAdjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110]))
      __Pyx_TraceStartFunc("__repr__", __pyx_f[0], 1017, 0, 0, 0, __PYX_ERR(0, 1017, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 1017, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.BooleanAdjustment.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1018:         return (

      __Pyx_XDECREF(__pyx_r);

    +1019:             "%s(first_row=%d, last_row=%d,"

      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 12, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 11 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 1018, __pyx_L1_error));
      goto __pyx_L0;

     1020:             " first_col=%d, last_col=%d, value=%r)" % (

    +1021:                 type(self).__name__,

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1022:                 self.first_row,

      __pyx_t_1 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

    +1023:                 self.last_row,

      __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_row, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1023, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +1024:                 self.first_col,

      __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.first_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +1025:                 self.last_col,

      __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_self->__pyx_base.last_col, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1025, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

    +1026:                 bool(self.value),

      __pyx_t_6 = __Pyx_PyLong_From_npy_uint8(__pyx_v_self->value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1026, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1026, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_9[0] = __pyx_t_2;
      __pyx_t_9[1] = __pyx_mstate_global->__pyx_kp_u_first_row_2;
      __pyx_t_9[2] = __pyx_t_1;
      __pyx_t_9[3] = __pyx_mstate_global->__pyx_kp_u_last_row_3;
      __pyx_t_9[4] = __pyx_t_3;
      __pyx_t_9[5] = __pyx_mstate_global->__pyx_kp_u_first_col_2;
      __pyx_t_9[6] = __pyx_t_4;
      __pyx_t_9[7] = __pyx_mstate_global->__pyx_kp_u_last_col_3;
      __pyx_t_9[8] = __pyx_t_5;
      __pyx_t_9[9] = __pyx_mstate_global->__pyx_kp_u_value_2;
      __pyx_t_9[10] = __pyx_t_8;
      __pyx_t_9[11] = __pyx_mstate_global->__pyx_kp_u__5;

     1027:             )

     1028:         )

     1029:

    +1030:     def __reduce__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_17BooleanAdjustment_5__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_17BooleanAdjustment_4__reduce__, "BooleanAdjustment.__reduce__(self)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_17BooleanAdjustment_5__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_17BooleanAdjustment_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_17BooleanAdjustment_4__reduce__};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_17BooleanAdjustment_5__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_17BooleanAdjustment_4__reduce__(((struct __pyx_obj_7zipline_3lib_10adjustment_BooleanAdjustment *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_17BooleanAdjustment_4__reduce__(struct __pyx_obj_7zipline_3lib_10adjustment_BooleanAdjustment *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111]))
      __Pyx_TraceStartFunc("__reduce__", __pyx_f[0], 1030, 0, 0, 0, __PYX_ERR(0, 1030, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 1030, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.BooleanAdjustment.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_17BooleanAdjustment_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanAdjustment___reduce, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_BooleanAdjustment, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_3) < (0)) __PYX_ERR(0, 1030, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +1031:         return type(self), (

      __Pyx_XDECREF(__pyx_r);
    /* … */
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(0, 1031, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 1031, __pyx_L1_error);
      __pyx_t_7 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 1031, __pyx_L1_error));
      goto __pyx_L0;

    +1032:             self.first_row,

      __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.first_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    /* … */
      __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1032, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1032, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 1032, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 1032, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 1032, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5) != (0)) __PYX_ERR(0, 1032, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;

    +1033:             self.last_row,

      __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.last_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

    +1034:             self.first_col,

      __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.first_col); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1034, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

    +1035:             self.last_col,

      __pyx_t_4 = PyLong_FromSsize_t(__pyx_v_self->__pyx_base.last_col); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1035, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

    +1036:             bool(self.value),

      __pyx_t_5 = __Pyx_PyLong_From_npy_uint8(__pyx_v_self->value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1036, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

     1037:         )

     1038:

     1039:

    +1040: cdef class BooleanOverwrite(BooleanAdjustment):

    struct __pyx_vtabstruct_7zipline_3lib_10adjustment_BooleanOverwrite {
      struct __pyx_vtabstruct_7zipline_3lib_10adjustment_BooleanAdjustment __pyx_base;
      PyObject *(*mutate)(struct __pyx_obj_7zipline_3lib_10adjustment_BooleanOverwrite *, __Pyx_memviewslice, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_3lib_10adjustment_BooleanOverwrite *__pyx_vtabptr_7zipline_3lib_10adjustment_BooleanOverwrite;

     1041:     """

     1042:     An adjustment that overwrites with a boolean.

     1043:

     1044:     This operates on uint8 data.

     1045:     """

    +1046:     cpdef mutate(self, uint8_t[:, :] data):

    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_16BooleanOverwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_3lib_10adjustment_16BooleanOverwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_BooleanOverwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data, int __pyx_skip_dispatch) {
      Py_ssize_t __pyx_v_row;
      Py_ssize_t __pyx_v_col;
      __pyx_t_5numpy_uint8_t __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114]))
      __Pyx_TraceStartFunc("mutate", __pyx_f[0], 1046, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 1046, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_BooleanOverwrite &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_mutate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_3lib_10adjustment_16BooleanOverwrite_1mutate)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 1046, __pyx_L1_error) }
            __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_v_data, 2, (PyObject *(*)(char *)) __pyx_memview_get_nn___pyx_t_5numpy_uint8_t, (int (*)(char *, PyObject *)) __pyx_memview_set_nn___pyx_t_5numpy_uint8_t, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1046, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_6 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 1046, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 1046, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 1046, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.lib.adjustment.BooleanOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_16BooleanOverwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_3lib_10adjustment_16BooleanOverwrite_mutate, "BooleanOverwrite.mutate(self, uint8_t[:, :] data)");
    static PyMethodDef __pyx_mdef_7zipline_3lib_10adjustment_16BooleanOverwrite_1mutate = {"mutate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_3lib_10adjustment_16BooleanOverwrite_1mutate, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_3lib_10adjustment_16BooleanOverwrite_mutate};
    static PyObject *__pyx_pw_7zipline_3lib_10adjustment_16BooleanOverwrite_1mutate(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("mutate (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1046, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1046, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "mutate", 0) < (0)) __PYX_ERR(0, 1046, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, i); __PYX_ERR(0, 1046, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1046, __pyx_L3_error)
        }
        __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dsds_nn___pyx_t_5numpy_uint8_t(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 1046, __pyx_L3_error)
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("mutate", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1046, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_AddTraceback("zipline.lib.adjustment.BooleanOverwrite.mutate", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_3lib_10adjustment_16BooleanOverwrite_mutate(((struct __pyx_obj_7zipline_3lib_10adjustment_BooleanOverwrite *)__pyx_v_self), __pyx_v_data);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_3lib_10adjustment_16BooleanOverwrite_mutate(struct __pyx_obj_7zipline_3lib_10adjustment_BooleanOverwrite *__pyx_v_self, __Pyx_memviewslice __pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114]))
      __Pyx_TraceStartFunc("mutate (wrapper)", __pyx_f[0], 1046, 0, 0, 0, __PYX_ERR(0, 1046, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_v_data.memview)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(0, 1046, __pyx_L1_error) }
      __pyx_t_1 = __pyx_f_7zipline_3lib_10adjustment_16BooleanOverwrite_mutate(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_3lib_10adjustment_16BooleanOverwrite_1mutate, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_BooleanOverwrite_mutate, NULL, __pyx_mstate_global->__pyx_n_u_zipline_lib_adjustment, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_3lib_10adjustment_BooleanOverwrite, __pyx_mstate_global->__pyx_n_u_mutate, __pyx_t_3) < (0)) __PYX_ERR(0, 1046, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     1047:         cdef Py_ssize_t row, col

    +1048:         cdef uint8_t value = self.value

      __pyx_t_7 = __pyx_v_self->__pyx_base.value;
      __pyx_v_value = __pyx_t_7;

     1049:

     1050:         # last_col + 1 because last_col should also be affected.

    +1051:         for col in range(self.first_col, self.last_col + 1):

      __pyx_t_8 = (__pyx_v_self->__pyx_base.__pyx_base.last_col + 1);
      __pyx_t_9 = __pyx_t_8;
      for (__pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base.first_col; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
        __pyx_v_col = __pyx_t_10;

     1052:             # last_row + 1 because last_row should also be affected.

    +1053:             for row in range(self.first_row, self.last_row + 1):

        __pyx_t_11 = (__pyx_v_self->__pyx_base.__pyx_base.last_row + 1);
        __pyx_t_12 = __pyx_t_11;
        for (__pyx_t_13 = __pyx_v_self->__pyx_base.__pyx_base.first_row; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
          __pyx_v_row = __pyx_t_13;

    +1054:                 data[row, col] = value

          __pyx_t_14 = __pyx_v_row;
          __pyx_t_15 = __pyx_v_col;
          __pyx_t_16 = -1;
          if (__pyx_t_14 < 0) {
            __pyx_t_14 += __pyx_v_data.shape[0];
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_16 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_v_data.shape[0])) __pyx_t_16 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_v_data.shape[1];
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_v_data.shape[1])) __pyx_t_16 = 1;
          if (unlikely(__pyx_t_16 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_16);
            __PYX_ERR(0, 1054, __pyx_L1_error)
          }
          *((__pyx_t_5numpy_uint8_t *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_data.data + __pyx_t_14 * __pyx_v_data.strides[0]) ) + __pyx_t_15 * __pyx_v_data.strides[1]) )) = __pyx_v_value;
        }
      }